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

Published May 1, 2026
·
Updated

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

9 affected components
Linux Linux kernel
Linux Linux kernel>=6.19<6.19.12
Linux Linux kernel=7.0-rc1
Linux Linux kernel=7.0-rc2
Linux Linux kernel=7.0-rc3
Linux Linux kernel=7.0-rc4
Linux Linux kernel=7.0-rc5
Linux Linux kernel=7.0-rc6
Linux Linux kernel=7.0-rc7

Event History

May 1, 2026
CVE Published
via MITRE·02:14 PM
Data Sourced
via MITRE·02:14 PM
Description
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

4

What should be done if patching cannot be performed immediately?

The provided data identifies no workaround or mitigation. Apply the available patch when possible.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203