Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: Don't request encryption for proble response
@ 2008-07-01  8:45 Ivo van Doorn
  2008-07-01  8:48 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Ivo van Doorn @ 2008-07-01  8:45 UTC (permalink / raw)
  To: John W. Linville; +Cc: Johannes Berg, linux-wireless

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 <IvDoorn@gmail.com>
---
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7b4d4d4..fd28cd8 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2531,6 +2531,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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: Don't request encryption for proble response
  2008-07-01  8:45 [PATCH] mac80211: Don't request encryption for proble response Ivo van Doorn
@ 2008-07-01  8:48 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2008-07-01  8:48 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: John W. Linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

On Tue, 2008-07-01 at 10:45 +0200, Ivo van Doorn wrote:
> 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 <IvDoorn@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>

> ---
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index 7b4d4d4..fd28cd8 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -2531,6 +2531,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);
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-01  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01  8:45 [PATCH] mac80211: Don't request encryption for proble response Ivo van Doorn
2008-07-01  8:48 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox