]> asedeno.scripts.mit.edu Git - linux.git/commit
nl80211: require and validate vendor command policy
authorJohannes Berg <johannes.berg@intel.com>
Tue, 28 May 2019 08:56:03 +0000 (10:56 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 14 Jun 2019 12:12:01 +0000 (14:12 +0200)
commit901bb9891855164fdcfcfdd9c3d25bcc800d3f5b
tree74e0821a522ebb1f5bee4cb8df8705dd1a4442f3
parentd7edf40c15e85b44c4bef146819b664089b827b1
nl80211: require and validate vendor command policy

Require that each vendor command give a policy of its sub-attributes
in NL80211_ATTR_VENDOR_DATA, and then (stricly) check the contents,
including the NLA_F_NESTED flag that we couldn't check on the outer
layer because there we don't know yet.

It is possible to use VENDOR_CMD_RAW_DATA for raw data, but then no
nested data can be given (NLA_F_NESTED flag must be clear) and the
data is just passed as is to the command.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c
include/net/cfg80211.h
include/net/netlink.h
net/wireless/core.c
net/wireless/nl80211.c