# CVE-2026-31745: reset: gpio: fix double free in reset_add_gpio_aux_device() error path

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-05-01T14:14:39.529Z
- Modified: 2026-11-11T21:10:00.200Z
- Weaknesses: CWE-415
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

reset: gpio: fix double free in reset_add_gpio_aux_device() error path

When __auxiliary_device_add() fails, reset_add_gpio_aux_device()
calls auxiliary_device_uninit(adev).

The device release callback reset_gpio_aux_device_release() frees
adev, but the current error path then calls kfree(adev) again,
causing a double free.

Keep kfree(adev) for the auxiliary_device_init() failure path, but
avoid freeing adev after auxiliary_device_uninit().

(As written by CVE List.)

## Affected

- Linux Linux: from 5fc4e4cf7a2268b5f73700fd1e8d02159f2417d8 before 1de465753220deb41569cf2add87bbb0673731db; from 5fc4e4cf7a2268b5f73700fd1e8d02159f2417d8 before fbffb8c7c7bb4d38e9f65e0bee446685011de5d8; 6.19 (not affected: before 6.19; from 6.19.12 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.19 before 6.19.12; 7.0

## References

- <https://git.kernel.org/stable/c/1de465753220deb41569cf2add87bbb0673731db> (patch)
- <https://git.kernel.org/stable/c/fbffb8c7c7bb4d38e9f65e0bee446685011de5d8> (patch)

## Sources

- CVE List: [CVE-2026-31745](https://www.cve.org/CVERecord?id=CVE-2026-31745), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2026-31745](https://nvd.nist.gov/vuln/detail/CVE-2026-31745), Public domain, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-31745 · Whole record: https://cve.day/CVE-2026-31745.json · Rebuilt by cve.day 2026-11-25T22:59:20.363Z
