Subject: CVE-2024-26708: mptcp: really cope with fastopen race

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

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

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

mptcp: really cope with fastopen race

Fastopen and PM-trigger subflow shutdown can race, as reported by
syzkaller.

In my first attempt to close such race, I missed the fact that
the subflow status can change again before the subflow_state_change
callback is invoked.

Address the issue additionally copying with all the states directly
reachable from TCP_FIN_WAIT1.

The Linux kernel CVE team has assigned CVE-2024-26708 to this issue.

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

	Issue introduced in 6.2 with commit 1e777f39b4d7 and fixed in 6.6.18 with commit 4bfe217e075d
	Issue introduced in 6.2 with commit 1e777f39b4d7 and fixed in 6.7.6 with commit e158fb9679d1
	Issue introduced in 6.2 with commit 1e777f39b4d7 and fixed in 6.8 with commit 337cebbd850f

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-2024-26708
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/mptcp/protocol.h

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/4bfe217e075d04e63c092df9d40c608e598c2ef2
	https://git.kernel.org/stable/c/e158fb9679d15a2317ec13b4f6301bd26265df2f
	https://git.kernel.org/stable/c/337cebbd850f94147cee05252778f8f78b8c337f