]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
run(4): add more length checks in Rx path.
authoravos <avos@FreeBSD.org>
Mon, 21 Jan 2019 00:03:35 +0000 (00:03 +0000)
committeravos <avos@FreeBSD.org>
Mon, 21 Jan 2019 00:03:35 +0000 (00:03 +0000)
commitd4e79c037889f03d1f52069e464a3d598c1a4cec
treed00a516f56a4de93f8fe5bfab95f459b3cc8af94
parente874bbce534cd7d66f352a3276ede041ea11f535
run(4): add more length checks in Rx path.

- Discard frames that are bigger than MCLBYTES (to prevent buffer overrun).
- Check buffer length before accessing its contents.
- Fix len <-> dmalen check - the last includes Rx Wireless information
structure size.
- Fix out-of-bounds read during Rx node search for ACK / CTS frames
(monitor mode only).

While here:
- Mark few suspicious places with comments.
- Move common cleanup to the function end.

MFC after: 1 week
sys/dev/usb/wlan/if_run.c