From mboxrd@z Thu Jan 1 00:00:00 1970 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 BA7A4143872 for ; Tue, 21 May 2024 15:07:26 +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=1716304046; cv=none; b=a7x2D8Ppt/QhxJ9BZkPOvuPDdaZ0qElC6rF44k1ceWs6Ov6qd/ohznhrpI+bZMsXVVpTRg6WRM15OA218PFgCLy0fnaswTLogW0ay45DuvlKfWh9uGgWLfgTwSQp0eNhvy1TYDFPAEHsgb73m/L4jJa77K4cYcwB/++F+PTighQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716304046; c=relaxed/simple; bh=pUhrM3y3/PZFkTcDzyPyPDyByF9M40iI6VhNrkRj/Qk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hanmHk2MWm/qJ7KwUhT9I3Rto9r7uNMwXMa7GMijDDrLisURRkfrXuE4D/pPHNirKHc26w0TTBXG0k4IKL4QOBaj94BOLGU+LD00lKsduq8w1yAGmL6f0gDoD18+ouP25Nb4Idwe7QEg6/YyivIeULlC/CQjKbIZ6R2J1Qpd5yw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cRkD2OVL; 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="cRkD2OVL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4098BC2BD11; Tue, 21 May 2024 15:07:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716304046; bh=pUhrM3y3/PZFkTcDzyPyPDyByF9M40iI6VhNrkRj/Qk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=cRkD2OVLBlkhK5bUuyUkQbqsq9OhnuE3HNBWO+t+0Rq/P7FMykSolr5s6A0Sni7Ss oc1fBk3OAVdnBP489Ayl61sbHwNFiBIroIQHTzNwmhsAs4tam5UDCz/uKhL7LEIcaQ lE25PHFBbmsp9V3HvP7pcrwx25I78TialmPj9PC0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47429: powerpc/64s: Fix unrecoverable MCE calling async handler from NMI Date: Tue, 21 May 2024 17:04:46 +0200 Message-ID: <2024052157-CVE-2021-47429-e386@gregkh> X-Mailer: git-send-email 2.45.1 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=2558; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pUhrM3y3/PZFkTcDzyPyPDyByF9M40iI6VhNrkRj/Qk=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+2+/u/aLH77VydQxP5saS4u5ll455aaouZlrccOKfb rTK29emHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRKzwM81StT8We6ap+Ehuy vO6yXl7YVOaCAoYFR45I8U/+xV0l3X/Y6FrCjZfrQvYGAgA= 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: powerpc/64s: Fix unrecoverable MCE calling async handler from NMI The machine check handler is not considered NMI on 64s. The early handler is the true NMI handler, and then it schedules the machine_check_exception handler to run when interrupts are enabled. This works fine except the case of an unrecoverable MCE, where the true NMI is taken when MSR[RI] is clear, it can not recover, so it calls machine_check_exception directly so something might be done about it. Calling an async handler from NMI context can result in irq state and other things getting corrupted. This can also trigger the BUG at arch/powerpc/include/asm/interrupt.h:168 BUG_ON(!arch_irq_disabled_regs(regs) && !(regs->msr & MSR_EE)); Fix this by making an _async version of the handler which is called in the normal case, and a NMI version that is called for unrecoverable interrupts. The Linux kernel CVE team has assigned CVE-2021-47429 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit 2b43dd7653cc and fixed in 5.14.12 with commit d7a8e38999fb Issue introduced in 5.14 with commit 2b43dd7653cc and fixed in 5.15 with commit f08fb25bc669 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-2021-47429 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/powerpc/include/asm/interrupt.h arch/powerpc/kernel/exceptions-64s.S arch/powerpc/kernel/traps.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/d7a8e38999fbd6910516e44cb43f9f4317e54f73 https://git.kernel.org/stable/c/f08fb25bc66986b0952724530a640d9970fa52c1