iommu/riscv: prevent NULL deref in iova_to_phys
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/riscv: prevent NULL deref in iova_to_phys
The riscv_iommu_pte_fetch() function returns either NULL for unmapped/never-mapped iova, or a valid leaf pte pointer that requires no further validation.
riscv_iommu_iova_to_phys() failed to handle NULL returns. Prevent null pointer dereference in riscv_iommu_iova_to_phys(), and remove the pte validation.
From the CVE record · Linux
The Linux kernel’s RISC-V IOMMU code can dereference a NULL pointer when translating an unmapped or never-mapped IOVA. The input does not specify an attacker path, authentication requirement, or user interaction condition.
Engineers running Linux kernels with RISC-V IOMMU support should check their deployments; affected versions are not specified.