CVE-2026-64551: sctp: validate STALE_COOKIE cause length before reading staleness

Greg Kroah-Hartman <[email protected]> Mon, 27 Jul 2026 22:10:49 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072737-CVE-2026-64551-1deb@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

sctp: validate STALE_COOKIE cause length before reading staleness

When an ERROR chunk with a STALE_COOKIE cause is received in the
COOKIE_ECHOED state, sctp_sf_do_5_2_6_stale() reads the 4-byte Measure
of Staleness that follows the cause header:

	err   = (struct sctp_errhdr *)(chunk->skb->data);
	stale = ntohl(*(__be32 *)((u8 *)err + sizeof(*err)));

err is the first cause in the chunk, not the STALE_COOKIE cause that
caused the dispatch, and nothing guarantees the staleness field is
present. sctp_walk_errors() only requires a cause to be as long as the
4-byte header, so for a STALE_COOKIE cause of length 4 the read runs
past the cause, and for a minimal ERROR chunk past skb->tail. The value
is echoed to the peer in the Cookie Preservative of the reply INIT,
leaking uninitialized memory.

sctp_sf_cookie_echoed_err() already walks to the STALE_COOKIE cause, so
check its length there and pass it to sctp_sf_do_5_2_6_stale(), which
reads that cause instead of the first one. A STALE_COOKIE cause too
short to hold the staleness field is discarded.

The read is reachable by any peer that can drive an association into
COOKIE_ECHOED, including an unprivileged process using a raw SCTP socket
in a user and network namespace.

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


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

	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 5.10.261 with commit 6022da37786701df1fc5dd946a6dcba59d5473b1
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 5.15.212 with commit 861f884f5471632c731cbbd612a1c072e391a624
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.1.178 with commit 588706ebaf8cdb4a4161602949eba365514b1db1
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.6.145 with commit a257b41ddfe9e327b26581ad2777f04b23ac73f5
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.97 with commit 08a8f2d13f703924316e9aeac863a88ef50990c7
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.18.40 with commit ebe0a55d954fa8da383b6192edb8f763dcb002d5
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.1.5 with commit bbd6b2ea966cf57b6ae095cf5a8dbc993cd197a0
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.2-rc4 with commit 1cd23ca80784223fa2204e16203f754da4e821f8

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-64551
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/sm_statefuns.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/6022da37786701df1fc5dd946a6dcba59d5473b1
	https://git.kernel.org/stable/c/861f884f5471632c731cbbd612a1c072e391a624
	https://git.kernel.org/stable/c/588706ebaf8cdb4a4161602949eba365514b1db1
	https://git.kernel.org/stable/c/a257b41ddfe9e327b26581ad2777f04b23ac73f5
	https://git.kernel.org/stable/c/08a8f2d13f703924316e9aeac863a88ef50990c7
	https://git.kernel.org/stable/c/ebe0a55d954fa8da383b6192edb8f763dcb002d5
	https://git.kernel.org/stable/c/bbd6b2ea966cf57b6ae095cf5a8dbc993cd197a0
	https://git.kernel.org/stable/c/1cd23ca80784223fa2204e16203f754da4e821f8