2014-06-10 17:03:47

by Grumbach, Emmanuel

[permalink] [raw]
Subject: [PATCH] mac80211: WEP extra head/tail room in ieee80211_send_auth

From: Max Stepanov <[email protected]>

After skb allocation and call to ieee80211_wep_encrypt in ieee80211_send_auth
the flow fails with a warning in ieee80211_wep_add_iv on verification of
available head/tailroom needed for WEP_IV and WEP_ICV.

Signed-off-by: Max Stepanov <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
---
net/mac80211/util.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 4a0f3ae..1cc4d82 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1125,11 +1125,12 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
int err;

/* 24 + 6 = header + auth_algo + auth_transaction + status_code */
- skb = dev_alloc_skb(local->hw.extra_tx_headroom + 24 + 6 + extra_len);
+ skb = dev_alloc_skb(local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN +
+ 24 + 6 + extra_len + IEEE80211_WEP_ICV_LEN);
if (!skb)
return;

- skb_reserve(skb, local->hw.extra_tx_headroom);
+ skb_reserve(skb, local->hw.extra_tx_headroom + IEEE80211_WEP_IV_LEN);

mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24 + 6);
memset(mgmt, 0, 24 + 6);
--
1.9.1



2014-06-14 19:59:10

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: WEP extra head/tail room in ieee80211_send_auth

On Sat, 2014-06-14 at 11:00 +0300, Kalle Valo wrote:
> Johannes Berg <[email protected]> writes:
>
> > On Tue, 2014-06-10 at 20:00 +0300, Emmanuel Grumbach wrote:
> >> From: Max Stepanov <[email protected]>
> >>
> >> After skb allocation and call to ieee80211_wep_encrypt in ieee80211_send_auth
> >> the flow fails with a warning in ieee80211_wep_add_iv on verification of
> >> available head/tailroom needed for WEP_IV and WEP_ICV.
> >
> > Applied. There's still time - should that be Cc stable?
>
> Is this a regression?

Good question. I don't think anything changed this code recently, but
maybe something changed skb allocation or so? Max?

johannes


2014-06-14 08:00:45

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] mac80211: WEP extra head/tail room in ieee80211_send_auth

Johannes Berg <[email protected]> writes:

> On Tue, 2014-06-10 at 20:00 +0300, Emmanuel Grumbach wrote:
>> From: Max Stepanov <[email protected]>
>>
>> After skb allocation and call to ieee80211_wep_encrypt in ieee80211_send_auth
>> the flow fails with a warning in ieee80211_wep_add_iv on verification of
>> available head/tailroom needed for WEP_IV and WEP_ICV.
>
> Applied. There's still time - should that be Cc stable?

Is this a regression?

--
Kalle Valo

2014-06-13 18:01:14

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: WEP extra head/tail room in ieee80211_send_auth

On Tue, 2014-06-10 at 20:00 +0300, Emmanuel Grumbach wrote:
> From: Max Stepanov <[email protected]>
>
> After skb allocation and call to ieee80211_wep_encrypt in ieee80211_send_auth
> the flow fails with a warning in ieee80211_wep_add_iv on verification of
> available head/tailroom needed for WEP_IV and WEP_ICV.

Applied. There's still time - should that be Cc stable?

johannes