From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796383104; b=3GN3CyEjK7OCFaxzEm0iiRwoYJyewViWmQSxhUP5vD/mkgExqfJpzPvilweyBaDx3p9j +D7jnbkekMLlDUGYQQtz8fHAhzU0PZ00pvlJf+DH0XSipcmQBwJIgbB2NeIfMaxYbWcIs Nn1CyiYMCkBKkMxTc2pFj2LAYgQi+xXDwzqwEWFVfRRAIKzzxJ/W8xOAJXQrMJmfZpeee iJZJaQPCysfHCTwZXPXdWxN6QqkxLg2KsQiJv5AkA8n7x0qcBVPN5IkyJ+6mIu04OfbOD G45jf9Eh7udh/lb9D0iD+9ZYyu16MmMSdxc1o+fA6E+7K6zQSJtrkuIty7oCtKL1ipg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383104; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=5zUTQ6VpwbwX4mSWzV2eYqyStiUG4Xr0Yva3txfFUb8=; b=2bOvP65QI2xnBfyvxSvmv9eirLbHIAs/KC1zQpx8JkWwmUi5GUmYjNcAKlAZ9uTWsgwM WGbuQqvO4s4wdQDsiDKBZFUrJKj85SQ/mAvNhjqQFXxmT0Q7alU7QcDH0JG609Ry/E8vd mWjeWKFxhp2Fo4lezqFDf7xeQY2XIc0wjQqF910r9vw4+03rw6k2H1MR332X3fdBB/tGO ehXRDso70KOsDjfmxh0DxxCa9AFBHTWExge+9GzRqXMaSM6cqaRITWy0a0HZRGy/nP1u6 WjzuUBKA/X+xEQgmEkqGpJyr3Yv1QXkAYfKiIB+8e4dtO31HBznEnGYsNhZU+YqfxzQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=QkZJFFqD; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66F19606A32D; Fri, 4 Dec 2026 11:18:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=QkZJFFqD Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3CC21F00935; Fri, 4 Dec 2026 11:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383104; bh=5zUTQ6VpwbwX4mSWzV2eYqyStiUG4Xr0Yva3txfFUb8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QkZJFFqDm+4BQBHdQZkp8fGVFMdVM1qS2P1vZPTzjxvD1TaiC+AnSv27arDLsILRr +d4tT5niFozDyKa0s1FjuVd8nBIMKjsSst0Q+rYk0qpfFfE1Vm3vDsRK++XrVQy8CH WaZBtyibDHc2yPTTWbmEa7kM6Otc0Z8ipGPfxNWk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhao Li , Johannes Berg , Sasha Levin Subject: [PATCH 6.12 072/555] wifi: mac80211_hwsim: ignore non-generic netlink releases Date: Fri, 4 Dec 2026 19:01:55 +0900 Message-ID: <20261204100610.027295987@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhao Li [ Upstream commit 989f47c56e48d442d79497a25ed946d029c4dc53 ] Closing an unrelated netlink socket can remove mac80211_hwsim radios or clear the active wmediumd registration when its port ID matches a generic netlink socket. mac80211_hwsim_netlink_notify() handles every NETLINK_URELEASE event, but netlink port IDs are scoped by protocol. The notifier therefore treats a release from another protocol as a MAC80211_HWSIM socket release. Ignore release notifications unless they come from NETLINK_GENERIC. LLM assistance was used to find the bug and review. Fixes: 7882513bacb1 ("mac80211_hwsim driver support userspace frame tx/rx") Fixes: e9ed49bf4c2c ("mac80211-hwsim: Add support for HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE") Cc: stable@vger.kernel.org Signed-off-by: Zhao Li Link: https://patch.msgid.link/20261028141751.6728-2-enderaoelyther@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/virtual/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c index 71f07e1a2a972..9f70025fafcc8 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -6454,7 +6454,7 @@ static int mac80211_hwsim_netlink_notify(struct notifier_block *nb, { struct netlink_notify *notify = _notify; - if (state != NETLINK_URELEASE) + if (state != NETLINK_URELEASE || notify->protocol != NETLINK_GENERIC) return NOTIFY_DONE; remove_user_radios(notify->portid, hwsim_net_get_netgroup(notify->net)); -- 2.53.0