Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: Torsten Schmitz <noreply.torsten at gmail.com>
To: iwd at lists.01.org
Subject: [PATCH v2] station: Prevent a NULL pointer access
Date: Sun, 07 Nov 2021 02:03:38 +0100	[thread overview]
Message-ID: <CFJ55REIK1NJ.3RPA8HBGL04MQ@hostname> (raw)
In-Reply-To: 3c0e6c34-3054-276c-9f0f-44c57b173f84@gmail.com

[-- 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

                 reply	other threads:[~2021-11-07  1:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CFJ55REIK1NJ.3RPA8HBGL04MQ@hostname \
    --to=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox