
Technical analysis of CVE-2026-52924, a critical use-after-free in Linux kernel SCTP stale cookie handling, including root cause, attack flow, fix, and detection methods.
.# CVE-2026-52924: SCTP Use-After-Free in Stale Cookie Handling
CVE ID: CVE-2026-52924
Severity: CRITICAL (CVSS 9.8)
Component: Linux Kernel - SCTP (Stream Control Transmission Protocol)
Type: Use-After-Free (CWE-416, CWE-825)
Published: 2026-06-24
Status: Fixed
The vulnerability occurs in the SCTP state machine's handling of stale COOKIE-ECHO packets. The issue involves improper cleanup of the outbound stream queue when an association is rolled back.
sctp_stream_update() frees old stream table, installs new onestream->out_curr still points to freed sctp_stream_out entryout_curr->extsctp_sf_do_5_2_6_stale():
├─ Receive Stale Cookie error
├─ Rollback association state
└─ Call sctp_stream_update()
├─ Free old stream table
├─ Install new stream table
└─ BUG: stream->out_curr NOT invalidated ❌
Later when dequeuing:
sctp_sched_fcfs_dequeue():
└─ Access stream->out_curr->ext (FREED MEMORY) 💥
BUG: KASAN: slab-use-after-free in sctp_sched_fcfs_dequeue+0x13a/0x140
Read of size 8 at addr ff1100004d4d3208 by task mini_poc/9312
CPU: 1 UID: 1001 PID: 9312 Comm: mini_poc Not tainted 7.1.0-rc1-00305-gbd3a4795d574 #5 PREEMPT(full)
Call trace:
sctp_sched_fcfs_dequeue+0x13a/0x140
sctp_outq_flush+0x1603/0x33e0
sctp_do_sm+0x31c9/0x5d30
sctp_assoc_bh_rcv+0x392/0x6f0
sctp_inq_push+0x1db/0x270
sctp_rcv+0x138d/0x3c10
A naive fix might be to just clear stream->out_curr:
// INSUFFICIENT FIX ❌
stream->out_curr = NULL;
Problem: The outqueue still contains:
These stale references will still cause use-after-free when accessed.
Solution: Fully purge the association's outqueue during stale cookie handling.
// CORRECT FIX ✓
sctp_outq_free(&asoc->outqueue);
This ensures:
File: net/sctp/sm_statefuns.c
Function: sctp_sf_do_5_2_6_stale()
Addition: Call sctp_outq_free(&asoc->outqueue) before sctp_stream_update()
enum sctp_disposition sctp_sf_do_5_2_6_stale(...)
{
// ... existing code ...
// Purge outqueue before rebuilding stream state
sctp_outq_free(&asoc->outqueue);
// Now safe to update stream
sctp_stream_update(&asoc->stream, &asoc->c.h_init_tag);
// ... rest of function ...
}
# Enable KASAN in kernel config
CONFIG_KASAN=y
CONFIG_KASAN_GENERIC=y
# Runtime output shows:
BUG: KASAN: slab-use-after-free
# Look for unsafe stream->out_curr access without validation
grep -r "out_curr->ext" net/sctp/
grep -r "out_curr->" net/sctp/sched*.c
Disable SCTP: Remove SCTP module or block SCTP ports (132, 132 UDP)
echo "install sctp /bin/true" >> /etc/modprobe.d/sctp-disable.conf
Firewall Rules: Block SCTP traffic at network boundary
iptables -A INPUT -p sctp -j DROP
Kernel Version: Upgrade to patched versions
Apply the kernel patch that calls sctp_outq_free() in sctp_sf_do_5_2_6_stale().
sctp_outq_free() properly invalidates out_curr** Autor : Elliot
Document Version: 1.0
Last Updated: 2026-09-07
Classification: Public Information