CVE-2026-142792: resource: report a devm_request_resource() conflict under the lock
In the Linux kernel, the following vulnerability has been resolved:
resource: report a devmrequestresource() conflict under the lock
devmrequestresource() calls requestresourceconflict(), which takes resourcelock, tries to insert the new resource and returns a pointer to the conflicting resource after dropping the lock. The error message is then formatted from that pointer: conflict->name and the %pR argument read the name, start, end, flags and desc of a resource that nothing pins any more. The owner of the conflicting resource may call releaseresource() and free it the moment the lock is dropped.
The conflicting resource normally belongs to another device. With two devices whose drivers claim overlapping regions (two PCI host bridges whose "ranges" windows overlap, two instances of a controller on the same aperture, or a stale claim an administrator is replacing), the following interleaving reads freed memory:
CPU 0: driver B probe CPU 1: driver A unbind devmrequestresource(devB, root, resB) requestresourceconflict() writelock(&resourcelock) requestresource() -> resA writeunlock(&resourcelock) devresreleaseall(devA) devmresourcerelease() releaseresource(resA) putdevice() -> kfree(resA) deverr(..., resA->name, resA) use after free
Both halves are reachable from userspace on any kernel: a write to the "unbind" file of the driver that holds the region and a write to the "bind" file of the driver that wants it. One in-tree path is drivers/pci/bus.c devmrequestpcibusresources(), called from host bridge probe for every bridge window; the windows are the embedded struct resource of kzalloc'ed resourceentry objects that pcifreeresourcelist() frees when the other bridge is released. In the common case the "resource collision" message is garbled; with the slab object poisoned (CONFIGSLUBDEBUG) or reused, formatting conflict->name oopses, and KASAN reports a slab-use-after-free read in devmrequestresource(). All of this happens in a probe that is already failing with -EBUSY. The window is a few hundred instructions wide and exists only when two devices actually collide, so the race has not been observed outside of analysis.
Do the same here: take resourcelock, insert with requestresource() and print the diagnostic while the lock still keeps the conflicting resource in the tree, then drop the lock. The return values and the devres handling are unchanged.
The change was built for x8664 and RISC-V; the resource KUnit tests pass on both.
Found by formal verification of kernel/resource.c against the kernel binary.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.275 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.3-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.117-1Fixed in 7.3.3-1
Event History
Frequently Asked Questions
What systems are most likely to encounter this issue?
Systems with drivers that claim overlapping resource regions are exposed. Examples include overlapping PCI host-bridge ranges, multiple controller instances using the same aperture, or replacement of a stale administrator-created resource claim.
What timing is required for the use-after-free to occur?
One driver must attempt to claim a resource and receive a conflict while another driver unbinds and releases the conflicting resource. The release must occur after request_resource_conflict() drops resource_lock but before the conflict information is used to format the error message.
Is the conflicting resource necessarily owned by the driver reporting the error?
No. The conflicting resource normally belongs to another device, and its owner can release and free it once the resource lock has been dropped.