nl80211: fix HT capability attribute validation
authorJohannes Berg <johannes.berg@intel.com>
Thu, 3 Nov 2011 08:27:01 +0000 (09:27 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 26 Nov 2011 17:09:55 +0000 (09:09 -0800)
commitc1ce1705eb0778927a0b81a6eb29e8ff193aa3de
treece823c6988c2cda5d7db1abe6e1cf882dcf72c21
parentae1e9df381d5197015356e22de9d7acaf646a9ab
nl80211: fix HT capability attribute validation

commit 6c7394197af90f6a332180e33f5d025d3037d883 upstream.

Since the NL80211_ATTR_HT_CAPABILITY attribute is
used as a struct, it needs a minimum, not maximum
length. Enforce that properly. Not doing so could
potentially lead to reading after the buffer.

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/wireless/nl80211.c