Page MenuHomeFreeBSD

net80211: fix ieee80211_init_channels() usage
ClosedPublic

Authored by avos on Jan 7 2016, 3:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 5 2024, 7:53 AM
Unknown Object (File)
Jan 9 2024, 11:23 PM
Unknown Object (File)
Dec 22 2023, 9:57 PM
Unknown Object (File)
Dec 16 2023, 11:44 PM
Unknown Object (File)
Nov 19 2023, 10:43 PM
Unknown Object (File)
Sep 26 2023, 7:51 PM
Unknown Object (File)
Sep 26 2023, 5:12 AM
Unknown Object (File)
Aug 29 2023, 2:09 PM
Subscribers

Details

Summary

Fix out-of-bounds read (all) / write (11n capable) for drivers that are using ieee80211_init_channels() to initialize channel list.

MFC after: 2 weeks.

Test Plan

Tested with

  • RTL8188EU, STA mode.
  • RTL8188CUS, STA mode.
  • WUSB54GC, HOSTAP mode.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avos retitled this revision from to net80211: fix ieee80211_init_channels() usage.
avos updated this object.
avos edited the test plan for this revision. (Show Details)
avos added a reviewer: adrian.
avos set the repository for this revision to rS FreeBSD src repository - subversion.

Overall this is a good catch. I'm happy to see this merged in this in once the ndis comment is address.

I kinda wonder if we should just create a 'bands' typedef for net80211 to hide this problem in the future.

sys/dev/if_ndis/if_ndis.c
763 ↗(On Diff #12003)

This won't work if bits[1] is non-zero, etc. Modify the iterator above to set some flag to 1 if a mode was set, and check if the flag is 0 here.

avos edited edge metadata.

Use more proper check for ndis(4).

avos marked an inline comment as done.Jan 7 2016, 5:06 PM
adrian edited edge metadata.

all good, let's do it! thanks!

This revision is now accepted and ready to land.Jan 7 2016, 6:15 PM
This revision was automatically updated to reflect the committed changes.