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 DA1DF31A578 for ; Mon, 15 Sep 2025 14:25:33 +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=1757946333; cv=none; b=bk4HFsJgJlmapzac19mAzXaclD9w50DVA0FvFNXVS0/Exa+8VV82gVU8O9VnlB1aVr3CSxFwYByr1jPdeUKDWHKjZT6fHNDLiD8pJoGOBaGPdCNfA+CmLgIVfI3t3HrPZgI5v7Yt2Wpa4W4YeyqQpZxpmFFejagwm7FNRvlZQQQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757946333; c=relaxed/simple; bh=u3OlEV//RLlPPknEizzQg02YOO6e8InLJinV3bk9kmk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WK+DaVIKXJBhgAU6rx8ymZhQ+4gOGh8pZtYD57Peqcm0/iHBjhvCVQ/wQZ8waYFsOcao1mook5U7GuB+LatIdvrjOJkUnmQZPOS4eZB5F7sZvPnXUX32lm2hZkqMUI5mMEhTWOh/lDbYQv+Fra0URkvvjix40vf3F+IWDAsQAZw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=poPpUIBa; 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="poPpUIBa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEFE2C4CEF1; Mon, 15 Sep 2025 14:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757946333; bh=u3OlEV//RLlPPknEizzQg02YOO6e8InLJinV3bk9kmk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=poPpUIBab0Udunu+UCy+5clr1FaOFqnDkE1eVRuMM+O846r8FDcadHku5Y64nZuTF 2AhpfN4w4ZUFzS5vUxCmQ0YdKABnstGiJUbYm6e9dt9fIcqI78SXvDujOVhmUsbtZJ 74Tu9yDBEVPyWAHppJVcdckcYin7u0c1SJ/PoDNM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53216: arm64: efi: Make efi_rt_lock a raw_spinlock Date: Mon, 15 Sep 2025 16:21:50 +0200 Message-ID: <2025091512-CVE-2023-53216-7693@gregkh> X-Mailer: git-send-email 2.51.0 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=4603; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=TINijO4iDAfYL9LmvRXlfstb06/XNtbuHuECEXxdwvg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknFG5wzVWelrr0nJ6rz+cd+sI9v12XcgZmrPGNZZh1Y G4hl/PjjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIxmUMC674z3xX0VYt/WXb /lVGS/8l+r7b+Y1hntGux3cchPp2rH4j+Zl/07/ts1fv1QIA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: arm64: efi: Make efi_rt_lock a raw_spinlock Running a rt-kernel base on 6.2.0-rc3-rt1 on an Ampere Altra outputs the following: BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 9, name: kworker/u320:0 preempt_count: 2, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by kworker/u320:0/9: #0: ffff3fff8c27d128 ((wq_completion)efi_rts_wq){+.+.}-{0:0}, at: process_one_work (./include/linux/atomic/atomic-long.h:41) #1: ffff80000861bdd0 ((work_completion)(&efi_rts_work.work)){+.+.}-{0:0}, at: process_one_work (./include/linux/atomic/atomic-long.h:41) #2: ffffdf7e1ed3e460 (efi_rt_lock){+.+.}-{3:3}, at: efi_call_rts (drivers/firmware/efi/runtime-wrappers.c:101) Preemption disabled at: efi_virtmap_load (./arch/arm64/include/asm/mmu_context.h:248) CPU: 0 PID: 9 Comm: kworker/u320:0 Tainted: G W 6.2.0-rc3-rt1 Hardware name: WIWYNN Mt.Jade Server System B81.03001.0005/Mt.Jade Motherboard, BIOS 1.08.20220218 (SCP: 1.08.20220218) 2022/02/18 Workqueue: efi_rts_wq efi_call_rts Call trace: dump_backtrace (arch/arm64/kernel/stacktrace.c:158) show_stack (arch/arm64/kernel/stacktrace.c:165) dump_stack_lvl (lib/dump_stack.c:107 (discriminator 4)) dump_stack (lib/dump_stack.c:114) __might_resched (kernel/sched/core.c:10134) rt_spin_lock (kernel/locking/rtmutex.c:1769 (discriminator 4)) efi_call_rts (drivers/firmware/efi/runtime-wrappers.c:101) [...] This seems to come from commit ff7a167961d1 ("arm64: efi: Execute runtime services from a dedicated stack") which adds a spinlock. This spinlock is taken through: efi_call_rts() \-efi_call_virt() \-efi_call_virt_pointer() \-arch_efi_call_virt_setup() Make 'efi_rt_lock' a raw_spinlock to avoid being preempted. [ardb: The EFI runtime services are called with a different set of translation tables, and are permitted to use the SIMD registers. The context switch code preserves/restores neither, and so EFI calls must be made with preemption disabled, rather than only disabling migration.] The Linux kernel CVE team has assigned CVE-2023-53216 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10.165 with commit 4012603cbd469223f225637d265a233f034c567a and fixed in 5.10.175 with commit 030b1c4217a4f504c7d0795a2bd86b7181e56f11 Issue introduced in 5.15.90 with commit de2af657cab92afc13a4ccd8780370481ed0eb61 and fixed in 5.15.103 with commit 6a72729ed6accc86dad5522895e8fa2f96642a2c Issue introduced in 6.1.8 with commit f75a91c82dc805af8f718ff106ec9c090234b37b and fixed in 6.1.18 with commit 8b38969fa01662ec539a0d08a8ea5ec6f31fa4ed Issue introduced in 6.2 with commit ff7a167961d1b97e0e205f245f806e564d3505e7 and fixed in 6.2.5 with commit 4e8f7d998b582a99aadedd07ae6086e99b89c97a Issue introduced in 6.2 with commit ff7a167961d1b97e0e205f245f806e564d3505e7 and fixed in 6.3 with commit 0e68b5517d3767562889f1d83fdb828c26adb24f 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-2023-53216 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/arm64/include/asm/efi.h arch/arm64/kernel/efi.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/030b1c4217a4f504c7d0795a2bd86b7181e56f11 https://git.kernel.org/stable/c/6a72729ed6accc86dad5522895e8fa2f96642a2c https://git.kernel.org/stable/c/8b38969fa01662ec539a0d08a8ea5ec6f31fa4ed https://git.kernel.org/stable/c/4e8f7d998b582a99aadedd07ae6086e99b89c97a https://git.kernel.org/stable/c/0e68b5517d3767562889f1d83fdb828c26adb24f