All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-98994: statmount: read the parent of an unmounted mount under mount_lock
@ 2026-10-23 12:19 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-10-23 12:19 UTC (permalink / raw)
  To: linux-cve-announce; +Cc: Greg Kroah-Hartman

From: Greg Kroah-Hartman <gregkh@kernel.org>

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

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

statmount: read the parent of an unmounted mount under mount_lock

statmount_mnt_basic() reads the ids of the parent through m->mnt_parent
with namespace_sem held for reading. That's fine for a mount that is
in a namespace. Everything above it is pinned by that namespace.

STATMOUNT_BY_FD also accepts a file descriptor on a mount that has
been unmounted on purpose and that only the file descriptor keeps alive.
If that mount stayed attached to its parent when it was unmounted the
parent is unmounted as well and nothing pins it for the child.

The final mntput() unmounts the children under mount_lock alone and
frees the parent afterwards. Concurrently, statmount_mnt_basic() reads
m->mnt_parent twice while that can happen and can easily dereference a
mount that's already gone.

Read the parent of an unmounted mount under mount_lock. The parent
can't be put while it is held and both ids come from the same mount. A
mounted mount's parent is pinned by the namespace and a mount can't
leave its namespace while namespace_sem is held, so the common case
takes no global lock.

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


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

	Issue introduced in 7.0 with commit 0e5032237ee5530147fbdf33134297e1490d5ec3 and fixed in 7.2.11 with commit 98fc6c7b6ca676157d2c780bd0a537b2c10fe08f
	Issue introduced in 7.0 with commit 0e5032237ee5530147fbdf33134297e1490d5ec3 and fixed in 7.3 with commit bb46094057520304073130920c223451c2a694a7

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-98994
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:
	fs/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/98fc6c7b6ca676157d2c780bd0a537b2c10fe08f
	https://git.kernel.org/stable/c/bb46094057520304073130920c223451c2a694a7

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-23 12:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-23 12:19 CVE-2026-98994: statmount: read the parent of an unmounted mount under mount_lock Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.