Linux
SUNRPC: close backchannel before destroying callback service
In the Linux kernel, the following vulnerability has been resolved: SUNRPC: close backchannel before destroying callback service A backchannel receive can complete a request while the NFS callback service is being torn down. xprt_complete_bc_request() removes the request from bc_pa_list, drops bc_alloc_count, marks the request in use, and then asks xprt_enqueue_bc_request() to hand it to the callback service. If teardown has already cleared xprt->bc_serv, xprt_enqueue_bc_request() currently returns without enqueueing or freeing the committed request. The xprt_get() taken on entry is leaked as well. If the producer wins the race before bc_serv is cleared, it can also enqueue onto sv_cb_list after nfs_callback_down() has stopped the callback threads, leaving the request linked to a svc_serv that is about to be freed. Close the producer side before callback threads are stopped. Add xprt_svc_shutdown_bc() to clear xprt->bc_serv under bc_pa_lock, and call it on callback shutdown and callback-start failure before stopping the service threads. Requests that lose the NULL transition in xprt_enqueue_bc_request() are released through the normal backchannel free path after balancing bc_slot_count. Finally, drain any remaining sv_cb_list requests after the callback threads have stopped and before svc_destroy() frees the service.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 441244d4273a8037b265fd254dfdaca5fa736ee2, < 6debde9e3e6ae21dcca75837b4247b13ca4ea2b8
- >= 441244d4273a8037b265fd254dfdaca5fa736ee2, < 3674f780f47d2906b5a0f7199b66973067bdfeca
Fixed in 6debde9e3e6ae21dcca75837b4247b13ca4ea2b8, 3674f780f47d2906b5a0f7199b66973067bdfeca
- 6.19
Fixed in 0, 7.2.4, 7.3
Mitigation
Upgrade Linux to 6debde9e3e6ae21dcca75837b4247b13ca4ea2b8 or 3674f780f47d2906b5a0f7199b66973067bdfeca or later.
Upgrade Linux to 0 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.