Skip to contentSkip to conversation

CVE-2026-99553: nfsd: fix race between client_info_show() and free_client()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 19

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 race between client_info_show() and free_client()

client_info_show() renders /proc/fs/nfsd/clients/<id>/info and walks clp->cl_sessions under clp->cl_lock to print each session's slot counts. free_client() tears down the same list without taking cl_lock, and is the only unlocked mutator of cl_sessions. A reader can observe a client mid-teardown because get_nfsdfs_clp() pins the nfs4_client but not its sessions: free_client() frees every session before calling nfsd_client_rmdir(), so an in-flight seq_file reader can follow a list_del()'d node whose ->next now holds LIST_POISON1 and take a general protection fault:

  Oops: general protection fault, probably for non-canonical address
        0xdead00000000014c
  CPU: 1 UID: 0 PID: 132488 Comm: cat
  RIP: 0010:client_info_show+0x2bf/0x3d0
  RAX: dead000000000100
  Call Trace:
   seq_read_iter+0x12a/0x4b0
   seq_read+0xf1/0x130
   vfs_read+0xbf/0x350
   ksys_read+0x6f/0xf0
   do_syscall_64+0x8b/0xcb0
   entry_SYSCALL_64_after_hwframe+0x76/0x7e
  Kernel panic - not syncing: Fatal exception

Detach cl_sessions onto a local reaplist under cl_lock, then free the sessions after dropping the lock. Removing entries from cl_sessions under cl_lock matches unhash_session(), and the detach-then-reap shape matches how __destroy_client() reaps cl_delegations. The sessions cannot be freed while cl_lock is held, since free_session() calls nfsd4_del_conns(), which re-acquires it.

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

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

	Issue introduced in 6.14 with commit 601c8cb349c2d9a3a6cea6f53e0bf838e2e60893 and fixed in 6.18.61 with commit f43a5d7b665cf04199a3e8ea0dddc9e2dbd5ada6
	Issue introduced in 6.14 with commit 601c8cb349c2d9a3a6cea6f53e0bf838e2e60893 and fixed in 7.3.2 with commit 7f6a52f076d4ebbd91868b06e9546ada829cf101
	Issue introduced in 6.14 with commit 601c8cb349c2d9a3a6cea6f53e0bf838e2e60893 and fixed in 7.4-rc1 with commit ee62dc03a69ee57855de35da1a8ab53b51d30b32

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

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/f43a5d7b665cf04199a3e8ea0dddc9e2dbd5ada6
	https://git.kernel.org/stable/c/7f6a52f076d4ebbd91868b06e9546ada829cf101
	https://git.kernel.org/stable/c/ee62dc03a69ee57855de35da1a8ab53b51d30b32