Skip to contentSkip to conversation

CVE-2026-63971: sctp: fix race between sctp_wait_for_connect and peeloff

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jul 19

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: fix race between sctp_wait_for_connect and peeloff

sctp_wait_for_connect() drops and re-acquires the socket lock while waiting for the association to reach ESTABLISHED state. During this window, another thread can peeloff the association to a new socket via getsockopt(SCTP_SOCKOPT_PEELOFF), changing asoc->base.sk. After re-acquiring the old socket lock, sctp_wait_for_connect() returns success without noticing the migration — the caller then accesses the association under the wrong lock in sctp_datamsg_from_user().

Add the same sk != asoc->base.sk check that sctp_wait_for_sndbuf() already has, returning an error if the association was migrated while we slept.

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

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

	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 5.10.259 with commit 0e0d5bc76fd4267a71334fcc8f1a5fbcf997845d
	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 5.15.210 with commit bcfeac79af740735ace44008b4a11b8e5add20f5
	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 6.1.176 with commit 8e9b56051d24540cfbf39194618708c4a7633549
	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 6.6.143 with commit 634a9af8a26a84d8b0d7b3b643204b344b42d9fb
	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 6.12.93 with commit 7d2038d4b80166f7bead8d07eba3b97405816c21
	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 6.18.35 with commit 68667ee4c7dadf7f63167234e2a1af09b3f7874e
	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 7.0.12 with commit 6140cfa721451fa6e18e134e709703c2bf34d0fb
	Issue introduced in 4.16 with commit 668c9beb9020d5834ee9e43c208190a07d2b1928 and fixed in 7.1 with commit f14fe6395a8b3d961a61e138ad7b36ba3626dd4e

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-63971

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/0e0d5bc76fd4267a71334fcc8f1a5fbcf997845d
	https://git.kernel.org/stable/c/bcfeac79af740735ace44008b4a11b8e5add20f5
	https://git.kernel.org/stable/c/8e9b56051d24540cfbf39194618708c4a7633549
	https://git.kernel.org/stable/c/634a9af8a26a84d8b0d7b3b643204b344b42d9fb
	https://git.kernel.org/stable/c/7d2038d4b80166f7bead8d07eba3b97405816c21
	https://git.kernel.org/stable/c/68667ee4c7dadf7f63167234e2a1af09b3f7874e
	https://git.kernel.org/stable/c/6140cfa721451fa6e18e134e709703c2bf34d0fb
	https://git.kernel.org/stable/c/f14fe6395a8b3d961a61e138ad7b36ba3626dd4e