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 C3181335951 for ; Wed, 17 Sep 2025 14:59:06 +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=1758121146; cv=none; b=fzw9D2fU814fu0zzgS+xIq1qwx8XjSIWHweqvpz9P0I0tKo8ixfhD5XRiqnq4SeNUrLO67Q3Sx3VIv2tVC76iiXtpvtmDGi4uFVPhs0Enb35R7KL0yvLmNVmP96YKz/CXiNNSRf+wsJKzobL1dHD0IRd1mmWPz56Hy0M54VYqmw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758121146; c=relaxed/simple; bh=Qp27N4Ypb0VALNg74wZP1D5UT3IHTF0uMdcpb6EUY2k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DlXQqDElf52bH1eegcBT5oAH5s34enlyW/EKzCx2bWAeAgiprryrpWBhJ9Kg6ZLMD1oF+bwuW/0+SJa/1L0I+qy73EGhu1qDIbabZehbqqsFDDxNEYTnuNeykww+DVRccCo4nR+uW7Sro4e/8peYcR6Sbt7H3QpYCD1nnd/J/mQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PY0vCAWE; 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="PY0vCAWE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A3FFC4CEE7; Wed, 17 Sep 2025 14:59:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758121146; bh=Qp27N4Ypb0VALNg74wZP1D5UT3IHTF0uMdcpb6EUY2k=; h=From:To:Cc:Subject:Date:Reply-to:From; b=PY0vCAWElXNFInBcFztdWdKkSFC8ZIPPCXwYQqMXgn/WBuVdx5jXIC+o1YOUQ87mo bFQ0lUGKz8OyoFdZd7uXTrNr66PKVAOfb4NrmakBNt9X0M7oXwIvzGPwBNAS+Hknf6 EW3zK53pdiZzhV98ZzJZ57zAwOIFoFqGVpa2B3qw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53366: block: be a bit more careful in checking for NULL bdev while polling Date: Wed, 17 Sep 2025 16:57:05 +0200 Message-ID: <2025091723-CVE-2023-53366-c8e7@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=4586; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bSRcULeNeV9tbG6yt+WeXEJshxQ9nxXMssWj9fEXxaY=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmnzohLmmQxV9ixxyT8ZhPP1pO11v8RfmB/782I89ESz 8865fzoiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlsd2GYXyjXo5vrN/9bSeC1 F9cCmFYs0LY8wjA/pMycuVb3sFpleVxiNe/yB+vv1f8FAA== 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: block: be a bit more careful in checking for NULL bdev while polling Wei reports a crash with an application using polled IO: PGD 14265e067 P4D 14265e067 PUD 47ec50067 PMD 0 Oops: 0000 [#1] SMP CPU: 0 PID: 21915 Comm: iocore_0 Kdump: loaded Tainted: G S 5.12.0-0_fbk12_clang_7346_g1bb6f2e7058f #1 Hardware name: Wiwynn Delta Lake MP T8/Delta Lake-Class2, BIOS Y3DLM08 04/10/2022 RIP: 0010:bio_poll+0x25/0x200 Code: 0f 1f 44 00 00 0f 1f 44 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 28 65 48 8b 04 25 28 00 00 00 48 89 44 24 20 48 8b 47 08 <48> 8b 80 70 02 00 00 4c 8b 70 50 8b 6f 34 31 db 83 fd ff 75 25 65 RSP: 0018:ffffc90005fafdf8 EFLAGS: 00010292 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 74b43cd65dd66600 RDX: 0000000000000003 RSI: ffffc90005fafe78 RDI: ffff8884b614e140 RBP: ffff88849964df78 R08: 0000000000000000 R09: 0000000000000008 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88849964df00 R13: ffffc90005fafe78 R14: ffff888137d3c378 R15: 0000000000000001 FS: 00007fd195000640(0000) GS:ffff88903f400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000270 CR3: 0000000466121001 CR4: 00000000007706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: iocb_bio_iopoll+0x1d/0x30 io_do_iopoll+0xac/0x250 __se_sys_io_uring_enter+0x3c5/0x5a0 ? __x64_sys_write+0x89/0xd0 do_syscall_64+0x2d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x94f225d Code: 24 cc 00 00 00 41 8b 84 24 d0 00 00 00 c1 e0 04 83 e0 10 41 09 c2 8b 33 8b 53 04 4c 8b 43 18 4c 63 4b 0c b8 aa 01 00 00 0f 05 <85> c0 0f 88 85 00 00 00 29 03 45 84 f6 0f 84 88 00 00 00 41 f6 c7 RSP: 002b:00007fd194ffcd88 EFLAGS: 00000202 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 00007fd194ffcdc0 RCX: 00000000094f225d RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007 RBP: 00007fd194ffcdb0 R08: 0000000000000000 R09: 0000000000000008 R10: 0000000000000001 R11: 0000000000000202 R12: 00007fd269d68030 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000 which is due to bio->bi_bdev being NULL. This can happen if we have two tasks doing polled IO, and task B ends up completing IO from task A if they are sharing a poll queue. If task B completes the IO and puts the bio into our cache, then it can allocate that bio again before task A is done polling for it. As that would necessitate a preempt between the two tasks, it's enough to just be a bit more careful in checking for whether or not bio->bi_bdev is NULL. The Linux kernel CVE team has assigned CVE-2023-53366 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit be4d234d7aebbfe0c233bc20b9cdef7ab3408ff4 and fixed in 6.1.16 with commit 1af0bdca03f367874da45d6cbe05fa05b90b1439 Issue introduced in 5.15 with commit be4d234d7aebbfe0c233bc20b9cdef7ab3408ff4 and fixed in 6.2.3 with commit 0510d5e654d05053ed0e6309a9b42043ac9903ab Issue introduced in 5.15 with commit be4d234d7aebbfe0c233bc20b9cdef7ab3408ff4 and fixed in 6.3 with commit 310726c33ad76cebdee312dbfafc12c1b44bf977 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-53366 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: block/blk-core.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/1af0bdca03f367874da45d6cbe05fa05b90b1439 https://git.kernel.org/stable/c/0510d5e654d05053ed0e6309a9b42043ac9903ab https://git.kernel.org/stable/c/310726c33ad76cebdee312dbfafc12c1b44bf977