CVE-2026-99989: gpiolib: Free chip resources when allocating the label fails
In the Linux kernel, the following vulnerability has been resolved:
gpiolib: Free chip resources when allocating the label fails
If descsetlabel() fails after the chip's request callback succeeds, gpiodrequestcommit() clears GPIODFLAGREQUESTED without calling the free callback. The caller receives an error and has no GPIO to release, leaving resources acquired by the request callback held.
Call the chip's free callback, if present, before clearing the requested bit on label allocation failure. Leave request callback errors on the existing path to avoid freeing a failed request.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1 - Compensating control
On label allocation failure, call the chip’s free callback if present before clearing the requested bit.
Event History
Frequently Asked Questions
What condition is required for the resource leak to occur?
A GPIO chip request callback must succeed, and allocation of the GPIO label must then fail in desc_set_label(). The issue only applies when the chip provides resources through its request callback and a corresponding free callback is available but was not invoked on this failure path.
What is the operational impact of the vulnerable behavior?
The caller receives an error and does not obtain a GPIO handle to release, while resources acquired by the chip request callback remain held. This can leave chip resources unavailable until they are otherwise recovered.
How can I determine whether a system is affected?
Review the kernel's gpiod_request_commit() failure handling after desc_set_label() fails. An affected implementation clears GPIOD_FLAG_REQUESTED without first calling the GPIO chip free callback after a successful request callback.