* [PATCH] wifi: wil6210: fix BSS reference leak on unsupported EDMG config
@ 2026-11-25 9:06 Yige Jiang
0 siblings, 0 replies; only message in thread
From: Yige Jiang @ 2026-11-25 9:06 UTC (permalink / raw)
To: linux-wireless; +Cc: Yige Jiang, linux-kernel, stable
wil_cfg80211_connect() takes a reference on the target BSS with
cfg80211_get_bss() and drops it with cfg80211_put_bss() at the out
label. Every error path after the lookup jumps there, except the one
for wil_get_wmi_edmg_channel(): when the requested EDMG bandwidth
configuration or channel bitmap is not supported, the function returns
directly and the BSS reference is never dropped.
Each such connect request leaks one reference, so the BSS entry is
never freed, even after it expires from the scan list.
Jump to the out label instead, like the other error paths.
Fixes: 9abe3e306ecc ("wil6210: Add EDMG channel support")
Cc: stable@vger.kernel.org
Signed-off-by: Yige Jiang <yigejiang86@gmail.com>
---
Based on linux-next next-20261109 (630059a5a632).
Compile-tested: arm64, GCC 14.2.0, W=1, CONFIG_WIL6210=m, CONFIG_CFG80211=m, CONFIG_COMPILE_TEST=y; baseline and patched cfg80211.o, no new warnings.
No hardware or runtime test was performed.
AI assistance was used for analysis and patch preparation.
The path needs a connect request (CAP_NET_ADMIN) with an EDMG config the driver rejects, to a BSS already in the scan table.
drivers/net/wireless/ath/wil6210/cfg80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index bf060281c9a2..0d256f313511 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -1356,7 +1356,7 @@ static int wil_cfg80211_connect(struct wiphy *wiphy,
rc = wil_get_wmi_edmg_channel(wil, sme->edmg.bw_config,
sme->edmg.channels, &conn.edmg_channel);
if (rc < 0)
- return rc;
+ goto out;
ether_addr_copy(conn.bssid, bss->bssid);
ether_addr_copy(conn.dst_mac, bss->bssid);
base-commit: 630059a5a632377b9b7b487baccde92b7ae1dd47
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-25 9:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 9:06 [PATCH] wifi: wil6210: fix BSS reference leak on unsupported EDMG config Yige Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox