CVE-2026-31769
gpib: fix use-after-free in IO ioctl handlers
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.
INFO
Published Date :
May 1, 2026, 3:16 p.m.
Last Modified :
Nov. 11, 2026, 9:10 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | HIGH | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
Solution
- Update the Linux kernel to the patched version.
- Verify the kernel version after the update.
- Monitor system logs for related errors.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-31769.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-31769 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-31769
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-31769 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-31769 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Nov. 11, 2026
Action Type Old Value New Value Added Translation Title: Linux Kernel, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: gpib: corrección de uso después de liberación en los gestores ioctl de E/S Los gestores ioctl IBRD, IBWRT, IBCMD e IBWAIT usan un puntero gpib_descriptor después de que board -> big_gpib_mutex ha sido liberado. Un ioctl IBCLOSEDEV concurrente puede liberar el descriptor a través de close_dev_ioctl() durante esta ventana, causando un uso después de liberación. Los gestores de E/S (read_ioctl, write_ioctl, command_ioctl) liberan explícitamente big_gpib_mutex antes de llamar a su gestor. wait_ioctl() se llama con big_gpib_mutex retenido, pero ibwait() lo libera internamente cuando wait_mask es distinto de cero. En los cuatro casos, el puntero del descriptor obtenido de handle_to_descriptor() queda desprotegido. Esto se soluciona introduciendo un contador de referencias descriptor_busy solo para el kernel en la estructura gpib_descriptor. Cada gestor incrementa atómicamente descriptor_busy bajo file_priv -> descriptors_mutex antes de liberar el bloqueo, y lo decrementa al finalizar. close_dev_ioctl() comprueba descriptor_busy bajo el mismo bloqueo y rechaza el cierre con -EBUSY si el contador es distinto de cero. Es necesario un contador de referencias en lugar de un simple indicador porque múltiples gestores pueden operar sobre el mismo descriptor concurrentemente (por ejemplo, IBRD e IBWAIT en el mismo identificador desde hilos diferentes). Se necesita un contador separado porque io_in_progress puede borrarse desde el espacio de usuario sin privilegios a través del ioctl IBWAIT (mediante general_ibstatus() con set_mask conteniendo CMPL), lo que permitiría a un atacante eludir una comprobación basada únicamente en io_in_progress. El nuevo contador descriptor_busy solo es modificado por las rutas de E/S del kernel. El orden de bloqueo es consistente (big_gpib_mutex -> descriptors_mutex) y los gestores solo retienen descriptors_mutex brevemente durante la búsqueda, por lo que no hay riesgo de interbloqueo ni impacto en el rendimiento de E/S. -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '9dde4559e93955ccc47d588f7fd051684d55c4e7', 'lessThan': 'cae26eff1b56d78bed7873cf3e60a2b1bdd4da6c', 'versionType': 'git'}, {'status': 'affected', 'version': '9dde4559e93955ccc47d588f7fd051684d55c4e7', 'lessThan': '28c75dd143ead62e0dfac564c79d251e21d5d74b', 'versionType': 'git'}, {'status': 'affected', 'version': '9dde4559e93955ccc47d588f7fd051684d55c4e7', 'lessThan': 'd1857f8296dceb75d00ab857fc3c61bc00c7f5c6', 'versionType': 'git'}], 'programFiles': ['drivers/gpib/common/gpib_os.c', 'drivers/gpib/include/gpib_types.h'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '6.13'}, {'status': 'unaffected', 'version': '0', 'lessThan': '6.13', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.18.22', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '6.19.12', 'versionType': 'semver', 'lessThanOrEqual': '6.19.*'}, {'status': 'unaffected', 'version': '7.0', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['drivers/gpib/common/gpib_os.c', 'drivers/gpib/include/gpib_types.h'], 'defaultStatus': 'affected'}] -
Initial Analysis by [email protected]
May. 11, 2026
Action Type Old Value New Value Added CWE CWE-416 Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.13 up to (excluding) 6.18.22 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 6.19.12 Added Reference Type kernel.org: https://git.kernel.org/stable/c/28c75dd143ead62e0dfac564c79d251e21d5d74b Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/cae26eff1b56d78bed7873cf3e60a2b1bdd4da6c Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/d1857f8296dceb75d00ab857fc3c61bc00c7f5c6 Types: Patch -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
May. 03, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
May. 01, 2026
Action Type Old Value New Value Added 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. Added Reference https://git.kernel.org/stable/c/28c75dd143ead62e0dfac564c79d251e21d5d74b Added Reference https://git.kernel.org/stable/c/cae26eff1b56d78bed7873cf3e60a2b1bdd4da6c Added Reference https://git.kernel.org/stable/c/d1857f8296dceb75d00ab857fc3c61bc00c7f5c6