From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388362; b=SqO9bCNYhcrEfWpPSEGKYRjap5wRn9n6T5YdTRO5Zw3DRbwtvC7bWRDElqIrMSJRCJXH IqEMa8ySsooNpRLuItC+ZIY18JxLSaGqC/giws1hsV47z9aZI3J2WiZfQtV3kV8W/WyIm 5yVMiZwMaM5SKANJycLXP55omc9Hp6UXvzqgNX7txZPJWaLdpLqzBWCBaqN9x1MZRXzRh AvV5bcgILgvEs4FQiOJh5Wl+KswNpxS+oLlPS89Flj2yuyyTkl47PdGw8CBM6aTYRl58+ 1Q4FEsmuQJGYjGaT6ibpEieTuWvWzICi7nX+gKJquOKyNGzbP4E48yyynfyakgHYqnA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388362; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=VMlDQiWVA+kmUGHlh0QgSNHExWEGdlnHvYtKrAugIp8=; b=rbR/yQkDVqQjdMbUD9T33+r2KRjE1rLzjZTP+L8tHeossnJ2MSDgh/M5lNa/o/R9/YW3 BP0v2IiOfObs2A2M0xJhUB3wptBJraquDim7XjtsCiINptVoasXhSPoxwyDWs3tCD7L8J q6tWVHLTNlEzeQ37XmApp3QxAll2DM7Z9YsSGPXrjViI7hn9TyHMgUBQ/EeUsOSQR6xER /764O/EK/nN+JAMKyoILvzuLcaAgqqKc7FX7fczOoqLPFcy5A7yhlBkq82nmAhES5trBN 4Ny28BiaIyZaqY3Vbdh5bqFrEDr3dAjvE6WGKqAAK0tAMUqDpGy8zAkCJM8pAoqY4UA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=0JZLPOw1; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B41F2606A322; Fri, 4 Dec 2026 12:46:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=0JZLPOw1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9EEF1F0092C; Fri, 4 Dec 2026 12:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388362; bh=VMlDQiWVA+kmUGHlh0QgSNHExWEGdlnHvYtKrAugIp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=0JZLPOw1C7xw/KKeC8tUADxJChId7o/awVuAuvbK5+HBT/ocmb7a76tbjwXzer3k5 xh99f2n/4zay0aSAIq9nZdDbLKxl/H8PufDhVg+0XwIrLYU6T65byEcQUN+2m4wxxa ABvlARjY8zhEriJWJa9W4XJUvvsP1/ojfoyJ5C34= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhao Li , Johannes Berg Subject: [PATCH 6.1 0544/1059] wifi: cfg80211: release rejected nontransmitted BSS reference Date: Fri, 4 Dec 2026 19:01:15 +0900 Message-ID: <20261204100658.290471574@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-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 @@ -2175,6 +2175,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; } }