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 522311553BD for ; Wed, 3 Apr 2024 17:31:36 +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=1712165497; cv=none; b=FhOW/0kRLe1vDJeQpFT2Pch/Y3njtNmsXX0J+O4yUXYbdI6JHxhsBhspNgUOBkAiOODNLpbogwnW6J3XQ7TFCvIY9O4JWQTUxY95HzFro+NNCty/Ks6Iarjc2L4ExAZHZh70jDE5vu/YyFu7sMv9xrB8VKWk72Gwv4IDkEt9ivw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712165497; c=relaxed/simple; bh=Nq/FZCQ5BuMkZh6xOgqkaoJ+iRTN1IcRIuLQUvzRtzM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Wh4WGTBU867G7tmBaeGB+43fP6k+GgRQgm0WNkgSSvw5PVlIRDvAwQRRzSb3Tx5uuN/5/nE/htyR+PFKqdyJtgoLWZZwfJ9ud25krpO8m9I7DpUyp6bLr+2zt6ybY83b7bDCh8LXvIFa1Ze4ISI+drTf7u1yMj09ns/bncS3dlM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KEzD7YOg; 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="KEzD7YOg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EF02C433C7; Wed, 3 Apr 2024 17:31:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712165496; bh=Nq/FZCQ5BuMkZh6xOgqkaoJ+iRTN1IcRIuLQUvzRtzM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KEzD7YOg8XBM6aLlb2bZnuYDIpyqpABnJF2PdwTgZGBSwyD1YHyzf+RNfK7Jz4nU4 MjkNEWW8p3qd/uyLzlRChC25IjNn1Zsv20G0X+1/7Gn+LtOKHJLm8lHayoLWpeGCC1 rJwduKv8v5l0PFXoxLeA3pGXMvUxt8OYKcdE/1K8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26740: net/sched: act_mirred: use the backlog for mirred ingress Date: Wed, 3 Apr 2024 19:31:10 +0200 Message-ID: <2024040300-CVE-2024-26740-4d6f@gregkh> X-Mailer: git-send-email 2.44.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=2745; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Nq/FZCQ5BuMkZh6xOgqkaoJ+iRTN1IcRIuLQUvzRtzM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGm8k0IOuVSJe/KH3flotYMzp1w/rFk8fpfR+xaXVFW5C nbDJZs6YlkYBJkYZMUUWb5s4zm6v+KQopeh7WmYOaxMIEMYuDgFYCLbTBgWHOS7fO7+tYYA3/ev 1aUfTDXW2c9ZzTBXLvj8jhk3p5UvWJfs3DxxoVKi25l2AA== 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: net/sched: act_mirred: use the backlog for mirred ingress The test Davide added in commit ca22da2fbd69 ("act_mirred: use the backlog for nested calls to mirred ingress") hangs our testing VMs every 10 or so runs, with the familiar tcp_v4_rcv -> tcp_v4_rcv deadlock reported by lockdep. The problem as previously described by Davide (see Link) is that if we reverse flow of traffic with the redirect (egress -> ingress) we may reach the same socket which generated the packet. And we may still be holding its socket lock. The common solution to such deadlocks is to put the packet in the Rx backlog, rather than run the Rx path inline. Do that for all egress -> ingress reversals, not just once we started to nest mirred calls. In the past there was a concern that the backlog indirection will lead to loss of error reporting / less accurate stats. But the current workaround does not seem to address the issue. The Linux kernel CVE team has assigned CVE-2024-26740 to this issue. Affected and fixed versions =========================== Issue introduced in 4.10 with commit 53592b364001 and fixed in 6.6.19 with commit 7c787888d164 Issue introduced in 4.10 with commit 53592b364001 and fixed in 6.7.7 with commit 60ddea1600bc Issue introduced in 4.10 with commit 53592b364001 and fixed in 6.8 with commit 52f671db1882 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-26740 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/sched/act_mirred.c tools/testing/selftests/net/forwarding/tc_actions.sh 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/7c787888d164689da8b1b115f3ef562c1e843af4 https://git.kernel.org/stable/c/60ddea1600bc476e0f5e02bce0e29a460ccbf0be https://git.kernel.org/stable/c/52f671db18823089a02f07efc04efdb2272ddc17