Linux: iommu/arm-smmu-v3: Manage teardown with devm
What fixes it
- 64b1a9384db9cabf1bde378a2d5c1923fd67ea0dLinuxCVE List
- 981686f4137760a16a03c5193f11d85133533f93LinuxCVE List
- 2235eafda9b3df9295efd0593cd4a8977440c3f6LinuxCVE List
- 78fd5a2d65f3546cb4285f8e52f445baecbd00e0LinuxCVE List
- 2bd22a0d40503a65d243b011de146603c8ce1cbcLinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
iommu/arm-smmu-v3: Manage teardown with devm
arm_smmu_device_remove() manually frees the IOPF queue, destroys the vmid_map and disables the device, while the IRQs and queues are devm managed. devm unwinds only after remove() returns, so the cleanup runs in the wrong order. The IOPF queue is freed before the event-queue IRQ whose handler uses it.
Manage all of it with devm so the unwind order is correct. Free the IOPF queue and vmid_map via devm actions, and disable the device from one registered after arm_smmu_device_reset().
This is also a prerequisite for fixing a Tegra241 CMDQV CMD_SYNC use-after-free in the subsequent patch.
Text from CVE List
Affected versions 12
- Linuxaffected: 395ad89d11fd93f79a6b942e91fc409807a63c4b before 64b1a9384db9cabf1bde378a2d5c1923fd67ea0dCVE List
- Linuxaffected: 395ad89d11fd93f79a6b942e91fc409807a63c4b before 981686f4137760a16a03c5193f11d85133533f93CVE List
- Linuxaffected: 395ad89d11fd93f79a6b942e91fc409807a63c4b before 2235eafda9b3df9295efd0593cd4a8977440c3f6CVE List
- Linuxaffected: 395ad89d11fd93f79a6b942e91fc409807a63c4b before 78fd5a2d65f3546cb4285f8e52f445baecbd00e0CVE List
- Linuxaffected: 395ad89d11fd93f79a6b942e91fc409807a63c4b before 2bd22a0d40503a65d243b011de146603c8ce1cbcCVE List
- Linuxaffected: 5.14CVE List
- Linuxunaffected: all versions before 5.14CVE List
- Linuxunaffected: 6.6.160 through 6.6.*CVE List
- Linuxunaffected: 6.12.109 through 6.12.*CVE List
- Linuxunaffected: 6.18.50 through 6.18.*CVE List
- Linuxunaffected: 7.2.4 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 5
- git.kernel.org/stable/c/64b1a9384db9cabf1bde378a2d5c1923fd67ea0dReferencevia CVE List
- git.kernel.org/stable/c/981686f4137760a16a03c5193f11d85133533f93Referencevia CVE List
- git.kernel.org/stable/c/2235eafda9b3df9295efd0593cd4a8977440c3f6Referencevia CVE List
- git.kernel.org/stable/c/78fd5a2d65f3546cb4285f8e52f445baecbd00e0Referencevia CVE List
- git.kernel.org/stable/c/2bd22a0d40503a65d243b011de146603c8ce1cbcReferencevia CVE List