Skip to contentSkip to conversation

CVE-2026-53026: NFSD: fix nfs4_file access extra count in nfsd4_add_rdaccess_to_wrdeleg

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jun 24

lore
Share & tools
lore
#0 lore raw

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

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

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

NFSD: fix nfs4_file access extra count in nfsd4_add_rdaccess_to_wrdeleg

In nfsd4_add_rdaccess_to_wrdeleg, if fp->fi_fds[O_RDONLY] is already set by another thread, __nfs4_file_get_access should not be called to increment the nfs4_file access count since that was already done by the thread that added READ access to the file. The extra fi_access count in nfs4_file can prevent the corresponding nfsd_file from being freed.

When stopping nfs-server service, these extra access counts trigger a BUG in kmem_cache_destroy() that shows nfsd_file object remaining on __kmem_cache_shutdown.

This problem can be reproduced by running the Git project's test suite over NFS.

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

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

	Issue introduced in 6.18.4 with commit c07dc84ed67c5a182273171639bacbbb87c12175 and fixed in 6.18.33 with commit 4584229395d0d65bd517780afe97ffea07cb2c3d
	Issue introduced in 6.19 with commit 8072e34e1387d03102b788677d491e2bcceef6f5 and fixed in 7.0.10 with commit b81572b073441dfd32213e41857676d0dbff4665
	Issue introduced in 6.19 with commit 8072e34e1387d03102b788677d491e2bcceef6f5 and fixed in 7.1 with commit b48f44f36e6607b2f818560f19deb86b4a9c717b

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

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/nfsd/nfs4state.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/4584229395d0d65bd517780afe97ffea07cb2c3d
	https://git.kernel.org/stable/c/b81572b073441dfd32213e41857676d0dbff4665
	https://git.kernel.org/stable/c/b48f44f36e6607b2f818560f19deb86b4a9c717b