CVE-2026-98548: sctp: discard the rest of the packet on a stale-cookie error

Published Oct 18, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

sctp: discard the rest of the packet on a stale-cookie error

When an association is in COOKIE-ECHOED state and the peer sends a bundled [ERROR(Stale Cookie)][DATA] packet from one of its non-primary addresses, processing the ERROR chunk takes the non-fatal stale-cookie retry path sctpsfdo526stale(), which queues SCTPCMDDELNONPRIMARY while keeping the association alive. sctpcmddelnonprimary() removes every non-primary transport - including the very transport this packet arrived on, which is still referenced by the receive lookup and shared by all chunks of the packet via chunk->transport.

sctpassocrmpeer() does redirect asoc->peer.lastdatafrom away from the removed transport, but right afterwards the bundled DATA chunk makes sctpassocbhrcv() re-register asoc->peer.lastdatafrom = chunk->transport unconditionally, undoing the redirection with the just-removed transport.

Once the packet is done, the receive reference is dropped and the transport is RCU-freed, while the surviving association keeps the dangling lastdatafrom. A later FWD-TSN (or the delayed SACK timer) makes sctpgensack() dereference it (->paramflags and friends), and sctpmakesack()/sctpoutqselecttransport() may write to the freed object and link it into the live transport list. This is a use-after-free triggerable by any malicious SCTP peer (or a local unprivileged user acting as one) with no capabilities required:

BUG: KASAN: slab-use-after-free in sctpdosm+0x498a/0x5660 Read of size 4 at addr ffff88800e1e356c by task poc/115 Call Trace: sctpdosm <- sctpassocbhrcv <- sctpinqpush <- sctprcv <- ipprotocoldeliverrcu <- iprcv Allocated: sctptransportnew <- sctpassocaddpeer <- sctpprocessinit (INIT-ACK processing) Freed: kfree <- sctptransportdestroyrcu <- rcucore (callrcu queued by sctptransportput at end of sctprcv) The buggy address is located 364 bytes inside of freed 1024-byte region [ffff88800e1e3400, ffff88800e1e3800), cache kmalloc-1k

Note that commit 03a9d10ecf71 ("sctp: drop a chunk if its transport was removed") only covers the window between the receive lookup and the chunk processing (e.g. an ASCONF DEL-IP racing the socket backlog); here the transport is removed while the packet is being processed, by an earlier chunk of the same packet, so the drop in sctpinqpush() does not reach this path. Verified with the bundled [ERROR(Stale Cookie)][DATA] + FWD-TSN reproducer: the KASAN report above still fires with that commit applied, and is gone with this patch on top.

Fix it by discarding the rest of the packet on this path, as suggested by Xin. After the stale-cookie ERROR has sent the association back to COOKIE-WAIT and removed the non-primary transports, the remaining chunks of the packet can only run against the restarted handshake while referencing the removed arrival transport through chunk->transport: besides the lastdatafrom registration above, sctpcmdsetupt2() and the sctpmake() reply builders would also copy that pointer into association-lifetime state that sctpassocrmpeer() has already sanitized. Let the peer retransmit them, in line with what sctpinqpush() does for chunks whose transport was removed before processing.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    On the SCTP stale-cookie ERROR path, discard the rest of the packet after processing the error so bundled chunks are not processed against removed transports.

Event History

Oct 18, 2026
CVE Published
via MITRE·03:18 PM
Data Sourced
via MITRE·03:18 PM
Description
Data Sourced
via NVD·04:17 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203