From 5a111ac902c1bb1dc9c3ac35bd0e19638bdc7998 Mon Sep 17 00:00:00 2001 From: Torsten Schmitz Date: Sun, 7 Nov 2021 01:41:37 +0100 Subject: [PATCH] station: Prevent a NULL pointer access There is an unchecked NULL pointer access in network_has_open_pair. open_info can be NULL, when out of multiple APs in range that advertise the same SSID some advertise OWE transition elments and some don't. --- src/station.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/station.c b/src/station.c index 19f2aaeb..245fd780 100644 --- a/src/station.c +++ b/src/station.c @@ -698,6 +698,10 @@ static bool network_has_open_pair(struct network *network, struct scan_bss *owe) struct scan_bss *open = entry->data; struct ie_owe_transition_info *open_info = open->owe_trans; + /* AP does not advertise owe transition */ + if (!open_info) + continue; + /* * Check if this is an Open/Hidden pair: *