In the Linux kernel, the following vulnerability has been resolved:
sctp: stop processing a packet once its association is deleted
sctp_endpoint_bh_rcv() looks the association up only when chunk->asoc is
NULL, and caches the result in chunk->asoc and chunk->transport without
taking a reference.
A packet that matches no association is handed to the endpoint, so a peer
can bundle COOKIE ECHO, SHUTDOWN and SHUTDOWN ACK in one packet. The
COOKIE ECHO creates the association, the SHUTDOWN chunk caches it, and
with the outqueue empty the SHUTDOWN ACK reaches sctp_sf_do_9_2_final(),
so the association and its transports are freed.
The endpoint loop has no counterpart to the asoc->base.dead check in
sctp_assoc_bh_rcv(). The next chunk writes to last_time_heard in the freed
transport and is then passed to sctp_do_sm() with the freed association.
The transport is freed through RCU, so this needs the packet to come off
the socket backlog, where the loop runs in task context.
The endpoint loop cannot do the same check: it holds no reference on the
association, so reading asoc->base.dead would itself be a use-after-free.
Mark the packet for discard in the command interpreter, just before it
deletes the association. That is also before sctp_inq_free() releases the
chunk on the association receive path.
sctp_sf_do_5_2_4_dupcook() issues SCTP_CMD_DELETE_TCB for the temporary
association, while the one the packet belongs to stays alive. A restarting
peer can bundle DATA behind its COOKIE ECHO, so compare against
chunk->asoc and leave that case alone.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - The UAF is reached from sctp_rcv() when a remote peer sends a bundled SCTP packet (COOKIE-ECHO, SHUTDOWN, SHUTDOWN-ACK, then another chunk) to a listening internet-facing SCTP endpoint; no local syscall or link-local medium is required.
AC:L - The attacker fully controls the four-way handshake and the bundled chunk order that creates, caches, then deletes the association in one packet; forcing that packet onto the socket backlog is done with concurrent associations or recv/accept load the attacker generates, with no victim-only race.
PR:N - COOKIE-ECHO is the unauthenticated SCTP handshake completion using only the INIT-ACK cookie as anti-spoofing; a network peer needs no Linux account, capability, or namespace privilege on the victim host.
UI:N - The kernel automatically processes inbound SCTP chunks in sctp_endpoint_bh_rcv()/sctp_do_sm(); no victim mount, file open, or other interactive action is required.
S:U - Impact is kernel heap use-after-free of sctp_association/sctp_transport on the host; it does not cross a VM, container, or IOMMU boundary.
C:H - After DELETE_TCB the next bundled chunk reads freed asoc->state and other association fields and is passed into sctp_do_sm(); UAF of these slab objects enables heap grooming for arbitrary kernel disclosure.
I:H - The same loop writes last_time_heard on the RCU-freed transport and mutates freed asoc fields (stats, last_data_from) before sctp_do_sm() runs with the dangling pointer, yielding a standard UAF write/control-flow primitive.
A:H - Dereferencing the freed association and transport in the endpoint receive loop can oops or panic the kernel, and a remote peer can repeat the bundled packet against any listening SCTP service.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - The UAF is reached from sctp_rcv() when a remote peer sends a bundled SCTP packet (COOKIE-ECHO, SHUTDOWN, SHUTDOWN-ACK, then another chunk) to a listening internet-facing SCTP endpoint; no local syscall or link-local medium is required.
AC:L - The attacker fully controls the four-way handshake and the bundled chunk order that creates, caches, then deletes the association in one packet; forcing that packet onto the socket backlog is done with concurrent associations or recv/accept load the attacker generates, with no victim-only race.
PR:N - COOKIE-ECHO is the unauthenticated SCTP handshake completion using only the INIT-ACK cookie as anti-spoofing; a network peer needs no Linux account, capability, or namespace privilege on the victim host.
UI:N - The kernel automatically processes inbound SCTP chunks in sctp_endpoint_bh_rcv()/sctp_do_sm(); no victim mount, file open, or other interactive action is required.
S:U - Impact is kernel heap use-after-free of sctp_association/sctp_transport on the host; it does not cross a VM, container, or IOMMU boundary.
C:H - After DELETE_TCB the next bundled chunk reads freed asoc->state and other association fields and is passed into sctp_do_sm(); UAF of these slab objects enables heap grooming for arbitrary kernel disclosure.
I:H - The same loop writes last_time_heard on the RCU-freed transport and mutates freed asoc fields (stats, last_data_from) before sctp_do_sm() runs with the dangling pointer, yielding a standard UAF write/control-flow primitive.
A:H - Dereferencing the freed association and transport in the endpoint receive loop can oops or panic the kernel, and a remote peer can repeat the bundled packet against any listening SCTP service.
CVSS 3.1