resource: report a devm_request_resource() conflict under the lock

Summary

CVECVE-2026-142792
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-12-03 04:18:12 UTC
Updated2026-12-03 04:18:12 UTC
DescriptionIn 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.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 8d38821cbcf51292cd5a23469d03bd38932a3ba9 132b34e1e7fcc09955bda91ac36e9b6c1126b90c git Not specified
CNA Linux Linux affected 8d38821cbcf51292cd5a23469d03bd38932a3ba9 3e8d01c630d3cc781a36cfe29a6c20c0a12bd2d0 git Not specified
CNA Linux Linux affected 8d38821cbcf51292cd5a23469d03bd38932a3ba9 995342b317b1ca8a2b55ef4d7849f6a2ba0200ed git Not specified
CNA Linux Linux affected 8d38821cbcf51292cd5a23469d03bd38932a3ba9 4f071697d1b231c1059b771ef61d4335f1d20d6f git Not specified
CNA Linux Linux affected 8d38821cbcf51292cd5a23469d03bd38932a3ba9 14ab6a4761d2e4a02cb6859aee19788f38a24056 git Not specified
CNA Linux Linux affected 8d38821cbcf51292cd5a23469d03bd38932a3ba9 b3d771544f7d77bf191c7cc47c1f3f6feec1e05b git Not specified
CNA Linux Linux affected 8d38821cbcf51292cd5a23469d03bd38932a3ba9 6cfde28fca86aedb7084ba3dc669153f32ffda83 git Not specified
CNA Linux Linux affected 8d38821cbcf51292cd5a23469d03bd38932a3ba9 d2f7bdfdeac8137e942b32e0badc40e181127d7b git Not specified
CNA Linux Linux affected 3.18 Not specified
CNA Linux Linux unaffected 3.18 semver Not specified
CNA Linux Linux unaffected 5.10.275 5.10.* semver Not specified
CNA Linux Linux unaffected 5.15.226 5.15.* semver Not specified
CNA Linux Linux unaffected 6.1.193 6.1.* semver Not specified
CNA Linux Linux unaffected 6.6.163 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.117 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.61 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.2 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc1 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/3e8d01c630d3cc781a36cfe29a6c20c0a12bd2d0 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/14ab6a4761d2e4a02cb6859aee19788f38a24056 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/4f071697d1b231c1059b771ef61d4335f1d20d6f 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/b3d771544f7d77bf191c7cc47c1f3f6feec1e05b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/6cfde28fca86aedb7084ba3dc669153f32ffda83 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/d2f7bdfdeac8137e942b32e0badc40e181127d7b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/132b34e1e7fcc09955bda91ac36e9b6c1126b90c 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/995342b317b1ca8a2b55ef4d7849f6a2ba0200ed 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report