From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpo63.interia.pl (smtpo63.interia.pl [217.74.67.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3131A52B1CD for ; Tue, 8 Sep 2026 11:59:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.74.67.63 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788868756; cv=none; b=gj8GSl9tNX/TwIIFsQMwbrGdT0UbhaXDBjrDX2rBtYmeFxUUyuCxx+zhSC4FKeJn36vUhIhIulm++LsWk7/44L0OdNh7+j2yvsFsYs9HvabVu12xJCbLoQFrfhashnOsOZ93Eex0itKK1QtgwlGpglzyMyYqVL4il4Q5UOpCsVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788868756; c=relaxed/simple; bh=MfsxBJ6NlEeM+8rbXq+NIID3c9HT4pB92XAyZW+nVrs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bDkBE4et75h8T7yuY75P3KUzHHpYhW0CwEbaCSCOSoH2y3v6clUVe3vQ/N1nXZZWy55kVHfgqTUgYinkrT5WbtKySeHalyjO8OBZaELb3z8MUpMnV1dGa+s8dT5WnYzC7D6808rp+tgddGABn0k8EuGlecquRvbJJHv1ubldElk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=poczta.fm; spf=pass smtp.mailfrom=poczta.fm; dkim=pass (1024-bit key) header.d=poczta.fm header.i=@poczta.fm header.b=t7KnY8Cx; arc=none smtp.client-ip=217.74.67.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=poczta.fm Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=poczta.fm Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=poczta.fm header.i=@poczta.fm header.b="t7KnY8Cx" Received: from nr200 (unknown [80.68.231.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by poczta.interia.pl (INTERIA.PL) with ESMTPSA; Tue, 8 Sep 2026 13:59:03 +0200 (CEST) Date: Tue, 8 Sep 2026 13:59:01 +0200 From: Slawomir Stepien To: Johannes Berg Cc: syzkaller-bugs@googlegroups.com, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot@lists.linux.dev, syzbot+9bdc0c5998ab45b05030@syzkaller.appspotmail.com Subject: Re: [PATCH 3/3] wifi: cfg80211: check if AP has been started before adding new station Message-ID: References: <20260813090434.2071318-1-sst@poczta.fm> <20260813090434.2071318-3-sst@poczta.fm> <113768c35523738bdc7ab8441ecda64a063900bf.camel@sipsolutions.net> <8934029f86b1c0e75f777185b2768f8e9755cae5.camel@sipsolutions.net> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8934029f86b1c0e75f777185b2768f8e9755cae5.camel@sipsolutions.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poczta.fm; s=dk; t=1788868745; bh=LD3kiUlCRno+rl8RodUamrYcjrOz0JXo82CrRqMJUik=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=t7KnY8Cxk9Z4tNellCBXBlu2LLB0TV58LK8rLgSBtloJptm0mDHDwTDHZulK3IYUU m9WJd5/o4FdSndrEBspzMOFtXx+vYNZT1Dux9L2Nr89uAuUSziuM/eo1THZalajUeA BwqOUrzJ5Xj8kaJ+VhJA+jJh1RhAfGupGmdXJJpE= On wrz 08, 2026 11:46, Johannes Berg wrote: > On Tue, 2026-09-08 at 11:44 +0200, Slawomir Stepien wrote: > > On wrz 04, 2026 11:25, Johannes Berg wrote: > > > On Thu, 2026-08-13 at 11:04 +0200, Slawomir Stepien wrote: > > > > > > > > case NL80211_IFTYPE_P2P_GO: > > > > + /* Add a new station only after the AP and link has been started */ > > > > + link_id = wdev->valid_links ? params.link_sta_params.link_id : 0; > > > > > > max() maybe? > > > > > > > + if (!wdev->links[link_id].ap.beacon_interval) > > > > + return -ENETDOWN; > > > > > > I think the same issue might exist also for mesh, maybe address that as > > > well? > > > > > > And I think you could have a fourth patch to clean up the mac80211 code > > > to no longer handle the "STA creation on AP_VLAN" case? > > > > But is there such case? > > The only part I think is related is the handling code when params.vlan is set. However, this code is > > still OK. I do not see any other code that would be a good candidate for removal/change. > > > > Am I missing something here? > > Don't think you're missing anything, there's just the block handling > param->vlan in add_station, it's dead code now. But why not kill it? For the reason explained below (in my previous message). There can still be a command from userspace with AP base interface (as wdev) with attrs[NL80211_ATTR_STA_VLAN] set and this block will be executed in such case. Right? > > Also, during this check, I've came to a conclusion that I will reword a bit the commit message for > > PATCH 1/3, since userspace can still add STA to AP_VLAN in one go, using > > attrs[NL80211_ATTR_STA_VLAN] and that's fine, since the wdev would be the base AP interface, so all > > check will happen. > > Sure :) -- Slawomir Stepien