Skip to contentSkip to conversation

CVE-2026-72377: afs: Remove setting of AS_RELEASE_ALWAYS for symlinks and mountpoints

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 15

lore
Share & tools
lore
#0 lore raw

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

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

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

afs: Remove setting of AS_RELEASE_ALWAYS for symlinks and mountpoints

Regular AFS files correctly use afs_file_aops which have release_folio set as netfs_release_folio, so AS_RELEASE_ALWAYS is valid for them when fscache is enabled (set via afs_vnode_set_cache()). Symlinks and mountpoints in AFS use afs_dir_aops, which does not provide a release_folio callback. However, afs_apply_status() unconditionally calls mapping_set_release_always() for these.

In such case when memory management code attempts to release folios, filemap_release_folio() checks folio_needs_release() which returns true due to AS_RELEASE_ALWAYS being set. Since there is no release_folio callback, it falls through to try_to_free_buffers(), which at present expects buffer_heads to be not null. For symlinks and mountpoints without buffer_heads, this causes pointer dereference.

[dh: Added more bits that were missed]

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

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

	Issue introduced in 6.14 with commit eae9e78951bb02a7b94a9adef6e981413d13c564 and fixed in 7.1.5 with commit 9d6b0f6d437e2f8350e08678e5e1d20c11c364f3
	Issue introduced in 6.14 with commit eae9e78951bb02a7b94a9adef6e981413d13c564 and fixed in 7.2-rc2 with commit 81e985b4c3a6cbcc443fcdcd3ebda7fcc845d459

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

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/inode.c
fs/afs/internal.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/9d6b0f6d437e2f8350e08678e5e1d20c11c364f3
	https://git.kernel.org/stable/c/81e985b4c3a6cbcc443fcdcd3ebda7fcc845d459