blob: a6866240550f7b9ec423edc911310603c7927666 [file] [log] [blame]
From bippy-1.2.0 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@kernel.org>
To: <linux-cve-announce@vger.kernel.org>
Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: CVE-2024-26739: net/sched: act_mirred: don't override retval if we already lost the skb
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 e5cf1baf92cb785b90390db1c624948e70c8b8bd and fixed in 5.10.238 with commit 0117fe0a4615a7c8d30d6ebcbf87332fbe63e6fd
Issue introduced in 4.19 with commit e5cf1baf92cb785b90390db1c624948e70c8b8bd and fixed in 5.15.182 with commit 9d3ef89b6a5e9f2e940de2cef3d543be0be8dec5
Issue introduced in 4.19 with commit e5cf1baf92cb785b90390db1c624948e70c8b8bd and fixed in 6.1.136 with commit e873e8f7d03a2ee5b77fb1a305c782fed98e2754
Issue introduced in 4.19 with commit e5cf1baf92cb785b90390db1c624948e70c8b8bd and fixed in 6.6.19 with commit 28cdbbd38a4413b8eff53399b3f872fd4e80db9d
Issue introduced in 4.19 with commit e5cf1baf92cb785b90390db1c624948e70c8b8bd and fixed in 6.7.7 with commit f4e294bbdca8ac8757db436fc82214f3882fc7e7
Issue introduced in 4.19 with commit e5cf1baf92cb785b90390db1c624948e70c8b8bd and fixed in 6.8 with commit 166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210
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/0117fe0a4615a7c8d30d6ebcbf87332fbe63e6fd
https://git.kernel.org/stable/c/9d3ef89b6a5e9f2e940de2cef3d543be0be8dec5
https://git.kernel.org/stable/c/e873e8f7d03a2ee5b77fb1a305c782fed98e2754
https://git.kernel.org/stable/c/28cdbbd38a4413b8eff53399b3f872fd4e80db9d
https://git.kernel.org/stable/c/f4e294bbdca8ac8757db436fc82214f3882fc7e7
https://git.kernel.org/stable/c/166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210