Article View: linux.kernel.netdev
Article #7035[PATCH net 3/4] sctp: don't treat an I-FORWARD-TSN as an association reset
From: Tim Budding
Date: Sat, 24 Oct 2026 12:06
Date: Sat, 24 Oct 2026 12:06
77 lines
14436 bytes
14436 bytes
sctp_report_iftsn() handles both a received I-FORWARD-TSN and the SSN/TSN
reset request and response of RFC 6525, where all queued data has to be
discarded. It tells them apart by checking whether the New Cumulative
TSN equals the highest TSN seen, and if so calls sctp_intl_abort_pd(),
which aborts partial delivery on every stream, skips the MIDs being
partially delivered and flushes the whole ulpq.
However, sctp_tsnmap_skip() runs first and raises the highest TSN seen
to the New Cumulative TSN, so the check is also true for any
I-FORWARD-TSN that arrives before data with a higher TSN, e.g. when the
abandoned message was the last one sent, or after a burst of loss. All
partially received messages on all streams are then dropped. A stream
that was in partial delivery also has its MID skipped, so the next
fragment of that message fails sctp_validate_idata() as stale, and the
association is aborted with a protocol violation.
Drop the check from sctp_report_iftsn() and have the reset paths call
abort_pd() explicitly. For DATA chunks this changes nothing, as
sctp_report_fwdtsn() already aborts partial delivery and
sctp_ulpq_abort_pd() returns early when none is in progress. For I-DATA
the reset paths still discard everything as before.
This relies on the previous patch, which makes sctp_intl_skip() abort an
unordered partial delivery of the skipped message; the check removed
here used to do that at the leading edge.
Found by an AI assistant while working on the first patch in this
series. Reproduced on an unmodified kernel with the leading_edge test of
the sctp_ifwdtsn.sh selftest added later in this series, which passes
with this fix. Its reset test checks that an SSN/TSN association reset
still works with interleaving.
Fixes: 47b20a88566f ("sctp: implement report_ftsn for sctp_stream_interleave")
Cc: stable@vger.kernel.org
Signed-off-by: Tim Budding <tim.budding@gmail.com>
---
net/sctp/stream.c | 2 ++
net/sctp/stream_interleave.c | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/sctp/stream.c b/net/sctp/stream.c
index e4354d58f20b..d5e71a2027f5 100644
--- a/net/sctp/stream.c
+++ b/net/sctp/stream.c
@@ -749,6 +749,7 @@ struct sctp_chunk *sctp_process_strreset_tsnreq(
*/
max_tsn_seen = sctp_tsnmap_get_max_tsn_seen(&asoc->peer.tsn_map);
asoc->stream.si->report_ftsn(&asoc->ulpq, max_tsn_seen);
+ asoc->stream.si->abort_pd(&asoc->ulpq, GFP_ATOMIC);
/* G1: Compute an appropriate value for the Receiver's Next TSN -- the
* TSN that the peer should use to send the next DATA chunk. The
@@ -1028,6 +1029,7 @@ struct sctp_chunk *sctp_process_strreset_resp(
LIST_HEAD(temp);
asoc->stream.si->report_ftsn(&asoc->ulpq, mtsn);
+ asoc->stream.si->abort_pd(&asoc->ulpq, GFP_ATOMIC);
sctp_tsnmap_init(&asoc->peer.tsn_map,
SCTP_TSN_MAP_INITIAL,
diff --git a/net/sctp/stream_interleave.c b/net/sctp/stream_interleave.c
index 77fe0db5ff77..f49b534ff78f 100644
--- a/net/sctp/stream_interleave.c
+++ b/net/sctp/stream_interleave.c
@@ -1225,9 +1225,6 @@ static void sctp_report_iftsn(struct sctp_ulpq *ulpq, __u32 ftsn)
{
/* Move the Cumulattive TSN Ack ahead. */
sctp_tsnmap_skip(&ulpq->asoc->peer.tsn_map, ftsn);
- /* abort only when it's for all data */
- if (ftsn == sctp_tsnmap_get_max_tsn_seen(&ulpq->asoc->peer.tsn_map))
- sctp_intl_abort_pd(ulpq, GFP_ATOMIC);
}
static void sctp_handle_fwdtsn(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk)
--
2.34.1
Technical Details
Message-ID:
<20261024120627.837568-4-tim.budding@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351359-linux-kernel-netdev=dewy.ruReferences:
<20261024120627.837568-1-tim.budding@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351359-linux-kernel-netdev=dewy.ru
From: tim.budding@gmail.com (Tim Budding)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 3/4] sctp: don't treat an I-FORWARD-TSN as an association reset
Date: Sat, 24 Oct 2026 05:06:26 -0700
Organization: Usenet Network
Message-ID: <20261024120627.837568-4-tim.budding@gmail.com>
References: <20261024120627.837568-1-tim.budding@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="752594"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:z7I6+GRwhiT4NOY7CQmDje85lI4= sha256:HsW54v5tXEDjGsXg72rgFEevSWkceNMC6HMopqZkPbo=
sha1:0WrMRpKpEuMfRTpihCW/kXMoVeg= sha256:PQ8NJhH+o9OPHW/PVL0KhijMr/KEM75WrjrRWIPiw34=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id E35BD111628; Sat, 24 Oct 2026 15:11:34 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id DOYEPeXFoxYl;
Sat, 24 Oct 2026 15:11:29 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-351359-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 495671115DA; Sat, 24 Oct 2026 15:11:18 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 262003BF8C; Sat, 24 Oct 2026 12:07:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1792843632;
b=dhxtwPs3GZCEdelrtNVx0T8+PWP1Tq1PBIU50dfQDG/WN/BphsAH6nJdSgCtn/EWBARG
ykcXKCc1lgcql7+BCxVNbqAFeBHhcRTViQffYa0Rn6LNmJA/nDlaENUtA7H9qArzp8vyx
+Lbt/Mq3SHM24hPPRjtE6oEGapB/HPnrhihilHjW7mNwBpcE2KchZBE458j9sB4M9Z5MX
LUUsxC40BsH1XrOMu7v6tfX1o7rtdGHmw/3hYT5GYYYWx+UO2VyVcbDcYunMHMgmT8yCh
BtESUTyoRxYNFVFXTamBopIARt0S9koM1g+FsainTCtrh10mcJguSf/yQ1bBGefqQrw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792843632;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:
References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Transfer-Encoding;
bh=zLNM9fxN8Q0mYWX/OgajYSxuCiy7NImfGuJpx0sAOuU=;
b=AkpDULTIGG/URNMYg5b8tts+7/qvoB1sLTKnlIE7VcyQFfY6btATit/FyFahrGJ0ykKc
BkcEQoMetj4EB4IxX2DjpI7+cBf9BHg0U3b897Ysxeh7lftmTTauQiX+QPahRH8NUIXRR
Ck3EwbG6nvZV3w49pkFqnSdmgYfpuKycUC6rOxQw9Te33t+Y1dsK8OMEf0TaDV0T9edle
sWRrEGkqKOvHT7Qzj0wS/toOrBTH1ldEjbTEJYqWpRNZEYiT4EfOlKo+bi8wXNRVFDt/W
06Y/fqYoU5H32pmkLtA8pjor1eUaPFm9hbb+hROasDSOi0RxhkVX53QnGlRG6l2G/1Q==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=jbkjwaQH;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F1476606A31E;
Sat, 24 Oct 2026 12:07:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=jbkjwaQH
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.170
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1792843630;
b=Us2J0rybN1S8Si+st2j/GQ8An7TqCksIrWqVlu1FRthza1UnCIEnlRn7O0NubWRofqMM
44qqwcaEj7uk7KFZZWaa3JTEI288Q9mnKRuKQo44DcLqCNxZTZ+zqgqKtXYSEbaQeytxc
du9iIZOpqBO78keaKD0u0GmcgrhQj0wACE/LtA2UhSt6DqCO6QXx0w5sC8ENYnHgxjyym
FXN15zU1sKqkbRuemk4Qx5RfJ06/4QE/Or8r3zGBrNIrzb1QDd4OJjc4dWjdfj8nP+ebB
HVFdarDnwGZIx9Ax0ONNLgQK3o92WnRtH78cniNY1cEeloBArqgbBk6tz4jDQ5hwksA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792843630;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
Date:Message-Id:X-Mailer:In-Reply-To:References:MIME-Version:
Content-Transfer-Encoding;
bh=zLNM9fxN8Q0mYWX/OgajYSxuCiy7NImfGuJpx0sAOuU=;
b=rvNtcghQLzeNkH0FuZiOGbpTYTm7L6yJ5T3zmNw1mhcT2TAwGIGuDyY0M0fasufvq0RK
DSlECbcZAULrwewOpPXPJwUb+fcWV7rGi2Nt4fnbUmx695sDZ5NgO17qhzxbVoBg4fiUd
Pv/NF/U+JFjY8SchaS0zPoAQEmBycQ4o2Xly0FL1vAO1DbIgcUFn2sAEJeZ4EraXVLgjt
hK3nbRB6Jfn45QzHi+qpqpB9dj7Hmf584Ryqerw6nkkeVPrcS7xRDtao6lVJiJqHrjC1i
hkhcxl2hCi1u+5RsITU7XZCnA2ZMUGgOq9h4LqaqGrAwM+zXKWT5n7/7u8zTy/LnXpg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=jbkjwaQH;
arc=none smtp.remote-ip=74.125.82.170
X-Received: from mail-dy1-f170.google.com (mail-dy1-f170.google.com [74.125.82.170])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F222606A32A
for <netdev@vger.kernel.org>; Sat, 24 Oct 2026 12:07:08 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1F222606A32A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dy1-f170.google.com with SMTP id 5a478bee46e88-36681e85e87so376751eec.1
for <netdev@vger.kernel.org>; Sat, 24 Oct 2026 05:07:08 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792843628; x=1793448428; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=zLNM9fxN8Q0mYWX/OgajYSxuCiy7NImfGuJpx0sAOuU=;
b=jbkjwaQHOM9PvR1//nhAnjt8kj/2TksQ4yOsFvy5FOP0dbrbBcz3Za7a7PKHXZYz36
sZS1qtulphs4jCdlYqqjek2qB+1vZoV295ubms5R1QFlKO9i5SOOdwRgoOCqdJ9yQ7Wy
dpB62kKcPiBHBqfOH/T2NltriOyz6mN+AW7DwZo64Jqh2VbJDp+FpLwJRHrOo5O8kf0p
zPTNtlOkmz0p27ORnExmYq3J0kTMWFAwJBF1D88NpYt4zj/8VcEH8VG4meK23sNTM7Ft
JvtEWROLMn7nXRvCnQ8gaLABalcEMonDfO/0KQGgHgHOWPSl4ChKdJBIz7VemKTH5n4A
7xMQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792843628; x=1793448428;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:c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FtmaC6s3/ie8cW/CiBDkds0Dmz7+iCZ41It1oHkTsKwXATgfltMBu
VExDbCmvWGXn8dPILRp8eiy/62Cbx3CE+hJxdLC2l60jozjfzpUV4kdMyHBp0M309khcgm17VaS
KhntL3OjHVpMJV6T7bx/vqDB+w==
X-Received: by 2002:a05:7301:4205:b0:369:d793:328d with SMTP id 5a478bee46e88-369e84bd8b1mr2964461eec.31.1792843628051;
Sat, 24 Oct 2026 05:07:08 -0700 (PDT)
X-Received: from localhost.localdomain ([136.25.42.214])
by smtp.gmail.com with ESMTPSA id 5a478bee46e88-369e8d95e91sm8120722eec.15.2026.10.24.05.07.07
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sat, 24 Oct 2026 05:07:07 -0700 (PDT)
X-Cc: Xin Long <lucien.xin@gmail.com>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Tim Budding <tim.budding@gmail.com>,
stable@vger.kernel.org
X-Mailer: git-send-email 2.34.1
X-In-Reply-To: <20261024120627.837568-1-tim.budding@gmail.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list