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 6F4591D14FA for ; Tue, 19 Nov 2024 17:20:27 +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=1732036828; cv=none; b=mLeWl9gsEsLQUMix8g6FfnrCNbH8kCBEB4zaZRx2hfskVWoTWLMTEiY9w887rVfwDc1hRGNzO1XiIK7LF6Vm92gjSx4l4VAnl8N5ngdOTk04x6sbWGh5HpcCOo27MLyzPZcHi/IHv0K0t5zjI1LVXiDx2dGnoeSYcxsgh4Zygqs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732036828; c=relaxed/simple; bh=3aYxR8TzenkJmI0CMkkz9w+8fAXANX1c/UdGUB4dLFE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Waz24mbmV0cVG9pVvwPlsgx3BsTbjpZzQZf8Lg6NK1Rx2UIgkutIxlJ7iCh7m0WqpFA3eYRyTjvR0SVYeeTRmYvenHsAmW4ZOhE9GeuqxoZ/0vfHZaNhZhyRy5nSyiS+vWew2PVZR8DKdQIMusgWBn3MSsF3HawSKZ24H8GIPfY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GJ20yikG; 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="GJ20yikG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3AFBC4CED0; Tue, 19 Nov 2024 17:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1732036826; bh=3aYxR8TzenkJmI0CMkkz9w+8fAXANX1c/UdGUB4dLFE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=GJ20yikGlJRlTq90y07aFVtDOFbfA9jkgiu60Vz8BMhRtw6DJmgMNv3nwj8GCB4f5 5obe6kgMr2RogkWHsIqZyb2yHl4nCMJysPdWwbMsi9Ozkhrh6p+oKbfCYKDUlU16eI qtaHoc4Oea4x7xtXlR+JwgvUY8jCe2Q0UUHsVE4U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53047: mptcp: init: protect sched with rcu_read_lock Date: Tue, 19 Nov 2024 18:19:29 +0100 Message-ID: <2024111926-CVE-2024-53047-8214@gregkh> X-Mailer: git-send-email 2.47.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=3440; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3aYxR8TzenkJmI0CMkkz9w+8fAXANX1c/UdGUB4dLFE=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk2J+bJHJZft6tXX+pY3tMe/WWBRfPPWnjnnN28w9769 Fe9J9O5O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiLh8Y5so1tHPJ6f+97r6A a63uXS6DH/1hfxkWTLxYM3G3KuMl6/+GfVK2zyMeKkjMAwA= 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: init: protect sched with rcu_read_lock Enabling CONFIG_PROVE_RCU_LIST with its dependence CONFIG_RCU_EXPERT creates this splat when an MPTCP socket is created: ============================= WARNING: suspicious RCU usage 6.12.0-rc2+ #11 Not tainted ----------------------------- net/mptcp/sched.c:44 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 no locks held by mptcp_connect/176. stack backtrace: CPU: 0 UID: 0 PID: 176 Comm: mptcp_connect Not tainted 6.12.0-rc2+ #11 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 Call Trace: dump_stack_lvl (lib/dump_stack.c:123) lockdep_rcu_suspicious (kernel/locking/lockdep.c:6822) mptcp_sched_find (net/mptcp/sched.c:44 (discriminator 7)) mptcp_init_sock (net/mptcp/protocol.c:2867 (discriminator 1)) ? sock_init_data_uid (arch/x86/include/asm/atomic.h:28) inet_create.part.0.constprop.0 (net/ipv4/af_inet.c:386) ? __sock_create (include/linux/rcupdate.h:347 (discriminator 1)) __sock_create (net/socket.c:1576) __sys_socket (net/socket.c:1671) ? __pfx___sys_socket (net/socket.c:1712) ? do_user_addr_fault (arch/x86/mm/fault.c:1419 (discriminator 1)) __x64_sys_socket (net/socket.c:1728) do_syscall_64 (arch/x86/entry/common.c:52 (discriminator 1)) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) That's because when the socket is initialised, rcu_read_lock() is not used despite the explicit comment written above the declaration of mptcp_sched_find() in sched.c. Adding the missing lock/unlock avoids the warning. The Linux kernel CVE team has assigned CVE-2024-53047 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit 1730b2b2c5a5 and fixed in 6.6.60 with commit cb8b81ad3e89 Issue introduced in 6.6 with commit 1730b2b2c5a5 and fixed in 6.11.7 with commit 494eb22f9a7b Issue introduced in 6.6 with commit 1730b2b2c5a5 and fixed in 6.12 with commit 3deb12c788c3 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-2024-53047 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/cb8b81ad3e893a6d18dcdd3754cc2ea2a42c0136 https://git.kernel.org/stable/c/494eb22f9a7bd03783e60595a57611c209175f1a https://git.kernel.org/stable/c/3deb12c788c385e17142ce6ec50f769852fcec65