Message ID | 20211217203706.55031-1-johannes@sipsolutions.net |
---|---|
State | Superseded |
Headers | show |
Series | [v5.4] mac80211: validate extended element ID is present | expand |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index decd46b38393..c1c117fdf318 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1227,6 +1227,8 @@ _ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, elems->max_idle_period_ie = (void *)pos; break; case WLAN_EID_EXTENSION: + if (!elen) + break; if (pos[0] == WLAN_EID_EXT_HE_MU_EDCA && elen >= (sizeof(*elems->mu_edca_param_set) + 1)) { elems->mu_edca_param_set = (void *)&pos[1];