Linux
sunrpc: defer rq_argp and rq_resp free until after RCU grace period
In the Linux kernel, the following vulnerability has been resolved: sunrpc: defer rq_argp and rq_resp free until after RCU grace period svc_rqst_free() frees rqstp->rq_argp and rqstp->rq_resp synchronously via kfree(), but defers the rqstp struct free via kfree_rcu(). After svc_exit_thread() calls list_del_rcu() and svc_rqst_free(), there is a window where RCU readers that started before list_del_rcu() can still traverse the thread list and find the rqstp. These readers (e.g. nfsd_nl_rpc_status_get_dumpit()) dereference rqstp->rq_argp, which has already been freed — a use-after-free. Fix this by moving the kfree of rq_argp and rq_resp into an explicit call_rcu() callback alongside the struct free. Resources not accessed by RCU readers (bvec, buffer pages, scratch folio, auth_data) remain synchronously freed.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 812443865c5fc255363d4a684a62c086af1addca, < c977158237bccc3d2512d5b17c47ee3760dc8839
- >= 812443865c5fc255363d4a684a62c086af1addca, < 0ea49d69aa806008b2424c8cf21cf746b9963967
- >= 812443865c5fc255363d4a684a62c086af1addca, < 08bc49e0541260bf294962cf889a32a2d2713ad6
- >= 812443865c5fc255363d4a684a62c086af1addca, < e0c5693d3f9a5d4911735ab0e0eba4eecb1f1090
- >= 812443865c5fc255363d4a684a62c086af1addca, < c479bde671cbe2f9e152834a8b0eb7c3c295bbaf
Fixed in c977158237bccc3d2512d5b17c47ee3760dc8839, 0ea49d69aa806008b2424c8cf21cf746b9963967, 08bc49e0541260bf294962cf889a32a2d2713ad6, e0c5693d3f9a5d4911735ab0e0eba4eecb1f1090, c479bde671cbe2f9e152834a8b0eb7c3c295bbaf
- 3.19
Fixed in 0, 6.1.191, 6.12.111, 6.18.50, 7.2.4, 7.3
Mitigation
Upgrade Linux to c977158237bccc3d2512d5b17c47ee3760dc8839 or 0ea49d69aa806008b2424c8cf21cf746b9963967 or 08bc49e0541260bf294962cf889a32a2d2713ad6 or e0c5693d3f9a5d4911735ab0e0eba4eecb1f1090 or c479bde671cbe2f9e152834a8b0eb7c3c295bbaf or later.
Upgrade Linux to 0 or 6.1.191 or 6.12.111 or 6.18.50 or 7.2.4 or 7.3 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.