Subject: CVE-2024-46711: mptcp: pm: fix ID 0 endp usage after multiple re-creations

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

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

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

mptcp: pm: fix ID 0 endp usage after multiple re-creations

'local_addr_used' and 'add_addr_accepted' are decremented for addresses
not related to the initial subflow (ID0), because the source and
destination addresses of the initial subflows are known from the
beginning: they don't count as "additional local address being used" or
"ADD_ADDR being accepted".

It is then required not to increment them when the entrypoint used by
the initial subflow is removed and re-added during a connection. Without
this modification, this entrypoint cannot be removed and re-added more
than once.

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

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

	Issue introduced in 6.0 with commit 3ad14f54bd74 and fixed in 6.1.109 with commit c9c744666f73
	Issue introduced in 6.0 with commit 3ad14f54bd74 and fixed in 6.6.49 with commit 53e2173172d2
	Issue introduced in 6.0 with commit 3ad14f54bd74 and fixed in 6.10.8 with commit 119806ae4e46
	Issue introduced in 6.0 with commit 3ad14f54bd74 and fixed in 6.11 with commit 9366922adc6a

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-46711
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/pm_netlink.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/c9c744666f7308a4daba520191e29d395260bcfe
	https://git.kernel.org/stable/c/53e2173172d26c0617b29dd83618b71664bed1fb
	https://git.kernel.org/stable/c/119806ae4e46cf239db8e6ad92bc2fd3daae86dc
	https://git.kernel.org/stable/c/9366922adc6a71378ca01f898c41be295309f044