sctp: clear control chunk transport if it is being removed
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8a07eb0a50aebc8c95478d49c28c7f8419a26cef · < 18d704bdd809377dfd81a3c2f42426763b5da227| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
sctp: clear control chunk transport if it is being removed
sctp_make_heartbeat_ack() caches the destination transport in chunk->transport without taking a reference. When src_out_of_asoc_ok is enabled, the HEARTBEAT ACK may remain queued on control_chunk_list instead of being transmitted immediately.
If the peer transport is removed while the chunk is still queued, sctp_assoc_rm_peer() drops the transport and schedules it for RCU freeing, but only clears cached transport pointers in out_chunk_list. The queued control chunk therefore retains a dangling transport pointer.
Once an ASCONF_ACK clears the suppression and the queued control chunk is transmitted, SCTP dereferences the stale transport pointer, leading to a use-after-free.
Fix this by also clearing chunk->transport for queued control chunks in control_chunk_list when removing the transport.
From the CVE record · Linux
The Linux kernel's SCTP code can leave a queued HEARTBEAT ACK with a dangling transport pointer when a peer transport is removed. If an ASCONF_ACK later allows that chunk to be transmitted, the kernel dereferences the stale pointer, causing a use-after-free. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with SCTP should check their kernel versions against the vendor advisory; affected versions are not specified.