| 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-2024-27079: iommu/vt-d: Fix NULL domain on device release |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| iommu/vt-d: Fix NULL domain on device release |
| |
| In the kdump kernel, the IOMMU operates in deferred_attach mode. In this |
| mode, info->domain may not yet be assigned by the time the release_device |
| function is called. It leads to the following crash in the crash kernel: |
| |
| BUG: kernel NULL pointer dereference, address: 000000000000003c |
| ... |
| RIP: 0010:do_raw_spin_lock+0xa/0xa0 |
| ... |
| _raw_spin_lock_irqsave+0x1b/0x30 |
| intel_iommu_release_device+0x96/0x170 |
| iommu_deinit_device+0x39/0xf0 |
| __iommu_group_remove_device+0xa0/0xd0 |
| iommu_bus_notifier+0x55/0xb0 |
| notifier_call_chain+0x5a/0xd0 |
| blocking_notifier_call_chain+0x41/0x60 |
| bus_notify+0x34/0x50 |
| device_del+0x269/0x3d0 |
| pci_remove_bus_device+0x77/0x100 |
| p2sb_bar+0xae/0x1d0 |
| ... |
| i801_probe+0x423/0x740 |
| |
| Use the release_domain mechanism to fix it. The scalable mode context |
| entry which is not part of release domain should be cleared in |
| release_device(). |
| |
| The Linux kernel CVE team has assigned CVE-2024-27079 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.18 with commit 586081d3f6b13ec9dfdfdf3d7842a688b376fa5e and fixed in 6.8.2 with commit 333fe86968482ca701c609af590003bcea450e8f |
| Issue introduced in 5.18 with commit 586081d3f6b13ec9dfdfdf3d7842a688b376fa5e and fixed in 6.9 with commit 81e921fd321614c2ad8ac333b041aae1da7a1c6d |
| |
| 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-2024-27079 |
| 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/intel/iommu.c |
| drivers/iommu/intel/pasid.c |
| drivers/iommu/intel/pasid.h |
| |
| |
| 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/333fe86968482ca701c609af590003bcea450e8f |
| https://git.kernel.org/stable/c/81e921fd321614c2ad8ac333b041aae1da7a1c6d |