REDHAT-BUG-2492095: Use After Free

Published Jun 24, 2026
·
Updated

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

sctp: purge outqueue on stale COOKIE-ECHO handling

sctpstreamupdate() is only invoked when the association is moved into COOKIEWAIT during association setup/reconfiguration. In this path, the outbound stream scheduler state (stream->outcurr) is expected to be clean, since no user data should have been transmitted yet unless the state machine has already partially progressed.

However, a corner case exists in sctpsfdo526stale(): when a Stale Cookie ERROR is received, the association is rolled back from COOKIEECHOED to COOKIEWAIT. In this scenario, user data may already have been queued and even bundled with the COOKIE-ECHO chunk.

During the rollback, sctpstreamupdate() frees the old stream table and installs a new one, but it does not invalidate stream->outcurr. As a result, outcurr may still point to a freed sctpstreamout entry from the previous stream state.

Later, SCTP scheduler dequeue paths (FCFS, RR, PRIO, etc.) rely on stream->outcurr->ext, which can lead to use-after-free once the old stream state has been released via sctpstreamfree().

This results in crashes such as (reported by Yuqi):

BUG: KASAN: slab-use-after-free in sctpschedfcfsdequeue+0x13a/0x140 Read of size 8 at addr ff1100004d4d3208 by task minipoc/9312 CPU: 1 UID: 1001 PID: 9312 Comm: minipoc Not tainted 7.1.0-rc1-00305-gbd3a4795d574 #5 PREEMPT(full) sctpschedfcfsdequeue+0x13a/0x140 sctpoutqflush+0x1603/0x33e0 sctpdosm+0x31c9/0x5d30 sctpassocbhrcv+0x392/0x6f0 sctpinqpush+0x1db/0x270 sctprcv+0x138d/0x3c10

Fix this by fully purging the association outqueue when handling the Stale Cookie case. This ensures all pending transmit and retransmit state is dropped, and any scheduler cached pointers are invalidated, making it safe to rebuild stream state during COOKIEWAIT restart.

Updating only stream->outcurr would be insufficient, since queued and retransmittable data would still reference the old stream state and trigger later use-after-free in dequeue paths.

Affected Software

1 affected component
Linux Kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Implement the fix by fully purging the association outqueue when handling the stale COOKIE-ECHO case in the stale COOKIE path (sctp_sf_do_5_2_6_stale / COOKIE_WAIT restart). Ensure that scheduler cached pointers (e.g., stream->out_curr) are invalidated, and do not rely only on updating stream->out_curr; pending transmit/retransmittable data queued or bundled with COOKIE-ECHO must be associated with the new stream state.

    Linux kernel SCTP purge association outqueue during stale COOKIE-ECHO/COKIE_WAIT handling = fully purge the association outqueue when handling the stale COOKIE-ECHO case (COOKIE_WAIT restart) so that pending transmit/retransmit and scheduler cached pointers do not reference old stream state

Event History

Jun 24, 2026
Data Sourced
via Red Hat·08:01 AM
DescriptionSeverityAffected Software
Nov 16, 58491
Event
via Red Hat·05:04 PM

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