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=1796385476; b=iKUo/knuTtdm4YG25qb7YeTJ/ij1eWF1wxsIiAFgJ7ONOsrN1uvWxYmQ5TAqISBMyW3j lamwnx9aMzVqDqWC0uGE2gzDiJP/gbNvvtgKLuHUz3DHz/7O6ZhJr2jH7OHwHhdtAaGE+ Xz5f+1VGYFAqt1oCUAzjoglDxL92Bx4UPGCtCDKuXHqJFKkotfPQxNfep9aXONGF0sHVm g1BfaUjbDvWQ1EABbfx2xUMDlO5yQEWWWxhW41w40gLntmCh8PmjDx97+1Dz8nqrlrH+h 7MexMPplmAR0gHPkEs2TcpYYDhiTARo3+uigqkIKAjcZNuzIWsYwUqrBpGsVPngtaAA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385476; 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=KV6e0ofBSQRGEiIjjoh+n3T/e6RgD8/Cqh9zbraNnoo=; b=i/WlcvSMKPk8QJwUW8aHlYgT71LC0XeerZolIUe6dvWZFDao8fOtyIgjzLcV1hBTaAcJ cLzU7MTqY0ziHRRoah+vDBtKDzox60zPgf8dvG4qzgHtKfJu7cVYgxqfVDVHV8Z8dtWER FoToaOyVz8Mf9xBQ74an2Z40Erv0eqZkduw9w9m/s0JEpvip+3vFXk6xAUiH/BhXJaWGY Rx0po7B6XqP1HqkYSixR1WfGks8dTI2tmbq/zkWJNd/L2aHZwHgKVsABoadKfYbfvVB1t c9CH+njrGUY1Lil8C5x7GjnyfFjnuPy7Cdhi+oh3Qxmm9gM6P9/H6eVnJv49WzmlL6w== 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=q3EGY6dB; 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 239B9606A32D; Fri, 4 Dec 2026 11:57:56 +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=q3EGY6dB Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C8211F00A1A; Fri, 4 Dec 2026 11:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385476; bh=KV6e0ofBSQRGEiIjjoh+n3T/e6RgD8/Cqh9zbraNnoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=q3EGY6dBPk+tEQErf9QwrXsatQX7Tye7q9sIB9nBQ/p/JSK6Yk84YrfYU3YGcl23E /dA8ZLUqBmQfgipbCWL3m9DN1nbFUpMSChJQhLqw/qcAk7oplni1bJB/vgM0twRjHO 89v/B4MvRfg7gJoe+q3/U5O8givaOewe/B3qc/mc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Xiang Mei , Weiming Shi , Xin Long , Jakub Kicinski Subject: [PATCH 6.6 0570/1167] sctp: reset stored flag for each association Date: Fri, 4 Dec 2026 18:59:57 +0900 Message-ID: <20261204100716.895736548@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@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.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Weiming Shi commit 173712d868eb20628ad82deb07f6829a68a9e064 upstream. sctp_send_asconf_del_ip() walks every association on an endpoint. The stored flag records that the current association took the single-homed deferral path and therefore did not allocate an ASCONF chunk. It is currently scoped to the whole function. Once one association sets it, later eligible multihomed associations allocate chunks but skip sctp_send_asconf(), leaking each chunk and its skb. Reset stored for every association so only an association taking the deferral path skips transmission. In an A/B kmemleak test, the vulnerable kernel reported 210 leaked objects from this call path and the fixed kernel reported none. Cc: stable@vger.kernel.org Fixes: 8a07eb0a50ae ("sctp: Add ASCONF operation on the single-homed host") Reported-by: Xiang Mei Signed-off-by: Weiming Shi Acked-by: Xin Long Link: https://patch.msgid.link/20261108161149.2774119-1-bestswngs@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/sctp/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -808,7 +808,6 @@ static int sctp_send_asconf_del_ip(struc struct sctp_sockaddr_entry *saddr; int i; int retval = 0; - int stored = 0; chunk = NULL; sp = sctp_sk(sk); @@ -821,6 +820,7 @@ static int sctp_send_asconf_del_ip(struc __func__, sk, addrs, addrcnt); list_for_each_entry(asoc, &ep->asocs, asocs) { + int stored = 0; if (!asoc->peer.asconf_capable) continue;