🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
6 messages
6 total messages Started by Piyus Kedia Tue, 24 Nov 2026 00:35
[PATCH wireless 1/2] wifi: mac80211: do not copy the mesh RSN IE twice into the beacon
#21400
Author: Piyus Kedia
Date: Tue, 24 Nov 2026 00:35
92 lines
14107 bytes
ieee80211_mesh_build_beacon() budgets the user's extra IE blob once:

	tail_len = ... +
		   ifmsh->ie_len;

	bcn = kzalloc(sizeof(*bcn) + head_len + tail_len, GFP_KERNEL);

but two of the builders that fill the tail draw from that blob.
mesh_add_vendor_ies() emits everything from the first vendor IE to the
end of it:

	offset = ieee80211_ie_split_vendor(ifmsh->ie, ifmsh->ie_len, 0);

	if (offset < ifmsh->ie_len) {
		len = ifmsh->ie_len - offset;
		data = ifmsh->ie + offset;
		...
		skb_put_data(skb, data, len);

while mesh_add_rsn_ie() searches the whole blob:

	data = cfg80211_find_ie(WLAN_EID_RSN, ifmsh->ie, ifmsh->ie_len);

A blob that begins with a vendor IE therefore has its RSN IE emitted
twice - once inside the verbatim vendor range, once on its own - and the
tail copy runs past the allocation:

  BUG: KASAN: slab-out-of-bounds in ieee80211_mesh_build_beacon+0xe3f
  Write of size 479 at addr ffff88805ca1887b by task syz-executor
   __asan_memcpy
   ieee80211_mesh_build_beacon          net/mac80211/mesh.c:1110
   ieee80211_start_mesh                 net/mac80211/mesh.c:1187
   ieee80211_join_mesh                  net/mac80211/cfg.c:3330
   rdev_join_mesh
   __cfg80211_join_mesh                 net/wireless/mesh.c:214
   nl80211_join_mesh                    net/wireless/nl80211.c:15399

One NL80211_CMD_JOIN_MESH carrying such an NL80211_ATTR_IE is enough.

Confine the RSN search to the non-vendor part of the blob, so the two
builders cover disjoint ranges and their total cannot exceed the single
ifmsh->ie_len the beacon was sized with.  The blob reaches us having passed
validate_ie_attr(), which walks the element chain and requires it to end
exactly at the end of the attribute, so the split returns an element
boundary that is not past ifmsh->ie_len.

An RSN IE placed behind a vendor IE is still emitted, as part of that
verbatim vendor range; nothing that a well-formed configuration sends is
dropped.

How this was found: by AI-driven fuzzing built on top of syzkaller.  Its
analysis was checked by hand against the code, the fault was reproduced on
net.git main under KASAN, and the patched kernel is clean on the same
reproducer with ordinary secure-mesh beacons unaffected.

Fixes: 2b5e19677592 ("mac80211: cache mesh beacon")
Cc: stable@vger.kernel.org
Signed-off-by: Kapil Vaswani <kapil@presceralabs.ai>
Signed-off-by: Piyus Kedia <piyus@iiitd.ac.in>
---
 net/mac80211/mesh.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 8f8814125375..eb54bd98f282 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -379,12 +379,19 @@ int mesh_add_rsn_ie(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
 	struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
 	u8 len = 0;
 	const u8 *data;
+	size_t prefix;
 
 	if (!ifmsh->ie || !ifmsh->ie_len)
 		return 0;
 
-	/* find RSN IE */
-	data = cfg80211_find_ie(WLAN_EID_RSN, ifmsh->ie, ifmsh->ie_len);
+	/* Find the RSN IE in the non-vendor part of the blob only.  Everything
+	 * from the first vendor IE onwards is emitted verbatim by
+	 * mesh_add_vendor_ies(), and ieee80211_mesh_build_beacon() budgets
+	 * ifmsh->ie_len once for both of them, so an RSN IE sitting behind a
+	 * vendor IE would be copied twice and overrun the beacon's tail.
+	 */
+	prefix = ieee80211_ie_split_vendor(ifmsh->ie, ifmsh->ie_len, 0);
+	data = cfg80211_find_ie(WLAN_EID_RSN, ifmsh->ie, prefix);
 	if (!data)
 		return 0;
 
-- 
2.34.1
Re: [PATCH wireless 1/2] wifi: mac80211: do not copy the mesh RSN IE twice into the beacon
#21813
Author: Johannes Berg
Date: Tue, 24 Nov 2026 14:02
64 lines
11110 bytes
On Tue, 2026-11-24 at 06:05 +0530, Piyus Kedia wrote:
> ieee80211_mesh_build_beacon() budgets the user's extra IE blob once:
> 
> 	tail_len = ... +
> 		   ifmsh->ie_len;
> 
> 	bcn = kzalloc(sizeof(*bcn) + head_len + tail_len, GFP_KERNEL);
> 
> but two of the builders that fill the tail draw from that blob.
> mesh_add_vendor_ies() emits everything from the first vendor IE to the
> end of it:
> 
> 	offset = ieee80211_ie_split_vendor(ifmsh->ie, ifmsh->ie_len, 0);
> 
> 	if (offset < ifmsh->ie_len) {
> 		len = ifmsh->ie_len - offset;
> 		data = ifmsh->ie + offset;
> 		...
> 		skb_put_data(skb, data, len);
> 
> while mesh_add_rsn_ie() searches the whole blob:
> 
> 	data = cfg80211_find_ie(WLAN_EID_RSN, ifmsh->ie, ifmsh->ie_len);
> 
> A blob that begins with a vendor IE therefore has its RSN IE emitted
> twice - once inside the verbatim vendor range, once on its own - and the
> tail copy runs past the allocation:
> 
>   BUG: KASAN: slab-out-of-bounds in ieee80211_mesh_build_beacon+0xe3f
>   Write of size 479 at addr ffff88805ca1887b by task syz-executor
>    __asan_memcpy
>    ieee80211_mesh_build_beacon          net/mac80211/mesh.c:1110
>    ieee80211_start_mesh                 net/mac80211/mesh.c:1187
>    ieee80211_join_mesh                  net/mac80211/cfg.c:3330
>    rdev_join_mesh
>    __cfg80211_join_mesh                 net/wireless/mesh.c:214
>    nl80211_join_mesh                    net/wireless/nl80211.c:15399
> 
> One NL80211_CMD_JOIN_MESH carrying such an NL80211_ATTR_IE is enough.
> 
> Confine the RSN search to the non-vendor part of the blob, so the two
> builders cover disjoint ranges and their total cannot exceed the single
> ifmsh->ie_len the beacon was sized with.  The blob reaches us having passed
> validate_ie_attr(), which walks the element chain and requires it to end
> exactly at the end of the attribute, so the split returns an element
> boundary that is not past ifmsh->ie_len.
> 
> An RSN IE placed behind a vendor IE is still emitted, as part of that
> verbatim vendor range; nothing that a well-formed configuration sends is
> dropped.
> 
> How this was found: by AI-driven fuzzing built on top of syzkaller.  Its
> analysis was checked by hand against the code, the fault was reproduced on
> net.git main under KASAN, and the patched kernel is clean on the same
> reproducer with ordinary secure-mesh beacons unaffected.
> 

Please write a better commit message. This is *mostly* just stating the
obvious, as LLMs always do.

johannes
Re: [PATCH wireless 1/2] wifi: mac80211: do not copy the mesh RSN IE twice into the beacon
#22227
Author: netdev-bot+sashiko
Date: Wed, 25 Nov 2026 01:28
168 lines
14310 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.

Critical: 1 · High: 0 · Medium: 0 · Low: 2

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Critical] This patch adds a new out-of-bounds write into the mesh
  beacon buffer.
- [Low] The commit message names the wrong netlink attribute as the
  trigger: "One NL80211_CMD_JOIN_MESH carrying such an NL80211_ATTR_IE…
- [Low] Changing mesh_add_rsn_ie() also changes Mesh Peering Open/Confirm
  frames, which the commit message does not mention.

--

wifi: mac80211: do not copy the mesh RSN IE twice into the beacon

This commit limits the RSN IE search in mesh_add_rsn_ie() to the part of
the user's mesh IE blob that comes before the first vendor IE. That part
is found with ieee80211_ie_split_vendor(). The goal is for
mesh_add_rsn_ie() and mesh_add_vendor_ies() to cover disjoint ranges, so
their combined output fits the ifmsh->ie_len budget reserved in
ieee80211_mesh_build_beacon().

> One NL80211_CMD_JOIN_MESH carrying such an NL80211_ATTR_IE is enough.

[Severity: Low]
Is this the right attribute? nl80211_join_mesh() doesn't seem to read
NL80211_ATTR_IE. The blob that ends up in ifmsh->ie comes from
NL80211_MESH_SETUP_IE, which is nested inside NL80211_ATTR_MESH_SETUP:

net/wireless/nl80211.c:nl80211_parse_mesh_setup() {
    ...
	if (tb[NL80211_MESH_SETUP_IE]) {
		struct nlattr *ieattr =
			tb[NL80211_MESH_SETUP_IE];
		setup->ie = nla_data(ieattr);
		setup->ie_len = nla_len(ieattr);
	}
    ...
}

The attribute also matters for the analysis further down, because the
NL80211_MESH_SETUP_IE policy allows up to IEEE80211_MAX_DATA_LEN bytes.

> An RSN IE placed behind a vendor IE is still emitted, as part of that
> verbatim vendor range; nothing that a well-formed configuration sends is
> dropped.

[Severity: Low]
mesh_plink_frame_tx() in net/mac80211/mesh_plink.c also calls
mesh_add_rsn_ie(), so this patch changes Mesh Peering Open/Confirm frames
as well as beacons. Should the commit message say so?

In mesh_plink_frame_tx(), mesh_add_rsn_ie() runs right after the extended
supported rates. mesh_add_vendor_ies() runs at the end of the frame:

	    mesh_add_rsn_ie(sdata, skb) ||
    ...
	if (mesh_add_vendor_ies(sdata, skb))
		goto free;

Before this patch, an RSN IE placed behind a vendor IE appeared twice in
peering frames: once in its normal position and once in the trailing
vendor block. After this patch it appears only in the trailing vendor
block, after the Mesh ID, Mesh Config, MPM, HT, VHT, HE and EHT elements.
Beacons get the same reordering.

Could the commit message describe the peering frame change, and explain
why it is fine to move the RSN element out of the standard element order?

> diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
> index 8f88141253758..eb54bd98f282a 100644
> --- a/net/mac80211/mesh.c
> +++ b/net/mac80211/mesh.c
> @@ -379,12 +379,19 @@ int mesh_add_rsn_ie(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
>  	struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
>  	u8 len = 0;
>  	const u8 *data;
> +	size_t prefix;
>  
>  	if (!ifmsh->ie || !ifmsh->ie_len)
>  		return 0;
>  
> -	/* find RSN IE */
> -	data = cfg80211_find_ie(WLAN_EID_RSN, ifmsh->ie, ifmsh->ie_len);

[ ... ]

> +	prefix = ieee80211_ie_split_vendor(ifmsh->ie, ifmsh->ie_len, 0);
> +	data = cfg80211_find_ie(WLAN_EID_RSN, ifmsh->ie, prefix);

[Severity: Critical]
Can prefix end up larger than ifmsh->ie_len here?

The commit message relies on "the split returns an element boundary that
is not past ifmsh->ie_len". However, ieee80211_ie_split_vendor() moves
forward one whole element at a time:

	while (pos < ielen && ies[pos] != WLAN_EID_VENDOR_SPECIFIC)
		pos += 2 + ies[pos + 1];

So it returns pos > ielen whenever ielen ends in the middle of an element.

That can happen because ifmsh->ie_len is still a u8 in struct
ieee80211_if_mesh, while the policy allows NL80211_MESH_SETUP_IE up to
IEEE80211_MAX_DATA_LEN (2304) bytes:

	[NL80211_MESH_SETUP_IE] =
		NLA_POLICY_VALIDATE_FN(NLA_BINARY, validate_ie_attr,
				       IEEE80211_MAX_DATA_LEN),

copy_mesh_setup() in net/mac80211/cfg.c kmemdup()s the full blob, then
does:

	ifmsh->ie_len = setup->ie_len;

This truncates the length modulo 256. validate_ie_attr() checked element
framing only against the full nla_len, so the truncated length can fall
inside an element.

For example, take a 257 byte blob: an RSN element with a 253 byte body
(255 bytes in total), followed by a 2 byte non-vendor element. It passes
validate_ie_attr(), and ifmsh->ie_len becomes 1:

ieee80211_mesh_build_beacon()
    tail_len = ... + ifmsh->ie_len;               /* 1 byte budget */
    mesh_add_rsn_ie()
        prefix = ieee80211_ie_split_vendor(ie, 1, 0);   /* 255 */
        data = cfg80211_find_ie(WLAN_EID_RSN, ie, 255); /* offset 0 */
        skb_put_data(skb, data, 255);
    mesh_add_vendor_ies()                  /* nothing, 255 >= 1 */
    memcpy(bcn->tail, skb->data, bcn->tail_len);

The builder skb comes from __dev_alloc_skb(max(head_len, tail_len),
GFP_KERNEL). Rounding up to the kmalloc bucket gives it slack, so the
skb_tailroom() checks pass.

Wouldn't the final memcpy() into bcn->tail then overrun the
kzalloc(sizeof(*bcn) + head_len + tail_len) allocation? That is the same
place the KASAN report in the commit message points to.

Before this patch the search was bounded by ifmsh->ie_len, so it could not
return an RSN element that extends past the budget. The sender controls
the residue of the length modulo 256 and where the RSN element straddles
it, so the overrun can reach about 253 bytes.

The follow-up commit "wifi: mac80211: widen the mesh IE offsets a u8
cannot hold" doesn't appear to fix this. Its commit message says
"ifmsh->ie_len is a size_t", but the field is still a u8 at the end of
the series, and prefix is still not clamped.

Would prefix = min(prefix, ifmsh->ie_len) fix this? It would also need
either ifmsh->ie_len changed to a size_t, or NL80211_MESH_SETUP_IE capped
in the policy at what mac80211 can store.

>  	if (!data)
>  		return 0;
>

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124003526.78471-2-piyus%40iiitd.ac.in
Re: [PATCH wireless 1/2] wifi: mac80211: do not copy the mesh RSN IE twice into the beacon
#22289
Author: Piyus Kedia
Date: Wed, 25 Nov 2026 04:38
144 lines
17409 bytes
You are right, and the Critical one is right in the way that matters most:
the patch added a second route to the overrun it was fixing, reachable
without any vendor element at all.  Thank you for catching it before it went
anywhere.

All three points were checked against wireless.git at af6737b90668.  v2 of
this patch is posted as a separate thread:

  [PATCH wireless v2] wifi: mac80211: do not copy the mesh RSN IE twice
                      into the beacon

Only this patch is respun; 2/2 drew its own review and is answered in its own
thread.  The v2 changelog is under the --- line, with a Link: back to this
posting.

Point by point.


1. [Critical] Can prefix end up larger than ifmsh->ie_len?

> So it returns pos > ielen whenever ielen ends in the middle of an element.
> That can happen because ifmsh->ie_len is still a u8 in struct
> ieee80211_if_mesh, while the policy allows NL80211_MESH_SETUP_IE up to
> IEEE80211_MAX_DATA_LEN (2304) bytes

Yes, and every step of that holds.  Checked in order:

  ieee80211_ie_split_vendor()   net/mac80211/util.c - advances
                                pos += 2 + ies[pos + 1] while pos < ielen,
                                so a length that ends inside an element
                                makes it return past that length.
  struct ieee80211_if_mesh      ieee80211_i.h:829 - "u8 ie_len;".
  struct mesh_setup             cfg80211.h - "size_t ie_len;".
  copy_mesh_setup()             cfg.c:3449 - "ifmsh->ie_len = setup->ie_len;",
                                size_t into u8.
  the policy                    nl80211.c:10888 - NL80211_MESH_SETUP_IE is
                                NLA_POLICY_VALIDATE_FN(...,
                                IEEE80211_MAX_DATA_LEN).

and the write lands exactly where you say it does:

	bcn->tail_len = skb->len;                      /* mesh.c:1109 */
	memcpy(bcn->tail, skb->data, bcn->tail_len);   /* mesh.c:1110 */

bcn is kzalloc()ed to the PRECOMPUTED tail_len while bcn->tail_len is taken
from what was actually assembled, so anything the emitters put in the builder
skb beyond the budget is copied past the end of that block.  Your 257-byte
example is right: a 255-byte RSN element leaves ifmsh->ie_len at 1, the
unclamped split returns 255, and 255 bytes go into a one-byte budget.  My
commit message asserted "the split returns an element boundary that is not
past ifmsh->ie_len", and that assertion is false.

> Would prefix = min(prefix, ifmsh->ie_len) fix this?

It does, and v2 is exactly that:

	prefix = ieee80211_ie_split_vendor(ifmsh->ie, ifmsh->ie_len, 0);
	prefix = min_t(size_t, prefix, ifmsh->ie_len);
	data = cfg80211_find_ie(WLAN_EID_RSN, ifmsh->ie, prefix);

Two things make it sufficient on its own, and the commit message now says
both rather than leaving them to be rediscovered:

  - the clamped bound is never wider than ifmsh->ie_len, which is the bound
    this search had BEFORE the patch narrowed it.  So whatever ifmsh->ie_len
    happens to be - truncated or not - the patch cannot make this copy
    bigger than the unpatched code's could be.
  - cfg80211_find_ie() returns only an element that lies wholly inside its
    bound: for_each_element() requires sizeof(*elem) + elem->datalen to fit
    in the length given.  So len = 2 + data[1] cannot reach past the bound
    either, and the skb_put_data() fits the budget.

> It would also need either ifmsh->ie_len changed to a size_t, or
> NL80211_MESH_SETUP_IE capped in the policy at what mac80211 can store.

Agreed that the truncating assignment is a bug in its own right - a
configuration is silently stored with a length that does not describe the
blob - but v2 does not need it fixed to be safe, for the first reason above.
I have left it out deliberately rather than widen a struct field inside a
patch whose subject is the double copy.

> The follow-up commit "wifi: mac80211: widen the mesh IE offsets a u8 cannot
> hold" doesn't appear to fix this. Its commit message says "ifmsh->ie_len is
> a size_t", but the field is still a u8 at the end of the series

Also right, and worse than a wrong sentence: that patch widens the LOCAL
variables in mesh_add_vendor_ies() and mesh_add_rsn_ie() and does not touch
the field, so the message describes something the series does not do.  It has
its own review and I am answering it there; whichever of the two remedies you
prefer - the field to size_t, or the policy capped - belongs in that patch
rather than this one.


2. [Low] The wrong netlink attribute

> Is this the right attribute? nl80211_join_mesh() doesn't seem to read
> NL80211_ATTR_IE.

It is not, and it does not - nl80211_join_mesh() has no reference to
NL80211_ATTR_IE at all.  The blob is NL80211_MESH_SETUP_IE, nested inside
NL80211_ATTR_MESH_SETUP, stored by nl80211_parse_mesh_setup() at
nl80211.c:11071 and kmemdup()ed by copy_mesh_setup().  v2 says that, and as
you note it is not pedantry: it is that attribute's policy that admits
IEEE80211_MAX_DATA_LEN, which is the half of the Critical issue the u8 then
truncates.  The reproducer in the report thread sends the right attribute;
only the prose was wrong.


3. [Low] The peering frames

> mesh_plink_frame_tx() in net/mac80211/mesh_plink.c also calls
> mesh_add_rsn_ie(), so this patch changes Mesh Peering Open/Confirm frames
> as well as beacons. Should the commit message say so?

It should, and v2 does.  mesh_plink_frame_tx() calls mesh_add_rsn_ie() at
mesh_plink.c:287, right after the extended supported rates, and
mesh_add_vendor_ies() at :349, at the end of the frame - so for a
configuration with an RSN element behind a vendor element, that element used
to appear twice in peering frames too, and now appears once, in the trailing
vendor block.

> and explain why it is fine to move the RSN element out of the standard
> element order?

The argument v2 makes is the narrow one.  Element order in a management frame
is not something a receiver may rely on: 802.11 parsers walk elements by id,
and mac80211's own do.  The alternative is to keep the in-order copy and
accept the duplicate, which is the bug.  And the only configurations affected
are those that put an RSN element behind a vendor element - the ordering in
these frames was built around the RSN element coming first, and such a
configuration is untouched.

If you would rather the element kept its position and the DUPLICATE were
suppressed instead - have mesh_add_vendor_ies() skip an RSN element it finds
in the vendor range - say so and I will respin that way.  It is a bigger
change than this one and it makes the vendor range no longer verbatim, which
is why I did not reach for it first.


Thanks again.  The Critical one was a real defect in my patch and it is the
kind that the commit message's own confident sentence was hiding.

pw-bot: cr
Re: [PATCH wireless 1/2] wifi: mac80211: do not copy the mesh RSN IE twice into the beacon
#22317
Author: Piyus Kedia
Date: Wed, 25 Nov 2026 06:24
9 lines
11220 bytes
Hi Johannes,

Thanks for the review, and apologies for the delayed response. We have posted an updated version of the patch addressing the netdev-bot+sashiko feedback here: https://lore.kernel.org/all/20261125043805.883952-1-piyus@iiitd.ac.in/

We also plan to send a follow-up revision shortly to clarify and rewrite the commit message more concisely. Please let us know if you have any other feedback on the changes.

Best regards,
Piyus
Re: [PATCH wireless 1/2] wifi: mac80211: do not copy the mesh RSN IE twice into the beacon
#24217
Author: Piyus Kedia
Date: Sun, 29 Nov 2026 17:40
86 lines
15082 bytes
Hi Johannes,

Sorry for the delay. We have submitted another patch by condensing the
commit message and the comments. The link to the patch is as follows:
https://lore.kernel.org/all/20261129171732.1877563-1-piyus@iiitd.ac.in/

Please let us know if this is OK.

Thanks and regards,
Piyus Kedia
Kapil Vaswani


On Tue, Nov 24, 2026 at 7:32 PM Johannes Berg <johannes@sipsolutions.net> wrote:
>
> On Tue, 2026-11-24 at 06:05 +0530, Piyus Kedia wrote:
> > ieee80211_mesh_build_beacon() budgets the user's extra IE blob once:
> >
> >       tail_len = ... +
> >                  ifmsh->ie_len;
> >
> >       bcn = kzalloc(sizeof(*bcn) + head_len + tail_len, GFP_KERNEL);
> >
> > but two of the builders that fill the tail draw from that blob.
> > mesh_add_vendor_ies() emits everything from the first vendor IE to the
> > end of it:
> >
> >       offset = ieee80211_ie_split_vendor(ifmsh->ie, ifmsh->ie_len, 0);
> >
> >       if (offset < ifmsh->ie_len) {
> >               len = ifmsh->ie_len - offset;
> >               data = ifmsh->ie + offset;
> >               ...
> >               skb_put_data(skb, data, len);
> >
> > while mesh_add_rsn_ie() searches the whole blob:
> >
> >       data = cfg80211_find_ie(WLAN_EID_RSN, ifmsh->ie, ifmsh->ie_len);
> >
> > A blob that begins with a vendor IE therefore has its RSN IE emitted
> > twice - once inside the verbatim vendor range, once on its own - and the
> > tail copy runs past the allocation:
> >
> >   BUG: KASAN: slab-out-of-bounds in ieee80211_mesh_build_beacon+0xe3f
> >   Write of size 479 at addr ffff88805ca1887b by task syz-executor
> >    __asan_memcpy
> >    ieee80211_mesh_build_beacon          net/mac80211/mesh.c:1110
> >    ieee80211_start_mesh                 net/mac80211/mesh.c:1187
> >    ieee80211_join_mesh                  net/mac80211/cfg.c:3330
> >    rdev_join_mesh
> >    __cfg80211_join_mesh                 net/wireless/mesh.c:214
> >    nl80211_join_mesh                    net/wireless/nl80211.c:15399
> >
> > One NL80211_CMD_JOIN_MESH carrying such an NL80211_ATTR_IE is enough.
> >
> > Confine the RSN search to the non-vendor part of the blob, so the two
> > builders cover disjoint ranges and their total cannot exceed the single
> > ifmsh->ie_len the beacon was sized with.  The blob reaches us having passed
> > validate_ie_attr(), which walks the element chain and requires it to end
> > exactly at the end of the attribute, so the split returns an element
> > boundary that is not past ifmsh->ie_len.
> >
> > An RSN IE placed behind a vendor IE is still emitted, as part of that
> > verbatim vendor range; nothing that a well-formed configuration sends is
> > dropped.
> >
> > How this was found: by AI-driven fuzzing built on top of syzkaller.  Its
> > analysis was checked by hand against the code, the fault was reproduced on
> > net.git main under KASAN, and the patched kernel is clean on the same
> > reproducer with ordinary secure-mesh beacons unaffected.
> >
>
> Please write a better commit message. This is *mostly* just stating the
> obvious, as LLMs always do.
>
> johannes
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads