mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
Add KUnit coverage for ieee80211_parse_neg_ttlm() to lock the sparse link_map_presence layout against future regressions. The sparse_presence_no_oob_read case crafts a negotiated TTLM element with link_map_presence = BIT(0) | BIT(7) and bm_size = 2 in a buffer sized exactly to the validated element length. Without the parser fix this would read 14 bytes past the buffer when processing TID 7; under KASAN that is a slab-out-of-bounds report. The dense_presence_baseline case crafts a fully populated link_map_presence = 0xff element to confirm that the cursor-advance fix does not regress the path that was already correct. Export ieee80211_parse_neg_ttlm via VISIBLE_IF_MAC80211_KUNIT so the test can call it directly. Assisted-by: Claude:claude-sonnet-4-6 Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com> Link: https://patch.msgid.link/20260515151719.1317659-3-michael.bommarito@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
5 lines
80 B
Plaintext
5 lines
80 B
Plaintext
CONFIG_KUNIT=y
|
|
CONFIG_CFG80211=y
|
|
CONFIG_MAC80211=y
|
|
CONFIG_MAC80211_KUNIT_TEST=y
|