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 C7D673B42E7; Wed, 30 Sep 2026 19:22:22 +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=1790796143; cv=none; b=SpTJykd+h5ajmiaOuNWb3Z7tQCjzYDsrx0ez/Xoi+OPvKYLH2j1XOPwEuVNbHmOCvEcbY473LiQ3h0MVrayVlBFrtdgHGJAFXpJARdJKbkgYUiXwj0DYJXbKc3T2GtN6AinmLbfg3zPTo3pIJ9eLTaLXA739DhAYusDbkOKfRTM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790796143; c=relaxed/simple; bh=KBW02vbqMYxpo9L0FmW4r4kbXdYhar89Fv+DqTT1dkY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eu7p//ys9UI8WpLfMe2dbXA5zzY7AXDHKp2bSqYy6Kef2BBhwpD0r84plgAWFcwnr165A30tpIJBT2JRkAF05Qm/1mZa5FYw+by5fG9pef5ctYyLdEqqT5sYYfl0EgrAZr0glw62XQgn71zwAKjTt1RkR8aXFijvZ63p004vt7Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2pquK0aU; 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="2pquK0aU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2DC831F000FF; Wed, 30 Sep 2026 19:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790796142; bh=8E7d61Clj4ZvCC4FyatARn3zhHcc4AKoA1ZZoJFMSkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2pquK0aU4SDQRMi+bMnOWNvOm6cbdwjMEcNQSYNkkRP/DrVHK1RUllfv2lrboygKX ndJzN+BoUqSlbOg/vdyhdNKTFxc/jYJlsAYdHNNNPxckXGkr/JWOP+M+cxVKj25Rxg N/le97qR7DyE+4lhiPmAK9WbPTluFKmOXo6WFMR8= 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.6 0764/1193] wifi: mac80211: dont access the TSF of a down interface Date: Wed, 30 Sep 2026 17:24:08 +0200 Message-ID: <20260930152451.230828352@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152434.301151190@linuxfoundation.org> References: <20260930152434.301151190@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.6-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 b77003d2cc2cc..cba05c79f831f 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c @@ -547,6 +547,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); @@ -560,6 +563,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