Linux kernel seccomp skips fd install when ADDFD send is interrupted
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA.
Summary
The Linux kernel from 5.13.2 before 5.14 and from 5.14 is affected. In seccomp_notify_addfd(), an interrupted wait with SECCOMP_ADDFD_FLAG_SEND leaves the notification state set to replied, so the tracee returns 0 from the trapped syscall without the file descriptor being installed. A supervisor retry of the ADDFD ioctl then fails with -EINPROGRESS.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
Description from the CNA
In the Linux kernel, the following vulnerability has been resolved: seccomp: restore knotif->state when SECCOMP_ADDFD_FLAG_SEND is interrupted In seccomp_notify_addfd(), when SECCOMP_ADDFD_FLAG_SEND is set in addfd.flags, knotif->state is optimistically transitioned from SECCOMP_NOTIFY_SENT to SECCOMP_NOTIFY_REPLIED before waking the tracee and waiting on kaddfd.completion: if (addfd.flags & SECCOMP_ADDFD_FLAG_SEND) { knotif->state = SECCOMP_NOTIFY_REPLIED; ... } If wait_for_completion_interruptible(&kaddfd.completion) is interrupted by a signal before the tracee dequeues the kaddfd request (!list_empty(&kaddfd.list)), seccomp_notify_addfd() removes kaddfd from knotif->addfd and returns -EINTR to the supervisor without having installed the file descriptor. However, knotif->state is left as SECCOMP_NOTIFY_REPLIED (with knotif->error == 0 and knotif->val == 0). This causes two problems: 1. When the tracee runs in do_user_notif(), it checks if (knotif.state != SECCOMP_NOTIFY_REPLIED) after calling seccomp_handle_addfd(). Because knotif->state is already SECCOMP_NOTIFY_REPLIED, the tracee exits the notification wait loop prematurely and returns 0 from the trapped syscall without the file descriptor ever having been installed. 2. If the supervisor retries SECCOMP_IOCTL_NOTIF_ADDFD or SECCOMP_IOCTL_NOTIF_SEND before the tracee runs, it fails with -EINPROGRESS because knotif->state is no longer SECCOMP_NOTIFY_SENT. Fix this by restoring knotif->state back to SECCOMP_NOTIFY_SENT if SECCOMP_ADDFD_FLAG_SEND was set and kaddfd was not consumed before the interrupted wait. Also add a seccomp_bpf selftest (user_notification_addfd_send_interrupted) covering this race. Tested in QEMU against Linux 7.3.0-rc3 using the user_notification_addfd_send_interrupted selftest added in this patch (./seccomp_bpf -t user_notification_addfd_send_interrupted): on the unfixed kernel the test fails because the retry ioctl(listener, SECCOMP_IOCTL_NOTIF_ADDFD, &addfd) returns -EINPROGRESS (-1) and the tracee prematurely exits do_user_notif() with return value 0 instead of FD 42, whereas with this patch applied the test passes.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Update the Linux kernel to 5.14, 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.63, 7.3.4 or 7.4-rc1, depending on the release branch in use.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
- Fix · CNA Linux (Linux) Fixed in 5.14
- Fix · CNA Linux (Linux) Fixed in 5.15.226, 6.1.193, 6.6.163, 6.12.117, 6.18.63, 7.3.4, 7.4-rc1
Timeline
- 2026-11-30 Threatist record created from CVE-2026-138996
- 2026-11-30 Alias added: GHSA-xq2p-52cw-vrxq
References
Other 7
- https://git.kernel.org/stable/c/fdab56398223c6084ca5a8dd1d5e5ed3262ce44f
- https://git.kernel.org/stable/c/386bab3924f755841d22a3004aa666015a28f9fc
- https://git.kernel.org/stable/c/86ad71967cca94b6972fc3ef099d494ebff6c290
- https://git.kernel.org/stable/c/2849bbaafd4f485aee87109d4225eb222eee5418
- https://git.kernel.org/stable/c/872bd917485f9332469a793a10c164a450813d6a
- https://git.kernel.org/stable/c/71a0eaa2ac84e20a9bf0fd40edd1eddd36181e6a
- https://git.kernel.org/stable/c/832b9b176be06a20747a267db6bc0010a24b74f4
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-138996 · CVE Program
- CVE-2026-138996 · NVD
- GHSA-xq2p-52cw-vrxq · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences