CVE-2026-31732
MediumIn 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 3.1 score
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-401CVE-2026-31732 is a Memory Leak vulnerability
What is Memory Leak?
The product does not release memory after use, causing gradual resource exhaustion. Learn more on MITRE CWE
Affected versions
Linux kernel versions
6.9
and later are affected. Fixed in
6.18.22,
6.19.12,
7.0
and their respective stable series.
References
The following references provide additional information about CVE-2026-31732 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/16fdabe143fce2cbf89139677728e17e21b46c28
-
PatchKernel patch commithttps://git.kernel.org/stable/c/f0cf9c7b7c281956cc0dec163132cd96f76e1d60
-
PatchKernel patch commithttps://git.kernel.org/stable/c/fb4584d2b324c522404c733c65840a1a6519ada8
Frequently asked questions
-
What is CVE-2026-31732?
CVE-2026-31732 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as a Memory Leak flaw (CWE-401) . It affects Linux kernel versions from 6.9 onward and has been patched in 6.18.22, 6.19.12 and 7.0. CVE-2026-31732 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2026-31732?
CVE-2026-31732 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2026-31732?
Yes — CVE-2026-31732 has been patched. Fixed versions include 6.18.22, 6.19.12 and 7.0. If you are running Linux kernel 6.9 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2026-31732 actively exploited?
No — CVE-2026-31732 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Memory Leak (CWE-401)?
The product does not release memory after use, causing gradual resource exhaustion. View CWE-401 on MITRE CWE →