All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] station: Prevent a NULL pointer access
@ 2021-11-07  1:03 Torsten Schmitz
  0 siblings, 0 replies; only message in thread
From: Torsten Schmitz @ 2021-11-07  1:03 UTC (permalink / raw)
  To: iwd 

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

>From 7b1ced9001b70b9644afca502ff744dd221cceab Mon Sep 17 00:00:00 2001
From: Torsten Schmitz <noreply.torsten(a)gmail.com>
Date: Sat, 6 Nov 2021 01:42:40 +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:
 		 *
-- 
2.33.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-07  1:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-07  1:03 [PATCH v2] station: Prevent a NULL pointer access Torsten Schmitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.