]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
urtw(4): add length checks in Rx path.
authoravos <avos@FreeBSD.org>
Mon, 21 Jan 2019 00:53:38 +0000 (00:53 +0000)
committeravos <avos@FreeBSD.org>
Mon, 21 Jan 2019 00:53:38 +0000 (00:53 +0000)
commit4c57b4412f6e0eb197cfbe5ce6311ad821d4b7cb
tree5e6ca20a4801a42ce911249f251d62a7ff35ef60
parent3f3666ec283e8f09068648b512cfc109db38565e
urtw(4): add length checks in Rx path.

- Check if buffer can contain Rx descriptor before accessing it.
- Verify upper / lower bounds for frame length.
- Do not pass too short frames into ieee80211_find_rxnode().

While here:
- Move cleanup to the function end.
- Reuse IEEE80211_IS_DATA() macro.

MFC after: 1 week
sys/dev/usb/wlan/if_urtw.c
sys/dev/usb/wlan/if_urtwvar.h