[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025022623-CVE-2022-49669-44d5@gregkh>
Date: Wed, 26 Feb 2025 03:23:52 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: CVE-2022-49669: mptcp: fix race on unaccepted mptcp sockets
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mptcp: fix race on unaccepted mptcp sockets
When the listener socket owning the relevant request is closed,
it frees the unaccepted subflows and that causes later deletion
of the paired MPTCP sockets.
The mptcp socket's worker can run in the time interval between such delete
operations. When that happens, any access to msk->first will cause an UaF
access, as the subflow cleanup did not cleared such field in the mptcp
socket.
Address the issue explicitly traversing the listener socket accept
queue at close time and performing the needed cleanup on the pending
msk.
Note that the locking is a bit tricky, as we need to acquire the msk
socket lock, while still owning the subflow socket one.
The Linux kernel CVE team has assigned CVE-2022-49669 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.17 with commit 86e39e04482b0aadf3ee3ed5fcf2d63816559d36 and fixed in 5.18.10 with commit a8a3e95c74e48c2c9b07b81fafda9122993f2e12
Issue introduced in 5.17 with commit 86e39e04482b0aadf3ee3ed5fcf2d63816559d36 and fixed in 5.19 with commit 6aeed9045071f2252ff4e98fc13d1e304f33e5b0
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-2022-49669
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
net/mptcp/protocol.h
net/mptcp/subflow.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/a8a3e95c74e48c2c9b07b81fafda9122993f2e12
https://git.kernel.org/stable/c/6aeed9045071f2252ff4e98fc13d1e304f33e5b0
Powered by blists - more mailing lists