summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_ps.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-03-04 13:46:53 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-03-05 15:49:54 +0100
commit864a6040f395464003af8dd0d8ca86fed19866d4 (patch)
tree1cfbdad9ad7df012fbddac170402795f2c99ef12 /net/mac80211/mesh_ps.c
parentbc00a91d627026f08abf69bf5d0015499dd30c2a (diff)
downloadlinux-864a6040f395464003af8dd0d8ca86fed19866d4.tar.bz2
mac80211: clear sequence/fragment number in QoS-null frames
Avoid leaking data by sending uninitialized memory and setting an invalid (non-zero) fragment number (the sequence number is ignored anyway) by setting the seq_ctrl field to zero. Cc: stable@vger.kernel.org Fixes: 3f52b7e328c5 ("mac80211: mesh power save basics") Fixes: ce662b44ce22 ("mac80211: send (QoS) Null if no buffered frames") Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh_ps.c')
-rw-r--r--net/mac80211/mesh_ps.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/mesh_ps.c b/net/mac80211/mesh_ps.c
index 2802f9d9279d..ad8b377b4b9f 100644
--- a/net/mac80211/mesh_ps.c
+++ b/net/mac80211/mesh_ps.c
@@ -36,6 +36,7 @@ static struct sk_buff *mps_qos_null_get(struct sta_info *sta)
sdata->vif.addr);
nullfunc->frame_control = fc;
nullfunc->duration_id = 0;
+ nullfunc->seq_ctrl = 0;
/* no address resolution for this frame -> set addr 1 immediately */
memcpy(nullfunc->addr1, sta->sta.addr, ETH_ALEN);
memset(skb_put(skb, 2), 0, 2); /* append QoS control field */