From mboxrd@z Thu Jan 1 00:00:00 1970 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 7259721A94D for ; Wed, 26 Feb 2025 02:25:02 +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=1740536702; cv=none; b=TaSNmLGYxIG34isW80JiEdUEg1bPtNypQmzDoPLePhZN0p4Z86xacVPJMiZoTSc8f+nXA4Hz5susHmf+uRGlKgeRJdqMdHy279wpE64d4+dee41TxIFu9rYJqtR8BizeMC2PjXhlUtn5hdTKdJwtOib9cta9Ld9IV4+b2MywmlA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536702; c=relaxed/simple; bh=mqyOM+gsrB5BSfi3Yng3fu2wH6arqbHjvy0cr67b1CA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ERpFrR3B2GwLvUDOog1FJle80CEKVoDsMI1Uyapo6Zg8nnwmeDFDH0e45deDgQ+0K6Cd9gPdobTlRqg2mMAcb/lz+Abi/CVpexvRePv+ViztCqrIVoySIUK++3a6BbBKy7xLiKqQwA1bxMzEqs6R/NjpSOeg82b5vzR0SJq/+JQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SZGiCRZZ; 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="SZGiCRZZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 463C8C4CEDD; Wed, 26 Feb 2025 02:25:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536702; bh=mqyOM+gsrB5BSfi3Yng3fu2wH6arqbHjvy0cr67b1CA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=SZGiCRZZc/f49+kfhV46dJFsQk16mAL0PwN5vvP0ueMSh4cd+Evg1y2mgpW0rte8M AqxLT7jgLdnybRphU2238TfgRU1ZzSlDaF9J9JxohHkw0WXogU9OEYhOv8jFed52gt qHFisELYGJkRtrHkD1iUnqlPyGRqJe7g4q51FT40= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49669: mptcp: fix race on unaccepted mptcp sockets Date: Wed, 26 Feb 2025 03:23:52 +0100 Message-ID: <2025022623-CVE-2022-49669-44d5@gregkh> X-Mailer: git-send-email 2.48.1 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=2460; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=mqyOM+gsrB5BSfi3Yng3fu2wH6arqbHjvy0cr67b1CA=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qu4fb364j03hpVHby10JB5/ciooUOr7kdmWzdGjmt j/f/yy40BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATmXKCYX7sDm3vx4lrF975 /VF3U8q5giwDjuMM82weNh6LXSvw78X3u2ULrVdbLb0jNx8A X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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