From: Johannes Berg <johannes@sipsolutions.net>
To: Zhongqiu Han <quic_zhonhan@quicinc.com>,
miriam.rachel.korenblit@intel.com
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+5a7b40bcb34dea5ca959@syzkaller.appspotmail.com
Subject: Re: [PATCH v3] wifi: mac80211: Prevent disconnect reports when no AP is associated
Date: Tue, 24 Jun 2025 15:35:55 +0200 [thread overview]
Message-ID: <89dd111db62029f1575f7a7113e2a0cb5a1a8d5f.camel@sipsolutions.net> (raw)
In-Reply-To: <5e378fe7-90ec-4453-b549-1106f9d0cfef@quicinc.com>
> >
> > > - Remove WARN_ON and early return in ieee80211_report_disconnect()
> > > - Change the return type of ieee80211_set_disassoc(). If
> > > ieee80211_report_disconnect() uses the frame_buf initialized by
> > > ieee80211_set_disassoc(), its invocation is now conditional based
> > > on the return value of ieee80211_set_disassoc().
> >
> > I don't understand this change ... surely syzbot couldn't have run into
> > an uninitialized buffer after the WARN_ON since it has panic_on_warn. So
> > why all these changes:
>
> yes, syzbot couldn't have run into an uninitialized buffer after the
> WARN_ON on **patch v2** such as:
>
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -4433,6 +4433,10 @@ static void ieee80211_report_disconnect(struct
> ieee80211_sub_if_data *sdata,
> .u.mlme.data = tx ? DEAUTH_TX_EVENT : DEAUTH_RX_EVENT,
> .u.mlme.reason = reason,
> };
> + struct sta_info *ap_sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
> +
> + if (WARN_ON(!ap_sta))
> + return;
I think you misunderstood ... We have this WARN_ON since 687a7c8a7227
("wifi: mac80211: change disassoc sequence a bit"). Therefore, !ap_sta
cannot be the cause of syzbot complaints, since WARN_ON would panic it
before it ever gets to the uninitialized memory use.
> "You're adding a WARN_ON() that's now guaranteed to trigger, no
so now it's no longer your WARN_ON, I guess, but how did it trigger? I
really think we need to figure out how it triggered and fix _that_.
johannes
next prev parent reply other threads:[~2025-06-24 13:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 3:20 Zhongqiu Han
2025-06-20 11:13 ` Johannes Berg
2025-06-24 12:33 ` Zhongqiu Han
2025-06-24 13:35 ` Johannes Berg [this message]
2025-06-25 3:58 ` Zhongqiu Han
2025-06-25 6:45 ` Johannes Berg
2025-06-25 10:11 ` Zhongqiu Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=89dd111db62029f1575f7a7113e2a0cb5a1a8d5f.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
--cc=quic_zhonhan@quicinc.com \
--cc=syzbot+5a7b40bcb34dea5ca959@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®