CVE-2026-31745: reset: gpio: fix double free in reset_add_gpio_aux_device() error path
In the Linux kernel, the following vulnerability has been resolved:
reset: gpio: fix double free in resetaddgpioauxdevice() error path
When auxiliarydeviceadd() fails, resetaddgpioauxdevice() calls auxiliarydeviceuninit(adev).
The device release callback resetgpioauxdevicerelease() frees adev, but the current error path then calls kfree(adev) again, causing a double free.
Keep kfree(adev) for the auxiliarydeviceinit() failure path, but avoid freeing adev after auxiliarydeviceuninit().
Affected Software
Remediation
Event History
Frequently Asked Questions
Who can exploit this vulnerability?
Exploitation requires local access and low privileges. No user interaction is required, and the vulnerable error path is reached when __auxiliary_device_add() fails during GPIO reset auxiliary-device setup.
What is the impact if the error path is triggered?
The error handling can free the same auxiliary-device allocation twice. The stated CVSS vector rates confidentiality, integrity, and availability impacts as high.
Are systems affected during normal successful device initialization?
The described double free is specific to the failure path after __auxiliary_device_add() fails. The separate auxiliary_device_init() failure path retains its kfree() behavior.
What should be done if patching cannot be performed immediately?
The provided data identifies no workaround or mitigation. Apply the available patch when possible.