Skip to contentSkip to conversation

CVE-2026-99172: ipc: drop the mqueue mount with kern_unmount() on setup failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 28

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

ipc: drop the mqueue mount with kern_unmount() on setup failure

mq_init_ns() creates the mqueue mount with fc_mount_longterm(), so its ->mnt_ns is MNT_NS_INTERNAL. When setting up the mqueue or ipc sysctls or msg_init_ns() fails afterwards, create_ipc_ns() drops it with a plain mntput(). With ->mnt_ns set that takes the fast path of mntput_no_expire(). The count drops to zero and nothing ever kills the mount, so the mount and the mqueue superblock are leaked.

Commit dc55e35f9e81 ("ipc: Store mqueue sysctls in the ipc namespace") added the first failure path after mq_init_ns() and never dropped the mount. Commit 7229d74e5e8c ("ipc: create_ipc_ns: drop mqueue mount on sysctl setup failure") tried to fix that with a mntput() but that doesn't help for a long-term mount.

Use kern_unmount(). free_ipc() open-codes the same thing for a namespace that made it.

The Linux kernel CVE team has assigned CVE-2026-99172 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.19 with commit dc55e35f9e810f23dd69cfdc91a3d636023f57a2 and fixed in 7.2.13 with commit c0620b648321fff654173d238d4a85298ea16d05
	Issue introduced in 5.19 with commit dc55e35f9e810f23dd69cfdc91a3d636023f57a2 and fixed in 7.3 with commit f0e48172a59e517e613b73f73cc35f24fd123aeb

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99172

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
ipc/namespace.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/c0620b648321fff654173d238d4a85298ea16d05
	https://git.kernel.org/stable/c/f0e48172a59e517e613b73f73cc35f24fd123aeb