Subject: CVE-2024-40931: mptcp: ensure snd_una is properly initialized on connect

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

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

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

mptcp: ensure snd_una is properly initialized on connect

This is strictly related to commit fb7a0d334894 ("mptcp: ensure snd_nxt
is properly initialized on connect"). It turns out that syzkaller can
trigger the retransmit after fallback and before processing any other
incoming packet - so that snd_una is still left uninitialized.

Address the issue explicitly initializing snd_una together with snd_nxt
and write_seq.

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

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

	Issue introduced in 5.9 with commit 8fd738049ac3 and fixed in 5.10.221 with commit 208cd22ef5e5
	Issue introduced in 5.9 with commit 8fd738049ac3 and fixed in 5.15.162 with commit 7b9c7fc8600b
	Issue introduced in 5.9 with commit 8fd738049ac3 and fixed in 6.1.95 with commit f03c46eabb3a
	Issue introduced in 5.9 with commit 8fd738049ac3 and fixed in 6.6.35 with commit f1f0a46f8bb8
	Issue introduced in 5.9 with commit 8fd738049ac3 and fixed in 6.9.6 with commit ef473bf1dd7e
	Issue introduced in 5.9 with commit 8fd738049ac3 and fixed in 6.10 with commit 8031b58c3a9b

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-40931
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.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/208cd22ef5e57f82d38ec11c1a1703f9401d6dde
	https://git.kernel.org/stable/c/7b9c7fc8600b64a86e4b47b2d190bba380267726
	https://git.kernel.org/stable/c/f03c46eabb3a67bd2993e237ab5517f00a5f1813
	https://git.kernel.org/stable/c/f1f0a46f8bb8890b90ab7194f0a0c8fe2a3fb57f
	https://git.kernel.org/stable/c/ef473bf1dd7e8dd08bcc04b9e2d1bfed69a0a7ce
	https://git.kernel.org/stable/c/8031b58c3a9b1db3ef68b3bd749fbee2e1e1aaa3