Skip to content

Commit daebcf9

Browse files
jmberg-intelgregkh
authored andcommitted
mac80211: fix IBSS presp allocation size
commit f1f3e9e2a50a70de908f9dfe0d870e9cdc67e042 upstream. When VHT IBSS support was added, the size of the extra elements wasn't considered in ieee80211_ibss_build_presp(), which makes it possible that it would overrun the allocated buffer. Fix it by allocating the necessary space. Fixes: abcff6e ("mac80211: add VHT support for IBSS") Reported-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent bb8428f commit daebcf9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

net/mac80211/ibss.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata,
6666
2 + (IEEE80211_MAX_SUPP_RATES - 8) +
6767
2 + sizeof(struct ieee80211_ht_cap) +
6868
2 + sizeof(struct ieee80211_ht_operation) +
69+
2 + sizeof(struct ieee80211_vht_cap) +
70+
2 + sizeof(struct ieee80211_vht_operation) +
6971
ifibss->ie_len;
7072
presp = kzalloc(sizeof(*presp) + frame_len, GFP_KERNEL);
7173
if (!presp)

0 commit comments

Comments
 (0)