GHSA-XQ2P-52CW-VRXQ

Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32
VLAI
Details

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.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-138996"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:18:02Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nseccomp: restore knotif-\u003estate when SECCOMP_ADDFD_FLAG_SEND is interrupted\n\nIn seccomp_notify_addfd(), when SECCOMP_ADDFD_FLAG_SEND is set in\naddfd.flags, knotif-\u003estate is optimistically transitioned from\nSECCOMP_NOTIFY_SENT to SECCOMP_NOTIFY_REPLIED before waking the tracee\nand waiting on kaddfd.completion:\n\n\tif (addfd.flags \u0026 SECCOMP_ADDFD_FLAG_SEND) {\n\t\tknotif-\u003estate = SECCOMP_NOTIFY_REPLIED;\n\t\t...\n\t}\n\nIf wait_for_completion_interruptible(\u0026kaddfd.completion) is interrupted\nby a signal before the tracee dequeues the kaddfd request\n(!list_empty(\u0026kaddfd.list)), seccomp_notify_addfd() removes kaddfd from\nknotif-\u003eaddfd and returns -EINTR to the supervisor without having\ninstalled the file descriptor.\n\nHowever, knotif-\u003estate is left as SECCOMP_NOTIFY_REPLIED (with\nknotif-\u003eerror == 0 and knotif-\u003eval == 0). This causes two problems:\n\n1. When the tracee runs in do_user_notif(), it checks\n   if (knotif.state != SECCOMP_NOTIFY_REPLIED) after calling\n   seccomp_handle_addfd(). Because knotif-\u003estate is already\n   SECCOMP_NOTIFY_REPLIED, the tracee exits the notification wait loop\n   prematurely and returns 0 from the trapped syscall without the file\n   descriptor ever having been installed.\n\n2. If the supervisor retries SECCOMP_IOCTL_NOTIF_ADDFD or\n   SECCOMP_IOCTL_NOTIF_SEND before the tracee runs, it fails with\n   -EINPROGRESS because knotif-\u003estate is no longer SECCOMP_NOTIFY_SENT.\n\nFix this by restoring knotif-\u003estate back to SECCOMP_NOTIFY_SENT if\nSECCOMP_ADDFD_FLAG_SEND was set and kaddfd was not consumed before the\ninterrupted wait. Also add a seccomp_bpf selftest\n(user_notification_addfd_send_interrupted) covering this race.\n\nTested in QEMU against Linux 7.3.0-rc3 using the\nuser_notification_addfd_send_interrupted selftest added in this patch\n(./seccomp_bpf -t user_notification_addfd_send_interrupted): on the\nunfixed kernel the test fails because the retry ioctl(listener,\nSECCOMP_IOCTL_NOTIF_ADDFD, \u0026addfd) returns -EINPROGRESS (-1) and the\ntracee prematurely exits do_user_notif() with return value 0 instead of\nFD 42, whereas with this patch applied the test passes.",
  "id": "GHSA-xq2p-52cw-vrxq",
  "modified": "2026-11-30T15:32:12Z",
  "published": "2026-11-30T15:32:12Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138996"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/2849bbaafd4f485aee87109d4225eb222eee5418"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/386bab3924f755841d22a3004aa666015a28f9fc"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/71a0eaa2ac84e20a9bf0fd40edd1eddd36181e6a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/832b9b176be06a20747a267db6bc0010a24b74f4"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/86ad71967cca94b6972fc3ef099d494ebff6c290"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/872bd917485f9332469a793a10c164a450813d6a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/fdab56398223c6084ca5a8dd1d5e5ed3262ce44f"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.