🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #648

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

#648
From: Alexander Martyniuk
Date: Thu, 08 Oct 2026 11:51
56 lines
9942 bytes
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);
+
+	return err;
 }
 
 static int ieee80211_leave_mesh(struct wiphy *wiphy, struct net_device *dev)
-- 
2.43.0
Technical Details
Message-ID: <20261008115145.83101-1-alexevgmart@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-342939-linux-kernel-netdev=dewy.ru

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-342939-linux-kernel-netdev=dewy.ru
From: alexevgmart@gmail.com (Alexander Martyniuk)
Newsgroups: linux.kernel.netdev
Subject: [PATCH 5.10/5.15] wifi: mac80211: mesh: release the channel if start fails
Date: Thu,  8 Oct 2026 14:51:40 +0300
Organization: Usenet Network
Message-ID: <20261008115145.83101-1-alexevgmart@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="871534"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:32Zh/dLN0goMHM8N0kddeVinLIM= sha256:USKHd9wnNo1Jfe3P50fxlcaeWStz0h+sTBYFwKbskls=
	sha1:OUxLCWNVUDF9KijJNJMP4LJCgKI= sha256:+/df7hGUbHt1q0DHLQdEMGC3ElqFXnu2/i9hFpS8O24=
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 D33C110F3C6; Thu,  8 Oct 2026 14:54:52 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: 0.251
X-Spam-Status: No, score=0.251 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, FORGED_GMAIL_RCVD=1,
	FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
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 60V3W359BHfT;
	Thu,  8 Oct 2026 14:54:49 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-342939-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id C7FFA10F3C0; Thu,  8 Oct 2026 14:54:45 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id F1F4229A59; Thu,  8 Oct 2026 11:52:00 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 790FC48CD63;
	Thu,  8 Oct 2026 11:51:58 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J7vUz9r+"
X-Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18E3B4848AA
	for <netdev@vger.kernel.org>; Thu,  8 Oct 2026 11:51:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791460318; cv=none; b=FRcBwPy691uCyZYBTp1L/UKW3ai+Mg4sSHKo7yTQBc23OhGv01wdgLuVqR++gqRLWnm/8FA8SZpC3091/G52McOAzcZpgNp0Z8rbSSqbOocUkF3XhdrtKrgJxWZbkwNYpcne6XLlT0fyWlE5qiCtLOROOsAVQWT2Znq6hkgBO7g=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791460318; c=relaxed/simple;
	bh=25Cy4hLs//7T7QQPA32J2gRwiv8swJf1KlsN0jWfScs=;
	h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nsz+hdCGtmObWBlpo/AKJvwSIeueh1mbz++6cBzucrtJNOOJ5QeZLkR3S2E70s/4LvAAVkpg7kUosDP44ozD19IeiEWwaUK+4g0u5Oc3TSTT3BSuPhUtvpPmB8T9nLMKhpQsWDnVgcHZ5478Qs+IuTHDcRv8n3Lq6OzNFVUp91c=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=J7vUz9r+; arc=none smtp.client-ip=209.85.208.174
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-3a20dec69f9so22473601fa.3
        for <netdev@vger.kernel.org>; Thu, 08 Oct 2026 04:51:56 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1791460315; x=1792065115; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=2YfozA0kOqu0j23n9iWNtMreJdG+KsOuhldDG1WEkjM=;
        b=J7vUz9r+endiGLrt7US8Etgjx80m6jFGyLi2Scs31762cAfnRPu3C+vRTawwhdN97e
         3Cb/XTAqb/bS+XYLQwQJJ2ZRyo0pPIQdutu5UOH71XVzviAgFcyN5jXkDTFyafPeIPfN
         0FA3HfgEkc390cvd8Crl2GYzWt1qdrnkbvJ+vnvV1W4a+4QaTgVTsfMnMB/jvvNhzAh2
         sMQSt+5QDwCIXv9w8vgBqIz9cqjLqNrnnXmyfiivnuvx/71lti8OYIOjJ01p/ycPfqKj
         d52K8w57B2+/XuFmlX68cWyN6jTrIzLcSRC1HN9MifEg7rL+/aKTheYlajcWLI0W2UXX
         UGZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1791460315; x=1792065115;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=2YfozA0kOqu0j23n9iWNtMreJdG+KsOuhldDG1WEkjM=;
        b=X+Zkf6PZU4dU/EfFKBcp520CVAfqBvnPanqot8teaUlNr0y4+1OBWFTQtfDywfNN+m
         HvCSsPGgG22yQqwrEiK25djkaRwISgln7HMXYKhNoT9aboNDnTTTDtt5OfqUEqtUSGo5
         Ch3GQ+H1iZJQLyoF/zoyEfXtnSwFN/a729wubHvbW4tvBCOYv4WcY/+/QMQ9iIGImCIP
         PFp81YBqtkK7isvkYBV5hTRZZ5+jVZ01l4jdVgiThujDlvtegLKgPOm2dd+v2KW6FxZl
         CrbuRUzjE7xIZ+uzb8YZibT+q/Oikh39UZIu8tyK8Z3ZxbnHQKmEBQAMzy6U0Ex3U5zW
         Z+tg==
X-Forwarded-Encrypted: i=1; AKwUvByP2EDvO3uUWmXuHFmPyysxZJYC0VoXZCV2DYucYvTv3tf71R2Ri5uLzLl8WgQiJTxKRwGJRGQ=@vger.kernel.org
X-Gm-Message-State: AFq9FYLjyD7+U+t1PwEGykT5ZhGYvYX/ZM8N1UZ1acPcjodQBddNujFK
	QlmaZWJO9PyTlFc50GggJwr6aNPBt+zEBBGM4corctsPWbpg1c+lKZ/+
X-Gm-Gg: AYBFou2CMpWFEt/RPhJD6QaHcaPSfUAfkMXGj7bWc8VFgqbvNr1EC4nOAIQaVDelE9K
	CKQV5x9RKlHs/QmIFgyyEIXOM9SofIiO59rN3OZ7oybvdE0xoKjiZYG0oRSUGMmIzV+urN1bMJc
	ehUL4eti/m2GAQ3yfxO7BU35Frk+UY/qP+7hB9SJYWtBQ8uP7brVnSnRJ8m5JGyykTnELekZttQ
	XtTlwPjn/mCGlu2ViWUSWHXjT9bntIfxBzHuCi8JuK8A0jjZ60bKzsXVjV7YYQfYgp99Dn57zSx
	B166Cx/5mJW87XSQj/b48h75JLRH0BtcOpZKNrY3VSG0KgqzpOslQkEb0ymrOGYEXvKvE7qxj2e
	X/HiW+3VMmBLnUW5+5wrUo1f6wleRkAjFohlK4vUUquia/geEPbppy7G/KRnd5M4iTMa1KKqOio
	s/jPSrdvr7JsZZQh76CchFmYuBT6tz2OgiH7la6ZFpyKHxkZipa0bmFrV8+yFtlK0TtFfyUMmAx
	/Nnw/8VMA==
X-Received: by 2002:a2e:be91:0:b0:3a9:849c:128a with SMTP id 38308e7fff4ca-3a9a2cfcf26mr12750371fa.19.1791460314922;
        Thu, 08 Oct 2026 04:51:54 -0700 (PDT)
X-Received: from grower.astralinux.ru ([38.74.72.197])
        by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3a9a1d3370csm15427281fa.13.2026.10.08.04.51.50
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 08 Oct 2026 04:51:52 -0700 (PDT)
X-Cc: Alexander Martyniuk <alexevgmart@gmail.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Thomas Pedersen <thomas@cozybit.com>,
	linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	lvc-project@linuxtesting.org,
	syzbot+63a84ea9c0f57d6133fa@syzkaller.appspotmail.com,
	Johannes Berg <johannes.berg@intel.com>
X-Mailer: git-send-email 2.43.0
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>