CVE-2026-31732
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
01/05/2026
Last modified:
07/05/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
gpio: Fix resource leaks on errors in gpiochip_add_data_with_key()<br />
<br />
Since commit aab5c6f20023 ("gpio: set device type for GPIO chips"),<br />
`gdev->dev.release` is unset. As a result, the reference count to<br />
`gdev->dev` isn&#39;t dropped on the error handling paths.<br />
<br />
Drop the reference on errors.<br />
<br />
Also reorder the instructions to make the error handling simpler.<br />
Now gpiochip_add_data_with_key() roughly looks like:<br />
<br />
>>> Some memory allocation. Go to ERR ZONE 1 on errors.<br />
>>> device_initialize().<br />
<br />
gpiodev_release() takes over the responsibility for freeing the<br />
resources of `gdev->dev`. The subsequent error handling paths<br />
shouldn&#39;t go through ERR ZONE 1 again which leads to double free.<br />
<br />
>>> Some initialization mainly on `gdev`.<br />
>>> The rest of initialization. Go to ERR ZONE 2 on errors.<br />
>>> Chip registration success and exit.<br />
<br />
>>> ERR ZONE 2. gpio_device_put() and exit.<br />
>>> ERR ZONE 1.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.9 (including) | 6.18.22 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.19 (including) | 6.19.12 (excluding) |
| cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page



