3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-05 19:08:52 +02:00

ie: Fix Supported Rates length check

Supported Rates IEs can be 1-8 bytes, not only 8 byte long, according to
802.11-2012 8.4.2.3.
This commit is contained in:
Andrew Zaborowski 2017-08-14 14:49:21 +02:00 committed by Denis Kenzior
parent 38b5f3fee4
commit b344d27c56

View File

@ -1325,7 +1325,7 @@ int ie_parse_supported_rates(struct ie_tlv_iter *iter,
len = ie_tlv_iter_get_length(iter);
if (ie_tlv_iter_get_tag(iter) == IE_TYPE_SUPPORTED_RATES &&
len != 8)
(len == 0 || len > 8))
return -EINVAL;
rates = ie_tlv_iter_get_data(iter);