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 EFC202505AA for ; Tue, 20 May 2025 15:23:32 +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=1747754613; cv=none; b=SK3B0hy4hsaVBdVT/jiVwepxbsCgRyNu9blMClo1gau3MMzDUwhlZMJ96ViI5BZZ2y9M+PDKSNq741JFIvJTxwSEi9ZeiZD4FyDwf99k64QNIQf2Mi+pKKPNwpRXPAo+6/ldBGeGkxBlkzpfNM9IOH6Phf7Dlic7lNzNMKq82r4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747754613; c=relaxed/simple; bh=Au/PDjjm/eiY0cquQPFKsRe1l4q0EApWNwp15QopOLo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nPj3VlzrxxAw8DLpPNfXgArh+Ua/g72KhnSk9ktRCdKrcRdKerapOGHpXfkeyiReC+IGiiluVijlGj0wqNRvLQRt5mPdukkIgWKh0WPajobybomOPudq5n0ti5/zqPwgCbhzvwWpd2VAUPlOb5qXD/f0x9bDZB5qX3cQ5YykZec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LbxuB5vH; 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="LbxuB5vH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5ECC2C4CEE9; Tue, 20 May 2025 15:23:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747754612; bh=Au/PDjjm/eiY0cquQPFKsRe1l4q0EApWNwp15QopOLo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=LbxuB5vHZMiqscgeScSS+/QqkYkKSM8dbUgf/PGdEQ+9WHGBZwbVeQriqj/soR/XP Lf97agTwLhQQn8HVKjGw/0ooVPd0rvh1t9cH6FWm7DgLG0wRnWfNKunsf42hXuxSNh g/EzJyJBOyAUbnBYiGmhgIuEG4YfB4ljZpfuQQxw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37902: dm: fix copying after src array boundaries Date: Tue, 20 May 2025 17:21:59 +0200 Message-ID: <2025052056-CVE-2025-37902-40c3@gregkh> X-Mailer: git-send-email 2.49.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=3190; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Khb+U3MQi8JyVJjfTNB9pM6lZTSGNDwBLSW9yEu0h5g=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk680TuGE7ZK7r4u6tLUliTnVqH/LEjvT4J8mkfbnRkz ymLUXTviGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlsnsKwoGv/+sNmtrasgq5K B34qXTfkiLnhxrDgdFnTN4X0hIy0NpPY2NNVSWsT+fkA 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: dm: fix copying after src array boundaries The blammed commit copied to argv the size of the reallocated argv, instead of the size of the old_argv, thus reading and copying from past the old_argv allocated memory. Following BUG_ON was hit: [ 3.038929][ T1] kernel BUG at lib/string_helpers.c:1040! [ 3.039147][ T1] Internal error: Oops - BUG: 00000000f2000800 [#1] SMP ... [ 3.056489][ T1] Call trace: [ 3.056591][ T1] __fortify_panic+0x10/0x18 (P) [ 3.056773][ T1] dm_split_args+0x20c/0x210 [ 3.056942][ T1] dm_table_add_target+0x13c/0x360 [ 3.057132][ T1] table_load+0x110/0x3ac [ 3.057292][ T1] dm_ctl_ioctl+0x424/0x56c [ 3.057457][ T1] __arm64_sys_ioctl+0xa8/0xec [ 3.057634][ T1] invoke_syscall+0x58/0x10c [ 3.057804][ T1] el0_svc_common+0xa8/0xdc [ 3.057970][ T1] do_el0_svc+0x1c/0x28 [ 3.058123][ T1] el0_svc+0x50/0xac [ 3.058266][ T1] el0t_64_sync_handler+0x60/0xc4 [ 3.058452][ T1] el0t_64_sync+0x1b0/0x1b4 [ 3.058620][ T1] Code: f800865e a9bf7bfd 910003fd 941f48aa (d4210000) [ 3.058897][ T1] ---[ end trace 0000000000000000 ]--- [ 3.059083][ T1] Kernel panic - not syncing: Oops - BUG: Fatal exception Fix it by copying the size of src, and not the size of dst, as it was. The Linux kernel CVE team has assigned CVE-2025-37902 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15-rc5 with commit 5a2a6c428190f945c5cbf5791f72dbea83e97f66 and fixed in 6.15-rc6 with commit f1aff4bc199cb92c055668caed65505e3b4d2656 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-2025-37902 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/md/dm-table.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/aaa763ab8cecae6308c5ec7f309e1bc3a7ebd29f https://git.kernel.org/stable/c/4c4f168b46229d527bda801ef15ad793b069f0ae https://git.kernel.org/stable/c/ed3248a403740a623c73afd95f88cc37e0cd3ad2 https://git.kernel.org/stable/c/db62809197658954a67b446c30677bc25baaf9f3 https://git.kernel.org/stable/c/a27cbadb995fa4cca90cefd74332c55c2c26616b https://git.kernel.org/stable/c/f1aff4bc199cb92c055668caed65505e3b4d2656