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 BDCBB1C286 for ; Thu, 22 Aug 2024 03:32:39 +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=1724297559; cv=none; b=N/azWPfekmgiy1V0qn2KnCVljV3ChxZZZCQ6feQbtLuX9PDIz/jN5B5fPcAdAaihnp8jrYgpqU9NAYtUqn/2mRasSUkXcY875/0S/fDMMuYWRDGEN/HAFipxZ/r0MC3Ym6aV3klKmU8Hvdd1T8uJNAw2nlh+Gg6hy7K35aLryRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724297559; c=relaxed/simple; bh=jfAnrZz21PgI5atffT1Wmsh+2kuTE5FBgnA/u4Dnphw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=h57hDYuMn/5DRryGy+I1sbw0MQ/uFDRebeXHz9RPket7ykZz5bu2aWejHdP28u89KLq51GDOTvxZu+DllGPFSYBGnp0lqFYcfUKaplLNDkiTo6n1vnZrDHDtkDalKU/fsXZKJ5+G6Pew73KWGh9JIEfukvoBp6f5o39WSGIIAF4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Bcko6w4U; 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="Bcko6w4U" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DBB8C4AF09; Thu, 22 Aug 2024 03:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1724297559; bh=jfAnrZz21PgI5atffT1Wmsh+2kuTE5FBgnA/u4Dnphw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Bcko6w4UUJcqpjwIN5IdXIryNHoV336rxr8sXMwyGdyCVHc/yti8gSdUI1S8Igjt+ 9WHCK04crGnuGoG6xFivJPFTg9udERy36IdzUmJIxlv6sn7NQpxS4k0YDKP74Q/k0N vZebgqscgSwmyHuRpIUl+Bj+3NLmadNoZzE4RaIU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48906: mptcp: Correctly set DATA_FIN timeout when number of retransmits is large Date: Thu, 22 Aug 2024 11:31:07 +0800 Message-ID: <2024082213-CVE-2022-48906-76db@gregkh> X-Mailer: git-send-email 2.46.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=3281; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=jfAnrZz21PgI5atffT1Wmsh+2kuTE5FBgnA/u4Dnphw=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnHNjKyH3XaJHomckm0uYf3BpbFYk3TfD84pN749fnL3 FWnDZfYdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE8u8wzHdK5akR3Ny0hNOl WdCgW7pv6bWQfQwL2rLOH567a7K5YrX/d4u5asbbUmomAgA= 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: Correctly set DATA_FIN timeout when number of retransmits is large Syzkaller with UBSAN uncovered a scenario where a large number of DATA_FIN retransmits caused a shift-out-of-bounds in the DATA_FIN timeout calculation: ================================================================================ UBSAN: shift-out-of-bounds in net/mptcp/protocol.c:470:29 shift exponent 32 is too large for 32-bit type 'unsigned int' CPU: 1 PID: 13059 Comm: kworker/1:0 Not tainted 5.17.0-rc2-00630-g5fbf21c90c60 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Workqueue: events mptcp_worker Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 ubsan_epilogue+0xb/0x5a lib/ubsan.c:151 __ubsan_handle_shift_out_of_bounds.cold+0xb2/0x20e lib/ubsan.c:330 mptcp_set_datafin_timeout net/mptcp/protocol.c:470 [inline] __mptcp_retrans.cold+0x72/0x77 net/mptcp/protocol.c:2445 mptcp_worker+0x58a/0xa70 net/mptcp/protocol.c:2528 process_one_work+0x9df/0x16d0 kernel/workqueue.c:2307 worker_thread+0x95/0xe10 kernel/workqueue.c:2454 kthread+0x2f4/0x3b0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 ================================================================================ This change limits the maximum timeout by limiting the size of the shift, which keeps all intermediate values in-bounds. The Linux kernel CVE team has assigned CVE-2022-48906 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit 6477dd39e62c and fixed in 5.15.27 with commit 0c3f34beb459 Issue introduced in 5.13 with commit 6477dd39e62c and fixed in 5.16.13 with commit 03ae283bd71f Issue introduced in 5.13 with commit 6477dd39e62c and fixed in 5.17 with commit 877d11f0332c Issue introduced in 5.12.4 with commit 0af76111c2a6 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-48906 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 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/0c3f34beb459753f9f80d0cc14c1b50ab615c631 https://git.kernel.org/stable/c/03ae283bd71f761feae3f402668d698b393b0e79 https://git.kernel.org/stable/c/877d11f0332cd2160e19e3313e262754c321fa36