{"id":"CVE-2026-31732","url":"https://www.cyber-defence.io/tools/cve/CVE-2026-31732","generatedAt":"2026-10-28T05:02:26.858Z","title":"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.","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ngpio: Fix resource leaks on errors in gpiochip_add_data_with_key()\n\nSince commit aab5c6f20023 (\"gpio: set device type for GPIO chips\"),\n`gdev->dev.release` is unset.  As a result, the reference count to\n`gdev->dev` isn't dropped on the error handling paths.\n\nDrop the reference on errors.\n\nAlso reorder the instructions to make the error handling simpler.\nNow gpiochip_add_data_with_key() roughly looks like:\n\n   >>> Some memory allocation.  Go to ERR ZONE 1 on errors.\n   >>> device_initialize().\n\n   gpiodev_release() takes over the responsibility for freeing the\n   resources of `gdev->dev`.  The subsequent error handling paths\n   shouldn't go through ERR ZONE 1 again which leads to double free.\n\n   >>> Some initialization mainly on `gdev`.\n   >>> The rest of initialization.  Go to ERR ZONE 2 on errors.\n   >>> Chip registration success and exit.\n\n   >>> ERR ZONE 2.  gpio_device_put() and exit.\n   >>> ERR ZONE 1.","published":"2026-05-01T15:16:36.000Z","lastModified":"2026-07-04T12:16:56.000Z","status":"Modified","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","cvss":{"version":"3.1","score":5.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"},"cwe":["CWE-401"],"affected":["linux/linux kernel"],"epss":{"score":0.00122,"percentile":0.01955,"date":"2026-10-27","history":[]},"kev":{"listed":false},"exploits":{"count":0,"verified":false,"firstPublished":null,"source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[]},"verdict":{"level":"low","text":"Lower severity and a low EPSS score (0.12%). Track it; it rarely justifies an emergency change on its own."},"changes":[],"references":[{"url":"https://git.kernel.org/stable/c/16fdabe143fce2cbf89139677728e17e21b46c28","tags":["Patch"],"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/a500e1837c4266ddb05b39b3e1cc71f49a43ffa5","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/f0cf9c7b7c281956cc0dec163132cd96f76e1d60","tags":["Patch"],"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/fb4584d2b324c522404c733c65840a1a6519ada8","tags":["Patch"],"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-31732","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}