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=1796388368; b=sWAHqCuALYYMEnMoNyMN9bRSK2wIqfP+Xjn/FsXfHKTASY0qjdvNtxiHJ3VRCGwW0BcX dJ1qp4CQUSqhfwc7UXWXSkcuy9o1isqtOkaDM3zdfUNtzMFza/nhBdXb9m+Lz2FRfiwAk GNlywl33J6REcqXaLR8o9Fgd/ERZqpOCtXYVv8Kdp5hnmxRzJgd39IA+Ddg25NmFcKuVB wDHPuOW/Na7rxQEoEcD9Ca4ZdqifluljFV8KWqXf0YlTL8w2IpOMdD4a88tNhY+AQtcnQ sLGoEiyN+rdnVedDdclk6T7TzefrnTesP+Z8ddedbmhxhAz/G0cSK+slTovSKbco1rw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388368; 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=6mnGG0HE8LcAm5WsxLEYQffj6AOgWmD+jEj2BkoBjT4=; b=Rb6TO6eVYvv7sYYFbY3x5JS1Ui75PV19YjgF2esOnLcAMzzJCNYlF6u/9ntqg8r3CS7C NKB3Oeke1D0yX8UBCwRnUOYXPqeCSmOGyf0C0/HxPo7zX/lfPfSfUDoDFvd1e2oPoBcP4 MsGZcWy5QBkuheLD3SBAMM1AVTJdsCWWk1C8lajEUkztJRjLCe/TLfsDd6AKOLGDbthXO YdFfRmkh4L1I8DYfyUMLNl+opedraR3WxFKMKbl45GQ2bSlVRb0FGOmTY0jrJN0oUHQRA QFQd3dk0EbUkXlkG0u3Goe7hvbF2ZDIpv0W+EqgGraU1dcRwqc4+qYHGafC1JubhIzA== 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=GW+GqkI2; 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 66AF4606A322; Fri, 4 Dec 2026 12:46:08 +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=GW+GqkI2 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51F781F00931; Fri, 4 Dec 2026 12:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388367; bh=6mnGG0HE8LcAm5WsxLEYQffj6AOgWmD+jEj2BkoBjT4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GW+GqkI2LFPJitQP4ZcPRDN1sCTyq7vjsRc4yZXwiGHJfEir5vxTOSgfNxQ/9ky4h nZQSwdLKPw+Gig4zgvL0peoorDjMSSpmuF9+5S7z+sus5uRrysDAw2L0HEiSK4DEqp w7Oqbs+IZGe/RdkeL49iKBQoLzc5PdRMWvxB4tR0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tim Budding , Xin Long , Jakub Kicinski Subject: [PATCH 6.1 0536/1059] sctp: abort unordered partial delivery when its message is skipped Date: Fri, 4 Dec 2026 19:01:07 +0900 Message-ID: <20261204100658.092605889@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: Tim Budding commit 05852c8b70f2291a50bb3f740a66ce9caf9cb98d upstream. When an I-FORWARD-TSN skips unordered messages on a stream, sctp_intl_skip() only aborts the stream's unordered partial delivery if the MID being delivered is lower than the skipped MID. If the skipped message is the one being partially delivered, partial delivery stays in progress: no PARTIAL_DELIVERY_ABORTED is sent, and the next unordered message on the stream is delivered as the rest of the abandoned one. Abort the partial delivery when the MID being delivered is at or below the skipped MID, as the ordered case already does. Reproduced on an unmodified kernel with the uo_pd test of the sctp_ifwdtsn.sh selftest added later in this series; its partial delivery checks pass with this fix. Reproduction and fix done with AI assistance. Fixes: de60fe910543 ("sctp: implement handle_ftsn for sctp_stream_interleave") Cc: stable@vger.kernel.org Signed-off-by: Tim Budding Acked-by: Xin Long Link: https://patch.msgid.link/20261105050225.49292-2-tim.budding@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/sctp/stream_interleave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/sctp/stream_interleave.c +++ b/net/sctp/stream_interleave.c @@ -1261,7 +1261,7 @@ static void sctp_intl_skip(struct sctp_u struct sctp_stream *stream = &ulpq->asoc->stream; if (flags & SCTP_FTSN_U_BIT) { - if (sin->pd_mode_uo && MID_lt(sin->mid_uo, mid)) { + if (sin->pd_mode_uo && !MID_lt(mid, sin->mid_uo)) { sin->pd_mode_uo = 0; sctp_intl_stream_abort_pd(ulpq, sid, mid, 0x1, GFP_ATOMIC);