aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-03-26 17:22:44 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-26 20:53:58 (GMT)
commit02155431030ed4cff683268d6a6f01032beca4b7 (patch)
treeb2437770097cb3ca453216eaa927a91411ae72ef
parent4d2c28746693ca6ed74e9c53bb626e5991039156 (diff)
downloadhostap-02155431030ed4cff683268d6a6f01032beca4b7.zip
hostap-02155431030ed4cff683268d6a6f01032beca4b7.tar.gz
hostap-02155431030ed4cff683268d6a6f01032beca4b7.tar.bz2
tests: Information element parsing OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--tests/hwsim/test_ap_params.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_params.py b/tests/hwsim/test_ap_params.py
index 87fc1dc..5d5819f 100644
--- a/tests/hwsim/test_ap_params.py
+++ b/tests/hwsim/test_ap_params.py
@@ -12,6 +12,7 @@ import subprocess
import hwsim_utils
import hostapd
from tshark import run_tshark
+from utils import alloc_fail
def test_ap_fragmentation_rts_set_high(dev, apdev):
"""WPA2-PSK AP with fragmentation and RTS thresholds larger than frame length"""
@@ -79,6 +80,18 @@ def test_ap_element_parse(dev, apdev):
if "38050102030405" not in bss['ie']:
raise Exception("Timeout element not shown in scan results")
+def test_ap_element_parse_oom(dev, apdev):
+ """Information element parsing OOM"""
+ bssid = apdev[0]['bssid']
+ ssid = "test-wpa2-psk"
+ params = { 'ssid': ssid,
+ 'vendor_elements': "dd0d506f9a0a00000600411c440028" }
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+ dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412")
+ with alloc_fail(dev[0], 1, "wpabuf_alloc;ieee802_11_vendor_ie_concat"):
+ bss = dev[0].get_bss(bssid)
+ logger.info(str(bss))
+
def test_ap_country(dev, apdev):
"""WPA2-PSK AP setting country code and using 5 GHz band"""
try: