Skip to contentSkip to conversation

CVE-2026-90038: NFSD: Prevent client use-after-free during export state revocation

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

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: Prevent client use-after-free during export state revocation

nfsd4_revoke_export_states() has the same use-after-free as nfsd4_revoke_states(): it drops nn->client_lock across revoke_one_stid() and the following read of clp->cl_minorversion, but the stateid reference it holds does not pin the client. A teardown racing the dropped lock can free the client while revoke_one_stid() still dereferences it.

exportfs -u drives this path through NFSD_CMD_UNLOCK_EXPORT, so an administrator removing an export can race a client expiry.

Skip a client that is already expiring and otherwise pin it with cl_rpc_users under client_lock before dropping the lock, matching nfsd4_revoke_states().

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

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

	Issue introduced in 7.2 with commit 2eac189bb059d31a29937b29ee0f477394198610 and fixed in 7.2.5 with commit c05ae58fe06ce2ac34312f649e71c3596bdde358
	Issue introduced in 7.2 with commit 2eac189bb059d31a29937b29ee0f477394198610 and fixed in 7.3-rc1 with commit 2108de53568a64936a0da3e04d85c35df98d3fb6

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

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/c05ae58fe06ce2ac34312f649e71c3596bdde358
	https://git.kernel.org/stable/c/2108de53568a64936a0da3e04d85c35df98d3fb6