{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "0ae71c7720e3ae3aabd2e8a072d27f7bd173d25c"
            },
            {
              "fixed": "fdab56398223c6084ca5a8dd1d5e5ed3262ce44f"
            },
            {
              "fixed": "386bab3924f755841d22a3004aa666015a28f9fc"
            },
            {
              "fixed": "86ad71967cca94b6972fc3ef099d494ebff6c290"
            },
            {
              "fixed": "2849bbaafd4f485aee87109d4225eb222eee5418"
            },
            {
              "fixed": "872bd917485f9332469a793a10c164a450813d6a"
            },
            {
              "fixed": "71a0eaa2ac84e20a9bf0fd40edd1eddd36181e6a"
            },
            {
              "fixed": "832b9b176be06a20747a267db6bc0010a24b74f4"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "31a5fc473d74d943438a03f83f519aac8d65ebe3"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.13.2"
            },
            {
              "fixed": "5.14"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.14.0"
            },
            {
              "fixed": "5.15.226"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.16.0"
            },
            {
              "fixed": "6.1.193"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.2.0"
            },
            {
              "fixed": "6.6.163"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.7.0"
            },
            {
              "fixed": "6.12.117"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.63"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138996.json"
  },
  "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": "CVE-2026-138996",
  "modified": "2026-12-01T20:45:59.312394665Z",
  "published": "2026-11-30T13:26:54.623Z",
  "references": [
    {
      "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"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138996.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138996"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "seccomp: restore knotif-\u003estate when SECCOMP_ADDFD_FLAG_SEND is interrupted"
}