CVE-2026-142818

Not scored yetLast modified Dec 3, 2026

Description

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

ns: don't add init_ipc_ns and init_net without namespace support

When CONFIG_IPC_NS or CONFIG_NET_NS are turned off we still add the initial ipc and network namespace to the namespace trees. ipc_ns_init() calls ns_tree_add(&init_ipc_ns) whenever CONFIG_SYSVIPC is set and setup_net() calls ns_tree_add_raw() on init_net whenever CONFIG_NET is set.

But without CONFIG_IPC_NS and CONFIG_NET_NS these aren't namespaces userspace can do anything with. They don't have proc_ns_operations so there's no /proc/<pid>/ns/{ipc,net} for them, nsfs_fh_to_dentry() refuses them with -EOPNOTSUPP, and since ns->ops is NULL __ns_tree_add_raw() doesn't add them to the owner list of init_user_ns either. So they end up half registered. That's also not how we treat any of the other namespace types. Without CONFIG_UTS_NS, CONFIG_PID_NS, CONFIG_TIME_NS or CONFIG_USER_NS the initial namespace is never added to the tree.

listns() walks the unified tree and calls is_current_namespace() for every namespace it finds via may_list_ns(). But is_current_namespace() only knows about CLONE_NEWIPC and CLONE_NEWNET if CONFIG_IPC_NS and CONFIG_NET_NS are set. Otherwise we end up in the default case and its VFS_WARN_ON_ONCE(). Any unprivileged caller can trigger that with a plain listns() call:

WARNING: CPU: 0 PID: 526 at fs/nsfs.c:508 is_current_namespace+0x12f/0x440 Call Trace: legitimize_ns+0x25f/0x4c0 do_listns+0x185/0x5c0 __do_sys_listns+0x13b/0x300

Instead of teaching is_current_namespace() about namespaces that can't be opened, only add the initial namespaces to the tree if their namespace type is enabled. Move the registration of init_ipc_ns into ipc/namespace.c which is only built with CONFIG_IPC_NS. That also fixes CONFIG_SYSVIPC=n, CONFIG_POSIX_MQUEUE=y, CONFIG_IPC_NS=y where ipc/shm.c isn't built and init_ipc_ns was never added at all. For the network namespace only call ns_tree_add_raw() if CONFIG_NET_NS is set. Without CONFIG_NET_NS cleanup_net() isn't built and init_net is never removed so there's nothing to balance.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

VendorProductVersions
LinuxLinux>= 74b24a582e1ff3960f0454f57afc2bcdbc52562e, < 0b014c734f70d258bb1c112b2bd6598fdcbce7b0; >= 74b24a582e1ff3960f0454f57afc2bcdbc52562e, < e0efb02fd551fe5e76e959a3112f55a612fa20e0; >= 74b24a582e1ff3960f0454f57afc2bcdbc52562e, < 82f1c815aaef1905c5c6c386c8a0d74f6ff70a54
LinuxLinux6.18

References

Timeline

Published
Dec 3, 2026
Last modified
Dec 3, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-142819In the Linux kernel, the following vulnerability has been resolved: kgdb: Fix buffer overflow in the qRcmd packet handler gdb_cmd_query() CVE-2026-142829.8The GoDAM – Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more plugin for WordPress is vulneraCVE-2026-142820In the Linux kernel, the following vulnerability has been resolved: kgdb: Fix buffer overflow in the 'm' packet handler gdb_cmd_memread() CVE-2026-142821In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: validate SRAT subtables before parsing The KFD SRAT walkerCVE-2026-142822In the Linux kernel, the following vulnerability has been resolved: ipmr: drop packets with unknown ingress VIF A packet can race with VIFCVE-2026-142823In the Linux kernel, the following vulnerability has been resolved: bonding: fix out-of-bounds read of arp_ip_target arp_ip_target is a moCVE-2026-142824In the Linux kernel, the following vulnerability has been resolved: ASoC: qcom: qdsp6: q6afe: fix clk vote response type mismatch The respCVE-2026-142825In the Linux kernel, the following vulnerability has been resolved: scsi: ufs: core: Clear stale UIC result byte before peer DME retries PCVE-2026-142826In the Linux kernel, the following vulnerability has been resolved: scsi: ufs: bsg: Reject UIC commands with a non-zero result byte ufs_bsCVE-2026-142827In the Linux kernel, the following vulnerability has been resolved: parisc: eisa_enumerator: Fix out-of-bounds reads of the EEPROM buffer CVE-2026-142828In the Linux kernel, the following vulnerability has been resolved: net/rds: ib: don't enable IRQs in rds_ib_conn_free() __rds_conn_createCVE-2026-142829In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: don't WARN when removing an unallocated MST payload [
CVE-2026-142818: Unscored | Vulnix