From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) (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 700CD3749F7 for ; Mon, 24 Aug 2026 02:42:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787539371; cv=none; b=glbFSvcj33n9pjb55aoI6G+kvZR+Q9a7Z1XQaTwxL4APPj4HzWJSlFxIcBhAwnLpjzE2pfdzn9k4U4Q+XYL7jiuUJjocscPZfM/n63KNLGjS9FIFJo+QUuo9Ees3ZZ04c1QFJwL1xqBpowt+MPFKglvJASk62GNpYIk0KGhYTFw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787539371; c=relaxed/simple; bh=+MgaXqALcJBsaVZrFSX2D6nvHm2UjR3PnyzZ5vTtZbk=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=a+UBT6rltvgHSGEdzJjNIk+GO/u073TvFSHeJYqycHZ8Mb5UrAj4DJ9YuUT2b5xm3K2Uy+yJdN2g+h6pmZupfKgAmo8LqZKpTFgVZKXwhHuh9OI1ImJ9dLNg6CU5ESj5HWhbRtJ3TPCKBKf/09a7AIFg+/a0jNvZyiMb3YnSfEA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.167.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-485ebc5706cso8066219b6e.0 for ; Sun, 23 Aug 2026 19:42:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787539365; x=1788144165; h=content-type:to:from:subject:message-id:in-reply-to:date :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=MJqyyBPnVfJ4kDDRPOAGT5naqsnBSPd9N6nDqnHYYGM=; b=m/9Dtnu/fhgbSYUCFei5oj9ZH53XiokfHo+0TsiRUTPshQKoWN9QP3qnIqD+ZN0dYj ByR6Q7rLVuoZkPaeF9py5xGGOK+WBl1Z5HY9DNvBCV8tB36gTa6vDZt7Ngw6PzKeIjXt qYq8MRrp8BINeJmrjf5iF038pYPToQchWgojaUKq5ClcecwWDMOVFdV6mwUXKmkbGRRf aYRCpsnJx1XToJerZjPM9d0A/HAKPc7kC20pNMmoM4hMt262cZ/LYZDFANO00CA8Yyi9 fPe3UXl/8G+hMlXxYQzl/Pwi2eZwDbyp1jmZ1ozad8JeY78YV5hYBzCVUDVOTt42jQ6A sOTw== X-Gm-Message-State: AFuF++kqXOux+Oo2jxpcdJMLgIVYvfOF+pNdn2AJoNlCDqE+ASFz1mUI ZYVPBzcIR0HJv4kBFtf5Cpnu2A3lpx343o2kUo/rzRGF4+PUgKjgXtFcluOoiYBKmvLMIlD2h1A /60r37SkD2IgeWd03oqoOY5/NJmksoGIQPVOLqsC3y567AswjIVmVOtbfxdI= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6808:14cc:b0:492:7abc:422e with SMTP id 5614622812f47-4b2cdd663d1mr26021267b6e.13.1787539365478; Sun, 23 Aug 2026 19:42:45 -0700 (PDT) Date: Sun, 23 Aug 2026 19:42:45 -0700 In-Reply-To: <6a8b254b.91706f20.16b6e3.02c9.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6a8bafa5.dbb3a75c.13dd47.005b.GAE@google.com> Subject: Forwarded: [PATCH] wifi: mac80211: mesh: free pending CSA settings on interface stop From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] wifi: mac80211: mesh: free pending CSA settings on interface stop Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master ifmsh->csa is allocated in ieee80211_mesh_csa_beacon() and normally freed in ieee80211_mesh_finish_csa() once the channel switch completes. If the mesh interface is stopped while a channel switch is still in progress, ifmsh->csa is never freed, leaking the mesh_csa_settings object. Free it in ieee80211_stop_mesh(), the same way ifmsh->beacon is already handled there. Reported-by: syzbot+f5752cd6b94fe38be666@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=f5752cd6b94fe38be666 Signed-off-by: Deepanshu Kartikey --- net/mac80211/mesh.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index d4507e4e6ec1..d3fb4478a366 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -1201,7 +1201,8 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) struct ieee80211_local *local = sdata->local; struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; struct beacon_data *bcn; - + struct mesh_csa_settings *csa; + netif_carrier_off(sdata->dev); /* flush STAs and mpaths on this iface */ @@ -1222,6 +1223,13 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) RCU_INIT_POINTER(ifmsh->beacon, NULL); kfree_rcu(bcn, rcu_head); + /* free any pending, unfinished channel switch */ + csa = sdata_dereference(ifmsh->csa, sdata); + if (csa) { + RCU_INIT_POINTER(ifmsh->csa, NULL); + kfree_rcu(csa, rcu_head); + } + /* free all potentially still buffered group-addressed frames */ local->total_ps_buffered -= skb_queue_len(&ifmsh->ps.bc_buf); skb_queue_purge(&ifmsh->ps.bc_buf); -- 2.34.1