Skip to contentSkip to conversation

CVE-2026-46100: fs: afs: revert mmap_prepare() change

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

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

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

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

fs: afs: revert mmap_prepare() change

Partially reverts commit 9d5403b1036c ("fs: convert most other generic_file_*mmap() users to .mmap_prepare()").

This is because the .mmap invocation establishes a refcount, but .mmap_prepare is called at a point where a merge or an allocation failure might happen after the call, which would leak the refcount increment.

Functionality is being added to permit the use of .mmap_prepare in this case, but in the interim, we need to fix this.

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

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

	Issue introduced in 6.17 with commit 9d5403b1036cdcd4be0f9f5568612c0e60e73d79 and fixed in 6.18.27 with commit f51f85c044809fbd39ac8ae07ac99bc43ce32bd5
	Issue introduced in 6.17 with commit 9d5403b1036cdcd4be0f9f5568612c0e60e73d79 and fixed in 7.0.4 with commit 48c7a0eaeea41da17d1d84d2d7a4c40be122b246
	Issue introduced in 6.17 with commit 9d5403b1036cdcd4be0f9f5568612c0e60e73d79 and fixed in 7.1-rc1 with commit fbfc6578eaca12daa0c09df1e9ba7f2c657b49da

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

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/afs/file.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/f51f85c044809fbd39ac8ae07ac99bc43ce32bd5
	https://git.kernel.org/stable/c/48c7a0eaeea41da17d1d84d2d7a4c40be122b246
	https://git.kernel.org/stable/c/fbfc6578eaca12daa0c09df1e9ba7f2c657b49da