From: Ahmet Eray Karadag <eraykrdg1@gmail.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Ahmet Eray Karadag <eraykrdg1@gmail.com>,
syzbot+665dd2d6eb222ac6a6ab@syzkaller.appspotmail.com
Subject: [PATCH] mac80211: tdls: don’t WARN on invalid/missing peer
Date: Fri, 26 Sep 2025 02:04:03 +0300 [thread overview]
Message-ID: <20250925230402.138761-1-eraykrdg1@gmail.com> (raw)
Replace WARN_ON_ONCE with a regular check; log via sdata_err() and return -EINVAL. Avoids panic_on_warn.
Reported-by: syzbot+665dd2d6eb222ac6a6ab@syzkaller.appspotmail.com
Fixes: https://syzkaller.appspot.com/bug?extid=665dd2d6eb222ac6a6ab
Signed-off-by: Ahmet Eray Karadag <eraykrdg1@gmail.com>
---
net/mac80211/tdls.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index ba5fbacbeeda..85d627e609f3 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -1457,8 +1457,11 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
set_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH);
- WARN_ON_ONCE(is_zero_ether_addr(sdata->u.mgd.tdls_peer) ||
- !ether_addr_equal(sdata->u.mgd.tdls_peer, peer));
+ if (is_zero_ether_addr(sdata->u.mgd.tdls_peer) || !ether_addr_equal(sdata->u.mgd.tdls_peer, peer)) {
+ sdata_err(sdata, "Invalid/missing peer (%pM vs %pM)\n",
+ sdata->u.mgd.tdls_peer, peer);
+ return -EINVAL;
+ }
break;
case NL80211_TDLS_DISABLE_LINK:
/*
--
2.34.1
reply other threads:[~2025-09-25 23:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250925230402.138761-1-eraykrdg1@gmail.com \
--to=eraykrdg1@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=syzbot+665dd2d6eb222ac6a6ab@syzkaller.appspotmail.com \
/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
all inboxes | Powered by JetHome®