CRITICAL Introduced in 2.6.12
sctp EndpointLoop UAF
CVE-2026-89479
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI8.1HIGH
01Description
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.
02KernelScan AI Analysis
Risk summary
A remote attacker can trigger a use-after-free in the SCTP endpoint receive loop by bundling COOKIE ECHO, SHUTDOWN, and SHUTDOWN ACK chunks in a single packet. This can lead to memory corruption, potentially allowing code execution or denial of service.
Vulnerability analysis
The SCTP endpoint receive path remembers which association a chunk belongs to without preventing that memory from being freed. If a peer bundles specific setup and teardown chunks in one packet, the association can be destroyed while the endpoint is still processing later chunks from the same packet, causing a use-after-free on the freed transport and association objects. The fix tells the packet to discard any remaining chunks as soon as the association is deleted, so nothing touches the stale memory afterward. A remote attacker can trigger this by sending a crafted SCTP packet to a listening socket; no local account or privileges are needed.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.15 | 2.6.12 | 5.15.221 | 09c3b193a3e8 |
| 5.10 | 2.6.12 | 5.10.270 | 7d970353eeb9 |
| 6.6 | 2.6.12 | 6.6.157 | 5c0b2dbbdafc |
| 6.18 | 2.6.12 | 6.18.50 | fa306a40e716 |
| 7.2 | 2.6.12 | 7.2.4 | a713e1b3a265 |
| mainline | 2.6.12 | 7.3-rc1 | 47e15a8d12e3 |
| 6.1 | 2.6.12 | 6.1.188 | ed85fe91a61b |
| 6.12 | 2.6.12 | 6.12.109 | ee3f04cf566f |