reset: gpio: fix double free in reset_add_gpio_aux_device() error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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().
From the CVE record · Linux
The Linux kernel's GPIO reset auxiliary-device error path can free the same allocation twice when __auxiliary_device_add() fails. The input does not establish how an attacker could trigger this failure or whether authentication, local access, or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.