From: Guangshuo Li <lgs201920130244@gmail.com>
To: Arend van Spriel <arend.vanspriel@broadcom.com>,
Johannes Berg <johannes.berg@intel.com>,
Peddolla Harshavardhan Reddy <peddolla.reddy@oss.qualcomm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Gokul Sivakumar <gokulkumar.sivakumar@infineon.com>,
Guangshuo Li <lgs201920130244@gmail.com>,
Pieter-Paul Giesberts <pieterpg@broadcom.com>,
Hante Meuleman <meuleman@broadcom.com>,
"John W. Linville" <linville@tuxdriver.com>,
Piotr Haber <phaber@broadcom.com>,
linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev,
brcm80211-dev-list.pdl@broadcom.com,
linux-kernel@vger.kernel.org
Subject: [PATCH] wifi: brcmfmac: guard P2P device vif in action frame search
Date: Wed, 8 Jul 2026 14:39:29 +0800 [thread overview]
Message-ID: <20260708063929.718152-1-lgs201920130244@gmail.com> (raw)
brcmf_p2p_send_action_frame() checks the P2P device vif saved probe
request IE when deciding whether to perform a peer channel search. The
P2P device vif is not guaranteed to exist, for example in standalone AP
mode where no P2P device interface has been created.
If a search-channel action frame is sent on a social channel in that
mode, the validation condition can dereference the NULL P2P device vif
before the frame is transmitted through the caller's vif.
Guard the P2P device vif before checking its saved probe request IE.
Fixes: 6eda4e2c5425 ("brcmfmac: Add tx p2p off-channel support.")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index 92c16a317328..bbdebf4c2010 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -1819,6 +1819,7 @@ bool brcmf_p2p_send_action_frame(struct brcmf_if *ifp,
/* validate channel and p2p ies */
if (config_af_params.search_channel &&
IS_P2P_SOCIAL_CHANNEL(le32_to_cpu(af_params->channel)) &&
+ p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif &&
p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif->saved_ie.probe_req_ie_len) {
afx_hdl = &p2p->afx_hdl;
afx_hdl->peer_listen_chan = le32_to_cpu(af_params->channel);
--
2.43.0
next reply other threads:[~2026-07-08 6:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 6:39 Guangshuo Li [this message]
2026-07-12 22:35 ` [PATCH] wifi: brcmfmac: guard P2P device vif in action frame search Arend van Spriel
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=20260708063929.718152-1-lgs201920130244@gmail.com \
--to=lgs201920130244@gmail.com \
--cc=arend.vanspriel@broadcom.com \
--cc=bhelgaas@google.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=brcm80211@lists.linux.dev \
--cc=gokulkumar.sivakumar@infineon.com \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=meuleman@broadcom.com \
--cc=peddolla.reddy@oss.qualcomm.com \
--cc=phaber@broadcom.com \
--cc=pieterpg@broadcom.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