Skip to contentSkip to conversation

CVE-2026-99165: sctp: revalidate output stream after association connect wait

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 28

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

sctp: revalidate output stream after association connect wait

When message interleaving is enabled, the first send waits for association establishment before building its data chunks. The wait drops the socket lock, and handshake processing can reduce the output stream count to the peer-advertised inbound stream count. sctp_stream_init() then frees the extension of every removed stream.

The sender resumes with the stream that it checked before the wait. If the peer removed that stream, sctp_outq_tail() later dereferences its NULL extension. Fatal-oops policies then panic the host.

KASAN: null-ptr-deref in range [0x38-0x3f]
RIP: sctp_outq_tail+0x49e/0xaa0
Call Trace:
 sctp_primitive_SEND
 sctp_sendmsg_to_asoc
 sctp_sendmsg

A range check alone is insufficient. Stream reconfiguration can grow the output count again while the lock is released without recreating extensions freed by the earlier shrink. The stream can then be in range while its extension remains NULL. The send-buffer wait has the same issue.

Factor the range and extension checks into a helper and repeat both after each send-path wait that drops the socket lock. Once the lock is reacquired, the validation remains stable through data creation and queueing.

If validation fails after the connect wait, the auto-created association is already established. Return ESRCH so the existing caller path keeps it under state-machine ownership instead of freeing it directly, which would leave protocol, counter and socket state inconsistent.

The Linux kernel CVE team has assigned CVE-2026-99165 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 6.18.59 with commit 77a63d1b813b08c4e5a948f5e04fbaca6176aa8f
	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 7.2.13 with commit fd56ac95ec31a05b66e8938debfa847f49c0e993
	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 7.3 with commit b7ad72414c673ce1fa1f463e807cd4f34f8be9bf

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99165

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
net/sctp/socket.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/77a63d1b813b08c4e5a948f5e04fbaca6176aa8f
	https://git.kernel.org/stable/c/fd56ac95ec31a05b66e8938debfa847f49c0e993
	https://git.kernel.org/stable/c/b7ad72414c673ce1fa1f463e807cd4f34f8be9bf