From mboxrd@z Thu Jan 1 00:00:00 1970 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 94CF523AE7E for ; Wed, 12 Mar 2025 09:43:05 +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=1741772585; cv=none; b=lbqMndP3L+94GBmhHiJI7p/B5vidqWXlndHK0MvHk7CXUnEVJbQZHhTi6Wa2GpXjGF/6Vmc6EmLjlm5Fv+8FX74XnegFdWx/8pq51eHfxIDSt1btUunL9foFYl/g7mFNBYiQu3WzctgPOADG8nnt5SXEnaDPfCq1QljyxBNvfY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741772585; c=relaxed/simple; bh=edNJH0uUBMAAYnDY/GMs3coeb0KtAxFgzZndwKDTPjI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=peXVDEjMZzLQzEAp68V5sq7sKD/oJ7XJ0O+ac8nBjsqFtG4P8lccXnw2RCh9RqMcNRbj1ZA30FjMHwlm7LVWMNC5/pxGcPL/h1hJ25K4H9GxIFnZqF0ogWmsqn5CbrQKcwjPyAWE94nNtgfZarstrahkhm9bBKhLkdQUm30Dpl8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tmA9Wy5l; 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="tmA9Wy5l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2216C4CEE3; Wed, 12 Mar 2025 09:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741772585; bh=edNJH0uUBMAAYnDY/GMs3coeb0KtAxFgzZndwKDTPjI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=tmA9Wy5lIzirU6i4FQIqTpMo7Jz6B+4zS2toEQja9gF8UcZkYx7bwyy3jpLBWrn0F p3T/MQlIQhx95b+X04zJT4WGIs0iGNAcAYO6afd2BM2kudUiRobjo6kNGXaFaGKK8u zt8ot3wWs+m1T3Y6y85lDNZkVuFZdwVHzhhizhow= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21862: drop_monitor: fix incorrect initialization order Date: Wed, 12 Mar 2025 10:42:28 +0100 Message-ID: <2025031217-CVE-2025-21862-e8a0@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=5174; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=edNJH0uUBMAAYnDY/GMs3coeb0KtAxFgzZndwKDTPjI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkXw36GXNZe8c2mtDTxwJmZqkZvy2M5/YqdhaU2r8wof H8/5kJtRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzE14ZhnrLjE8eUEy4HQvN2 FmwvVly1SfzGToYFFzuffWg8azn9ksJjOc2HfMtX+OU0AAA= 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: drop_monitor: fix incorrect initialization order Syzkaller reports the following bug: BUG: spinlock bad magic on CPU#1, syz-executor.0/7995 lock: 0xffff88805303f3e0, .magic: 00000000, .owner: /-1, .owner_cpu: 0 CPU: 1 PID: 7995 Comm: syz-executor.0 Tainted: G E 5.10.209+ #1 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x119/0x179 lib/dump_stack.c:118 debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] do_raw_spin_lock+0x1f6/0x270 kernel/locking/spinlock_debug.c:112 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline] _raw_spin_lock_irqsave+0x50/0x70 kernel/locking/spinlock.c:159 reset_per_cpu_data+0xe6/0x240 [drop_monitor] net_dm_cmd_trace+0x43d/0x17a0 [drop_monitor] genl_family_rcv_msg_doit+0x22f/0x330 net/netlink/genetlink.c:739 genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] genl_rcv_msg+0x341/0x5a0 net/netlink/genetlink.c:800 netlink_rcv_skb+0x14d/0x440 net/netlink/af_netlink.c:2497 genl_rcv+0x29/0x40 net/netlink/genetlink.c:811 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x54b/0x800 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x914/0xe00 net/netlink/af_netlink.c:1916 sock_sendmsg_nosec net/socket.c:651 [inline] __sock_sendmsg+0x157/0x190 net/socket.c:663 ____sys_sendmsg+0x712/0x870 net/socket.c:2378 ___sys_sendmsg+0xf8/0x170 net/socket.c:2432 __sys_sendmsg+0xea/0x1b0 net/socket.c:2461 do_syscall_64+0x30/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x62/0xc7 RIP: 0033:0x7f3f9815aee9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3f972bf0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f3f9826d050 RCX: 00007f3f9815aee9 RDX: 0000000020000000 RSI: 0000000020001300 RDI: 0000000000000007 RBP: 00007f3f981b63bd R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f3f9826d050 R15: 00007ffe01ee6768 If drop_monitor is built as a kernel module, syzkaller may have time to send a netlink NET_DM_CMD_START message during the module loading. This will call the net_dm_monitor_start() function that uses a spinlock that has not yet been initialized. To fix this, let's place resource initialization above the registration of a generic netlink family. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with Syzkaller. The Linux kernel CVE team has assigned CVE-2025-21862 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.30 with commit 9a8afc8d3962f3ed26fd6b56db34133860ed1e72 and fixed in 6.1.130 with commit fcfc00bfec7bb6661074cb21356d05a4c9470a3c Issue introduced in 2.6.30 with commit 9a8afc8d3962f3ed26fd6b56db34133860ed1e72 and fixed in 6.6.80 with commit 0efa6c42f81c60d8f72ba7f5ed8d4fec8c526282 Issue introduced in 2.6.30 with commit 9a8afc8d3962f3ed26fd6b56db34133860ed1e72 and fixed in 6.12.17 with commit b7859e8643e75619b2705b4fcac93ffd94d72b4a Issue introduced in 2.6.30 with commit 9a8afc8d3962f3ed26fd6b56db34133860ed1e72 and fixed in 6.13.5 with commit 219a47d0e6195bd202f22855e35f25bd15bc4d58 Issue introduced in 2.6.30 with commit 9a8afc8d3962f3ed26fd6b56db34133860ed1e72 and fixed in 6.14-rc4 with commit 07b598c0e6f06a0f254c88dafb4ad50f8a8c6eea 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-21862 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/core/drop_monitor.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/fcfc00bfec7bb6661074cb21356d05a4c9470a3c https://git.kernel.org/stable/c/0efa6c42f81c60d8f72ba7f5ed8d4fec8c526282 https://git.kernel.org/stable/c/b7859e8643e75619b2705b4fcac93ffd94d72b4a https://git.kernel.org/stable/c/219a47d0e6195bd202f22855e35f25bd15bc4d58 https://git.kernel.org/stable/c/07b598c0e6f06a0f254c88dafb4ad50f8a8c6eea