CVE-2026-31769: gpib: fix use-after-free in IO ioctl handlers
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.
Security readout for executives and security teams
Plain-English summary
A local user with limited privileges may trigger a race in Linux GPIB device handling, leaving the kernel using memory after it has been freed. Successful exploitation could potentially compromise confidentiality, integrity, and availability. Exposure depends on an affected kernel, usable GPIB functionality, and local access.
Executive priority
Treat this as high priority for shared, laboratory, industrial, or instrumentation systems exposing GPIB interfaces to untrusted local accounts. Expedite patching where those conditions overlap. Systems without reachable GPIB functionality are likely lower priority, but should still receive confirmation because the supplied affected-version boundaries are incomplete.
Technical view
IBRD, IBWRT, IBCMD, and IBWAIT ioctl paths can retain a gpib_descriptor after releasing its protecting mutex. Concurrent IBCLOSEDEV processing can free that descriptor, producing a use-after-free. The kernel fix adds a protected descriptor_busy reference count and makes close operations return EBUSY while I/O handlers retain references.
Likely exposure
Highest risk exists on systems running affected Linux kernels where GPIB functionality is present and low-privileged local users can access its device interfaces. The supplied version data includes 6.13, 6.18.22, 6.19.12, and 7.0, but does not provide sufficiently clear branch boundaries; confirm vendor backports.
Exploitation context
The CVSS vector describes local, low-complexity exploitation requiring low privileges and no user interaction, with potentially high confidentiality, integrity, and availability impact. The bundle does not identify public exploitation, and the CVE is not listed as KEV. No active exploitation claim is supported.
Researcher notes
The race crosses big_gpib_mutex and descriptors_mutex protection. A simple io_in_progress check is insufficient because IBWAIT-related status handling can clear it from unprivileged userspace. The fix therefore uses a separate kernel-controlled counter supporting multiple concurrent handlers. The sources provide no demonstrated exploit, CWE assignment, or detailed affected-branch mapping.
Mitigation direction
Apply a vendor kernel update containing the descriptor_busy reference-count fix.
Verify which cited stable commit applies to each deployed kernel branch.
Until patched, restrict untrusted local access to GPIB device interfaces.
Follow distribution guidance where kernel version numbers obscure backported fixes.
Validation and detection
Inventory deployed kernel builds and identify systems using GPIB functionality.
Confirm vendor advisories or source history show the applicable fix is included.
Review permissions controlling local access to GPIB device interfaces.
Regression-test concurrent GPIB I/O and close handling after updating.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2026-31769 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
4Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.