mac80211: fix duplicate retransmission detection
authorJohannes Berg <johannes.berg@intel.com>
Thu, 11 Jul 2013 20:33:26 +0000 (22:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2013 01:35:22 +0000 (18:35 -0700)
commitfd14e26686ae1729c25cf9c938eed826eb825e9d
tree44b821eefc2b4a105fc2f5dd75825e0274dae7c1
parentef47a5e4f1aaf1d0e2e6875e34b2c9595897bef6
mac80211: fix duplicate retransmission detection

commit 6b0f32745dcfba01d7be33acd1b40306c7a914c6 upstream.

The duplicate retransmission detection code in mac80211
erroneously attempts to do the check for every frame,
even frames that don't have a sequence control field or
that don't use it (QoS-Null frames.)

This is problematic because it causes the code to access
data beyond the end of the SKB and depending on the data
there will drop packets erroneously.

Correct the code to not do duplicate detection for such
frames.

I found this error while testing AP powersave, it lead
to retransmitted PS-Poll frames being dropped entirely
as the data beyond the end of the SKB was always zero.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/rx.c