From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1F6053A8B2; Wed, 23 Sep 2026 14:38:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790174323; cv=none; b=A6I+k619oTjWciqIWg4DNuBsUiED5ujOpK+Y4tiedQgCiZG8FneusnTi9WsX4eXUjneDUTOXddrpY1vZkfHNZotW5KnoR8zGvj2sUWshnG5CwGs1Z7B//0SEQJF9HmbptMT/sqbkbla5dj2IspGYkd7AkF7SYQp1DqfB9ljRqlU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790174323; c=relaxed/simple; bh=fQ6fN5tUMq4Ik+SM8hBXyQqUqhkOE6yzH9kUHUxkQkc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k2X4fAolV6gK1JbaoA5WzARKegINSeIB/5pt/0l3Ubhsed5ve66cpkNSzvyYmDTAqB6sGN5YYp5l10/Doxr9aqFT+PnKtVHhW0qwr2oZQVwSlQvVepTmDC3PUtQ6UdArjBaf4O3Rqjdq/ipo6gWruvxjjPFbUxp/wZFzI4W966Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VfcDxJuw; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VfcDxJuw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 081BA1F00893; Wed, 23 Sep 2026 14:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790174321; bh=14kr7ntnjkGjM/oZajuklwunXMt+D3bPopKyXQWm85I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VfcDxJuw4YXr8uFNX7kY1LdsjckrTpjTL97vfZ3RCfWCcjHZ3Xe7zdqndR19J6XDv 9CTJrLJCi5DHRjMsA3r/Gb49fQ3vv/U8wUp+dPwCwaWXsEdCCdlfbneQ40A8OMjemo dFcX6D53l7fSDXCZPkOWffZIcmDC1+w/4GUdFk3I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, syzbot+1c8c45017f784e646b47@syzkaller.appspotmail.com, Johannes Berg , Sasha Levin Subject: [PATCH 6.18 078/398] wifi: mac80211: dont access the TSF of a down interface Date: Wed, 23 Sep 2026 16:02:32 +0200 Message-ID: <20260923140645.453269428@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260923140643.441954610@linuxfoundation.org> References: <20260923140643.441954610@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johannes Berg [ Upstream commit 0b1de9feeb8651f7a3bb53ed7c9006e3b5298c01 ] The tsf debugfs files call the driver even if the interface isn't up, tgriggering check-sdata-in-driver warnings. Reject the access in that case. Assisted-by: LLM Fixes: 37a41b4affa3 ("mac80211: add ieee80211_vif param to tsf functions") Reported-by: syzbot+1c8c45017f784e646b47@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=1c8c45017f784e646b47 Link: https://patch.msgid.link/20260908122838.201719-18-johannes@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/debugfs_netdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index ba241567ac7e0..a7045787cb225 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c @@ -656,6 +656,9 @@ static ssize_t ieee80211_if_fmt_tsf( struct ieee80211_local *local = sdata->local; u64 tsf; + if (!ieee80211_sdata_running((struct ieee80211_sub_if_data *)sdata)) + return -ENETDOWN; + tsf = drv_get_tsf(local, (struct ieee80211_sub_if_data *)sdata); return scnprintf(buf, buflen, "0x%016llx\n", (unsigned long long) tsf); @@ -669,6 +672,9 @@ static ssize_t ieee80211_if_parse_tsf( int ret; int tsf_is_delta = 0; + if (!ieee80211_sdata_running(sdata)) + return -ENETDOWN; + if (strncmp(buf, "reset", 5) == 0) { if (local->ops->reset_tsf) { drv_reset_tsf(local, sdata); -- 2.53.0