CVE-2026-31732
Resource Leak in Linux Kernel GPIO Subsystem
Publication date: 2026-05-01
Last updated on: 2026-05-01
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
What immediate steps should I take to mitigate this vulnerability?
The vulnerability is fixed in the Linux kernel by correcting resource leaks in the gpiochip_add_data_with_key() function. To mitigate this vulnerability, you should update your Linux kernel to a version that includes the fix for this issue.
- Identify your current Linux kernel version.
- Check for available kernel updates from your distribution or kernel source that include the fix.
- Apply the kernel update and reboot your system to use the patched kernel.
- Avoid using unpatched kernels where gpiochip_add_data_with_key() may leak resources on error paths.
Can you explain this vulnerability to me?
This vulnerability is related to the Linux kernel's GPIO subsystem, specifically in the function gpiochip_add_data_with_key(). The issue arises because the device release function (gdev->dev.release) is unset, which causes the reference count to the device (gdev->dev) not to be properly decremented during error handling. This leads to resource leaks when errors occur.
The fix involves dropping the reference on errors and reordering instructions to simplify error handling, ensuring that resources are properly freed and preventing leaks or double frees.
How can this vulnerability impact me? :
This vulnerability can lead to resource leaks in the Linux kernel's GPIO subsystem. Resource leaks may cause increased memory usage or exhaustion of kernel resources, potentially leading to system instability or degraded performance.