linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH wireless 0/3] nl80211: add missing attribute validation
@ 2020-03-03  5:10 Jakub Kicinski
  2020-03-03  5:10 ` [PATCH wireless 1/3] nl80211: add missing attribute validation for critical protocol indication Jakub Kicinski
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jakub Kicinski @ 2020-03-03  5:10 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, netdev, kvalo, Jakub Kicinski

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(+)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH wireless 1/3] nl80211: add missing attribute validation for critical protocol indication
  2020-03-03  5:10 [PATCH wireless 0/3] nl80211: add missing attribute validation Jakub Kicinski
@ 2020-03-03  5:10 ` Jakub Kicinski
  2020-03-03  5:10 ` [PATCH wireless 2/3] nl80211: add missing attribute validation for beacon report scanning Jakub Kicinski
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2020-03-03  5:10 UTC (permalink / raw)
  To: johannes
  Cc: linux-wireless, netdev, kvalo, Jakub Kicinski,
	Franky (Zhenhui) Lin, Arend van Spriel, Pieter-Paul Giesberts

Add missing attribute validation for critical protocol fields
to the netlink policy.

Fixes: 5de17984898c ("cfg80211: introduce critical protocol indication from user-space")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: "Franky (Zhenhui) Lin" <frankyl@broadcom.com>
CC: Arend van Spriel <arend@broadcom.com>
CC: Pieter-Paul Giesberts <pieterpg@broadcom.com>

Leaving the conversion to RANGE to a follow up,
as this may get stabled.
---
 net/wireless/nl80211.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 5b19e9fac4aa..cd0e024d7cb6 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -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 },
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH wireless 2/3] nl80211: add missing attribute validation for beacon report scanning
  2020-03-03  5:10 [PATCH wireless 0/3] nl80211: add missing attribute validation Jakub Kicinski
  2020-03-03  5:10 ` [PATCH wireless 1/3] nl80211: add missing attribute validation for critical protocol indication Jakub Kicinski
@ 2020-03-03  5:10 ` Jakub Kicinski
  2020-03-03  5:10 ` [PATCH wireless 3/3] nl80211: add missing attribute validation for channel switch Jakub Kicinski
  2020-03-03  7:29 ` [PATCH wireless 0/3] nl80211: add missing attribute validation Johannes Berg
  3 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2020-03-03  5:10 UTC (permalink / raw)
  To: johannes
  Cc: linux-wireless, netdev, kvalo, Jakub Kicinski, David Spinadel,
	Luca Coelho, Avraham Stern, Assaf Krauss

Add missing attribute validation for beacon report scanning
to the netlink policy.

Fixes: 1d76250bd34a ("nl80211: support beacon report scanning")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: David Spinadel <david.spinadel@intel.com>
CC: Luca Coelho <luciano.coelho@intel.com>
CC: Avraham Stern <avraham.stern@intel.com>
CC: Assaf Krauss <assaf.krauss@intel.com>
---
 net/wireless/nl80211.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index cd0e024d7cb6..48e6508aba52 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -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 },
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH wireless 3/3] nl80211: add missing attribute validation for channel switch
  2020-03-03  5:10 [PATCH wireless 0/3] nl80211: add missing attribute validation Jakub Kicinski
  2020-03-03  5:10 ` [PATCH wireless 1/3] nl80211: add missing attribute validation for critical protocol indication Jakub Kicinski
  2020-03-03  5:10 ` [PATCH wireless 2/3] nl80211: add missing attribute validation for beacon report scanning Jakub Kicinski
@ 2020-03-03  5:10 ` Jakub Kicinski
  2020-03-03  7:29 ` [PATCH wireless 0/3] nl80211: add missing attribute validation Johannes Berg
  3 siblings, 0 replies; 7+ messages in thread
From: Jakub Kicinski @ 2020-03-03  5:10 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, netdev, kvalo, Jakub Kicinski, Arik Nemtsov

Add missing attribute validation for NL80211_ATTR_OPER_CLASS
to the netlink policy.

Fixes: 1057d35ede5d ("cfg80211: introduce TDLS channel switch commands")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: Arik Nemtsov <arik@wizery.com>
---
 net/wireless/nl80211.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 48e6508aba52..ec5d67794aab 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -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
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH wireless 0/3] nl80211: add missing attribute validation
  2020-03-03  5:10 [PATCH wireless 0/3] nl80211: add missing attribute validation Jakub Kicinski
                   ` (2 preceding siblings ...)
  2020-03-03  5:10 ` [PATCH wireless 3/3] nl80211: add missing attribute validation for channel switch Jakub Kicinski
@ 2020-03-03  7:29 ` Johannes Berg
  2020-03-03 17:53   ` Jakub Kicinski
  3 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2020-03-03  7:29 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: linux-wireless, netdev, kvalo

Hi Jakub,

> Wireless seems to be missing a handful of netlink policy entries.

Yep, these look good to me.

Here's a

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH wireless 0/3] nl80211: add missing attribute validation
  2020-03-03  7:29 ` [PATCH wireless 0/3] nl80211: add missing attribute validation Johannes Berg
@ 2020-03-03 17:53   ` Jakub Kicinski
  2020-03-03 18:58     ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2020-03-03 17:53 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, netdev, kvalo

On Tue, 03 Mar 2020 08:29:46 +0100 Johannes Berg wrote:
> Hi Jakub,
> 
> > Wireless seems to be missing a handful of netlink policy entries.  
> 
> Yep, these look good to me.
> 
> Here's a
> 
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> 
> if you want to apply them directly? 

Up to Dave, I only put a maintainer hat to cover for Dave when he's
away :)

> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH wireless 0/3] nl80211: add missing attribute validation
  2020-03-03 17:53   ` Jakub Kicinski
@ 2020-03-03 18:58     ` Johannes Berg
  0 siblings, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2020-03-03 18:58 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: linux-wireless, netdev, kvalo

On Tue, 2020-03-03 at 09:53 -0800, Jakub Kicinski wrote:
> On Tue, 03 Mar 2020 08:29:46 +0100 Johannes Berg wrote:
> > Hi Jakub,
> > 
> > > Wireless seems to be missing a handful of netlink policy entries.  
> > 
> > Yep, these look good to me.
> > 
> > Here's a
> > 
> > Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> > 
> > 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-03-03 18:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03  5:10 [PATCH wireless 0/3] nl80211: add missing attribute validation Jakub Kicinski
2020-03-03  5:10 ` [PATCH wireless 1/3] nl80211: add missing attribute validation for critical protocol indication Jakub Kicinski
2020-03-03  5:10 ` [PATCH wireless 2/3] nl80211: add missing attribute validation for beacon report scanning Jakub Kicinski
2020-03-03  5:10 ` [PATCH wireless 3/3] nl80211: add missing attribute validation for channel switch Jakub Kicinski
2020-03-03  7:29 ` [PATCH wireless 0/3] nl80211: add missing attribute validation Johannes Berg
2020-03-03 17:53   ` Jakub Kicinski
2020-03-03 18:58     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).