Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60A7128BAA1 for ; Wed, 18 Jun 2025 11:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245009; cv=none; b=C8lvo4PYihQ/vS3lTXkX4AFIYBTXme7SGW+Scl0VbxsLgpofM0E0bauqXrOfJRNDpwSqE3PYAEU4u174bJyJri2Gjs6nNtC/5Lfm7/SDEitIvuIASNK/bxlNicxxZGTWhSNhD8jESN39/UX0/mwgMvmagr3ZHfMHwSLJSZ1DuC4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245009; c=relaxed/simple; bh=zvPFk+y91loLgGvp/yYoUJSNlyvwuVdvFhaLr0vNR68=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cOFZLeai0zHVuk+52jmcMDa83GHWCw5qHkn0/CcvlzP8aGvB2pVBDwRdEthXb2CUv+JQ5npIkSOQcu7sms5clWc/j2SNInpLLVpVlvaJHsi4rm6UsSr1xvTbpM5QnLJonGdpekCQLEh0Y7wwxVw+FISyGUavXeYFQlCvzCJgT6w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pvE/zrh8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pvE/zrh8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB054C4CEE7; Wed, 18 Jun 2025 11:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750245009; bh=zvPFk+y91loLgGvp/yYoUJSNlyvwuVdvFhaLr0vNR68=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pvE/zrh8CCqgo8JAdAHlFyPNbZr+L/55hGl6J7Y4Lt4LWoHuZpw/K7SG4RK6W8Oae DhhHHUSr0iUPcqCqcK7KWQX2nAj5culmaKVIf1AoK/8JyGSY9DLsVgGYXYUR5SihSf w2frS06fHbLF5hb8M7n47ZN+zitbDNz8K0Oc26S4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50071: mptcp: move subflow cleanup in mptcp_destroy_common() Date: Wed, 18 Jun 2025 13:02:16 +0200 Message-ID: <2025061853-CVE-2022-50071-874c@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2438; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=6gEBq0RAGnJQvFz+Z54/hnEMMXAdE13QrKajJ7wvh/g=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc1J/LRB4wp/qvWGiN++tz/tC9MNa/RItXVKa9T8KM kQ+YDTuiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlYr2OY73tX1sXjvs5kp3Xb Pf3UIrPT30QkM8xiakrbuOXjW2HpCm/+2v/MDFWZhQwA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: mptcp: move subflow cleanup in mptcp_destroy_common() If the mptcp socket creation fails due to a CGROUP_INET_SOCK_CREATE eBPF program, the MPTCP protocol ends-up leaking all the subflows: the related cleanup happens in __mptcp_destroy_sock() that is not invoked in such code path. Address the issue moving the subflow sockets cleanup in the mptcp_destroy_common() helper, which is invoked in every msk cleanup path. Additionally get rid of the intermediate list_splice_init step, which is an unneeded relic from the past. The issue is present since before the reported root cause commit, but any attempt to backport the fix before that hash will require a complete rewrite. The Linux kernel CVE team has assigned CVE-2022-50071 to this issue. Affected and fixed versions =========================== Issue introduced in 5.11 with commit e16163b6e2b720fb74e5af758546f6dad27e6c9e and fixed in 5.19.4 with commit 6139039c8fc5c9dbcdc3ad389b9a6d0cacb4d693 Issue introduced in 5.11 with commit e16163b6e2b720fb74e5af758546f6dad27e6c9e and fixed in 6.0 with commit c0bf3c6aa444a5ef44acc57ef6cfa53fd4fc1c9b 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-50071 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/6139039c8fc5c9dbcdc3ad389b9a6d0cacb4d693 https://git.kernel.org/stable/c/c0bf3c6aa444a5ef44acc57ef6cfa53fd4fc1c9b