Linux hwe edge: In the Linux kernel, the following vulnerability has been resolved: gpio: Fix resource leaks on errors in gpiochip_add_data_with_key() Since commit… (CVE-2026-31732)
In the Linux kernel, the following vulnerability has been resolved: gpio: Fix resource leaks on errors in gpiochip_add_data_with_key() Since commit aab5c6f20023 ("gpio: set device type for GPIO chips"), `gdev->dev.release` is unset. As a result, the reference count to `gdev->dev` isn't dropped on the error handling paths. Drop the reference on errors. Also reorder the instructions to make the error handling simpler. Now gpiochip_add_data_with_key() roughly looks like: >>> Some memory allocation. Go to ERR ZONE 1 on errors. >>> device_initialize(). gpiodev_release() takes over the responsibility for freeing the resources of `gdev->dev`. The subsequent error handling paths shouldn't go through ERR ZONE 1 again which leads to double free. >>> Some initialization mainly on `gdev`. >>> The rest of initialization. Go to ERR ZONE 2 on errors. >>> Chip registration success and exit. >>> ERR ZONE 2. gpio_device_put() and exit. >>> ERR ZONE 1.
AI Analysis
Technical Summary
The vulnerability in the Linux kernel gpio subsystem stems from a change where the device release callback (gdev->dev.release) was unset, causing the reference count to the device (gdev->dev) not to be decremented on error paths in gpiochip_add_data_with_key(). This led to resource leaks (CWE-401). The patch drops the reference on error paths and reorders initialization steps to avoid double frees and simplify error handling. The vulnerability does not impact confidentiality or integrity but affects availability due to resource leaks.
Potential Impact
The vulnerability causes resource leaks in the Linux kernel gpio subsystem, which can degrade system availability or stability. There is no impact on confidentiality or integrity. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, monitor for updates from the Linux kernel maintainers regarding this issue.
Linux hwe edge: In the Linux kernel, the following vulnerability has been resolved: gpio: Fix resource leaks on errors in gpiochip_add_data_with_key() Since commit… (CVE-2026-31732)
Description
In the Linux kernel, the following vulnerability has been resolved: gpio: Fix resource leaks on errors in gpiochip_add_data_with_key() Since commit aab5c6f20023 ("gpio: set device type for GPIO chips"), `gdev->dev.release` is unset. As a result, the reference count to `gdev->dev` isn't dropped on the error handling paths. Drop the reference on errors. Also reorder the instructions to make the error handling simpler. Now gpiochip_add_data_with_key() roughly looks like: >>> Some memory allocation. Go to ERR ZONE 1 on errors. >>> device_initialize(). gpiodev_release() takes over the responsibility for freeing the resources of `gdev->dev`. The subsequent error handling paths shouldn't go through ERR ZONE 1 again which leads to double free. >>> Some initialization mainly on `gdev`. >>> The rest of initialization. Go to ERR ZONE 2 on errors. >>> Chip registration success and exit. >>> ERR ZONE 2. gpio_device_put() and exit. >>> ERR ZONE 1.
CVSS v3.1
Score 5.5medium
Affected software
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in the Linux kernel gpio subsystem stems from a change where the device release callback (gdev->dev.release) was unset, causing the reference count to the device (gdev->dev) not to be decremented on error paths in gpiochip_add_data_with_key(). This led to resource leaks (CWE-401). The patch drops the reference on error paths and reorders initialization steps to avoid double frees and simplify error handling. The vulnerability does not impact confidentiality or integrity but affects availability due to resource leaks.
Potential Impact
The vulnerability causes resource leaks in the Linux kernel gpio subsystem, which can degrade system availability or stability. There is no impact on confidentiality or integrity. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, monitor for updates from the Linux kernel maintainers regarding this issue.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-fv85-jgqf-p95r
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-31732"]
- Ecosystems
- []
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a498a7827e9c7971936effc
Added to database: 07/04/2026, 22:34:32 UTC
Last enriched: 07/04/2026, 23:07:07 UTC
Last updated: 07/31/2026, 19:30:30 UTC
Views: 28
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.