CVE-2025-71070: ublk: clean up user copy references on ublk server exit
In the Linux kernel, the following vulnerability has been resolved:
ublk: clean up user copy references on ublk server exit
If a ublk server process releases a ublk char device file, any requests dispatched to the ublk server but not yet completed will retain a ref value of UBLKREFCOUNTINIT. Before commit e63d2228ef83 ("ublk: simplify aborting ublk request"), ublkfailreq() would decrement the reference count before completing the failed request. However, that commit optimized ublkfailreq() to call ublkcompleterq() directly without decrementing the request reference count. The leaked reference count incorrectly allows user copy and zero copy operations on the completed ublk request. It also triggers the WARNONONCE(refcountread(&io->ref)) warnings in ublkqueuereinit() and ublkdeinitqueue(). Commit c5c5eb24ed61 ("ublk: avoid ublkiorelease() called after ublk char dev is closed") already fixed the issue for ublk devices using UBLKFSUPPORTZEROCOPY or UBLKFAUTOBUFREG. However, the reference count leak also affects UBLKFUSERCOPY, the other reference-counted data copy mode. Fix the condition in ublkcheckandresetactiveref() to include all reference-counted data copy modes. This ensures that any ublk requests still owned by the ublk server when it exits have their reference counts reset to 0.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-71070?
CVE-2025-71070 is classified as a low severity vulnerability.
How do I fix CVE-2025-71070?
To fix CVE-2025-71070, update your Linux kernel to the latest patched version.
Which software is affected by CVE-2025-71070?
CVE-2025-71070 affects the Linux kernel's ublk server feature.
What are the potential impacts of CVE-2025-71070?
CVE-2025-71070 can lead to improper handling of user copy references upon server exit.
Is CVE-2025-71070 exploitable remotely?
CVE-2025-71070 may be exploitable remotely if the ublk server is exposed to malicious requests.