diff options
author | Felix Fietkau <nbd@nbd.name> | 2024-05-01 18:57:00 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2024-05-01 19:00:21 +0200 |
commit | 52a5f4491c642fcb524494800ce64c5040901b86 (patch) | |
tree | 7ba5f31d0c3f6a60b63daab323f52bf00e131500 | |
parent | a8bfdf2ed4d930ca5a31b5c4bc7061ad5ef11ba3 (diff) | |
download | openwrt-52a5f4491c642fcb524494800ce64c5040901b86.tar.gz openwrt-52a5f4491c642fcb524494800ce64c5040901b86.tar.bz2 openwrt-52a5f4491c642fcb524494800ce64c5040901b86.zip |
hostapd: fix a null pointer dereference in wpa_supplicant on teardown
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch b/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch new file mode 100644 index 0000000000..85d5127f60 --- /dev/null +++ b/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch @@ -0,0 +1,20 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Wed, 1 May 2024 18:55:24 +0200 +Subject: [PATCH] AP: add missing null pointer check in hostapd_free_hapd_data + +When called from wpa_supplicant, iface->interfaces can be NULL + +Signed-off-by: Felix Fietkau <nbd@nbd.name> +--- + +--- a/src/ap/hostapd.c ++++ b/src/ap/hostapd.c +@@ -502,7 +502,7 @@ void hostapd_free_hapd_data(struct hosta + struct hapd_interfaces *ifaces = hapd->iface->interfaces; + size_t i; + +- for (i = 0; i < ifaces->count; i++) { ++ for (i = 0; ifaces && i < ifaces->count; i++) { + struct hostapd_iface *iface = ifaces->iface[i]; + size_t j; + |