nl80211: add missing attribute validation
Subsystems (3)
Jakub Kicinski
maintainercover nl80211: add missing attribute validation
Hi!
Wireless seems to be missing a handful of netlink policy entries.
Compilation tested only.
Jakub Kicinski (3):
nl80211: add missing attribute validation for critical protocol
indication
nl80211: add missing attribute validation for beacon report scanning
nl80211: add missing attribute validation for channel switch
net/wireless/nl80211.c | 5 +++++ 1 file changed, 5 insertions(+)
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 1/3 nl80211: add missing attribute validation for critical protocol indication
Add missing attribute validation for critical protocol fields to the netlink policy.
---
CC: "Franky (Zhenhui) Lin" <[email protected]>
CC: Arend van Spriel <[email protected]>
CC: Pieter-Paul Giesberts <[email protected]>
Leaving the conversion to RANGE to a follow up,
as this may get stabled.
--- net/wireless/nl80211.c | 2 ++ 1 file changed, 2 insertions(+)
net/wireless/nl80211.c +2 -0
@@ -531,6 +531,8 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { [NL80211_ATTR_MDID] = { .type = NLA_U16 }, [NL80211_ATTR_IE_RIC] = { .type = NLA_BINARY, .len = IEEE80211_MAX_DATA_LEN }, + [NL80211_ATTR_CRIT_PROT_ID] = { .type = NLA_U16 }, + [NL80211_ATTR_MAX_CRIT_PROT_DURATION] = { .type = NLA_U16 }, [NL80211_ATTR_PEER_AID ] = NLA_POLICY_RANGE(NLA_U16, 1, IEEE80211_MAX_AID), [NL80211_ATTR_CH_SWITCH_COUNT] = { .type = NLA_U32 },
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 2/3 nl80211: add missing attribute validation for beacon report scanning
In reply to Jakub KicinskiAdd missing attribute validation for beacon report scanning to the netlink policy.
---
CC: David Spinadel <[email protected]>
CC: Luca Coelho <[email protected]>
CC: Avraham Stern <[email protected]>
CC: Assaf Krauss <[email protected]>
--- net/wireless/nl80211.c | 2 ++ 1 file changed, 2 insertions(+)
net/wireless/nl80211.c +2 -0
@@ -470,6 +470,8 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { [NL80211_ATTR_WOWLAN_TRIGGERS] = { .type = NLA_NESTED }, [NL80211_ATTR_STA_PLINK_STATE ] = NLA_POLICY_MAX(NLA_U8, NUM_NL80211_PLINK_STATES - 1), + [NL80211_ATTR_MEASUREMENT_DURATION] = { .type = NLA_U16 }, + [NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY] = { .type = NLA_FLAG }, [NL80211_ATTR_MESH_PEER_AID ] = NLA_POLICY_RANGE(NLA_U16, 1, IEEE80211_MAX_AID), [NL80211_ATTR_SCHED_SCAN_INTERVAL] = { .type = NLA_U32 },
Signature · 1 line
2.24.1
Jakub Kicinski
maintainerPATCH 3/3 nl80211: add missing attribute validation for channel switch
In reply to Jakub KicinskiAdd missing attribute validation for NL80211_ATTR_OPER_CLASS to the netlink policy.
---
CC: Arik Nemtsov <[email protected]>
--- net/wireless/nl80211.c | 1 + 1 file changed, 1 insertion(+)
net/wireless/nl80211.c +1 -0
@@ -565,6 +565,7 @@ const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { NLA_POLICY_MAX(NLA_U8, IEEE80211_NUM_UPS - 1), [NL80211_ATTR_ADMITTED_TIME] = { .type = NLA_U16 }, [NL80211_ATTR_SMPS_MODE] = { .type = NLA_U8 }, + [NL80211_ATTR_OPER_CLASS] = { .type = NLA_U8 }, [NL80211_ATTR_MAC_MASK] = { .type =NLA_EXACT_LEN_WARN , .len = ETH_ALEN
Signature · 1 line
2.24.1
Hi Jakub,
Quoted 1 line
Wireless seems to be missing a handful of netlink policy entries.
Yep, these look good to me.
Here's a
if you want to apply them directly? I can take them, but you said later you might want to pick them into stable, so maybe you have some more direct plan there?
Thanks,
johannes
Jakub Kicinski
maintainerQuoted 11 lines · On Tue, 03 Mar 2020 08:29:46 +0100 Johannes Berg wrote:
Hi Jakub,
Quoted 1 line
Wireless seems to be missing a handful of netlink policy entries.
Yep, these look good to me.
Here's a
Reviewed-by Johannes Berg <[email protected]>if you want to apply them directly?
Up to Dave, I only put a maintainer hat to cover for Dave when he's away :)
Quoted 2 lines
I can take them, but you said later you might want to pick them into stable, so maybe you have some more direct plan there?
No real plan, but the autoselection bot will very likely pick those up even if we don't do anything, so given the very limited testing I was cautious with refactoring.
Johannes Berg
maintainerQuoted 7 lines · Jakub Kicinski
Quoted 6 lines · On Tue, 03 Mar 2020 08:29:46 +0100 Johannes Berg wrote:
Hi Jakub,
Quoted 1 line
Wireless seems to be missing a handful of netlink policy entries.
Yep, these look good to me.
Quoted 8 lines
Quoted 5 lines
Here's a
Reviewed-by Johannes Berg <[email protected]>if you want to apply them directly?
Up to Dave, I only put a maintainer hat to cover for Dave when he's away :)
Ah, ok; I'll just take them then, that's easier.
johannes