PT-2026-166515

CVE-2026-142792

·

Published

2026-12-03

·

Updated

2026-12-03

Description by

Score
N/A
Not available

No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.

In the Linux kernel, the following vulnerability has been resolved:
resource: report a devm request resource() conflict under the lock
devm request resource() calls request resource conflict(), which takes resource lock, 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 release resource() 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 devm request resource(devB, root, resB) request resource conflict() write lock(&resource lock) request resource() -> resA write unlock(&resource lock) devres release all(devA) devm resource release() release resource(resA) put device() -> kfree(resA) dev err(..., 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 devm request pci bus resources(), called from host bridge probe for every bridge window; the windows are the embedded struct resource of kzalloc'ed resource entry objects that pci free resource list() frees when the other bridge is released. In the common case the "resource collision" message is garbled; with the slab object poisoned (CONFIG SLUB DEBUG) or reused, formatting conflict->name oopses, and KASAN reports a slab-use-after-free read in devm request resource(). 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 resource lock, insert with request resource() 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 x86 64 and RISC-V; the resource KUnit tests pass on both.
Found by formal verification of kernel/resource.c against the kernel binary.
Vendors
Affected products
Related identifiers
Found an issue in the description? Have something to add? Feel free to write us 👾