fragattacks/src
Jouni Malinen cc79eb725f Check against integer overflow in int_array functions
int_array_concat() and int_array_add_unique() could potentially end up
overflowing the int type variable used to calculate their length. While
this is mostly theoretical for platforms that use 32-bit int, there
might be cases where a 16-bit int overflow could be hit. This could
result in accessing memory outside buffer bounds and potentially a
double free when realloc() ends up freeing the buffer.

All current uses of int_array_add_unique() and most uses of
int_array_concat() are currently limited by the buffer limits for the
local configuration parameter or frame length and as such, cannot hit
this overflow cases. The only case where a long enough int_array could
be generated is the combination of scan_freq values for a scan. The
memory and CPU resource needs for generating an int_array with 2^31
entries would not be realistic to hit in practice, but a device using
LP32 data model with 16-bit int could hit this case.

It is better to have more robust checks even if this could not be
reached in practice, so handle cases where more than INT_MAX entries
would be added to an int_array as memory allocation failures instead of
allowing the overflow case to proceed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2020-03-21 17:12:17 +02:00
..
ap Allow RSNXE to be removed from Beacon frames for testing purposes 2020-03-21 00:24:03 +02:00
common Remove unnecessary and confusing length check from the PMKID KDE case 2020-03-15 23:24:18 +02:00
crypto crypto: Add a function to get the ECDH prime length 2020-02-29 23:26:26 +02:00
drivers nl80211: Debug print set_key() command names 2020-03-15 23:42:21 +02:00
eap_common EAP-SIM/AKA peer: Add support for EAP Method prefix 2020-01-10 19:16:13 +02:00
eap_peer EAP-SIM peer: Do not accept SIM/Challenge without SIM/Start 2019-12-23 23:59:16 +02:00
eap_server Clean up base64_{encode,decode} pointer types 2019-11-28 16:39:09 +02:00
eapol_auth Make WEP functionality an optional build parameter 2020-02-29 17:45:25 +02:00
eapol_supp Fix unicast argument for set_wep_key() from EAPOL supplicant 2020-03-04 23:59:49 +02:00
fst FST: Update FST about MAC address change 2019-10-15 15:39:22 +03:00
l2_packet l2_packet: Fix bridge workaround for repeater configuration 2019-12-24 21:16:23 +02:00
p2p P2P: Increase number of channels per operating class 2020-02-12 23:17:24 +02:00
pae mka: Check OLPN for exhaustion on SAKuse decode 2019-09-19 00:21:47 +03:00
radius RADIUS client: fix extra retry before failover 2019-12-30 19:13:51 +02:00
rsn_supp FT: Omit RSNXE from FT protocol Reassociation Request when needed 2020-03-21 00:01:47 +02:00
tls ASN.1: Helper functions for building DER encoded data 2020-01-31 23:16:05 +02:00
utils Check against integer overflow in int_array functions 2020-03-21 17:12:17 +02:00
wps WPS: Remove expired PINs on Selected Registrar timeout 2020-03-04 23:26:02 +02:00
lib.rules tests: Fix CFLAGS passing for new fuzzing tools 2019-06-11 06:34:19 +03:00
Makefile FST: Add the Fast Session Transfer (FST) module 2015-07-16 18:26:15 +03:00