Skip to contentSkip to conversation

CVE-2026-99478: filelock: keep superblock active through delegation wait

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 19

lore
Share & tools
lore
#0 lore raw

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

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

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

filelock: keep superblock active through delegation wait

A caller may drop its path after try_break_deleg() returns a delegated inode but before break_deleg_wait() finishes. The extra inode reference held in struct delegated_inode does not keep the superblock active.

After a lazy unmount, closing the delegation holder can release the last mount reference and shut down the superblock while another task waits for the delegation break. The waiter's final iput() can then enter the filesystem's eviction code after its superblock-private state was freed. This has been observed as a KASAN use-after-free in shmem_evict_inode().

When try_break_deleg() saves a delegated inode, take an active reference to its superblock while the caller still pins the mount. Keep that reference through break_deleg_wait() and the final iput(), then release it with deactivate_super(). This protects every caller of the helpers, including the mknod, mkdir, symlink and rmdir paths that drop their path before waiting.

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

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

	Issue introduced in 6.19 with commit e12d203b8c880061c0bf0339cad51e5851a33442 and fixed in 7.3.2 with commit a6e222f1d75bce8de430ba4d0f8c6a1e923f9acd
	Issue introduced in 6.19 with commit e12d203b8c880061c0bf0339cad51e5851a33442 and fixed in 7.4-rc1 with commit c206cdfee6c037b829178bb7e17e6e37ddc9aa35

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-99478

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:
include/linux/filelock.h

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/a6e222f1d75bce8de430ba4d0f8c6a1e923f9acd
	https://git.kernel.org/stable/c/c206cdfee6c037b829178bb7e17e6e37ddc9aa35