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=1796379855; b=enGPVqdST6e3pgiTr6UF1kOhsCZx2DMGeeWt0EahI+JC//JaNkSwuH0xLN62LAGq6w9l ABMNKmAbEzhyxqduiTdZeGwFzO2gamUjxpXEYg4sLjSeYat/4DDmpCLGq8g3xoQWMnZB8 +vpYPSffRhWZjfyEk+2bAH4ASDCUNy2uQs/GgPJmjMwhCoNnm8bUrdCrEeK3AIdKrGWgx mOwnkMS2cqAHI010Uvb964ssaWxuAVAkCj+Y28HxX8ec6gzJLE/MJN4f+4jIMp412PzFw K3rUT9KsVVL66amyXqoNkl43GQ19RJWkjwVRks4fZvJi07aKu/3Z08oTCkUT01823qw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796379855; 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=SLSJBvQsKG7HTD+GQ9EZpch9824CBPSIZBFRv9Me4OA=; b=kYTCdRNboyCNiF1qguWc3Du3lrHWoqQAiVNMZbtESPSFjlWeVt+xWUp45VsD1WtuXD3Q I8H+EbNcGI6KY6ouQ9Arv9E8UCFKea2CxxeJf3kbBGCAIqPJUrZ8XdupTVg2oHwOff28s MWdYXCh5AJnJy6VKKXNv3ijcjsn5QDKJTM8TwPziafEHB6Js3soD2tZn+ZeZucpCUVOmW 3Kc3PxbX3eDar5rnMmZkuN4WXxRo5yS4oJrZQDaJ79XB6pqRtNul+naLEqwcjPZs9BUNH tLp/rYOi12TTDlgvPYoKEZeSOggp2MKYM9nvgOPsuF1/M/FIBUAw0Aborr7dFqzSe+w== 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=hb0uDg5U; 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 80CE1606A32D; Fri, 4 Dec 2026 10:24:15 +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=hb0uDg5U Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA0871F000CE; Fri, 4 Dec 2026 10:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796379855; bh=SLSJBvQsKG7HTD+GQ9EZpch9824CBPSIZBFRv9Me4OA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hb0uDg5U89f5S8g0ssmDoGOePvFnJanARuyoZrXeDywIAhQLURnBqfoVpnBTJM8OZ L5mzoD1a9/+x4/BIIef6/sXBve2Xzc4eBE4aFDjbXCQ2mNiFamen/E4Q3qy0NjMJ31 0NZXYOlIMfWEUxtIE/fZ2PfWATQk7RumXOlq0q2k= 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.18 058/703] wifi: mac80211_hwsim: ignore non-generic netlink releases Date: Fri, 4 Dec 2026 18:59:17 +0900 Message-ID: <20261204100629.222376810@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-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 89794c724858c..eecd6e2ee27e4 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -6747,7 +6747,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