WNM: Fix bounds checking in SSID List element matching
The IE header length check was off-by-one and that could allow the loop
to read one octet beyond the end of the buffer before breaking out in
the second check.
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14927
Fixes: 0a66ce3c49
("WNM: Add support for SSID List element matching")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
724c0f17b8
commit
5bad612311
1 changed files with 1 additions and 1 deletions
|
@ -595,7 +595,7 @@ static enum ssid_match_result ssid_match(struct hostapd_data *hapd,
|
|||
|
||||
pos = ssid_list;
|
||||
end = ssid_list + ssid_list_len;
|
||||
while (end - pos >= 1) {
|
||||
while (end - pos >= 2) {
|
||||
if (2 + pos[1] > end - pos)
|
||||
break;
|
||||
if (pos[1] == 0)
|
||||
|
|
Loading…
Reference in a new issue