{"id":"CVE-2026-139538","aliases":["CVE-2026-139538"],"related":[],"kind":"vulnerability","state":"published","title":"iommu/arm-smmu-v3: Don't rb_erase() a never-inserted stream node","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\niommu/arm-smmu-v3: Don't rb_erase() a never-inserted stream node\n\narm_smmu_insert_master() skips inserting a stream whose StreamID duplicates\none the same master already owns (bridged PCI devices can present duplicate\nIDs), leaving that master->streams[i].node zeroed and unlinked from the\nsmmu->streams rb-tree.\n\nBoth the insert error-rollback loop and arm_smmu_remove_master() then call\nrb_erase() on every master->streams[i].node unconditionally. rb_erase() on\na zeroed node sees a NULL parent, treats the node as the tree root and sets\nroot->rb_node = NULL, silently emptying the whole SID tree and breaking SID\nlookups (and DMA) for every other master on the SMMU.\n\nMark each node with RB_CLEAR_NODE() after sort_nonatomic() reorders the\narray, since sorting relocates the entries and would leave the earlier\nself-referential RB_CLEAR_NODE() pointer stale. An un-inserted node then\nstays RB_EMPTY_NODE() and is skipped in both erase loops; inserted nodes\nare linked by rb_find_add() and erased as before.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\niommu/arm-smmu-v3: Don't rb_erase() a never-inserted stream node\n\narm_smmu_insert_master() skips inserting a stream whose StreamID duplicates\none the same master already owns (bridged PCI devices can present duplicate\nIDs), leaving that master->streams[i].node zeroed and unlinked from the\nsmmu->streams rb-tree.\n\nBoth the insert error-rollback loop and arm_smmu_remove_master() then call\nrb_erase() on every master->streams[i].node unconditionally. rb_erase() on\na zeroed node sees a NULL parent, treats the node as the tree root and sets\nroot->rb_node = NULL, silently emptying the whole SID tree and breaking SID\nlookups (and DMA) for every other master on the SMMU.\n\nMark each node with RB_CLEAR_NODE() after sort_nonatomic() reorders the\narray, since sorting relocates the entries and would leave the earlier\nself-referential RB_CLEAR_NODE() pointer stale. An un-inserted node then\nstays RB_EMPTY_NODE() and is skipped in both erase loops; inserted nodes\nare linked by rb_find_add() and erased as before.","source":"cvelist"}],"published":"2026-11-30T13:35:41.244Z","modified":"2026-11-30T14:19:30.600Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"98e634aa4b5d8a2766789785d4d1bcbefab0bc5c","fixed":"535bcf5895519650b4fee9d01ed42fda81f3dd0f","status":"affected"},{"type":"git","introduced":"b00d24997a11c10d3e420614f0873b83ce358a34","fixed":"7bd2c17d756a97c8fd590460382eac97bd74ccc9","status":"affected"},{"type":"git","introduced":"b00d24997a11c10d3e420614f0873b83ce358a34","fixed":"57729bca305c529a2a8dd08e1733002bb6daab9b","status":"affected"},{"type":"git","introduced":"b00d24997a11c10d3e420614f0873b83ce358a34","fixed":"2888520bdcbe0599cfc77b2fad8dc6c95505a3cb","status":"affected"},{"type":"git","version":"655e607898f8cdfdb29fd2a6e618d11de99ec17a","status":"affected"},{"type":"git","version":"8316820e4082052666872398a31c91668d1f8461","status":"affected"},{"type":"git","version":"4306dbd7676e41032813620e49cd821a25559852","status":"affected"},{"type":"git","version":"47a17be21a625f6c67a8a486867ffcc7eefecc97","status":"affected"},{"type":"semver","introduced":"6.12.28","fixed":"6.12.120","status":"affected"},{"type":"semver","introduced":"5.15.182","fixed":"5.16","status":"affected"},{"type":"semver","introduced":"6.1.138","fixed":"6.2","status":"affected"},{"type":"semver","introduced":"6.6.90","fixed":"6.7","status":"affected"},{"type":"semver","introduced":"6.14.6","fixed":"6.15","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.15","status":"unaffected"},{"type":"semver","introduced":"6.12.120","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.66","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/535bcf5895519650b4fee9d01ed42fda81f3dd0f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7bd2c17d756a97c8fd590460382eac97bd74ccc9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/57729bca305c529a2a8dd08e1733002bb6daab9b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2888520bdcbe0599cfc77b2fad8dc6c95505a3cb","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139538","url":"https://www.cve.org/CVERecord?id=CVE-2026-139538","licence":"CVE Terms of Use","modified":"2026-11-30T13:35:41.244Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139538","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139538","licence":"Public domain","modified":"2026-11-30T14:19:30.600Z"}],"updatedAt":"2026-11-30T14:33:38.267Z","epss":{"score":0.00168,"percentile":0.06328,"date":"2026-12-01T12:00:22.000Z"}}