iommu/arm-smmu: fix possible null-ptr-deref in arm_smmu_device_probe()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
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: fix possible null-ptr-deref in arm_smmu_device_probe()
It will cause null-ptr-deref when using 'res', if platform_get_resource() returns NULL, so move using 'res' after devm_ioremap_resource() that will check it to avoid null-ptr-deref. And use devm_platform_get_and_ioremap_resource() to simplify code.
From the CVE record · Linux
The Linux kernel's arm-smmu device probe can dereference a null pointer if platform_get_resource() returns NULL. This can cause a kernel fault; the input does not specify how an attacker could trigger it or whether access or user interaction is required.
Engineers running the Linux kernel should check whether their builds include the affected arm-smmu code; affected versions are not specified.