CRITICAL Introduced in 6.18
sunrpc ProcInfo DoubleFree
CVE-2026-72220
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI9.8CRITICAL
01Description
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.
02KernelScan AI Analysis
Risk summary
A remote, unauthenticated attacker can trigger a double-free in the kernel's SUN RPC server by sending a sequence of valid then malformed RPC requests. This can lead to kernel memory corruption, information disclosure, privilege escalation, or denial of service on any system running a kernel RPC service such as NFS.
Vulnerability analysis
When a kernel RPC worker thread finishes processing a request, the release callback is invoked but the pointer to the procedure information is not cleared. If the same worker thread then picks up a new request and hits an early error path — such as an unsupported protocol, a short frame, or failed authentication — before new procedure information is installed, the stale pointer causes the release callback to fire again against already-freed state, producing a double-free or use-after-free. The fix clears the procedure information pointer both immediately after the release callback runs and at the start of every new request in both the forward and backchannel paths, so error flows can never encounter a stale pointer. Any network client that can reach the RPC server can trigger this; no authentication is required because malformed requests that fail early are sufficient.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.18 | 6.18 | 6.18.40 | 66014ab165cb |
| 7.1 | 6.18 | 7.1.5 | 31ba490c02d4 |
| mainline | 6.18 | 7.2-rc1 | 18d216788bef |