From ddd821365a187001555fe572e9910e9975bedeec Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Mon, 8 Jun 2020 16:47:53 -0700 Subject: [PATCH] tests: Skip malformed SAE authentication frames The parsed 'length' field might pointsbeyond the end of the frame, for some malformed frames. I haven't figured the source of said packets (I'm using kernel 4.14.177, FWIW), but we can at least be safer about our handling of them here. Signed-off-by: Brian Norris --- tests/hwsim/test_sae.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_sae.py b/tests/hwsim/test_sae.py index ed6ae89dc..3722cd427 100644 --- a/tests/hwsim/test_sae.py +++ b/tests/hwsim/test_sae.py @@ -1788,8 +1788,10 @@ def build_sae_commit(bssid, addr, group=21, token=None): def sae_rx_commit_token_req(sock, radiotap, send_two=False): msg = sock.recv(1500) - ver, pad, len, present = struct.unpack('