Skip to content

Commit

Permalink
hostapd: fix use after free bugs
Browse files Browse the repository at this point in the history
Using a pointer one lifter after it freed is not the best idea.
Let's not do that.

Signed-off-by: David Bauer <[email protected]>
  • Loading branch information
blocktrron committed Nov 19, 2021
1 parent ea5fce3 commit 7ae04d3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions package/network/services/hostapd/patches/600-ubus_support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,22 @@
wpabuf_free(sta->p2p_ie);
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -459,6 +459,7 @@ void ap_handle_timer(void *eloop_ctx, vo
@@ -458,6 +458,7 @@ void ap_handle_timer(void *eloop_ctx, vo
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "deauthenticated due to "
"local deauth request");
ap_free_sta(hapd, sta);
+ hostapd_ubus_notify(hapd, "local-deauth", sta->addr);
ap_free_sta(hapd, sta);
return;
}
@@ -614,6 +615,7 @@ skip_poll:
@@ -613,6 +614,7 @@ skip_poll:
mlme_deauthenticate_indication(
hapd, sta,
WLAN_REASON_PREV_AUTH_NOT_VALID);
ap_free_sta(hapd, sta);
+ hostapd_ubus_notify(hapd, "inactive-deauth", sta->addr);
ap_free_sta(hapd, sta);
break;
}
}
@@ -1329,6 +1331,7 @@ void ap_sta_set_authorized(struct hostap
buf, ip_addr, keyid_buf);
} else {
Expand Down

0 comments on commit 7ae04d3

Please sign in to comment.