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)
Wed, Nov 20, 12:10 AM
Unknown Object (File)
Tue, Nov 19, 11:45 AM
Unknown Object (File)
Mon, Oct 28, 7:58 PM
Unknown Object (File)
Thu, Oct 24, 11:24 PM
Unknown Object (File)
Thu, Oct 24, 11:24 PM
Unknown Object (File)
Thu, Oct 24, 11:24 PM
Unknown Object (File)
Thu, Oct 24, 11:24 PM
Unknown Object (File)
Thu, Oct 24, 11:24 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.