iommu/arm-smmu-v3: Don't unregister on shutdown
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iommu/arm-smmu-v3: Don't unregister on shutdown
Similar to SMMUv2, this driver calls iommu_device_unregister() from the shutdown path, which removes the IOMMU groups with no coordination whatsoever with their users - shutdown methods are optional in device drivers. This can lead to NULL pointer dereferences in those drivers' DMA API calls, or worse.
Instead of calling the full arm_smmu_device_remove() from arm_smmu_device_shutdown(), let's pick only the relevant function call - arm_smmu_device_disable() - more or less the reverse of arm_smmu_device_reset() - and call just that from the shutdown path.
From the CVE record · Linux
The Linux kernel's arm-smmu-v3 driver can unregister IOMMU groups during shutdown without coordinating with drivers that use them. This can cause NULL pointer dereferences in those drivers' DMA API calls, or worse. The input does not describe an attack path or authentication requirements.
Engineers running Linux kernels that use the arm-smmu-v3 driver should check their versions; affected versions are not specified.