| 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-42140: riscv: kexec: Avoid deadlock in kexec crash path |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| riscv: kexec: Avoid deadlock in kexec crash path |
| |
| If the kexec crash code is called in the interrupt context, the |
| machine_kexec_mask_interrupts() function will trigger a deadlock while |
| trying to acquire the irqdesc spinlock and then deactivate irqchip in |
| irq_set_irqchip_state() function. |
| |
| Unlike arm64, riscv only requires irq_eoi handler to complete EOI and |
| keeping irq_set_irqchip_state() will only leave this possible deadlock |
| without any use. So we simply remove it. |
| |
| The Linux kernel CVE team has assigned CVE-2024-42140 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.15.82 with commit 12f237200c169a8667cf9dca7a40df8d7917b9fd and fixed in 5.15.163 with commit bb80a7911218bbab2a69b5db7d2545643ab0073d |
| Issue introduced in 6.1 with commit b17d19a5314a37f7197afd1a0200affd21a7227d and fixed in 6.1.98 with commit 653deee48a4682ea17a05b96fb6842795ab5943c |
| Issue introduced in 6.1 with commit b17d19a5314a37f7197afd1a0200affd21a7227d and fixed in 6.6.39 with commit 7692c9b6baacdee378435f58f19baf0eb69e4155 |
| Issue introduced in 6.1 with commit b17d19a5314a37f7197afd1a0200affd21a7227d and fixed in 6.9.9 with commit 484dd545271d02d1571e1c6b62ea7df9dbe5e692 |
| Issue introduced in 6.1 with commit b17d19a5314a37f7197afd1a0200affd21a7227d and fixed in 6.10 with commit c562ba719df570c986caf0941fea2449150bcbc4 |
| Issue introduced in 6.0.12 with commit 7594956fec8902dfc18150bf1dca0940cd4ad025 |
| |
| 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-42140 |
| 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: |
| arch/riscv/kernel/machine_kexec.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/bb80a7911218bbab2a69b5db7d2545643ab0073d |
| https://git.kernel.org/stable/c/653deee48a4682ea17a05b96fb6842795ab5943c |
| https://git.kernel.org/stable/c/7692c9b6baacdee378435f58f19baf0eb69e4155 |
| https://git.kernel.org/stable/c/484dd545271d02d1571e1c6b62ea7df9dbe5e692 |
| https://git.kernel.org/stable/c/c562ba719df570c986caf0941fea2449150bcbc4 |