5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tim Budding commit 3097fba868019924e92b8786ebd473992565f015 upstream. When an I-FORWARD-TSN skips the message being partially delivered on a stream, sctp_intl_skip() passes the MID from the I-FORWARD-TSN to the PARTIAL_DELIVERY_ABORTED notification as pdapi_seq. That MID is the highest one skipped on the stream, so when more than one message is skipped, the notification names a later message instead of the one whose partial delivery was aborted. Report the MID being partially delivered, sin->mid_uo or sin->mid, instead. Reproduced on an unmodified kernel with the pdapi and pdapi_uo tests of the sctp_ifwdtsn.sh selftest added later in this series, which pass with this fix. Reproduction and fix done with AI assistance. Fixes: de60fe910543 ("sctp: implement handle_ftsn for sctp_stream_interleave") Reported-by: Sashiko Closes: https://lore.kernel.org/all/179293012867.3134.16497481637722705271@kernel.org/ Cc: stable@vger.kernel.org Signed-off-by: Tim Budding Acked-by: Xin Long Link: https://patch.msgid.link/20261105050225.49292-3-tim.budding@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/sctp/stream_interleave.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/sctp/stream_interleave.c +++ b/net/sctp/stream_interleave.c @@ -1253,7 +1253,7 @@ static void sctp_intl_skip(struct sctp_u if (flags & SCTP_FTSN_U_BIT) { 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, + sctp_intl_stream_abort_pd(ulpq, sid, sin->mid_uo, 0x1, GFP_ATOMIC); } sctp_intl_reasm_flush_mid(&ulpq->reasm_uo, sid, mid); @@ -1265,7 +1265,7 @@ static void sctp_intl_skip(struct sctp_u if (sin->pd_mode) { sin->pd_mode = 0; - sctp_intl_stream_abort_pd(ulpq, sid, mid, 0x0, GFP_ATOMIC); + sctp_intl_stream_abort_pd(ulpq, sid, sin->mid, 0x0, GFP_ATOMIC); } sctp_intl_reasm_flush_mid(&ulpq->reasm, sid, mid);