iommu/msm: Unwind probe state on registration failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 42df43b36163ed7d0ab13992e411093252903273 · < 535a200220ca2c83bc8bf54bd2cbe045d6ee70c4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iommu/msm: Unwind probe state on registration failure
msm_iommu_probe() adds its devm-managed IOMMU object to qcom_iommu_devices before adding the IOMMU sysfs device and registering it with the IOMMU core.
If iommu_device_sysfs_add() fails, probe returns with the object still on qcom_iommu_devices. The driver core then releases the devm allocation, leaving a dangling list entry that later list walks may dereference.
If iommu_device_register() fails, the same dangling list entry remains and the sysfs device is left registered as well.
Unwind the sysfs device and global list entry in reverse setup order on the corresponding failure paths.
From the CVE record · Linux
The msm IOMMU driver can leave a dangling entry in its device list if sysfs setup or IOMMU registration fails during probe. A later list walk may dereference freed memory; the input does not establish whether an attacker can trigger the failure or what access would be needed.
Engineers running Linux kernels with the msm IOMMU driver should check whether their kernel is affected; affected versions were not provided.