]> git.baikalelectronics.ru Git - kernel.git/commit
nl80211: fix NL80211_ATTR_CHANNEL_WIDTH attribute type
authorJohannes Berg <johannes.berg@intel.com>
Wed, 25 Mar 2020 08:05:32 +0000 (09:05 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 25 Mar 2020 08:58:43 +0000 (09:58 +0100)
commit31f4408c34ce3e4c03a35baa4e4d5b9031a5df5a
tree84d33f3b3a749041a1e2171f2995f4908a85eff5
parentc03f13eca9b03ac31b48c8affc0e91108fc24624
nl80211: fix NL80211_ATTR_CHANNEL_WIDTH attribute type

The new opmode notification used this attribute with a u8, when
it's documented as a u32 and indeed used in userspace as such,
it just happens to work on little-endian systems since userspace
isn't doing any strict size validation, and the u8 goes into the
lower byte. Fix this.

Cc: stable@vger.kernel.org
Fixes: 84c5a29dbf98 ("cfg80211: Add support to notify station's opmode change to userspace")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200325090531.be124f0a11c7.Iedbf4e197a85471ebd729b186d5365c0343bf7a8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c