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 92D42153822 for ; Wed, 3 Apr 2024 17:31:33 +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=1712165493; cv=none; b=gjZRfhUmot8gLb4uDmxRV5ivBM/AADonWOOrAjAwh9HWdJFzb11cwmX3fKAlK+AJ59dgEtSNdh9m+QslKDQjRazs4e9rP5xpYD1Uzrscy9YX6Nk0G/Wvr1tgBcgdE4tMhs3i2vjYM9MkzwwDxTsMM5NfQ0qMrDGuC+HJjgn7fhc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712165493; c=relaxed/simple; bh=qMGFp9At34AoLgoHZnZ9hy92dFmdn3o1a8UkFB5rr5I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NtECB7SMPePPLpvBgwDaSdqHC2u854V7QOee32KkhbXBSSKUMGzFBVoLCFzcnbhmnUJyyTSuevJsTeGWEWmvlkKgh+Jh3hprHtHT/c277OitEF6oGqxKcbBb2G78fr1fzOJIRx4J4hKknqlYJF0oRZe2s7htka2rwFI0EtFKWGg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2H449HGT; 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="2H449HGT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5ED9C433F1; Wed, 3 Apr 2024 17:31:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712165493; bh=qMGFp9At34AoLgoHZnZ9hy92dFmdn3o1a8UkFB5rr5I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=2H449HGTOBnWTAFeiBl1S74MFepUPUAjU8gaOJlb4Ar549Jz2AviK6san/zeWWI06 D+uYOMID+o4m/6ZMahR9BF5oW/Rkwld2EbneVVF7H6JT72XyJ22hD0hdjC4CqeStHH nbt+FF+1D1ebyDpP6uZfIO6tXVuxn2Ha+CrJV8Uc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26739: net/sched: act_mirred: don't override retval if we already lost the skb Date: Wed, 3 Apr 2024 19:31:09 +0200 Message-ID: <2024040300-CVE-2024-26739-170e@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=2170; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qMGFp9At34AoLgoHZnZ9hy92dFmdn3o1a8UkFB5rr5I=; b=owGbwMvMwCRo6H6F97bub03G02pJDGm8k0K6nsxO3SX7xVlMLvUsX4DSIi0FJ910rscuXzJfi Sx49MKxI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbyOY5hfoZ4hdNfvt2/KzT2 tXrXcvE8FWM7wrCgdWrZEtfP0o5/L+to7hZ47LJs6QYJAA== 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: don't override retval if we already lost the skb If we're redirecting the skb, and haven't called tcf_mirred_forward(), yet, we need to tell the core to drop the skb by setting the retcode to SHOT. If we have called tcf_mirred_forward(), however, the skb is out of our hands and returning SHOT will lead to UaF. Move the retval override to the error path which actually need it. The Linux kernel CVE team has assigned CVE-2024-26739 to this issue. Affected and fixed versions =========================== Issue introduced in 4.19 with commit e5cf1baf92cb and fixed in 6.6.19 with commit 28cdbbd38a44 Issue introduced in 4.19 with commit e5cf1baf92cb and fixed in 6.7.7 with commit f4e294bbdca8 Issue introduced in 4.19 with commit e5cf1baf92cb and fixed in 6.8 with commit 166c2c8a6a4d 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-26739 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 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/28cdbbd38a4413b8eff53399b3f872fd4e80db9d https://git.kernel.org/stable/c/f4e294bbdca8ac8757db436fc82214f3882fc7e7 https://git.kernel.org/stable/c/166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210