{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "a0623b2a1d595341971c189b90a6b06f42cd209d"
            },
            {
              "fixed": "24705093eeb28c70f56ea509d9110e802435b1b8"
            },
            {
              "fixed": "a0da1ee51f1dfa7c3ddac48bdb04858264b56539"
            },
            {
              "fixed": "bf5ba73c9bdd5e872eb35e801e429a3b526f8f04"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.14.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/99xxx/CVE-2026-99843.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nuserns: don't drop the exec securebits\n\nSECBIT_EXEC_RESTRICT_FILE and SECBIT_EXEC_DENY_INTERACTIVE tell script\ninterpreters to only run what AT_EXECVE_CHECK allows and to refuse\ninteractive input. A service manager sets them together with their lock\nbits so that nothing below it can turn them off again.\n\nBut set_cred_user_ns() resets all securebits to SECUREBITS_DEFAULT. So\nany task that can create a user namespace sheds the locked exec bits\nwith a single unshare(CLONE_NEWUSER) and joining one with setns() does\nthe same. The lock is pointless if anyone who may create a user\nnamespace can drop it, and that is pretty much everyone.\n\nResetting the other bits is fine. They are about how capabilities are\ncomputed and a new user namespace starts out with a full set of\ncapabilities anyway. The exec bits grant nothing though. They are\nrestrictions a task placed on itself, just like no_new_privs which a\nuser namespace doesn't touch either. So keep them and their locks.\n\nReproducer:\n\n  // SPDX-License-Identifier: GPL-2.0\n  /* Lock the exec securebits, then create a user namespace and look at them again. */\n  #define _GNU_SOURCE\n  #include \u003csched.h\u003e\n  #include \u003cstdio.h\u003e\n  #include \u003csys/prctl.h\u003e\n\n  #define SECBIT_EXEC_RESTRICT_FILE\t\t(1 \u003c\u003c 8)\n  #define SECBIT_EXEC_RESTRICT_FILE_LOCKED\t(1 \u003c\u003c 9)\n  #define SECBIT_EXEC_DENY_INTERACTIVE\t\t(1 \u003c\u003c 10)\n  #define SECBIT_EXEC_DENY_INTERACTIVE_LOCKED\t(1 \u003c\u003c 11)\n\n  int main(void)\n  {\n  \tint bits = SECBIT_EXEC_RESTRICT_FILE | SECBIT_EXEC_RESTRICT_FILE_LOCKED |\n  \t\t   SECBIT_EXEC_DENY_INTERACTIVE | SECBIT_EXEC_DENY_INTERACTIVE_LOCKED;\n\n  \tif (prctl(PR_SET_SECUREBITS, bits, 0, 0, 0)) {\n  \t\tperror(\"PR_SET_SECUREBITS\");\n  \t\treturn 1;\n  \t}\n  \tprintf(\"before: 0x%x\\n\", prctl(PR_GET_SECUREBITS, 0, 0, 0, 0));\n  \tprintf(\"clear locked bits: %s\\n\", prctl(PR_SET_SECUREBITS, 0, 0, 0, 0) ? \"refused\" : \"ALLOWED\");\n\n  \tif (unshare(CLONE_NEWUSER)) {\n  \t\tperror(\"unshare(CLONE_NEWUSER)\");\n  \t\treturn 1;\n  \t}\n  \tprintf(\"after unshare(CLONE_NEWUSER): 0x%x\\n\", prctl(PR_GET_SECUREBITS, 0, 0, 0, 0));\n  \treturn 0;\n  }\n\nOn v7.1 this prints \"before: 0xf00\", \"clear locked bits: refused\" and\n\"after unshare(CLONE_NEWUSER): 0x0\". With this patch the last line\nreads 0xf00 as well.",
  "id": "CVE-2026-99843",
  "modified": "2026-12-01T20:45:33.194023795Z",
  "published": "2026-11-30T13:17:34.423Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/24705093eeb28c70f56ea509d9110e802435b1b8"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a0da1ee51f1dfa7c3ddac48bdb04858264b56539"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/bf5ba73c9bdd5e872eb35e801e429a3b526f8f04"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99843.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99843"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "userns: don't drop the exec securebits"
}