CVE-2026-99843

Source
https://cve.org/CVERecord?id=CVE-2026-99843
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99843.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-99843
Downstream
Published
2026-11-30T13:17:34Z
Modified
2026-11-30T15:02:31Z
Summary
userns: don't drop the exec securebits
Details

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.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99843.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a0623b2a1d595341971c189b90a6b06f42cd209d
Fixed
24705093eeb28c70f56ea509d9110e802435b1b8
Fixed
a0da1ee51f1dfa7c3ddac48bdb04858264b56539
Fixed
bf5ba73c9bdd5e872eb35e801e429a3b526f8f04

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99843.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.14.0
Fixed
6.18.63
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.3.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99843.json"