From: Sam James <sam@gentoo.org>
To: keescook@chromium.org
Cc: chunkeey@gmail.com,chunkeey@googlemail.com,davem@davemloft.net,edumazet@google.com,helmut.schaa@googlemail.com,johannes@sipsolutions.net,kernel@quicinc.com,kuba@kernel.org,kvalo@kernel.org,linux-kernel@vger.kernel.org,linux-wireless@vger.kernel.org,netdev@vger.kernel.org,pabeni@redhat.com,pkshih@realtek.com,quic_jjohnson@quicinc.com,stf_xl@wp.pl,toke@toke.dk
Subject: Re: [PATCH v2 2/2] mac80211: Use flexible array in struct ieee80211_tim_ie
Date: Tue, 14 May 2024 05:51:02 +0100 [thread overview]
Message-ID: <87jzjxgfnt.fsf@gentoo.org> (raw)
In-Reply-To: <202308301529.AC90A9EF98@keescook>
I think I've just hit this, unless it's been fixed since and it's just
similar.
```
[ 291.051876] ================================================================================
[ 291.051892] UBSAN: array-index-out-of-bounds in /var/tmp/portage/sys-kernel/gentoo-kernel-6.6.30/work/linux-6.6/include/linux/ieee80211.h:4455:28
[ 291.051901] index 1 is out of range for type 'u8 [1]'
[ 291.051908] CPU: 2 PID: 627 Comm: kworker/2:3 Not tainted 6.6.30-gentoo-dist-hardened #1
[ 291.051917] Hardware name: ASUSTeK COMPUTER INC. UX305FA/UX305FA, BIOS UX305FA.216 04/17/2019
[ 291.051922] Workqueue: events cfg80211_wiphy_work [cfg80211]
[ 291.052082] Call Trace:
[ 291.052088] <TASK>
[ 291.052096] dump_stack_lvl (lib/dump_stack.c:107)
[ 291.052114] __ubsan_handle_out_of_bounds (lib/ubsan.c:218 (discriminator 1) lib/ubsan.c:348 (discriminator 1))
[ 291.052130] ieee80211_rx_mgmt_beacon (include/linux/ieee80211.h:4455 net/mac80211/mlme.c:6047) mac80211
[ 291.052354] ? check_preempt_wakeup (kernel/sched/fair.c:977 kernel/sched/fair.c:8226)
[ 291.052368] ? check_preempt_curr (kernel/sched/core.c:2232)
[ 291.052375] ? ttwu_do_activate (kernel/sched/core.c:3766 (discriminator 2) kernel/sched/core.c:3794 (discriminator 2))
[ 291.052383] ? __mutex_lock.constprop.0 (kernel/locking/mutex.c:489 kernel/locking/mutex.c:607 kernel/locking/mutex.c:747)
[ 291.052393] ieee80211_sta_rx_queued_mgmt (net/mac80211/mlme.c:6288) mac80211
[ 291.052599] ? finish_task_switch.isra.0 (arch/x86/include/asm/paravirt.h:700 kernel/sched/sched.h:1386 kernel/sched/core.c:5138 kernel/sched/core.c:5256)
[ 291.052613] ieee80211_iface_work (net/mac80211/iface.c:1602 net/mac80211/iface.c:1658) mac80211
[ 291.052792] ? __pm_runtime_suspend (drivers/base/power/runtime.c:1128)
[ 291.052807] cfg80211_wiphy_work (include/net/cfg80211.h:5789 net/wireless/core.c:442) cfg80211
[ 291.052889] process_one_work (kernel/workqueue.c:2632)
[ 291.052894] worker_thread (kernel/workqueue.c:2694 (discriminator 2) kernel/workqueue.c:2781 (discriminator 2))
[ 291.052897] ? __pfx_worker_thread (kernel/workqueue.c:2727)
[ 291.052900] kthread (kernel/kthread.c:388)
[ 291.052905] ? __pfx_kthread (kernel/kthread.c:341)
[ 291.052909] ret_from_fork (arch/x86/kernel/process.c:153)
[ 291.052913] ? __pfx_kthread (kernel/kthread.c:341)
[ 291.052917] ret_from_fork_asm (arch/x86/entry/entry_64.S:314)
[ 291.052922] </TASK>
[ 291.052923]
================================================================================
```
I can reproduce it fairly easily when changing wifi adapters and
toggling connecting to an AP.
(It was a fun mini-adventure to get the trace usable and I should send
some patches to decode_stacktrace.sh, I think...)
thanks,
sam
next prev parent reply other threads:[~2024-05-14 4:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 13:29 [PATCH v2 0/2] wifi: Fix struct ieee80211_tim_ie::virtual_map Jeff Johnson
2023-08-29 13:29 ` [PATCH v2 1/2] wifi: cw1200: Avoid processing an invalid TIM IE Jeff Johnson
2023-08-29 13:29 ` [PATCH v2 2/2] mac80211: Use flexible array in struct ieee80211_tim_ie Jeff Johnson
2023-08-30 19:51 ` Christian Lamparter
2023-08-30 20:22 ` Jeff Johnson
2023-08-30 22:31 ` Kees Cook
2024-05-14 4:51 ` Sam James [this message]
2024-05-14 5:49 ` Kees Cook
2023-08-30 20:24 ` Jeff Johnson
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=87jzjxgfnt.fsf@gentoo.org \
--to=sam@gentoo.org \
--cc=chunkeey@gmail.com \
--cc=chunkeey@googlemail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=helmut.schaa@googlemail.com \
--cc=johannes@sipsolutions.net \
--cc=keescook@chromium.org \
--cc=kernel@quicinc.com \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pkshih@realtek.com \
--cc=quic_jjohnson@quicinc.com \
--cc=stf_xl@wp.pl \
--cc=toke@toke.dk \
/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;
as well as URLs for NNTP newsgroup(s).