Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B822190666 for ; Tue, 30 Jul 2024 07:50:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325814; cv=none; b=pc7etFg9HYLBozJkhS4ndYlccmJIx/No4CftSdqfM+LRLOTtXtk1n0aBnZdQRBx9fjfjy29nZiXX3qHGocR38qWYBxRkXgIMPxc4L8UeMWh0p7kOOEsBhzM5/6phRI5xzSImC9c+v5GgBzJVpmaiPDVIsDAO4Cq9JGzj6raD2Nw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325814; c=relaxed/simple; bh=imKfGYAWevFZKzP+FPg5MBa6ynBwcaDdQPxoGuXzCo0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SiWbwip1rnXCJUEF/h2mVATVDRDCYXVwr0cBtFiiTPW4noXbHeE/r5Dn5c0/wS5vAmFliThuBnUUNU7nmQx9YZQo81FZIi2kIg378QnBLm21u4kH8thKnitsaZ+OJGwdrSVar6pgvLYF7CSu9iyyPXgW7XQTp9GzaK8tbioxu4w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=V27KS1ew; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="V27KS1ew" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14DF1C32782; Tue, 30 Jul 2024 07:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722325814; bh=imKfGYAWevFZKzP+FPg5MBa6ynBwcaDdQPxoGuXzCo0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=V27KS1ewUFWmKyWMyIYYqLY7VCKbkwTf7iRdPhE/n7MMET3dzyYITG0k67FnFtH4v PwYHlrrTlxib0IPYXSz47nNpxkr4zdHzGf2jM6f7+CGPSpZLIfdOTRzU88/FJOHZZp dBAQpQGbnNvMbc0w/70HuyxIE1JQAb2/CCb9Afk0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42140: riscv: kexec: Avoid deadlock in kexec crash path Date: Tue, 30 Jul 2024 09:47:58 +0200 Message-ID: <2024073030-CVE-2024-42140-65eb@gregkh> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2651; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=imKfGYAWevFZKzP+FPg5MBa6ynBwcaDdQPxoGuXzCo0=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkrZk367OovP9+uxSVTTXD2F61XclMncyhPnVKTpcGzY KtCRJ58RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEI49hnlHo/Vm2GnWfq/Mm TQx4eo39GvflPIYFq75sbZU2uBK/0bjx/MSA7D1XFi4VBwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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 12f237200c16 and fixed in 5.15.163 with commit bb80a7911218 Issue introduced in 6.1 with commit b17d19a5314a and fixed in 6.1.98 with commit 653deee48a46 Issue introduced in 6.1 with commit b17d19a5314a and fixed in 6.6.39 with commit 7692c9b6baac Issue introduced in 6.1 with commit b17d19a5314a and fixed in 6.9.9 with commit 484dd545271d Issue introduced in 6.1 with commit b17d19a5314a and fixed in 6.10 with commit c562ba719df5 Issue introduced in 6.0.12 with commit 7594956fec89 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