Page MenuHomeFreeBSD

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

Authored by bz on Wed, Jun 18, 10:02 PM.
Tags
None
Referenced Files
F121817193: D50923.id157294.diff
Sun, Jun 29, 3:42 PM
Unknown Object (File)
Sat, Jun 28, 12:18 AM
Unknown Object (File)
Fri, Jun 27, 5:30 PM
Unknown Object (File)
Fri, Jun 27, 5:17 AM
Unknown Object (File)
Thu, Jun 26, 5:17 AM
Unknown Object (File)
Tue, Jun 24, 5:42 PM
Unknown Object (File)
Sun, Jun 22, 12:45 PM
Unknown Object (File)
Fri, Jun 20, 7:55 AM

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 Passed
Unit
No Test Coverage
Build Status
Buildable 64962
Build 61845: arc lint + arc unit

Event Timeline

bz requested review of this revision.Wed, Jun 18, 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.Wed, Jun 18, 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.