iommu/tegra241-cmdqv: Don't fall back to a freed smmu after devm_krealloc()
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/tegra241-cmdqv: Don't fall back to a freed smmu after devm_krealloc()
__tegra241_cmdqv_probe() uses devm_krealloc() to grow @smmu into the larger tegra241_cmdqv, which frees the original @smmu once it relocates. A failure after that returned NULL, and the caller then dereferenced the freed @smmu on its fallback path.
Return an int and take @smmu by reference instead, then update *smmu to the reallocated pointer after devm_krealloc() succeeds, so the caller and its fallback path both use the live @smmu rather than the freed original.
From the CVE record · Linux
The Linux kernel’s Tegra241 CMDQV probe can leave its caller with a freed SMMU pointer after a reallocation succeeds and a later operation fails. The caller may then dereference that pointer on its fallback path. The input does not establish how an attacker could trigger this condition or whether access or user interaction is required.
Engineers running Linux kernels with the Tegra241 CMDQV driver should check their kernel; affected versions are not specified.