Page MenuHomeFreeBSD

net80211: don't do_ht in sta_recv_mgmt without htcap/htinfo
Needs ReviewPublic

Authored by me_runxiyu.org on Fri, Jul 3, 8:46 AM.
Referenced Files
F161712245: D58020.diff
Mon, Jul 6, 4:22 AM
Unknown Object (File)
Fri, Jul 3, 1:38 PM
Unknown Object (File)
Fri, Jul 3, 9:55 AM

Details

Reviewers
bz
Group Reviewers
wireless
Summary

My laptop was kernel panicking randomly, and I kgdb'ed it down to this a null deref here.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74497
Build 71380: arc lint + arc unit

Event Timeline

me_runxiyu.org retitled this revision from net80211: don't do_ht in sta_recv_mgmt without HE IEs to net80211: don't do_ht in sta_recv_mgmt without htcap/htinfo.Fri, Jul 3, 8:50 AM

oh good catch, I thought I had found all of these!

adrian added a project: wireless.
adrian added a subscriber: wireless.

ugh ok why's do_ht being set when there's no htcap/htinfo fields.

OH, hilarious, it's because you have VHT parameters but not HT parameters? That's problematic. Would you mind doing an "ifconfig -v wlan0 list scan" to capture what's being seen in the scan, find the entry that has VHT parameters and not HT parameters, and including it in here?

Since it is also part of the VHT code path we can't just /not/ do it here; I think we need to handle NULL IE pointers in ieee80211_ht_updateparams_final() and just not do the htinfo deferefence there. (And document that the function must handle NULL IEs.)

Would you like to try that instead?

ugh ok why's do_ht being set when there's no htcap/htinfo fields.

OH, hilarious, it's because you have VHT parameters but not HT parameters? That's problematic. Would you mind doing an "ifconfig -v wlan0 list scan" to capture what's being seen in the scan, find the entry that has VHT parameters and not HT parameters, and including it in here?

Yes, first first gather data before any further conclusions; and see if it is a broken AP.

Since it is also part of the VHT code path we can't just /not/ do it here; I think we need to handle NULL IE pointers in ieee80211_ht_updateparams_final() and just not do the htinfo deferefence there. (And document that the function must handle NULL IEs.)

I have a partly done entire rework of IE handling in net80211 as we do have multiple places (regularly reported in the last years) without proper checks one way or another.