Skip to contentSkip to conversation

CVE-2026-90151: NFSv4: remove callback IDR entry on client allocation failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

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

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

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

NFSv4: remove callback IDR entry on client allocation failure

nfs4_alloc_client() allocates an NFSv4.0 callback identifier before it finishes setting up the client. If any later initialization step fails, the error path frees the nfs_client directly with nfs_free_client(). That bypasses nfs_put_client(), which is where the callback IDR entry is removed during normal teardown.

A failed allocation can therefore leave cb_ident_idr pointing at a freed nfs_client. A later NFSv4.0 callback lookup by cb_ident would find the stale pointer and take a reference to it.

Make the callback IDR removal helper callable by the allocation failure path, and remove the callback identifier before freeing the client.

This was found by a local static-analysis checker for publish-before-free lifetime bugs and confirmed by manual inspection.

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

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

	Issue introduced in 2.6.38 with commit f4eecd5da3422e82e88e36c33cbd2595eebcacb1 and fixed in 5.10.270 with commit 68c721391b761dbe38d5b0094d2bb6e8489ad92b
	Issue introduced in 2.6.38 with commit f4eecd5da3422e82e88e36c33cbd2595eebcacb1 and fixed in 5.15.221 with commit 9bfdd0f591307b5198826a0e7a5b2f35f87acd2d
	Issue introduced in 2.6.38 with commit f4eecd5da3422e82e88e36c33cbd2595eebcacb1 and fixed in 6.1.188 with commit 7c4812eb96bdcafb31a65b12f2aa96659429d1d4
	Issue introduced in 2.6.38 with commit f4eecd5da3422e82e88e36c33cbd2595eebcacb1 and fixed in 6.6.157 with commit fc95ca82d5ae598c428ab5a00ae69f8526d59371
	Issue introduced in 2.6.38 with commit f4eecd5da3422e82e88e36c33cbd2595eebcacb1 and fixed in 6.12.110 with commit 80b1c3d5a881f7d9081aa9f46da9742878a0f893
	Issue introduced in 2.6.38 with commit f4eecd5da3422e82e88e36c33cbd2595eebcacb1 and fixed in 6.18.52 with commit 3f2387e8bfbc4efda5d77c3a11a028d0a119c48f
	Issue introduced in 2.6.38 with commit f4eecd5da3422e82e88e36c33cbd2595eebcacb1 and fixed in 7.2.6 with commit 5891c03e150920618db0e9c4ea2d772abacdcfd1
	Issue introduced in 2.6.38 with commit f4eecd5da3422e82e88e36c33cbd2595eebcacb1 and fixed in 7.3-rc1 with commit d05c2007b3d84ccba11dc6e9cb3202768cc72f14

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

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/nfs/client.c
fs/nfs/internal.h
fs/nfs/nfs4client.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/68c721391b761dbe38d5b0094d2bb6e8489ad92b
	https://git.kernel.org/stable/c/9bfdd0f591307b5198826a0e7a5b2f35f87acd2d
	https://git.kernel.org/stable/c/7c4812eb96bdcafb31a65b12f2aa96659429d1d4
	https://git.kernel.org/stable/c/fc95ca82d5ae598c428ab5a00ae69f8526d59371
	https://git.kernel.org/stable/c/80b1c3d5a881f7d9081aa9f46da9742878a0f893
	https://git.kernel.org/stable/c/3f2387e8bfbc4efda5d77c3a11a028d0a119c48f
	https://git.kernel.org/stable/c/5891c03e150920618db0e9c4ea2d772abacdcfd1
	https://git.kernel.org/stable/c/d05c2007b3d84ccba11dc6e9cb3202768cc72f14