Commit c926d006 authored by Tim Harvey's avatar Tim Harvey Committed by John W. Linville

mac80211: Fix NULL-pointer deference on ibss merge when not ready

dev_open will eventually call ieee80211_ibss_join which sets up the
skb used for beacons/probe-responses however it is possible to
receive beacons that attempt to merge before this occurs causing
a null pointer dereference.  Check ssid_len as that is the last
thing set in ieee80211_ibss_join.

This occurs quite easily in the presence of adhoc nodes with hidden SSID's

revised previous patch to check further up based on irc feedback
Signed-off-by: default avatarTim Harvey <>
Reviewed-by: default avatarJohannes Berg <>
Signed-off-by: default avatarJohn W. Linville <>
parent 4a55d585
......@@ -780,6 +780,9 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
if (!sdata->u.ibss.ssid_len)
goto mgmt_out; /* not ready to merge yet */
switch (fc & IEEE80211_FCTL_STYPE) {
ieee80211_rx_mgmt_probe_req(sdata, mgmt, skb->len);
......@@ -797,6 +800,7 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment