From: Ivo van Doorn Date: Tue, 1 Jul 2008 08:45:13 +0000 (+0200) Subject: mac80211: Don't request encryption for probe response X-Git-Tag: MMI-PSA29.97-13-9~33552^2~187^2~36 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b2898a27809f54a33050a70d0eaa4a78194163a0;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mac80211: Don't request encryption for probe response Probe responses shouldn't be encrypted, and mac80211 doesn't set the crypto key accordingly. However it didn't set the IEEE80211_TX_CTL_DO_NOT_ENCRYPT flag which means drivers could make an attempt to encrypt it, and causing a NULL pointer dereference when accessing the provided hw_key field. Signed-off-by: Ivo van Doorn Acked-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4a3bddd206d8..86abdf96390c 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2481,6 +2481,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, control->flags |= IEEE80211_TX_CTL_SHORT_PREAMBLE; control->antenna_sel_tx = local->hw.conf.antenna_sel_tx; control->flags |= IEEE80211_TX_CTL_NO_ACK; + control->flags |= IEEE80211_TX_CTL_DO_NOT_ENCRYPT; control->control.retry_limit = 1; ifsta->probe_resp = skb_copy(skb, GFP_ATOMIC);