lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251022182701.250897-5-ast@fiberby.net>
Date: Wed, 22 Oct 2025 18:26:57 +0000
From: Asbjørn Sloth Tønnesen <ast@...erby.net>
To: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>
Cc: Asbjørn Sloth Tønnesen <ast@...erby.net>,
	Chia-Yu Chang <chia-yu.chang@...ia-bell-labs.com>,
	Chuck Lever <chuck.lever@...cle.com>,
	Donald Hunter <donald.hunter@...il.com>,
	Jonathan Corbet <corbet@....net>,
	"Matthieu Baerts (NGI0)" <matttbe@...nel.org>,
	Simon Horman <horms@...nel.org>,
	linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org
Subject: [PATCH net-next 4/7] netlink: specs: nl80211: set ignore-index on indexed-arrays

The indexes in nl80211 indexed-arrays have no special meaning,
they are just written with an iterator index, which refers to
the order in which they have been packed into the netlink message.

Thus this patch sets ignore-index on these attributes.

Most of these are only used for dumping kernel state, and are
never parsed by the kernel.

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━┳━━━━━━━━┓
┃                                     ┃ out/ ┃ input/ ┃ ignore ┃
┃ Attribute                           ┃ dump ┃ parsed ┃ -index ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━╇━━━━━━━━┩
│ NL80211_ATTR_SUPPORTED_COMMANDS     │ 1++  │ -      │ yes    │
│ NL80211_ATTR_INTERFACE_COMBINATIONS │ 1++  │ -      │ yes    │
│ NL80211_BAND_ATTR_FREQS             │ 0++  │ -      │ yes    │
│ NL80211_BAND_ATTR_RATES             │ 0++  │ -      │ yes    │
│ NL80211_BAND_ATTR_IFTYPE_DATA       │ 1++  │ -      │ yes    │
│ NL80211_FREQUENCY_ATTR_WMM          │ 0++  │ -      │ yes    │
│ NL80211_IFACE_COMB_LIMITS           │ 1++  │ -      │ yes    │
│ NL80211_SAR_ATTR_SPECS              │ 1++  │ yes(2) │ yes    │
└─────────────────────────────────────┴──────┴────────┴────────┘

Where:
  0++) incrementing index starting from 0
  1++) incrementing index starting from 1
  2)   NL80211_SAR_ATTR_SPECS is parsed in nl80211_set_sar_specs(),
       which doesn't use the index. Additionally it also has a
       NLA_POLICY_NESTED_ARRAY() policy, as defined in commit
       1501d13596b9 ("netlink: add nested array policy validation"),
       meaning that the index has no meaning, and can be disregarded.

Signed-off-by: Asbjørn Sloth Tønnesen <ast@...erby.net>
---
 Documentation/netlink/specs/nl80211.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/netlink/specs/nl80211.yaml b/Documentation/netlink/specs/nl80211.yaml
index 802097128bdae..b93c612037e26 100644
--- a/Documentation/netlink/specs/nl80211.yaml
+++ b/Documentation/netlink/specs/nl80211.yaml
@@ -390,6 +390,7 @@ attribute-sets:
         name: supported-commands
         type: indexed-array
         sub-type: u32
+        ignore-index: true
         enum: commands
       -
         name: frame
@@ -608,6 +609,7 @@ attribute-sets:
         name: interface-combinations
         type: indexed-array
         sub-type: nest
+        ignore-index: true
         nested-attributes: if-combination-attributes
       -
         name: software-iftypes
@@ -1307,11 +1309,13 @@ attribute-sets:
         name: freqs
         type: indexed-array
         sub-type: nest
+        ignore-index: true
         nested-attributes: frequency-attrs
       -
         name: rates
         type: indexed-array
         sub-type: nest
+        ignore-index: true
         nested-attributes: bitrate-attrs
       -
         name: ht-mcs-set
@@ -1335,6 +1339,7 @@ attribute-sets:
         name: iftype-data
         type: indexed-array
         sub-type: nest
+        ignore-index: true
         nested-attributes: iftype-data-attrs
       -
         name: edmg-channels
@@ -1418,6 +1423,7 @@ attribute-sets:
         name: wmm
         type: indexed-array
         sub-type: nest
+        ignore-index: true
         nested-attributes: wmm-attrs
       -
         name: no-he
@@ -1474,6 +1480,7 @@ attribute-sets:
         name: limits
         type: indexed-array
         sub-type: nest
+        ignore-index: true
         nested-attributes: iface-limit-attributes
       -
         name: maxnum
@@ -1613,6 +1620,7 @@ attribute-sets:
         name: specs
         type: indexed-array
         sub-type: nest
+        ignore-index: true
         nested-attributes: sar-specs
   -
     name: sar-specs
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ