Skip to contentSkip to conversation

CVE-2026-72220: sunrpc: harden rq_procinfo lifecycle to prevent double-free

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 15

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: harden rq_procinfo lifecycle to prevent double-free

The svc_release_rqst() function executes the callback inside rqstp->rq_procinfo->pc_release. However, if a worker thread begins processing a new request and encounters an early error path (e.g., unsupported protocol, short frame, or bad auth) before a valid rq_procinfo is installed, a stale release hook can be re-triggered against reused state from the previous RPC, resulting in a double-free or use-after-free vulnerability.

Harden the lifecycle of rq_procinfo by:
1. Ensuring svc_release_rqst() always clears rq_procinfo after the optional pc_release() call, regardless of whether the hook exists.
2. Explicitly clearing rq_procinfo at request entry in svc_process() before any early decode or drop paths.
3. Ensuring svc_process_bc() does the same at backchannel entry.

This guarantees that error flows will not encounter a non-NULL stale rq_procinfo pointer when there is nothing to release.

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

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

	Issue introduced in 6.18 with commit d9adbb6e10bf7d4223d3d521ede1b2052903bc5e and fixed in 6.18.40 with commit 66014ab165cb01bfef5836939412a8ef98d5d5ff
	Issue introduced in 6.18 with commit d9adbb6e10bf7d4223d3d521ede1b2052903bc5e and fixed in 7.1.5 with commit 31ba490c02d476a5e4f90b8845932ac9db8aa71b
	Issue introduced in 6.18 with commit d9adbb6e10bf7d4223d3d521ede1b2052903bc5e and fixed in 7.2-rc1 with commit 18d216788bef06332ff8901670ecf1ed8f6eb614

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

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/66014ab165cb01bfef5836939412a8ef98d5d5ff
	https://git.kernel.org/stable/c/31ba490c02d476a5e4f90b8845932ac9db8aa71b
	https://git.kernel.org/stable/c/18d216788bef06332ff8901670ecf1ed8f6eb614