]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mac80211: fix NULL dereference in radiotap code
authorJohannes Berg <johannes.berg@intel.com>
Tue, 8 Nov 2011 11:28:33 +0000 (12:28 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 26 Nov 2011 17:08:34 +0000 (09:08 -0800)
commit4a4d69f0ec7cf7afdcc4346cf6bc8d3835358df8
tree2bd83f50c99ce7a66a996c8f6e81291c31011d9a
parent7aa8983f0b2c57c25de227909072fe4f8edaa9ad
mac80211: fix NULL dereference in radiotap code

commit f8d1ccf15568268c76f913b45ecdd33134387f1a upstream.

When receiving failed PLCP frames is enabled, there
won't be a rate pointer when we add the radiotap
header and thus the kernel will crash. Fix this by
not assuming the rate pointer is always valid. It's
still always valid for frames that have good PLCP
though, and that is checked & enforced.

This was broken by my
commit fc88518916793af8ad6a02e05ff254d95c36d875
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Fri Jul 30 13:23:12 2010 +0200

    mac80211: don't check rates on PLCP error frames

where I removed the check in this case but didn't
take into account that the rate info would be used.

Reported-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/mac80211/rx.c