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 974D233AEA4 for ; Wed, 17 Sep 2025 14:58:02 +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=1758121083; cv=none; b=FseCQLDbc1c7Z2EGd4m9VzxrbIynPEIkc3+EMphChIWxZIrqYDm6JUKK881lutynUq87c0RY4g23lctN46VqowFOvnB1Upi6TC5UB6qCL19cYIqp8rkqlim1aE54Jp+xKwIpfA4ymJpYteeMvUXRQ873jj1y90m0jhMDbsO+Z8o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758121083; c=relaxed/simple; bh=IXLej/A9rH7ONHuEAtO/8MA4JliKybubGeQxXLSPcn4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TjNSv6NdoPUiz6hZKu7tipktaRKmvDcCL13KIaSz3453vZKDN8851ekr+rYvLV4zgT3acwuE5ak95Ppxz4QAWfbSnEctPHpZ8VGjE1ROl6lk9PCsa6f28aVFRJEO34dTj1qLLKT4u8AkXrE3Ba+aqjuPpgQpOxy+qGx4mrMEidM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=e0tbAF6D; 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="e0tbAF6D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7C51C4CEF5; Wed, 17 Sep 2025 14:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758121082; bh=IXLej/A9rH7ONHuEAtO/8MA4JliKybubGeQxXLSPcn4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=e0tbAF6DejucUDuPABeXPxV6T4ESlTeY47TIXOrEC+MFGW65xkSYQ3gGXvcP856Us 862sbj9OlmSAYT2PM1WqIf/SsDQg1lrwWoPqxINbNCfk86W5UqX/WwQiLrTe0jbjUF 0YCwPtFZrgJv9wG7Pzu5g53mnMYcjcYy+W4uN9ac= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53344: can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write Date: Wed, 17 Sep 2025 16:56:43 +0200 Message-ID: <2025091719-CVE-2023-53344-b8a4@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=5470; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=t7oKwZcWPxwOT0EAooM9i0Lw0N+pSVIkPhQScnSrCAQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmnzgi/MvFv+pDy8VrswoC3Vl3mC3aoH3Ip+830b+17N s6Zi79t7YhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJbLBnWNCzT6ou44SP6ONV k/8/Sp31MnWnlxXDgq6ClRkzJ27Q77ZO+3Rhws1lbtOUTQA= 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: can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write Syzkaller reported the following issue: ===================================================== BUG: KMSAN: uninit-value in aio_rw_done fs/aio.c:1520 [inline] BUG: KMSAN: uninit-value in aio_write+0x899/0x950 fs/aio.c:1600 aio_rw_done fs/aio.c:1520 [inline] aio_write+0x899/0x950 fs/aio.c:1600 io_submit_one+0x1d1c/0x3bf0 fs/aio.c:2019 __do_sys_io_submit fs/aio.c:2078 [inline] __se_sys_io_submit+0x293/0x770 fs/aio.c:2048 __x64_sys_io_submit+0x92/0xd0 fs/aio.c:2048 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Uninit was created at: slab_post_alloc_hook mm/slab.h:766 [inline] slab_alloc_node mm/slub.c:3452 [inline] __kmem_cache_alloc_node+0x71f/0xce0 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc+0x11d/0x3b0 mm/slab_common.c:981 kmalloc_array include/linux/slab.h:636 [inline] bcm_tx_setup+0x80e/0x29d0 net/can/bcm.c:930 bcm_sendmsg+0x3a2/0xce0 net/can/bcm.c:1351 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] sock_write_iter+0x495/0x5e0 net/socket.c:1108 call_write_iter include/linux/fs.h:2189 [inline] aio_write+0x63a/0x950 fs/aio.c:1600 io_submit_one+0x1d1c/0x3bf0 fs/aio.c:2019 __do_sys_io_submit fs/aio.c:2078 [inline] __se_sys_io_submit+0x293/0x770 fs/aio.c:2048 __x64_sys_io_submit+0x92/0xd0 fs/aio.c:2048 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd CPU: 1 PID: 5034 Comm: syz-executor350 Not tainted 6.2.0-rc6-syzkaller-80422-geda666ff2276 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 ===================================================== We can follow the call chain and find that 'bcm_tx_setup' function calls 'memcpy_from_msg' to copy some content to the newly allocated frame of 'op->frames'. After that the 'len' field of copied structure being compared with some constant value (64 or 8). However, if 'memcpy_from_msg' returns an error, we will compare some uninitialized memory. This triggers 'uninit-value' issue. This patch will add 'memcpy_from_msg' possible errors processing to avoid uninit-value issue. Tested via syzkaller The Linux kernel CVE team has assigned CVE-2023-53344 to this issue. Affected and fixed versions =========================== Issue introduced in 4.8 with commit 6f3b911d5f29b98752e5da86a295210c0c4f4e14 and fixed in 4.14.312 with commit 3fa0f1e0e31b1b73cdf59d4c36c7242e6ef821be Issue introduced in 4.8 with commit 6f3b911d5f29b98752e5da86a295210c0c4f4e14 and fixed in 4.19.280 with commit 618b15d09fed6126356101543451d49860db4388 Issue introduced in 4.8 with commit 6f3b911d5f29b98752e5da86a295210c0c4f4e14 and fixed in 5.4.240 with commit 78bc7f0ab99458221224d3ab97199c0f8e6861f1 Issue introduced in 4.8 with commit 6f3b911d5f29b98752e5da86a295210c0c4f4e14 and fixed in 5.10.177 with commit ab2a55907823f0bca56b6d03ea05e4071ba8535f Issue introduced in 4.8 with commit 6f3b911d5f29b98752e5da86a295210c0c4f4e14 and fixed in 5.15.106 with commit bf70e0eab64c625da84d9fdf4e84466b79418920 Issue introduced in 4.8 with commit 6f3b911d5f29b98752e5da86a295210c0c4f4e14 and fixed in 6.1.23 with commit c11dbc7705b3739974ac31a13f4ab81e61a5fb07 Issue introduced in 4.8 with commit 6f3b911d5f29b98752e5da86a295210c0c4f4e14 and fixed in 6.2.10 with commit 2e6ad51c709fa794e0ce26003c9c9cd944e3383a Issue introduced in 4.8 with commit 6f3b911d5f29b98752e5da86a295210c0c4f4e14 and fixed in 6.3 with commit 2b4c99f7d9a57ecd644eda9b1fb0a1072414959f 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-53344 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: net/can/bcm.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/3fa0f1e0e31b1b73cdf59d4c36c7242e6ef821be https://git.kernel.org/stable/c/618b15d09fed6126356101543451d49860db4388 https://git.kernel.org/stable/c/78bc7f0ab99458221224d3ab97199c0f8e6861f1 https://git.kernel.org/stable/c/ab2a55907823f0bca56b6d03ea05e4071ba8535f https://git.kernel.org/stable/c/bf70e0eab64c625da84d9fdf4e84466b79418920 https://git.kernel.org/stable/c/c11dbc7705b3739974ac31a13f4ab81e61a5fb07 https://git.kernel.org/stable/c/2e6ad51c709fa794e0ce26003c9c9cd944e3383a https://git.kernel.org/stable/c/2b4c99f7d9a57ecd644eda9b1fb0a1072414959f