5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhao Li commit f3c45d5b741a7d7586e639c2f55d2557029f2e1a upstream. Repeated MBSSID reports without an SSID can leak BSS entries outside the scan cache, where the BSS entry limit cannot account for them. __cfg80211_bss_update() returns a referenced BSS. If adding it to the transmitting BSS list fails, unlinking drops the cache reference, but the caller reference is lost when res is cleared. Release the caller reference before discarding the unlinked BSS. LLM assistance was used to find the bug and review. Fixes: 0b7808818cb9 ("wifi: cfg80211: fix BSS refcounting bugs") Cc: stable@vger.kernel.org Signed-off-by: Zhao Li Link: https://patch.msgid.link/20261028141731.6185-1-enderaoelyther@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/wireless/scan.c | 1 + 1 file changed, 1 insertion(+) --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -2109,6 +2109,7 @@ cfg80211_inform_single_bss_data(struct w &res->pub)) { if (__cfg80211_unlink_bss(rdev, res)) { rdev->bss_generation++; + bss_ref_put(rdev, res); res = NULL; } }