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 8F9D026E6F6 for ; Sat, 4 Oct 2025 15:19:46 +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=1759591186; cv=none; b=FaYJkA/zF5lXNRlYcX6EFj4OaZMkm6CqtMLPcakRwvMvn5/c2Er5E+nxk5S3Uw+pfyGWTAnClMeCIIQNfOZAgigmolU9qf/sVZSOcvL4h0IWtvtjAZx6FVpfeZTTmVMnAKK8G8PljsBYkvagWCnR+7kN/dhQTUeyEKIAf/BjcDk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759591186; c=relaxed/simple; bh=+Ogviges0lewd+nkD7uOE25Nex+cR8dCyxmbLTyJi9I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OwCuwCOvaiAok5qhv2GY31osLqx9r2OVuPwNohPmiVQuq8NUEHFEdw+ZBmOnamI7ZMWv6e/Hk0+Crj8BoGoA/gxSvYRZNyLlhe4vGvCdr/pz5squRNYQDXxe5w4bfFSmJPynR2DbBnx9aSON0znFW4vMjrU5iyBU/s10/I2QsAs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IrHoOG3F; 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="IrHoOG3F" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17CD6C4CEF1; Sat, 4 Oct 2025 15:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759591186; bh=+Ogviges0lewd+nkD7uOE25Nex+cR8dCyxmbLTyJi9I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=IrHoOG3Fv2LfdPuvUGpjA4xh7h0mwOY1yGj15XzJCW5LQXYVz0+HyQdFgpy9fLCNu X7TNDn61DvfM58d+0EKwYrd/+0MTA1E5/Tah8rHSlUNx+0z8bDeIunFvVnfcFiIkkk BKOxPl617mVWPGEMCKAtVPS2TA/bKtod+c17Ml2I= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53558: rcu-tasks: Avoid pr_info() with spin lock in cblist_init_generic() Date: Sat, 4 Oct 2025 17:17:12 +0200 Message-ID: <2025100449-CVE-2023-53558-e6f7@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=4176; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=OdAL1MViho+2ZEYWDOpoDvJLvund5A4LsmGgdaipTiE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPrRLNf+vpBX76WaVy4M+XB9NLzjycxTKt6bCdWiSHQ x1D8iGNjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI5CkMc/iulrCmn9gdsldl 2prb03ZFcsgz+ABF68vSnOOeTn+bUO4x8+HHjLybJpMB 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: rcu-tasks: Avoid pr_info() with spin lock in cblist_init_generic() pr_info() is called with rtp->cbs_gbl_lock spin lock locked. Because pr_info() calls printk() that might sleep, this will result in BUG like below: [ 0.206455] cblist_init_generic: Setting adjustable number of callback queues. [ 0.206463] [ 0.206464] ============================= [ 0.206464] [ BUG: Invalid wait context ] [ 0.206465] 5.19.0-00428-g9de1f9c8ca51 #5 Not tainted [ 0.206466] ----------------------------- [ 0.206466] swapper/0/1 is trying to lock: [ 0.206467] ffffffffa0167a58 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x327/0x4a0 [ 0.206473] other info that might help us debug this: [ 0.206473] context-{5:5} [ 0.206474] 3 locks held by swapper/0/1: [ 0.206474] #0: ffffffff9eb597e0 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic.constprop.0+0x14/0x1f0 [ 0.206478] #1: ffffffff9eb579c0 (console_lock){+.+.}-{0:0}, at: _printk+0x63/0x7e [ 0.206482] #2: ffffffff9ea77780 (console_owner){....}-{0:0}, at: console_emit_next_record.constprop.0+0x111/0x330 [ 0.206485] stack backtrace: [ 0.206486] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.19.0-00428-g9de1f9c8ca51 #5 [ 0.206488] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-1.fc36 04/01/2014 [ 0.206489] Call Trace: [ 0.206490] [ 0.206491] dump_stack_lvl+0x6a/0x9f [ 0.206493] __lock_acquire.cold+0x2d7/0x2fe [ 0.206496] ? stack_trace_save+0x46/0x70 [ 0.206497] lock_acquire+0xd1/0x2f0 [ 0.206499] ? serial8250_console_write+0x327/0x4a0 [ 0.206500] ? __lock_acquire+0x5c7/0x2720 [ 0.206502] _raw_spin_lock_irqsave+0x3d/0x90 [ 0.206504] ? serial8250_console_write+0x327/0x4a0 [ 0.206506] serial8250_console_write+0x327/0x4a0 [ 0.206508] console_emit_next_record.constprop.0+0x180/0x330 [ 0.206511] console_unlock+0xf7/0x1f0 [ 0.206512] vprintk_emit+0xf7/0x330 [ 0.206514] _printk+0x63/0x7e [ 0.206516] cblist_init_generic.constprop.0.cold+0x24/0x32 [ 0.206518] rcu_init_tasks_generic+0x5/0xd9 [ 0.206522] kernel_init_freeable+0x15b/0x2a2 [ 0.206523] ? rest_init+0x160/0x160 [ 0.206526] kernel_init+0x11/0x120 [ 0.206527] ret_from_fork+0x1f/0x30 [ 0.206530] [ 0.207018] cblist_init_generic: Setting shift to 1 and lim to 1. This patch moves pr_info() so that it is called without rtp->cbs_gbl_lock locked. The Linux kernel CVE team has assigned CVE-2023-53558 to this issue. Affected and fixed versions =========================== Fixed in 6.1.42 with commit 9027d69221ff96e1356f070f7feb2ff989ae7388 Fixed in 6.4.7 with commit ea9b81c7d9104040b46a84d2303045de267f5557 Fixed in 6.5 with commit 5fc8cbe4cf0fd34ded8045c385790c3bf04f6785 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-53558 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: kernel/rcu/tasks.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/9027d69221ff96e1356f070f7feb2ff989ae7388 https://git.kernel.org/stable/c/ea9b81c7d9104040b46a84d2303045de267f5557 https://git.kernel.org/stable/c/5fc8cbe4cf0fd34ded8045c385790c3bf04f6785