Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
nfsd: defer vfree of compound ops to fix rpc_status UAF
The rpc_status netlink dumpit walks every in-flight svc_rqst under rcu_read_lock and, for NFSv4 requests, reads opnums out of args->ops[]. But args->ops is a separate vmalloc buffer freed synchronously by vfree() in nfsd4_release_compoundargs() at the end of every compound. The dumpit’s rcu_read_lock pins the svc_rqst struct itself (freed via kfree_rcu), but nothing defers the vfree of the ops buffer across the RCU grace period. A concurrent compound completion can therefore free the buffer while the dumpit is reading it — a use-after-free on vmalloc memory.
The trailing seqcount recheck (smp_load_acquire of rq_status_counter) cannot undo a load that already retired against freed memory.
Fix by replacing vfree(args->ops) with kvfree_rcu_mightsleep(), which defers the free until after an RCU grace period. This makes the existing rcu_read_lock in the dumpit sufficient to protect the read. The tradeoff is that completed compound ops buffers (up to 200 * sizeof(struct nfsd4_op)) persist in memory slightly longer, across one grace period, before being reclaimed.
Details
- Affected product:
- AlmaLinux 9.2 ESU , Debian 10 ELS , Debian 11 ELS , TuxCare 9.6 ESU , TuxCare 9.8 ESU
- Affected packages:
- linux @ 5.10.259 (+4 more)
Fixes
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| AlmaLinux 10 | In Rollout |
73 kernels
|
| AlmaLinux 9 | Released |
106 kernels
|
| Debian 13 | Released |
17 kernels
|
| Oracle Linux 10 | In Rollout |
57 kernels
|
| Oracle Linux 9 | Released |
99 kernels
|
| RHEL 10 | In Rollout |
74 kernels
|
| RHEL 9 | Released |
105 kernels
|
| Rocky Linux 10 | In Rollout |
56 kernels
|
| Rocky Linux 9 | Released |
81 kernels
|