CVE-2023-54085: mptcp: fix NULL pointer dereference on fastopen early fallback
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mptcp: fix NULL pointer dereference on fastopen early fallback
In case of early fallback to TCP, subflow_syn_recv_sock() deletes the subflow context before returning the newly allocated sock to the caller.
The fastopen path does not cope with the above unconditionally dereferencing the subflow context.
The Linux kernel CVE team has assigned CVE-2023-54085 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.2 with commit 36b122baf6a8bd46b4a591f12f4ed17b22257408 and fixed in 6.2.12 with commit 95135835519b0ab931c39908b2c99e9fb3c9068b Issue introduced in 6.2 with commit 36b122baf6a8bd46b4a591f12f4ed17b22257408 and fixed in 6.3 with commit c0ff6f6da66a7791a32c0234388b1bdc00244917
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-2023-54085
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/fastopen.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/95135835519b0ab931c39908b2c99e9fb3c9068b https://git.kernel.org/stable/c/c0ff6f6da66a7791a32c0234388b1bdc00244917