mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-26 13:49:35 -05:00
Commit 587d60d2b74190d58ddeb6a30ab338352af1186a ('Add AP mode support for HT 20/40 co-ex Action frame') added processing of co-ex report, but did not include proper bounds checking or IE type checking for the payload. Furthermore, this was not ready for the possible extensibility of the 20/40 BSS Coexistence element. Fix these by checking IE ids for both elements and doing more apprioriate bounds checking for the element lengths to avoid potentially reading beyond the frame buffer. Though, the event receive buffer in both libnl and driver_nl80211_monitor.c is sufficiently large to make it very unlikely that the maximum read of about 260 bytes beyond the end of the Action frame would really have any chances of hitting the end of the memory buffer, so the practical effect of missing bounds checking would have been possibly accepting an invalid report frame and moving to 20 MHz channel unnecessarily. Signed-off-by: Jouni Malinen <j@w1.fi>