From: Richard Kinder <richard.kinder@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field
Date: Fri, 29 Mar 2024 14:24:42 +1100 [thread overview]
Message-ID: <2E32B9D8-F9BC-4ADE-A501-9B9E3D0E75FF@gmail.com> (raw)
In-Reply-To: <3009b152cd9f95065860d2de6b7ff8ee5775e579.camel@sipsolutions.net>
> On 29 Mar 2024, at 5:28 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
>
> On Thu, 2024-03-28 at 11:57 +1100, Richard Kinder wrote:
>> Logic inside ieee80211_rx_mgmt_beacon accesses the
>> mgmt->u.beacon.timestamp field without first checking whether the beacon
>> received is non-S1G format.
>>
>> Fix the problem by checking the beacon is non-S1G format to avoid access
>> of the mgmt->u.beacon.timestamp field.
>
> Huh, how did that end up being a problem, since iwlmvm with older
> devices is the only driver using that flag, and it doesn't support S1G?
>
> It's still correct, but it shouldn't be a problem now?
>
> johannes
Hi Johannes,
Thanks for the quick reply, much appreciated.
The motivation behind the patch was that a similar pattern is shown in lines
6315-6316: the same flag is checked along with !ieee80211_is_s1g_beacon.
If it is guaranteed that an interface running at non-S1G frequencies cannot
receive an S1G formatted frame at this point in the receive path, then the check
for is_s1g_beacon can be removed. However, could a malicious actor form an
S1G formatted frame with appropriate MAC addresses and trigger this path on
the older iwlmvm devices?
Regards,
Richard
prev parent reply other threads:[~2024-03-29 3:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 0:57 [PATCH] wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field Richard Kinder
2024-03-28 18:28 ` Johannes Berg
2024-03-29 3:24 ` Richard Kinder [this message]
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=2E32B9D8-F9BC-4ADE-A501-9B9E3D0E75FF@gmail.com \
--to=richard.kinder@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).