Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-31769

published high CVSS 3.1 · 7.8

gpib: fix use-after-free in IO ioctl handlers

Published
01 May 2026, 14:14:58 UTC
Updated
05 Aug 2026, 12:25:02 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux9dde4559e93955ccc47d588f7fd051684d55c4e7 to < cae26eff1b56d78bed7873cf3e60a2b1bdd4da6c · 9dde4559e93955ccc47d588f7fd051684d55c4e7 to < 28c75dd143ead62e0dfac564c79d251e21d5d74b · 9dde4559e93955ccc47d588f7fd051684d55c4e7 to < d1857f8296dceb75d00ab857fc3c61bc00c7f5c6 · Other versions: unaffected Affected Not stated Linux
Linux — Linux6.13 (affected) · 0 to < 6.13 (unaffected · semver) · 6.18.22 through 6.18.* (unaffected · semver) · 6.19.12 through 6.19.* (unaffected · semver) · 7.0 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

Description

In the Linux kernel, the following vulnerability has been resolved: gpib: fix use-after-free in IO ioctl handlers The IBRD, IBWRT, IBCMD, and IBWAIT ioctl handlers use a gpib_descriptor pointer after board->big_gpib_mutex has been released. A concurrent IBCLOSEDEV ioctl can free the descriptor via close_dev_ioctl() during this window, causing a use-after-free. The IO handlers (read_ioctl, write_ioctl, command_ioctl) explicitly release big_gpib_mutex before calling their handler. wait_ioctl() is called with big_gpib_mutex held, but ibwait() releases it internally when wait_mask is non-zero. In all four cases, the descriptor pointer obtained from handle_to_descriptor() becomes unprotected. Fix this by introducing a kernel-only descriptor_busy reference count in struct gpib_descriptor. Each handler atomically increments descriptor_busy under file_priv->descriptors_mutex before releasing the lock, and decrements it when done. close_dev_ioctl() checks descriptor_busy under the same lock and rejects the close with -EBUSY if the count is non-zero. A reference count rather than a simple flag is necessary because multiple handlers can operate on the same descriptor concurrently (e.g. IBRD and IBWAIT on the same handle from different threads). A separate counter is needed because io_in_progress can be cleared from unprivileged userspace via the IBWAIT ioctl (through general_ibstatus() with set_mask containing CMPL), which would allow an attacker to bypass a check based solely on io_in_progress. The new descriptor_busy counter is only modified by the kernel IO paths. The lock ordering is consistent (big_gpib_mutex -> descriptors_mutex) and the handlers only hold descriptors_mutex briefly during the lookup, so there is no deadlock risk and no impact on IO throughput.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The vulnerable code is reached through local `/dev/gpibN` character-device ioctls such as `IBRD`, `IBWRT`, `IBCMD`, `IBWAIT`, and `IBCLOSEDEV`. There is no network, adjacent, or physical packet-processing entry point for this bug. AC:L - The attacker controls both sides of the race by issuing concurrent ioctls on the same GPIB file descriptor and handle. Use-after-free triggering does not depend on conditions outside attacker control once the board is online and accessible. PR:L - The vulnerable ioctls do not perform capability checks; a local user with access to the GPIB device node can open a descriptor, run IO or wait operations, and concurrently close it. Administrative privileges are needed for board configuration, but not for the vulnerable open/close/IO path in a configured deployment. UI:N - No victim action is required after the attacker has local access to the device. Exploitation is performed entirely by attacker-controlled ioctl calls. S:U - The bug is a kernel use-after-free reachable from a local kernel device interface and impacts the same kernel security authority. It does not cross a virtualization, IOMMU, or separate security-scope boundary. C:H - This is a kernel heap use-after-free of `struct gpib_descriptor`, and freed object reuse can expose or help derive kernel memory contents. Following the required kernel guidance, use-after-free bugs are scored as high confidentiality impact. I:H - The stale descriptor pointer is dereferenced after free and can be overlapped through heap reuse, giving a plausible path to corrupt kernel data or build write/control-flow primitives. Following the required kernel guidance, use-after-free bugs are scored as high integrity impact. A:H - The stale pointer can be dereferenced after `kfree()` during IO or wait completion, making kernel oops, panic, or hang plausible. Use-after-free bugs are therefore high availability impact.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 9dde4559e93955ccc47d588f7fd051684d55c4e7 to < cae26eff1b56d78bed7873cf3e60a2b1bdd4da6c (affected · git)9dde4559e93955ccc47d588f7fd051684d55c4e7 to < 28c75dd143ead62e0dfac564c79d251e21d5d74b (affected · git)9dde4559e93955ccc47d588f7fd051684d55c4e7 to < d1857f8296dceb75d00ab857fc3c61bc00c7f5c6 (affected · git)Default: unaffected Linux · cna
Linux Linux 6.13 (affected)0 to < 6.13 (unaffected · semver)6.18.22 through 6.18.* (unaffected · semver)6.19.12 through 6.19.* (unaffected · semver)7.0 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

3

Provider assertions

1

Linux · cna

gpib: fix use-after-free in IO ioctl handlers

Provenance

Schema
5.2
Searchable
yes
Content hash
3e7ae9b28dcdbc4dd2f2428c7973fe88b2dc5ad028b69a9c7764f8b72e26a4e3
Ingested
23 Sep 2026, 09:09:43 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected