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 4F81C34B410 for ; Wed, 24 Dec 2025 13:12:27 +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=1766581947; cv=none; b=ERxj9Qr7YWkvuOYYZG4Q5fqO7/0Kt7TYvuzzW715EosvSr60vq9P7Y6d6CQIEMh9PukXjjMvVE/36OfkMZk6RbBuN/R+Pbm5YmGBKoJYd/9QVosbAxSK6RwEDJ3LBS0UVqEAGcP0UyUFheoy2NgJ0kM2wSP9NHa+F6yRsgeL5G8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581947; c=relaxed/simple; bh=9WsC/pU6nHiiga8bqlCbqTWp5B5lqQ84JkT1m6NDhXk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=X0MCflLWYyqDTZ5csqXKIIFxHDOGV3ru6HtlXEbaeERA7uKAyMg6CG30QXY266yGMfCYJ8GKD9aq/CDPIVO7onyrc0J1EZcuOudY9bXkU7L39SX3pDXYzA2e6Q+OaBuex8SswVfim/p9qQfr0yknb6Iercsm1oGvl/ltYmadF8c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sp9FZOK6; 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="sp9FZOK6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0495C4CEFB; Wed, 24 Dec 2025 13:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766581947; bh=9WsC/pU6nHiiga8bqlCbqTWp5B5lqQ84JkT1m6NDhXk=; h=From:To:Cc:Subject:Date:Reply-To:From; b=sp9FZOK6ETtn95XA02clPAi++ANYgBsAWD2jMtDH03IAf/G/Q/bJjVhpdRMv/mZFa qZ5OOv5izSq+UnzVVcJoQ2gWaIP/hX9+akkKgUYyvz4OozEAAXOPosg9xQuOVPGSOy GNhytZEMsBzkTOnpObCD2mf8rzWWFdt/ng6R8dSQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54160: firmware: arm_sdei: Fix sleep from invalid context BUG Date: Wed, 24 Dec 2025 14:07:57 +0100 Message-ID: <2025122429-CVE-2023-54160-ed90@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4705; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=GMcwZ2AAb3Bs/ie3WOUdXbgCahWm7NuOCr3QB0Wxqn0=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneT0PXX3e9a63goC16W2nS3Mh83x6RZ8GbLvWn+R3Iy Ny1KLaxI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbiMpNhfgrPIg0BXb8+jd0G hgxLbYyiqiR+MSw4KD/T96/16toF0glfDL5F5t8KYJsMAA== 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: firmware: arm_sdei: Fix sleep from invalid context BUG Running a preempt-rt (v6.2-rc3-rt1) based kernel on an Ampere Altra triggers: BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46 in_atomic(): 0, irqs_disabled(): 128, non_block: 0, pid: 24, name: cpuhp/0 preempt_count: 0, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by cpuhp/0/24: #0: ffffda30217c70d0 (cpu_hotplug_lock){++++}-{0:0}, at: cpuhp_thread_fun+0x5c/0x248 #1: ffffda30217c7120 (cpuhp_state-up){+.+.}-{0:0}, at: cpuhp_thread_fun+0x5c/0x248 #2: ffffda3021c711f0 (sdei_list_lock){....}-{3:3}, at: sdei_cpuhp_up+0x3c/0x130 irq event stamp: 36 hardirqs last enabled at (35): [] finish_task_switch+0xb4/0x2b0 hardirqs last disabled at (36): [] cpuhp_thread_fun+0x21c/0x248 softirqs last enabled at (0): [] copy_process+0x63c/0x1ac0 softirqs last disabled at (0): [<0000000000000000>] 0x0 CPU: 0 PID: 24 Comm: cpuhp/0 Not tainted 5.19.0-rc3-rt5-[...] Hardware name: WIWYNN Mt.Jade Server [...] Call trace: dump_backtrace+0x114/0x120 show_stack+0x20/0x70 dump_stack_lvl+0x9c/0xd8 dump_stack+0x18/0x34 __might_resched+0x188/0x228 rt_spin_lock+0x70/0x120 sdei_cpuhp_up+0x3c/0x130 cpuhp_invoke_callback+0x250/0xf08 cpuhp_thread_fun+0x120/0x248 smpboot_thread_fn+0x280/0x320 kthread+0x130/0x140 ret_from_fork+0x10/0x20 sdei_cpuhp_up() is called in the STARTING hotplug section, which runs with interrupts disabled. Use a CPUHP_AP_ONLINE_DYN entry instead to execute the cpuhp cb later, with preemption enabled. SDEI originally got its own cpuhp slot to allow interacting with perf. It got superseded by pNMI and this early slot is not relevant anymore. [1] Some SDEI calls (e.g. SDEI_1_0_FN_SDEI_PE_MASK) take actions on the calling CPU. It is checked that preemption is disabled for them. _ONLINE cpuhp cb are executed in the 'per CPU hotplug thread'. Preemption is enabled in those threads, but their cpumask is limited to 1 CPU. Move 'WARN_ON_ONCE(preemptible())' statements so that SDEI cpuhp cb don't trigger them. Also add a check for the SDEI_1_0_FN_SDEI_PRIVATE_RESET SDEI call which acts on the calling CPU. [1]: https://lore.kernel.org/all/5813b8c5-ae3e-87fd-fccc-94c9cd08816d@arm.com/ The Linux kernel CVE team has assigned CVE-2023-54160 to this issue. Affected and fixed versions =========================== Fixed in 4.19.284 with commit 59842a9ba27d5390ae5bf3233a92cad3a26d495c Fixed in 5.4.244 with commit 48ac727ea4a3577eb1b4e24f807ba532c47930f9 Fixed in 5.10.181 with commit 7d8f5ccc826b39e05ff252b1fccd808c7a0725e0 Fixed in 5.15.113 with commit 66caf22787714c925e755719c293aaf3cb0b873b Fixed in 6.1.30 with commit a8267bc8de736cae927165191b52fbc20d101dd1 Fixed in 6.3.4 with commit 18d5ea5b746120a3972e6c347ad9428228445327 Fixed in 6.4 with commit d2c48b2387eb89e0bf2a2e06e30987cf410acad4 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-54160 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/firmware/arm_sdei.c include/linux/cpuhotplug.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/59842a9ba27d5390ae5bf3233a92cad3a26d495c https://git.kernel.org/stable/c/48ac727ea4a3577eb1b4e24f807ba532c47930f9 https://git.kernel.org/stable/c/7d8f5ccc826b39e05ff252b1fccd808c7a0725e0 https://git.kernel.org/stable/c/66caf22787714c925e755719c293aaf3cb0b873b https://git.kernel.org/stable/c/a8267bc8de736cae927165191b52fbc20d101dd1 https://git.kernel.org/stable/c/18d5ea5b746120a3972e6c347ad9428228445327 https://git.kernel.org/stable/c/d2c48b2387eb89e0bf2a2e06e30987cf410acad4