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 933AD14831F for ; Thu, 27 Feb 2025 02:09:00 +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=1740622140; cv=none; b=S4BByMNwOdy0V13o/uRyJhJxwiLH7bSwvmYfWIau9+JJvkd+QIDAzsN4KrO/6A8qSsl+wHUvRDuXQJDrzp1E25P0Xq/yiL3ieHhBytUlzGTztwdEkk54MD26I3YIeSZ/rlABbz8NmX2/yR5zPcEOy6IOWVEdn54R6gXlQEvbUfs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740622140; c=relaxed/simple; bh=gzioZWtDY1vhPpYTTeGQIDBzw067xxAEGNgoXZp0JJw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GqDV7UQ2m+MYVtoVK0AbRnA9ECAubxmFi+fyVfTmsgbcCkFHL5QgsISAqDURu3fB3hArcOPejabNgFvP+JvvSw5Rl8XfLsPXfWkcFkC2hyri7aEJrO07IWiJIQJ1bm6doI2C31ujVZN8mQhyAQcaBpq1ASMTNPCP7RGtVggyRxE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=APcjGXkK; 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="APcjGXkK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66273C4CED6; Thu, 27 Feb 2025 02:09:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740622140; bh=gzioZWtDY1vhPpYTTeGQIDBzw067xxAEGNgoXZp0JJw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=APcjGXkKz+Yz2j/QvQNLN3qNTpJDWseJKZaagMmIQr2CLzf9yGcRPHOEQau2Uu9sF 3MmYFWVNX3QR/diaNePBOw6Kz869QXZKyu3HRru7ZCOHyOYSAMUqplzJBr3u2LCE59 zsQL7VRiQZPhylkV/raDh9jttS4CgU+Da214o6lU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21725: smb: client: fix oops due to unset link speed Date: Wed, 26 Feb 2025 18:06:20 -0800 Message-ID: <2025022647-CVE-2025-21725-3a4d@gregkh> X-Mailer: git-send-email 2.48.1 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=5336; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=gzioZWtDY1vhPpYTTeGQIDBzw067xxAEGNgoXZp0JJw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7T9S0V23utpv0iP+biNW+3hWd24OFprTNLWXPcxa6f KFUUVGxI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbCJM8wv1Z0fqjz7jD+Pz4W qaVMq6LXtN4sZlhwgnfxnv+B2R1+mxb6dApe6HmZcjUFAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: smb: client: fix oops due to unset link speed It isn't guaranteed that NETWORK_INTERFACE_INFO::LinkSpeed will always be set by the server, so the client must handle any values and then prevent oopses like below from happening: Oops: divide error: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 1323 Comm: cat Not tainted 6.13.0-rc7 #2 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-3.fc41 04/01/2014 RIP: 0010:cifs_debug_data_proc_show+0xa45/0x1460 [cifs] Code: 00 00 48 89 df e8 3b cd 1b c1 41 f6 44 24 2c 04 0f 84 50 01 00 00 48 89 ef e8 e7 d0 1b c1 49 8b 44 24 18 31 d2 49 8d 7c 24 28 <48> f7 74 24 18 48 89 c3 e8 6e cf 1b c1 41 8b 6c 24 28 49 8d 7c 24 RSP: 0018:ffffc90001817be0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88811230022c RCX: ffffffffc041bd99 RDX: 0000000000000000 RSI: 0000000000000567 RDI: ffff888112300228 RBP: ffff888112300218 R08: fffff52000302f5f R09: ffffed1022fa58ac R10: ffff888117d2c566 R11: 00000000fffffffe R12: ffff888112300200 R13: 000000012a15343f R14: 0000000000000001 R15: ffff888113f2db58 FS: 00007fe27119e740(0000) GS:ffff888148600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe2633c5000 CR3: 0000000124da0000 CR4: 0000000000750ef0 PKRU: 55555554 Call Trace: ? __die_body.cold+0x19/0x27 ? die+0x2e/0x50 ? do_trap+0x159/0x1b0 ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? do_error_trap+0x90/0x130 ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? exc_divide_error+0x39/0x50 ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? asm_exc_divide_error+0x1a/0x20 ? cifs_debug_data_proc_show+0xa39/0x1460 [cifs] ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? seq_read_iter+0x42e/0x790 seq_read_iter+0x19a/0x790 proc_reg_read_iter+0xbe/0x110 ? __pfx_proc_reg_read_iter+0x10/0x10 vfs_read+0x469/0x570 ? do_user_addr_fault+0x398/0x760 ? __pfx_vfs_read+0x10/0x10 ? find_held_lock+0x8a/0xa0 ? __pfx_lock_release+0x10/0x10 ksys_read+0xd3/0x170 ? __pfx_ksys_read+0x10/0x10 ? __rcu_read_unlock+0x50/0x270 ? mark_held_locks+0x1a/0x90 do_syscall_64+0xbb/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe271288911 Code: 00 48 8b 15 01 25 10 00 f7 d8 64 89 02 b8 ff ff ff ff eb bd e8 20 ad 01 00 f3 0f 1e fa 80 3d b5 a7 10 00 00 74 13 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 4f c3 66 0f 1f 44 00 00 55 48 89 e5 48 83 ec RSP: 002b:00007ffe87c079d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000040000 RCX: 00007fe271288911 RDX: 0000000000040000 RSI: 00007fe2633c6000 RDI: 0000000000000003 RBP: 00007ffe87c07a00 R08: 0000000000000000 R09: 00007fe2713e6380 R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000040000 R13: 00007fe2633c6000 R14: 0000000000000003 R15: 0000000000000000 Fix this by setting cifs_server_iface::speed to a sane value (1Gbps) by default when link speed is unset. The Linux kernel CVE team has assigned CVE-2025-21725 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.65 with commit 548893404c44fc01a59f17727876e02553146fe6 and fixed in 6.1.129 with commit 208e102a2fca44e40a6c3f7b9e2609cfd17a15aa Issue introduced in 6.6.4 with commit 1cd8c353708de99d8bfa7db8a0c961a800b1fa7f and fixed in 6.6.76 with commit 3f901c35e1a1b3ed1b528a17ffdb941aa0294458 Issue introduced in 6.7 with commit a6d8fb54a515f0546ffdb7870102b1238917e567 and fixed in 6.12.13 with commit 699179dfc8d7da457b152ca5d18ae45f9ed9beaa Issue introduced in 6.7 with commit a6d8fb54a515f0546ffdb7870102b1238917e567 and fixed in 6.13.2 with commit ad3b49fbdb156aa8ee2026ba590642c9b5a410f2 Issue introduced in 6.7 with commit a6d8fb54a515f0546ffdb7870102b1238917e567 and fixed in 6.14-rc1 with commit be7a6a77669588bfa5022a470989702bbbb11e7f 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-21725 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: fs/smb/client/smb2ops.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/208e102a2fca44e40a6c3f7b9e2609cfd17a15aa https://git.kernel.org/stable/c/3f901c35e1a1b3ed1b528a17ffdb941aa0294458 https://git.kernel.org/stable/c/699179dfc8d7da457b152ca5d18ae45f9ed9beaa https://git.kernel.org/stable/c/ad3b49fbdb156aa8ee2026ba590642c9b5a410f2 https://git.kernel.org/stable/c/be7a6a77669588bfa5022a470989702bbbb11e7f