# CVE-2026-99843: userns: don't drop the exec securebits

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-11-30T13:17:34.423Z
- Modified: 2026-11-30T14:20:17.527Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

userns: don't drop the exec securebits

SECBIT_EXEC_RESTRICT_FILE and SECBIT_EXEC_DENY_INTERACTIVE tell script
interpreters to only run what AT_EXECVE_CHECK allows and to refuse
interactive input. A service manager sets them together with their lock
bits so that nothing below it can turn them off again.

But set_cred_user_ns() resets all securebits to SECUREBITS_DEFAULT. So
any task that can create a user namespace sheds the locked exec bits
with a single unshare(CLONE_NEWUSER) and joining one with setns() does
the same. The lock is pointless if anyone who may create a user
namespace can drop it, and that is pretty much everyone.

Resetting the other bits is fine. They are about how capabilities are
computed and a new user namespace starts out with a full set of
capabilities anyway. The exec bits grant nothing though. They are
restrictions a task placed on itself, just like no_new_privs which a
user namespace doesn't touch either. So keep them and their locks.

Reproducer:

  // SPDX-License-Identifier: GPL-2.0
  /* Lock the exec securebits, then create a user namespace and look at them again. */
  #define _GNU_SOURCE
  #include <sched.h>
  #include <stdio.h>
  #include <sys/prctl.h>

  #define SECBIT_EXEC_RESTRICT_FILE		(1 << 8)
  #define SECBIT_EXEC_RESTRICT_FILE_LOCKED	(1 << 9)
  #define SECBIT_EXEC_DENY_INTERACTIVE		(1 << 10)
  #define SECBIT_EXEC_DENY_INTERACTIVE_LOCKED	(1 << 11)

  int main(void)
  {
  	int bits = SECBIT_EXEC_RESTRICT_FILE | SECBIT_EXEC_RESTRICT_FILE_LOCKED |
  		   SECBIT_EXEC_DENY_INTERACTIVE | SECBIT_EXEC_DENY_INTERACTIVE_LOCKED;

  	if (prctl(PR_SET_SECUREBITS, bits, 0, 0, 0)) {
  		perror("PR_SET_SECUREBITS");
  		return 1;
  	}
  	printf("before: 0x%x\n", prctl(PR_GET_SECUREBITS, 0, 0, 0, 0));
  	printf("clear locked bits: %s\n", prctl(PR_SET_SECUREBITS, 0, 0, 0, 0) ? "refused" : "ALLOWED");

  	if (unshare(CLONE_NEWUSER)) {
  		perror("unshare(CLONE_NEWUSER)");
  		return 1;
  	}
  	printf("after unshare(CLONE_NEWUSER): 0x%x\n", prctl(PR_GET_SECUREBITS, 0, 0, 0, 0));
  	return 0;
  }

On v7.1 this prints "before: 0xf00", "clear locked bits: refused" and
"after unshare(CLONE_NEWUSER): 0x0". With this patch the last line
reads 0xf00 as well.

(As written by CVE List.)

## Affected

- Linux Linux: from a0623b2a1d595341971c189b90a6b06f42cd209d before 24705093eeb28c70f56ea509d9110e802435b1b8; from a0623b2a1d595341971c189b90a6b06f42cd209d before a0da1ee51f1dfa7c3ddac48bdb04858264b56539; from a0623b2a1d595341971c189b90a6b06f42cd209d before bf5ba73c9bdd5e872eb35e801e429a3b526f8f04; 6.14 (not affected: before 6.14; from 6.18.63 up to 6.18.*; from 7.3.4 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/24705093eeb28c70f56ea509d9110e802435b1b8>
- <https://git.kernel.org/stable/c/a0da1ee51f1dfa7c3ddac48bdb04858264b56539>
- <https://git.kernel.org/stable/c/bf5ba73c9bdd5e872eb35e801e429a3b526f8f04>

## Sources

- CVE List: [CVE-2026-99843](https://www.cve.org/CVERecord?id=CVE-2026-99843), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-99843](https://nvd.nist.gov/vuln/detail/CVE-2026-99843), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-99843 · Whole record: https://cve.day/CVE-2026-99843.json · Rebuilt by cve.day 2026-11-30T14:33:43.009Z
