CVE-2026-31732

MediumCVSS 5.5/10Last modified Nov 11, 2026

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.

Metrics

CVSS 3.1 5.5/10CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Weakness enumeration

Affected software

VendorProductVersions
LinuxLinux>= aab5c6f200238ac45001bec3d5494fff8438a8dc, < a500e1837c4266ddb05b39b3e1cc71f49a43ffa5; >= aab5c6f200238ac45001bec3d5494fff8438a8dc, < f0cf9c7b7c281956cc0dec163132cd96f76e1d60; >= aab5c6f200238ac45001bec3d5494fff8438a8dc, < fb4584d2b324c522404c733c65840a1a6519ada8; >= aab5c6f200238ac45001bec3d5494fff8438a8dc, < 16fdabe143fce2cbf89139677728e17e21b46c28
LinuxLinux6.9

References

Timeline

Published
May 1, 2026
Last modified
Nov 11, 2026
NVD status
Modified

Related CVEs from 2026

CVE-2026-317335.5In the Linux kernel, the following vulnerability has been resolved: sched_ext: Fix stale direct dispatch state in ddsp_dsq_id @p->scx.ddspCVE-2026-317345.5In the Linux kernel, the following vulnerability has been resolved: sched_ext: Fix is_bpf_migration_disabled() false negative on non-PREEMPCVE-2026-317358.8In the Linux kernel, the following vulnerability has been resolved: iommupt: Fix short gather if the unmap goes into a large mapping unmapCVE-2026-317365.5In the Linux kernel, the following vulnerability has been resolved: net: ethernet: mtk_ppe: avoid NULL deref when gmac0 is disabled If theCVE-2026-317375.5In the Linux kernel, the following vulnerability has been resolved: net: ftgmac100: fix ring allocation unwind on open failure ftgmac100_aCVE-2026-317385.5In the Linux kernel, the following vulnerability has been resolved: vxlan: validate ND option lengths in vxlan_na_create vxlan_na_create()CVE-2026-317398.8In the Linux kernel, the following vulnerability has been resolved: crypto: tegra - Add missing CRYPTO_ALG_ASYNC The tegra crypto driver fCVE-2026-31747.5The Event Tickets and Registration plugin for WordPress is vulnerable to unauthorized modification of data due to a missing capability checkCVE-2026-317405.5In the Linux kernel, the following vulnerability has been resolved: counter: rz-mtu3-cnt: do not use struct rz_mtu3_channel's dev member TCVE-2026-317415.5In the Linux kernel, the following vulnerability has been resolved: counter: rz-mtu3-cnt: prevent counter from being toggled multiple timesCVE-2026-317427.8In the Linux kernel, the following vulnerability has been resolved: vt: discard stale unicode buffer on alt screen exit after resize When CVE-2026-317437.8In the Linux kernel, the following vulnerability has been resolved: nvmem: zynqmp_nvmem: Fix buffer size in DMA and memcpy Buffer size use
CVE-2026-31732: Medium severity, CVSS 5.5 | Vulnix