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

Published Nov 30, 2026
·
Updated

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

userns: don't drop the exec securebits

SECBITEXECRESTRICTFILE and SECBITEXECDENYINTERACTIVE tell script interpreters to only run what ATEXECVECHECK 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 setcreduserns() resets all securebits to SECUREBITSDEFAULT. So any task that can create a user namespace sheds the locked exec bits with a single unshare(CLONENEWUSER) 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 nonewprivs 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 GNUSOURCE #include <sched.h> #include <stdio.h> #include <sys/prctl.h>

#define SECBITEXECRESTRICTFILE (1 << 8) #define SECBITEXECRESTRICTFILELOCKED (1 << 9) #define SECBITEXECDENYINTERACTIVE (1 << 10) #define SECBITEXECDENYINTERACTIVELOCKED (1 << 11)

int main(void) { int bits = SECBITEXECRESTRICTFILE | SECBITEXECRESTRICTFILELOCKED | SECBITEXECDENYINTERACTIVE | SECBITEXECDENYINTERACTIVELOCKED;

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

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

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

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:17 PM
Data Sourced
via MITRE·01:17 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203