iommu/arm-smmu-v3: Don't rb_erase() a never-inserted stream node
- CVE-2026-139538
- GHSA-cvwr-fv2f-hgv6
- EUVD-2026-139244
Description
In the Linux kernel, the following vulnerability has been resolved: iommu/arm-smmu-v3: Don't rb_erase() a never-inserted stream node arm_smmu_insert_master() skips inserting a stream whose StreamID duplicates one the same master already owns (bridged PCI devices can present duplicate IDs), leaving that master->streams[i].node zeroed and unlinked from the smmu->streams rb-tree. Both the insert error-rollback loop and arm_smmu_remove_master() then call rb_erase() on every master->streams[i].node unconditionally. rb_erase() on a zeroed node sees a NULL parent, treats the node as the tree root and sets root->rb_node = NULL, silently emptying the whole SID tree and breaking SID lookups (and DMA) for every other master on the SMMU. Mark each node with RB_CLEAR_NODE() after sort_nonatomic() reorders the array, since sorting relocates the entries and would leave the earlier self-referential RB_CLEAR_NODE() pointer stale. An un-inserted node then stays RB_EMPTY_NODE() and is skipped in both erase loops; inserted nodes are linked by rb_find_add() and erased as before.
Text from the CVE.org record.
Recommendation
Linux
- If you run 6.12.xupdate to 6.12.120 or laterPatch update: breaking changes are unlikely
- If you run a version from 6.6.90 to before 6.7update to 6.7 or laterMinor version change: check the release notes
- If you run a version from 6.1.138 to before 6.2update to 6.2 or laterMinor version change: check the release notes
- If you run a version from 5.15.182 to before 5.16update to 5.16 or laterMinor version change: check the release notes
Some affected versions have no stated fix.
Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
Linux
Affected versions Fixed in from 6.12.28 to before 6.12.120 6.12.120 from 6.6.90 to before 6.7 6.7 from 6.1.138 to before 6.2 6.2 from 5.15.182 to before 5.16 5.16 from 6.14.6 to before 6.15 none stated 6.15 none stated before 6.15: not affected none stated from 6.12.120 up to 6.12.*: not affected none stated and 3 more
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.