| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2022-48894: iommu/arm-smmu-v3: Don't unregister on shutdown |
| |
| Description |
| =========== |
| |
| 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. |
| |
| The Linux kernel CVE team has assigned CVE-2022-48894 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 6.1 with commit 57365a04c92126525a58bf7a1599ddfa832415e9 and fixed in 6.1.7 with commit ead3e6c79479890444c777fd329afc125fecde48 |
| Issue introduced in 6.1 with commit 57365a04c92126525a58bf7a1599ddfa832415e9 and fixed in 6.2 with commit 32ea2c57dc216b6ad8125fa680d31daa5d421c95 |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2022-48894 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| https://git.kernel.org/stable/c/ead3e6c79479890444c777fd329afc125fecde48 |
| https://git.kernel.org/stable/c/32ea2c57dc216b6ad8125fa680d31daa5d421c95 |