projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79ea0a5
)
mac80211: free skb in WEP error case
author
Johannes Berg
<johannes.berg@intel.com>
Fri, 18 Jun 2021 10:41:33 +0000
(13:41 +0300)
committer
Johannes Berg
<johannes.berg@intel.com>
Wed, 23 Jun 2021 09:29:14 +0000
(11:29 +0200)
If, for some strange reason, ieee80211_wep_encrypt() fails in
ieee80211_send_auth() free the SKB instead of sending out the
useless frame, in addition to the warning. This can't really
happen since the SKB was freshly allocated.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link:
https://lore.kernel.org/r/iwlwifi.20210618133832.98f058d7a8b2.Ie605e6a10e72eae02f5734032826af48b85b6d11@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/util.c
patch
|
blob
|
history
diff --git
a/net/mac80211/util.c
b/net/mac80211/util.c
index
060059e
..
ee5410b
100644
(file)
--- a/
net/mac80211/util.c
+++ b/
net/mac80211/util.c
@@
-1693,7
+1693,10
@@
void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) {
mgmt->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED);
err = ieee80211_wep_encrypt(local, skb, key, key_len, key_idx);
- WARN_ON(err);
+ if (WARN_ON(err)) {
+ kfree_skb(skb);
+ return;
+ }
}
IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |