Skip to contentSkip to conversation

CVE-2026-89547: SUNRPC: Check svc pool percpu counter allocation

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 11

lore
Share & tools
lore
#0 lore raw

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

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

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

SUNRPC: Check svc pool percpu counter allocation

__svc_create() initializes three per-pool percpu_counter stats and ignores every return value. On SMP, percpu_counter_init() fails when __alloc_percpu_gfp() cannot satisfy the allocation, leaving the failed counter with fbc->counters == NULL and its embedded raw_spinlock_t, list_head, and count never initialized. __svc_create() returns the half-constructed svc_serv to nfsd, lockd, or the NFS callback service anyway.

Once that service is live, the hot-path increments in svc_xprt_enqueue(), svc_handle_xprt(), and svc_pool_wake_idle_thread() reach a counter whose backing pointer is NULL. The pointer is a per-cpu offset, so the access does not fault:
it resolves to offset zero of the current CPU's per-cpu area and silently corrupts whatever variable lives there. A /proc/fs/nfsd/pool_stats read walks the same NULL per-cpu storage and returns garbage, and on CONFIG_DEBUG_SPINLOCK or lockdep it splats on the never-initialized lock.

Creating the broken service requires a percpu allocation failure during RPC server startup, so it is reachable only by a local administrator under memory pressure or fault injection; a remote peer cannot induce the bad state on its own.

Check each percpu_counter_init() return value in __svc_create() and fail when an allocation fails, unwinding the counters already set up in the current pool and in every pool initialized before it. A discrete percpu_counter_destroy() per counter at teardown frees each per-cpu allocation exactly once.

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

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

	Issue introduced in 6.3 with commit ccf08bed6e7a80519569456edd2ea21b7b1701c6 and fixed in 6.12.109 with commit 3a2b7649de76376a69f1d3ed2a539fb15907cd4d
	Issue introduced in 6.3 with commit ccf08bed6e7a80519569456edd2ea21b7b1701c6 and fixed in 6.18.50 with commit bd1ef2cfb44d72b7aa6943e87b206eb0e30fbd0c
	Issue introduced in 6.3 with commit ccf08bed6e7a80519569456edd2ea21b7b1701c6 and fixed in 7.2.4 with commit b541a15046976e481618726cc23db0fb22d576db
	Issue introduced in 6.3 with commit ccf08bed6e7a80519569456edd2ea21b7b1701c6 and fixed in 7.3-rc1 with commit 43e11e164704dde975c9edb370de1a06bec67270

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

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:
net/sunrpc/svc.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/3a2b7649de76376a69f1d3ed2a539fb15907cd4d
	https://git.kernel.org/stable/c/bd1ef2cfb44d72b7aa6943e87b206eb0e30fbd0c
	https://git.kernel.org/stable/c/b541a15046976e481618726cc23db0fb22d576db
	https://git.kernel.org/stable/c/43e11e164704dde975c9edb370de1a06bec67270