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 39A271DDC28 for ; Wed, 18 Jun 2025 11:10:06 +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=1750245006; cv=none; b=aafs9niXwUUsWQ4UP5JU0cLW71/1ZCHwgwQFDVPEfF+4l52Uv8DyoZfkanT0A1uh78Fmcqms3rS/8btG5IjNKXGrdavH57yNmtOXNGchhBXnMxBNGxZoy7wqJafQb982Vy8pxjvwCUiXZ0lx2CfupmK8vEWKf4caVcBCLGW5044= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245006; c=relaxed/simple; bh=T4SGxWd2iWZbMFxSy28iZgZvJevoe7wCtrUtmvFRUbM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Dd+yp9tpRv88ntUZ6HzGjpe1KSMzsnVSbRq6c4mA/cLBoxsOeztYnvnGUXoJZgy3dYrG3Uo3cENrttC+o1jWvKcT5RQxph0AbiUrdTqjN9asZIXCFs2BzLs1dmbSqfeOW80Fgged26ZmbrHzvkt7HvEKIOEObM90aeVw40DNI8w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NtVMWk5a; 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="NtVMWk5a" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9ADE2C4CEE7; Wed, 18 Jun 2025 11:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750245006; bh=T4SGxWd2iWZbMFxSy28iZgZvJevoe7wCtrUtmvFRUbM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=NtVMWk5aBuamVu7hqjcsejQi+oWzRGSXoEmtUw92qKIMQgIkqTTFpT1+flBE4+gs/ 80455vl6UuGTdXXcDDLXs8Fmj2fzHvdB72UK1xpeKJ7qLGVI5NHCjtYxa/nBbp3mqt 79qIOGp65lk6yL9HWegXqjOpHDoKB7Q3Vgmt8uck= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50070: mptcp: do not queue data on closed subflows Date: Wed, 18 Jun 2025 13:02:15 +0200 Message-ID: <2025061853-CVE-2022-50070-87b5@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=4066; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=p+hNfnQutzY0s7LNx8Oh2/h71i4YaLWNxhOMuQfcphI=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc1K5t9U9zdPoOPCDwURjWc3Buu4tXbMrhKq0/ZoPF 78rubSiI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbCnM2wYEnFYmeLKXwiz09M 2lV/cw5XxhqGPQwLmmo8v8UEfHVMcV16ZLLOq9eFRaZhAA== 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: do not queue data on closed subflows Dipanjan reported a syzbot splat at close time: WARNING: CPU: 1 PID: 10818 at net/ipv4/af_inet.c:153 inet_sock_destruct+0x6d0/0x8e0 net/ipv4/af_inet.c:153 Modules linked in: uio_ivshmem(OE) uio(E) CPU: 1 PID: 10818 Comm: kworker/1:16 Tainted: G OE 5.19.0-rc6-g2eae0556bb9d #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Workqueue: events mptcp_worker RIP: 0010:inet_sock_destruct+0x6d0/0x8e0 net/ipv4/af_inet.c:153 Code: 21 02 00 00 41 8b 9c 24 28 02 00 00 e9 07 ff ff ff e8 34 4d 91 f9 89 ee 4c 89 e7 e8 4a 47 60 ff e9 a6 fc ff ff e8 20 4d 91 f9 <0f> 0b e9 84 fe ff ff e8 14 4d 91 f9 0f 0b e9 d4 fd ff ff e8 08 4d RSP: 0018:ffffc9001b35fa78 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000002879d0 RCX: ffff8881326f3b00 RDX: 0000000000000000 RSI: ffff8881326f3b00 RDI: 0000000000000002 RBP: ffff888179662674 R08: ffffffff87e983a0 R09: 0000000000000000 R10: 0000000000000005 R11: 00000000000004ea R12: ffff888179662400 R13: ffff888179662428 R14: 0000000000000001 R15: ffff88817e38e258 FS: 0000000000000000(0000) GS:ffff8881f5f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020007bc0 CR3: 0000000179592000 CR4: 0000000000150ee0 Call Trace: __sk_destruct+0x4f/0x8e0 net/core/sock.c:2067 sk_destruct+0xbd/0xe0 net/core/sock.c:2112 __sk_free+0xef/0x3d0 net/core/sock.c:2123 sk_free+0x78/0xa0 net/core/sock.c:2134 sock_put include/net/sock.h:1927 [inline] __mptcp_close_ssk+0x50f/0x780 net/mptcp/protocol.c:2351 __mptcp_destroy_sock+0x332/0x760 net/mptcp/protocol.c:2828 mptcp_worker+0x5d2/0xc90 net/mptcp/protocol.c:2586 process_one_work+0x9cc/0x1650 kernel/workqueue.c:2289 worker_thread+0x623/0x1070 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302 The root cause of the problem is that an mptcp-level (re)transmit can race with mptcp_close() and the packet scheduler checks the subflow state before acquiring the socket lock: we can try to (re)transmit on an already closed ssk. Fix the issue checking again the subflow socket status under the subflow socket lock protection. Additionally add the missing check for the fallback-to-tcp case. The Linux kernel CVE team has assigned CVE-2022-50070 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit d5f49190def61c47b2faff170ba8fbc48bac4371 and fixed in 5.19.4 with commit 8caf5c15b5288d52d9c89374d6c10fa32ee84ec5 Issue introduced in 5.10 with commit d5f49190def61c47b2faff170ba8fbc48bac4371 and fixed in 6.0 with commit c886d70286bf3ad411eb3d689328a67f7102c6ae 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-50070 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 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/8caf5c15b5288d52d9c89374d6c10fa32ee84ec5 https://git.kernel.org/stable/c/c886d70286bf3ad411eb3d689328a67f7102c6ae