CVE-2026-138996
seccomp: restore knotif->state when SECCOMP_ADDFD_FLAG_SEND is interrupted
Check your servers for CVE-2026-138996
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-138996 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Exploitation
EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 12.5% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c, before fdab56398223c6084ca5a8dd1d5e5ed3262ce44f affected from 0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c, before 386bab3924f755841d22a3004aa666015a28f9fc affected from 0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c, before 86ad71967cca94b6972fc3ef099d494ebff6c290 affected from 0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c, before 2849bbaafd4f485aee87109d4225eb222eee5418 affected from 0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c, before 872bd917485f9332469a793a10c164a450813d6a affected from 0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c, before 71a0eaa2ac84e20a9bf0fd40edd1eddd36181e6a affected from 0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c, before 832b9b176be06a20747a267db6bc0010a24b74f4 affected 31a5fc473d74d943438a03f83f519aac8d65ebe3 affected from 5.13.2, before 5.14
Other versions: unaffected
|
| Linux |
affected 5.14 unaffected before 5.14 unaffected from 5.15.226 up to and including 5.15.* unaffected from 6.1.193 up to and including 6.1.* unaffected from 6.6.163 up to and including 6.6.* unaffected from 6.12.117 up to and including 6.12.* unaffected from 6.18.63 up to and including 6.18.* unaffected from 7.3.4 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-138996 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-138996
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-138996
trivy image --scanners vuln IMAGE | grep CVE-2026-138996
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/fdab56398223c6084ca5a8dd1d5e5ed3262ce44f git.kernel.org
- https://git.kernel.org/stable/c/386bab3924f755841d22a3004aa666015a28f9fc git.kernel.org
- https://git.kernel.org/stable/c/86ad71967cca94b6972fc3ef099d494ebff6c290 git.kernel.org
- https://git.kernel.org/stable/c/2849bbaafd4f485aee87109d4225eb222eee5418 git.kernel.org
- https://git.kernel.org/stable/c/872bd917485f9332469a793a10c164a450813d6a git.kernel.org
- https://git.kernel.org/stable/c/71a0eaa2ac84e20a9bf0fd40edd1eddd36181e6a git.kernel.org
- https://git.kernel.org/stable/c/832b9b176be06a20747a267db6bc0010a24b74f4 git.kernel.org
Source: the record CVE-2026-138996 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse