From: Michael Bommarito <michael.bommarito@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Ayala Beker <ayala.beker@intel.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH wireless 0/2] wifi: mac80211: negotiated TTLM sparse-map cursor
Date: Fri, 15 May 2026 11:17:17 -0400 [thread overview]
Message-ID: <20260515151719.1317659-1-michael.bommarito@gmail.com> (raw)
ieee80211_parse_neg_ttlm() advances its cursor by map_size for every
TID, even TIDs whose bit is clear in link_map_presence and therefore
contribute no map bytes to the element. A sparse map then makes a
later present TID read past the validated element.
Patch 1/2 moves the cursor advance inside the if-present branch so
the parser walks the same layout that ieee80211_tid_to_link_map_size_ok()
already validates.
Patch 2/2 adds two KUnit cases under the new mac80211-ttlm suite to
lock the layout: sparse_presence_no_oob_read crafts a buffer sized
exactly to the validated element so a pre-fix run is a KASAN
slab-out-of-bounds report; dense_presence_baseline confirms the fix
does not regress the path that was already correct.
Reach is adjacent (AV:A) from an associated peer MLD; the sender does
not need privileges on the victim kernel. The OOB bytes are gated by
valid_links before being applied to driver state, so a peer cannot
turn the read into a policy change. KUnit + KASAN observes a slab-
out-of-bounds read when the element is exactly sized. Whether the
same read trips KASAN through the production RX frame path depends on
allocator state; this series does not include an over-the-air hwsim
replay.
Michael Bommarito (2):
wifi: mac80211: consume only present negotiated TTLM maps
wifi: mac80211: add KUnit coverage for negotiated TTLM parser
net/mac80211/ieee80211_i.h | 4 +
net/mac80211/mlme.c | 5 +-
net/mac80211/tests/.kunitconfig | 4 +
net/mac80211/tests/Makefile | 2 +-
net/mac80211/tests/ttlm.c | 175 ++++++++++++++++++++++++++++++++
5 files changed, 187 insertions(+), 3 deletions(-)
create mode 100644 net/mac80211/tests/.kunitconfig
create mode 100644 net/mac80211/tests/ttlm.c
--
2.53.0
next reply other threads:[~2026-05-15 15:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 15:17 Michael Bommarito [this message]
2026-05-15 15:17 ` [PATCH wireless 1/2] wifi: mac80211: consume only present negotiated TTLM maps Michael Bommarito
2026-05-15 15:17 ` [PATCH wireless 2/2] wifi: mac80211: add KUnit coverage for negotiated TTLM parser Michael Bommarito
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260515151719.1317659-1-michael.bommarito@gmail.com \
--to=michael.bommarito@gmail.com \
--cc=ayala.beker@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox