Page MenuHomeFreeBSD

net80211: in ieee80211_sta_join() only do_ht if HT is avail
ClosedPublic

Authored by bz on Jun 18 2025, 10:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 1, 3:11 AM
Unknown Object (File)
Tue, Sep 30, 7:47 AM
Unknown Object (File)
Sun, Sep 28, 8:22 PM
Unknown Object (File)
Sat, Sep 20, 6:27 PM
Unknown Object (File)
Fri, Sep 19, 8:35 AM
Unknown Object (File)
Sep 15 2025, 5:33 AM
Unknown Object (File)
Sep 14 2025, 8:07 AM
Unknown Object (File)
Sep 13 2025, 11:07 PM

Details

Summary

In ieee80211_sta_join() there are currently two ways to set
"do_ht": (1) after checking HT IEs are avail, and (2) after
checking VHT IEs are avail and we are not on 2GHz.

In the latter case no one checks that HT IEs are available and
when we hit ieee80211_ht_updateparams_final() htinfo may be NULL
and we panic.

Avoid this by only checking for VHT if do_ht was set.
No VHT without HT IEs.

While here switch do_ht to be a bool.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR: 287625
Fixes: 51172f62a753f

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Jun 18 2025, 10:02 PM

Heh we've both hit a couple of fun paths into this (see https://reviews.freebsd.org/D50794 as well)

This revision is now accepted and ready to land.Jun 18 2025, 10:10 PM

Heh we've both hit a couple of fun paths into this (see https://reviews.freebsd.org/D50794 as well)

I've not hit this. It came via a PR for STA mode.