🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #883

Re: [PATCH 5.10/5.15] wifi: mac80211: mesh: release the channel if start fails

#883
From: Fedor Pchelkin
Date: Thu, 08 Oct 2026 19:19
58 lines
8092 bytes
On Thu, 08. Oct 14:51, Alexander Martyniuk wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> commit ae97fff6495a8764bc0ef281cfe5444f701e527f upstream.
> 
> ieee80211_join_mesh() acquires a channel context and then calls
> ieee80211_start_mesh(), which can fail. In that case, the chanctx
> isn't released then interface removal will attempt to unassign it
> after it's removed from the driver, hitting:
> 
>   wlan0: Failed check-sdata-in-driver check, flags: 0x0
>   WARNING: net/mac80211/driver-ops.c:366 at drv_unassign_vif_chanctx
>    ieee80211_assign_link_chanctx
>    __ieee80211_link_release_channel
>    ieee80211_link_release_channel
>    ieee80211_teardown_sdata
>    unregister_netdevice_many_notify
>    _cfg80211_unregister_wdev
>    ieee80211_remove_interfaces
>    ieee80211_unregister_hw
>    mac80211_hwsim_del_radio
>    hwsim_exit_net
> 
> Correctly release the channel on start failures.
> 
> Assisted-by: LLM
> Reported-by: syzbot+63a84ea9c0f57d6133fa@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=63a84ea9c0f57d6133fa
> Fixes: 2b5e19677592 ("mac80211: cache mesh beacon")
> Link: https://patch.msgid.link/20260908122838.201719-21-johannes@sipsolutions.net
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> Signed-off-by: Alexander Martyniuk <alexevgmart@gmail.com>
> ---
> Backport fix for CVE-2026-98326
>  net/mac80211/cfg.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index afb1ad3e6ea1..bae9588ea913 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -2276,7 +2276,11 @@ static int ieee80211_join_mesh(struct wiphy *wiphy, struct net_device *dev,
>  	if (err)
>  		return err;
>  
> -	return ieee80211_start_mesh(sdata);
> +	err = ieee80211_start_mesh(sdata);
> +	if (err)
> +		ieee80211_vif_release_channel(sdata);

In 5.10/5.15 ieee80211_vif_release_channel() requires &sdata->local->mtx
to be held, it has the corresponding lockdep assertion.

Besides, the backport uses a different release-function, relevant for old
kernels.  I understand that's an adaptation but FWIW it's generally
recommended to write a brief backporter's comment above one's SoB line if
any non-trivial adaptation is done.
Technical Details
Message-ID: <20261008220352-4a493878ce385d22bedcf4a4-pchelkin@ispras>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343234-linux-kernel-netdev=dewy.ru
References: <20261008115145.83101-1-alexevgmart@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343234-linux-kernel-netdev=dewy.ru
From: pchelkin@ispras.ru (Fedor Pchelkin)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH 5.10/5.15] wifi: mac80211: mesh: release the channel if
 start fails
Date: Thu, 8 Oct 2026 22:19:58 +0300
Organization: Usenet Network
Message-ID: <20261008220352-4a493878ce385d22bedcf4a4-pchelkin@ispras>
References: <20261008115145.83101-1-alexevgmart@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Injection-Info: usenet.network;
	logging-data="952884"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:bnCGYw333+N62lG729OtnsvAdjA= sha256:4hqk+4Ibi2blrsJ/s6ehPjnGnGMajHtIpzYpIpuUaIk=
	sha1:hzv4fUi3jtzDyolJV24+ylsyrk8= sha256:C/L9Lya1MouBqEqL61qa1Z00MBo2TabaMYatqPHNra0=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id DEAA910F4EA; Thu,  8 Oct 2026 22:24:11 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.75
X-Spam-Status: No, score=-0.75 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=ispras.ru
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id GF2Fj308fS4P;
	Thu,  8 Oct 2026 22:24:08 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-343234-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=ispras.ru
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 8B1A310F47C; Thu,  8 Oct 2026 22:24:04 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id 764432CD33; Thu,  8 Oct 2026 19:20:13 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 939223CB2F6;
	Thu,  8 Oct 2026 19:20:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b="TOG+mGXE"
X-Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84])
	(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id AABC938C2D0;
	Thu,  8 Oct 2026 19:20:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.149.199.84
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791487212; cv=none; b=UjN6mxmgqQZTzgXDKHi4+o4mDaAqkQrcNJGCqmUafzNbPQFHgb0Yjzf03ilwANI92jS0SmE9u5yBgasM1met+bPlyuwa840xLl9XyVe/1BDNmcg49Zggrklc5Oy8+MBO4SAgbz6JK506g1R2hCz8bLFJl0a4hLTIeqqw6AeaPq0=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791487212; c=relaxed/simple;
	bh=fqtvXx7SuhVACWim03ZBe3zS9HB8AvdJ4R5T5U8Eqqk=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=OV0HErO1r5owNQiWTjDCx/KEumWsLSOP650cmUj5TS6ozw39sT4zjVXPUAzoTshFqtnOZJHsIQdEq05Sx+ZFKu67WXe7t5Ft+IazkIYZvupoefywXpZfA9veLxRAU0WqIxIGuIVQgaQZE9K3wtKW/hZYK67Xk1SSlgrEZ3NyS5c=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru; spf=pass smtp.mailfrom=ispras.ru; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b=TOG+mGXE; arc=none smtp.client-ip=83.149.199.84
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ispras.ru
X-Received: from localhost (unknown [10.10.165.5])
	by mail.ispras.ru (Postfix) with ESMTPSA id 14A18407617A;
	Thu,  8 Oct 2026 19:19:59 +0000 (UTC)
X-DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 14A18407617A
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru;
	s=default; t=1791487199;
	bh=jcK7/LghoFd1/EJFysr6Y0kYIb8jr/AM86zczc6LWtk=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
	b=TOG+mGXEoimluZjHiP2F8uGFZyIQHI6WhXAMQD11cJiE+Rd5LQCywBeX1/Kzv/RSt
	 23iiV9lBqoiJ/nD4A9KpWV+3G0Ii861XoeOQXQ7k4SvmeW4vwOSsSt0BjaEItPWMkS
	 MjyGKx+vERZDO+gyl9bFAr+mKq4voGF0qlRUy4JU=
X-Cc: stable@vger.kernel.org, 
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>, lvc-project@linuxtesting.org, 
	Johannes Berg <johannes.berg@intel.com>, Thomas Pedersen <thomas@cozybit.com>, 
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, 
	syzbot+63a84ea9c0f57d6133fa@syzkaller.appspotmail.com, netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>, 
	Johannes Berg <johannes@sipsolutions.net>, "David S. Miller" <davem@davemloft.net>
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261008115145.83101-1-alexevgmart@gmail.com>