HIGH
dm Clone Request Double-Free
CVE-2026-43278
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.7HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: dm: clear cloned request bio pointer when last clone bio completes Stale rq->bio values have been observed to cause double-initialization of cloned bios in request-based device-mapper targets, leading to use-after-free and double-free scenarios. One such case occurs when using dm-multipath on top of a PCIe NVMe namespace, where cloned request bios are freed during blk_complete_request(), but rq->bio is left intact. Subsequent clone teardown then attempts to free the same bios again via blk_rq_unprep_clone(). The resulting double-free path looks like: nvme_pci_complete_batch() nvme_complete_batch() blk_mq_end_request_batch() blk_complete_request() // called on a DM clone request bio_endio() // first free of all clone bios ... rq->end_io() // end_clone_request() dm_complete_request(tio->orig) dm_softirq_done() dm_done() dm_end_request() blk_rq_unprep_clone() // second free of clone bios Fix this by clearing the clone request's bio pointer when the last cloned bio completes, ensuring that later teardown paths do not attempt to free already-released bios.
02KernelScan AI Analysis
Risk summary
Local users with low privileges can trigger a double-free vulnerability in device-mapper's request cloning mechanism, potentially leading to kernel memory corruption and privilege escalation. The vulnerability affects systems using request-based device-mapper targets such as dm-multipath.
Vulnerability analysis
The root cause is that device-mapper fails to clear the clone request's bio pointer after freeing cloned bios during completion, leaving a stale pointer. When the request teardown path later calls blk_rq_unprep_clone(), it attempts to free the same bios again, causing a double-free. The fix clears tio->clone->bio = NULL when the last cloned bio completes, preventing the second free attempt. This affects local users who can trigger I/O operations through device-mapper targets, requiring only basic system access to reach the vulnerable code path.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.1 | 6.1.165 | 8d9ddad56113 |
| 6.12 | 6.12.75 | e2e738e8dfbb |
| 6.18 | 6.18.16 | b1c1a2637ebd |
| 6.19 | 6.19.6 | 83d720918046 |
| 6.6 | 6.6.128 | 7daf279c674d |
| mainline | 7.0 | fb8a6c18fb9a |