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 799408633E for ; Sat, 28 Dec 2024 09:48:19 +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=1735379299; cv=none; b=aM0Iexx0DPgNhuCde6tnj4i7TvxFMyeb+fhD5L+jxedfPiypHwQKWnpQXv49dKwgpxjyeZSt9znMXVlWWAl9usmljZyFR2qdOCS+mcUK+7UT6I0Xw87SJGYLfaSzeZ3XiXDYALHCBcpntjEpmnINpEr3GUFuj2rCM9HHbJTYdCY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735379299; c=relaxed/simple; bh=ZrM7WnLPjeeWzgAD2xtO9CVSzAYq6R8L2Lg2vzCApJc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tky0i+jMeTYgu6p6+J/E3Wk+EsJVvh3w3GWNhw3O8y6q5jbY42ObUz0fBnrcogWqoAS6EVfGHjV5SGL3SeywwZwkt3YqvR69TnUPW5KKBQmOSVH04wgEOCsdN0JRphyaCsumyE2LF+7HcUVHkmP1I55uJvWL7mDcNYS1tqTkPVc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=v3Yiqkqo; 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="v3Yiqkqo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 019AAC4CECD; Sat, 28 Dec 2024 09:48:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735379299; bh=ZrM7WnLPjeeWzgAD2xtO9CVSzAYq6R8L2Lg2vzCApJc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=v3Yiqkqo13gzokcnZ2e+3xvfcTYW+8NhoHpLV9MF/WXPfGZePSN/5L6UaXKsbOlSH Zn6avE3iQCCltPOO8K08bzLPNKOp/6CKvROommg5pU32a8BpFIOErmLj/KH+V9ReIH IynFJDuSlfxwkpDrS1dfudUQxoOlcaRVTt9eisyA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56694: bpf: fix recursive lock when verdict program return SK_PASS Date: Sat, 28 Dec 2024 10:45:46 +0100 Message-ID: <2024122835-CVE-2024-56694-c701@gregkh> X-Mailer: git-send-email 2.47.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=3838; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ZrM7WnLPjeeWzgAD2xtO9CVSzAYq6R8L2Lg2vzCApJc=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn5J/bv2R36M/ZF51/Dv7c1GnRfJqZl6q5rbv+dsOu38 4oXy+PlO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi70wY5plvnniTL8y6RMhh Yp9O9fPGE/MleRkWbGXoMuo9EHej93uJveYTroKeqv+/AQ== 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: bpf: fix recursive lock when verdict program return SK_PASS When the stream_verdict program returns SK_PASS, it places the received skb into its own receive queue, but a recursive lock eventually occurs, leading to an operating system deadlock. This issue has been present since v6.9. ''' sk_psock_strp_data_ready write_lock_bh(&sk->sk_callback_lock) strp_data_ready strp_read_sock read_sock -> tcp_read_sock strp_recv cb.rcv_msg -> sk_psock_strp_read # now stream_verdict return SK_PASS without peer sock assign __SK_PASS = sk_psock_map_verd(SK_PASS, NULL) sk_psock_verdict_apply sk_psock_skb_ingress_self sk_psock_skb_ingress_enqueue sk_psock_data_ready read_lock_bh(&sk->sk_callback_lock) <= dead lock ''' This topic has been discussed before, but it has not been fixed. Previous discussion: https://lore.kernel.org/all/6684a5864ec86_403d20898@john.notmuch The Linux kernel CVE team has assigned CVE-2024-56694 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15.159 with commit 5965bc7535fb87510b724e5465ccc1a1cf00916d and fixed in 5.15.174 with commit 6694f7acd625ed854bf6342926e771d65dad7f69 Issue introduced in 6.1.91 with commit 39dc9e1442385d6e9be0b6491ee488dddd55ae27 and fixed in 6.1.120 with commit 386efa339e08563dd33e83bc951aea5d407fe578 Issue introduced in 6.6.31 with commit b397a0ab8582c533ec0c6b732392f141fc364f87 and fixed in 6.6.64 with commit da2bc8a0c8f3ac66fdf980fc59936f851a083561 Issue introduced in 6.9 with commit 6648e613226e18897231ab5e42ffc29e63fa3365 and fixed in 6.11.11 with commit 01f1b88acfd79103da0610b45471f6c88ea98d72 Issue introduced in 6.9 with commit 6648e613226e18897231ab5e42ffc29e63fa3365 and fixed in 6.12.2 with commit f84c5ef6ca23cc2f72f3b830d74f67944684bb05 Issue introduced in 6.9 with commit 6648e613226e18897231ab5e42ffc29e63fa3365 and fixed in 6.13-rc1 with commit 8ca2a1eeadf09862190b2810697702d803ceef2d Issue introduced in 5.10.223 with commit c0809c128dad4c3413818384eb06a341633db973 Issue introduced in 6.8.10 with commit 772d5729b5ff0df0d37b32db600ce635b2172f80 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-56694 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/core/skmsg.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/6694f7acd625ed854bf6342926e771d65dad7f69 https://git.kernel.org/stable/c/386efa339e08563dd33e83bc951aea5d407fe578 https://git.kernel.org/stable/c/da2bc8a0c8f3ac66fdf980fc59936f851a083561 https://git.kernel.org/stable/c/01f1b88acfd79103da0610b45471f6c88ea98d72 https://git.kernel.org/stable/c/f84c5ef6ca23cc2f72f3b830d74f67944684bb05 https://git.kernel.org/stable/c/8ca2a1eeadf09862190b2810697702d803ceef2d