From nobody Tue Jun 9 01:00:49 2026 Received: from n169-114.mail.139.com (n169-114.mail.139.com [120.232.169.114]) (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 26A40358375; Mon, 25 May 2026 06:03:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=120.232.169.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779689022; cv=none; b=hd6PqxlV77CC8vY6rYiFXC4W9eTcLBYH9LqoLX5lPnydactdIOW9HuXMdPimqGkkpRz6MgFyYWzk6r8IGlBO38n7MJu7VVAUBA4M8bYJoKPy+fzPZUlYvFN/cKjO7vHzT2Zv093KNh+3q8igxswET6FFzjehd9Da1X57ufZwfiQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779689022; c=relaxed/simple; bh=M11jHMT5Ir/WrS8vwUnco3nI1PPClK1HlRkDcheaekQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=CuKbB8R5CaEkJRJXueSm9QMwxpLZvOxB7gMphQnIF6rkl/mG+GuMYTzsvU2CxSo9ckLxQubETwEeDU26O6OKWChTvFSe7zapyQFl7LmZuGzAJ7vi1k7XvNkge3fkyYxCcagH25aCITeQkD2Tpue2mt5jYCEgfhTJPjLBnROO+H0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=139.com; spf=pass smtp.mailfrom=139.com; dkim=pass (1024-bit key) header.d=139.com header.i=@139.com header.b=WhFGyqWs; arc=none smtp.client-ip=120.232.169.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=139.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=139.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=139.com header.i=@139.com header.b="WhFGyqWs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=139.com; s=dkim; l=0; h=from:subject:message-id:to:cc:mime-version; bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=; b=WhFGyqWs8c1Fw3Y4hj//ST9/xHGFQ/wTux/FRY3WylPXcAHA3bJefhxebpa8vkadQi5rGBhFMTXXi 1xtBMeiL8cs4hz4tf/WK1+yM26SHqUYDHQfok+qf+iT0LWrHQWaYwB402K7gpmlwz7B53A3gkiQDNr RmdYBsLC/rn7h4rk= X-RM-TagInfo: emlType=0 X-RM-SPAM: X-RM-SPAM-FLAG: 00000000 Received: from NTT-kernel-dev (unknown[60.247.85.88]) by rmsmtp-lg-appmail-43-12057 (RichMail) with SMTP id 2f196a13e635cb3-09d6e; Mon, 25 May 2026 14:03:37 +0800 (CST) X-RM-TRANSID: 2f196a13e635cb3-09d6e From: Li hongliang <1468888505@139.com> To: gregkh@linuxfoundation.org, stable@vger.kernel.org, kartikey406@gmail.com Cc: patches@lists.linux.dev, linux-kernel@vger.kernel.org, johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, johannes.berg@intel.com Subject: [PATCH 5.15.y] wifi: mac80211: check tdls flag in ieee80211_tdls_oper Date: Mon, 25 May 2026 14:03:36 +0800 Message-Id: <20260525060336.2460138-1-1468888505@139.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Deepanshu Kartikey [ Upstream commit 7d73872d949c488a1d7c308031d6a9d89b5e0a8b ] When NL80211_TDLS_ENABLE_LINK is called, the code only checks if the station exists but not whether it is actually a TDLS station. This allows the operation to proceed for non-TDLS stations, causing unintended side effects like modifying channel context and HT protection before failing. Add a check for sta->sta.tdls early in the ENABLE_LINK case, before any side effects occur, to ensure the operation is only allowed for actual TDLS peers. Reported-by: syzbot+56b6a844a4ea74487b7b@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3D56b6a844a4ea74487b7b Tested-by: syzbot+56b6a844a4ea74487b7b@syzkaller.appspotmail.com Suggested-by: Johannes Berg Signed-off-by: Deepanshu Kartikey Link: https://patch.msgid.link/20260313092417.520807-1-kartikey406@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Li hongliang <1468888505@139.com> --- net/mac80211/tdls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index c2d7479c119a..d25dfeb347f2 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c @@ -1380,7 +1380,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct n= et_device *dev, =20 mutex_lock(&local->sta_mtx); sta =3D sta_info_get(sdata, peer); - if (!sta) { + if (!sta || !sta->sta.tdls) { mutex_unlock(&local->sta_mtx); ret =3D -ENOLINK; break; --=20 2.34.1