Article View: linux.kernel.netdev
Article #24217Re: [PATCH wireless 1/2] wifi: mac80211: do not copy the mesh RSN IE twice into the beacon
From: Piyus Kedia
Date: Sun, 29 Nov 2026 17:40
Date: Sun, 29 Nov 2026 17:40
86 lines
15082 bytes
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
Technical Details
Message-ID:
<CADq=QSwzYDiqmrnVtFAT791p0EfsYXaFv4CvcDNyudbMR7f2Og@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373620-linux-kernel-netdev=dewy.ruReferences:
<20261124003526.78471-1-piyus@iiitd.ac.in> <20261124003526.78471-2-piyus@iiitd.ac.in> <ac39fb1720fc03069317f8a74aa0f34d86db2e30.camel@sipsolutions.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373620-linux-kernel-netdev=dewy.ru
From: piyus@iiitd.ac.in (Piyus Kedia)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH wireless 1/2] wifi: mac80211: do not copy the mesh RSN IE
twice into the beacon
Date: Sun, 29 Nov 2026 23:10:32 +0530
Organization: Usenet Network
Message-ID: <CADq=QSwzYDiqmrnVtFAT791p0EfsYXaFv4CvcDNyudbMR7f2Og@mail.gmail.com>
References: <20261124003526.78471-1-piyus@iiitd.ac.in> <20261124003526.78471-2-piyus@iiitd.ac.in>
<ac39fb1720fc03069317f8a74aa0f34d86db2e30.camel@sipsolutions.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="1226066"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:skvDQ6c320Gv40K3tuejaL3IuQo= sha256:1E/AAJ3sTSe7WYsO4bzrb8r9SwBsutbmXtaYOU3eTr8=
sha1:M5Yd1rLYvQ7vx31+fwbF7Y31J0A= sha256:ExSNAUOHNyVaNg6duV/jvXcYOppceNwedOhQ56ourmw=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 53A36125F9E; Sun, 29 Nov 2026 20:41:13 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
header.d=iiitd.ac.in
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id yGKbkaG-RFn9;
Sun, 29 Nov 2026 20:41:08 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373620-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=iiitd.ac.in
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 153F2125F9A; Sun, 29 Nov 2026 20:40:59 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id AB56E25899; Sun, 29 Nov 2026 17:40:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795974045;
b=A2svpEEAAYml1Ze/ti1o+n1KyIE4feK55jqtgFR8dFMGoTUYDz/q4O+mP5grXzBDfd38
4gXXGfxefr7owPMvPprcM8O+JxmHI2WpCMnQOE36ZIXgAe4QBsjcEy4YK3SpjSE/NjngV
4KBfz6fnY4u7bmF+csqb4jRxNHjCTEpKCRbu4AuKU0q8uITNhNbO4LfvZWBgjIuK0G+ED
ikGzBONpizwJcEEzYRTIMUNVcYmoPtFfW/r4W4sN74yowJ1vLRVNKpgZuPQPj7JwkNy9H
Brph31/jWGQtjec04NA2e9D+URQAaHzg2eIWf8fu0n9XxEX0hvNYCbpHJ7yXKBZJIjA==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795974045;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
References:In-Reply-To:From:Date:X-Gm-Features:Message-ID:Subject:To:
Cc:Content-Type:Content-Transfer-Encoding;
bh=tHtViJJsVpO7ochSSDMwQjvEK9IB3st1eAn9hl774cE=;
b=ptjlmlFrdUAwSWyok4aPFj71n3VEEpuYlUwyfCtk+9jdqxbBso5wwMg6hhX+5ybjajck
gwE/dZJAYNHjQ6Q05kyy/M8QWuMYbEJDqaHkL3zcQ6Z9KbBNFlS1NZdgijeqczE4K1JhU
RLFJ9rr0wWrqU6by91lSUe1UKGr2CuJsSic+gIUic0V1q1dorn8vfob2R61RcJKT0YoDk
Z7HX45r2bKRHW6mJOZb3zITdNQvZv4fN2pvux1tpi7VEM/hywORgNN3k/RHNZn0kPDtXo
KNCtRYo6zxC0zE+8tA9hs+fBoGUZLTDKzAtSyCR60xa+NZwgqdpHee8746b1411vF6A==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org;
dkim=pass header.d=iiitd.ac.in header.i=@iiitd.ac.in header.a=rsa-sha256 header.s=google header.b=hTt1uvnj;
dmarc=none header.from=iiitd.ac.in;
spf=pass smtp.mailfrom=iiitd.ac.in;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4158F606A33A;
Sun, 29 Nov 2026 17:40:45 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=iiitd.ac.in header.i=@iiitd.ac.in header.a=rsa-sha256 header.s=google header.b=hTt1uvnj
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.208.48
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795974044;
b=VC5oAvpfgook6E0UUMylQE7U0isVhG+48+lheGTWlER4XrfcCWxmP7p275NEc60QmZ85
Ir16xf6xoPujzKaGbCuUhGOTI03ef1yGSngFF5Ml0pCcgLOiBBGbHeXQ26vYU3ullODol
XCkmzR4wLUSUA8gUdwonXehLdZ8LV7JoDCdcL62bNsAQjUyXYKHP0C+bySbpppr1pmKNJ
S9qjsO/ivJebBHo3JyAQRHp4bRkfu2enNfLypzP6mHxhFW+iIHk08VFssCMO49SC88ZHg
Mul7YvgrRPNzG6G9ZalHromChJWza4gQ+K5nMzmxslEFShJQQXxuXdURRa1fW54JoRw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795974044;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:
MIME-Version:References:In-Reply-To:From:Date:X-Gm-Features:
Message-ID:Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
bh=tHtViJJsVpO7ochSSDMwQjvEK9IB3st1eAn9hl774cE=;
b=0YQevCr3HuIXvHUagIWgPppOggwvan+LYDhuRp1twdhkcO+DU13AKUm7xSvXZKA169bV
BJY5laJjvfwjNgFuend/Izc9Cd/zeseWERPXcnFObLYc18ytTFHR86BE6fFHjqIeSuwcM
PsqOgmWUEtkpj93MeRH2ViGyRqO5rdVUigRIItulnLAeXO8Kk5BUoqftrESskSoykDT2w
l7PoQ03HVMKgO/NhuXKmncrhJ3oTjyt0bJxHzR6SKoLyiyIgcVPppBD/wHqQQZ0dmTN+q
01n2ngysDndFlzbd7NjO78/H+05CEt4UpYtoLNHFDil0jsFx/raBeoZd9RR15GoQ8Cg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=none header.from=iiitd.ac.in;
spf=pass smtp.mailfrom=iiitd.ac.in;
dkim=pass header.d=iiitd.ac.in header.i=@iiitd.ac.in header.a=rsa-sha256 header.s=google header.b=hTt1uvnj;
arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.208.48
X-Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F559606A31C
for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 17:40:43 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0F559606A31C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iiitd.ac.in
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iiitd.ac.in
X-Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-6b87408c797so4574413a12.1
for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 09:40:43 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1795974042; cv=none;
d=google.com; s=arc-20260327;
b=BfsFpOMIw/rz83K3I6ewBmHbWz8wPLzCN+RwR2vfVHQ49lV3vLn02DHGiKpX6fMxYd
MiwHL4/KMmRM2WQ2ia48Z9H+fyJCqgMtX2Rqdi2ef1+6Hux0/sdEHgMYXH7aOJJQHWI+
YquNOcLO7CXC1HWHVgQHWhKSJ+qZh37/YSM3Y6yBZBTGW1a/b+SDb7/HeCNm8nozXq60
0msRYaycVnGEygOi8x5oZdTR8YEn85vuODbjtZ+PoL7eN2NyQvwMvjAFgdZykc/iezfT
zh57a+eR5EfJCcg571BQ2lVFTEeWt1DbZCp7HLpazC6mf2YEUNpbtytYDb45HBbuDKp6
T5XQ==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:dkim-signature;
bh=tHtViJJsVpO7ochSSDMwQjvEK9IB3st1eAn9hl774cE=;
fh=0MHiOR4LxOTVOj/3U3EBGqm4UJonPIl4yGAhOCIt43w=;
b=Q4J8ydxbZxVmUmra61aBYS5EaEHHfz3QeotdrDQq+jNjKIAyFGX2/CyY2G+X1J4bfN
n3a+WE2u0eXi1069vA91jEW3VhcXJOV5lGl5vmHme6+jHDuIG0vIuSBEsOMk1oPYyZUJ
IGKBN8887shIfSsLbEXQm0pCl+iVEtEPSEgp5A9AB2GEHzuPnz3oPwJq8AF2mBOO901b
C2rypXvYlbYVD6filijwGVgupKejOoTD24NSOgXSI8lIjuTb27pO+xq/xgjvQojdjReY
vl2dfLpGTOy4YvGaXUwH28jR9+dvEiGEWjERzFWWhBLBvY/XyXNUtPSW0MsEFkmpuUHd
PGhg==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=iiitd.ac.in; s=google; t=1795974042; x=1796578842; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=tHtViJJsVpO7ochSSDMwQjvEK9IB3st1eAn9hl774cE=;
b=hTt1uvnjRnJ1pZLFfc+gL5lvRp4Ab1quikjbLWGVt97LE+w8c/luwjh+YSuTbwfBZH
LhOCXo6k3coiv9iv1Jpee4ojeHLgGBFSvpzK3g/jIlTtyPzxb3KILDOd8jhcL0bTEyCS
wo4SeVAHQFF0Q+dbQaOOZryV6ljC4TegPNEdI=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795974042; x=1796578842;
h=content-transfer-encoding:content-type:cc:to:subject:message-id
:date:from:in-reply-to:references:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=tHtViJJsVpO7ochSSDMwQjvEK9IB3st1eAn9hl774cE=;
b=N9D5SQFuK75hmn7spoJqgAbnD6eJEo6jlkISU/ZfwK/7vEy2vHkqdQV2s8uMgujmoW
a35N0AHv3gyi260MRRvc3u6L0RkAxFq1+LnHg4nlI76TgBRRSi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:aa7:d94a:0:b0:6b4:2960:d38e with SMTP id
4fb4d7f45d1cf-6ba37e874dcmr17141505a12.26.1795974042422; Sun, 29 Nov 2026
09:40:42 -0800 (PST)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <ac39fb1720fc03069317f8a74aa0f34d86db2e30.camel@sipsolutions.net>
X-Gm-Features: Aa3M54qxn3bBLYEHAMHXf21pSJAt-pwUYdMenrkhNTAbF94rdNp7QwVCcPeHZas
X-Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Kapil Vaswani <kapil@presceralabs.ai>,
stable@vger.kernel.org