Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2461412lqo; Mon, 13 May 2024 21:51:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKN2N/Tul6UzU64pq2bT8ug55/zOp1T9oXG0rU/Z1c2vkZAsWgLQl7gXSLP76y5VdaCzmSH8JQDbqtCdE+2ZBK/W1q5IZR+sKvvGK2Xg== X-Google-Smtp-Source: AGHT+IF08W9RzDWnSVmA30NyI2cOHaIH8ikKMq/j1cUqOypNsYP3iu5vXoDvsvBPwFiJ3L87BH8U X-Received: by 2002:a05:620a:810:b0:792:957f:b17f with SMTP id af79cd13be357-792c7603aacmr1276187885a.72.1715662271894; Mon, 13 May 2024 21:51:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715662271; cv=pass; d=google.com; s=arc-20160816; b=gTivTBRDfKh8K1aR9l/zgjBXlabRJgvpZxGUIciqpli8lIDIidTamxtLvL6a8MVBUA PD9ai7//+09lqgaouAADwBxyKrgeX9u0Kck6U5nTYqXZHvz8JC16BOt8ju/OKC+2BtIL wXYIb3j/W1ClSZDInF6bW2rNZ2W+2njRijG16jGX/C9yVwvWN0EOTzt7Npp6qcA1GDS4 i84eLA6sd8tQFo+kQC8UQWCysPWJYwnAXXRVGeGYgNspIJUuqfiHGJzFqYor9t2jQZrE YPcTxNzJQH5m+aLoPKail3e1hY6x3YQICN9n3RehGmS0sy/0/1d3L1jLvoiD4nz/88fa tkdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:organization:in-reply-to:subject:cc:to:from; bh=JQ8LiC4dWgJ1ZC26yqVqgtP7i4S64ejKhimDJ1ShhWo=; fh=/2+7c0pi1LMn1dYdnEhbythxHv1r4otq4wKxOa5xNd0=; b=cAcHp9qc1RvIVchLuFqfiFWnjvw75LLxDRF7r6/+gtWv1DNYtyMjY+mwN5+mP8uAkM OzwkzXRzB9Kfg8jLs34llSrN5VwEgBU4LNSG0ZH6/8yJnUzFXZx6fRzaoSjoFt09dQ05 nOui/n8UARtLeML5lqXKG1yC6udDvpXSO7xLLgeM+i3iBhG0s9EVlP6NVDmYG24KoHam n0uoKe/28zJuct4pQYVwRyxeWw/TAvMf/UH6XuN8lQN7rg9wLCg7+aQ+qKL1SZslvl9J zzcxPU9BrMQc/EF0u9eZK2LdcsjRC9DDnNi3QwsqUfuiIX6O5iqCMlsrg/jmqmLubuaR T/Hg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gentoo.org dmarc=pass fromdomain=gentoo.org); spf=pass (google.com: domain of linux-wireless+bounces-7626-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7626-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf364f5fsi1093148485a.573.2024.05.13.21.51.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 21:51:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7626-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gentoo.org dmarc=pass fromdomain=gentoo.org); spf=pass (google.com: domain of linux-wireless+bounces-7626-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7626-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9E49F1C22EE7 for ; Tue, 14 May 2024 04:51:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7871111CA1; Tue, 14 May 2024 04:51:10 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECED6156E4; Tue, 14 May 2024 04:51:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.211.166.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715662270; cv=none; b=ivEWgb5P3SNh03No3iZRGkWGu5JURGJnH9t5jQmJlYx/YON8koXsuzVdaRxV0q+qpwNPm4R7RiUVfUCGZI/vuwJaj60Qr0TiSvnDP5a9sfeg2koVlP6a+051kb8ukcS1rXFQXBP228e2qBrxDsvIswQOe9pNfVTYCVa4QPU4bRM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715662270; c=relaxed/simple; bh=tDPqBP4j+7ZARKmInSjhtsEAIUssFCy8qEGySeTizao=; h=From:To:Cc:Subject:In-Reply-To:Date:Message-ID:MIME-Version: Content-Type; b=bf/Qm7mvAWlzs6FKwDA5LSyX2gg4YqUHuiXhut+JxY3phmuXSaVM6BB5SrhqOYnEbOsnUh+vQcHtYrgUY6R/aEhYRlswT8k5a8YG2xZfjhHyP1AmaPfRM4vw8dvDy4X2V6xnKzrPRf6ckiqDBGB76VqqR+vHcXY3e4ewEBFcR+w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentoo.org; spf=pass smtp.mailfrom=gentoo.org; arc=none smtp.client-ip=140.211.166.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gentoo.org From: Sam James 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 In-Reply-To: <202308301529.AC90A9EF98@keescook> Organization: Gentoo Date: Tue, 14 May 2024 05:51:02 +0100 Message-ID: <87jzjxgfnt.fsf@gentoo.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain 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] [ 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] [ 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