Skip to content
Low 2.5

seccomp: restore knotif->state when SECCOMP_ADDFD_FLAG_SEND is interrupted

CVE-2026-138996 First seen on SecPulse

Affected packages

PackageAffected → Fixed
LinuxLinux —
LinuxKernel
≥ 5.13.2, < 5.14→ 5.14
≥ 5.14.0, < 5.15.226→ 5.15.226
≥ 5.16.0, < 6.1.193→ 6.1.193
≥ 6.2.0, < 6.6.163→ 6.6.163
≥ 6.7.0, < 6.12.117→ 6.12.117
≥ 6.13.0, < 6.18.63→ 6.18.63
≥ 6.19.0, < 7.3.4→ 7.3.4

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

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->sta…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details