CVE-2024-27010
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
01/05/2024
Last modified:
04/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net/sched: Fix mirred deadlock on device recursion<br />
<br />
When the mirred action is used on a classful egress qdisc and a packet is<br />
mirrored or redirected to self we hit a qdisc lock deadlock.<br />
See trace below.<br />
<br />
[..... other info removed for brevity....]<br />
[ 82.890906]<br />
[ 82.890906] ============================================<br />
[ 82.890906] WARNING: possible recursive locking detected<br />
[ 82.890906] 6.8.0-05205-g77fadd89fe2d-dirty #213 Tainted: G W<br />
[ 82.890906] --------------------------------------------<br />
[ 82.890906] ping/418 is trying to acquire lock:<br />
[ 82.890906] ffff888006994110 (&sch->q.lock){+.-.}-{3:3}, at:<br />
__dev_queue_xmit+0x1778/0x3550<br />
[ 82.890906]<br />
[ 82.890906] but task is already holding lock:<br />
[ 82.890906] ffff888006994110 (&sch->q.lock){+.-.}-{3:3}, at:<br />
__dev_queue_xmit+0x1778/0x3550<br />
[ 82.890906]<br />
[ 82.890906] other info that might help us debug this:<br />
[ 82.890906] Possible unsafe locking scenario:<br />
[ 82.890906]<br />
[ 82.890906] CPU0<br />
[ 82.890906] ----<br />
[ 82.890906] lock(&sch->q.lock);<br />
[ 82.890906] lock(&sch->q.lock);<br />
[ 82.890906]<br />
[ 82.890906] *** DEADLOCK ***<br />
[ 82.890906]<br />
[..... other info removed for brevity....]<br />
<br />
Example setup (eth0->eth0) to recreate<br />
tc qdisc add dev eth0 root handle 1: htb default 30<br />
tc filter add dev eth0 handle 1: protocol ip prio 2 matchall \<br />
action mirred egress redirect dev eth0<br />
<br />
Another example(eth0->eth1->eth0) to recreate<br />
tc qdisc add dev eth0 root handle 1: htb default 30<br />
tc filter add dev eth0 handle 1: protocol ip prio 2 matchall \<br />
action mirred egress redirect dev eth1<br />
<br />
tc qdisc add dev eth1 root handle 1: htb default 30<br />
tc filter add dev eth1 handle 1: protocol ip prio 2 matchall \<br />
action mirred egress redirect dev eth0<br />
<br />
We fix this by adding an owner field (CPU id) to struct Qdisc set after<br />
root qdisc is entered. When the softirq enters it a second time, if the<br />
qdisc owner is the same CPU, the packet is dropped to break the loop.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.2 (including) | 6.8.8 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.9:rc4:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/0f022d32c3eca477fbf79a205243a6123ed0fe11
- https://git.kernel.org/stable/c/e6b90468da4dae2281a6e381107f411efb48b0ef
- https://git.kernel.org/stable/c/0f022d32c3eca477fbf79a205243a6123ed0fe11
- https://git.kernel.org/stable/c/e6b90468da4dae2281a6e381107f411efb48b0ef
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4EZ6PJW7VOZ224TD7N4JZNU6KV32ZJ53/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DAMSOZXJEPUOXW33WZYWCVAY7Z5S7OOY/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GCBZZEC7L7KTWWAS2NLJK6SO3IZIL4WW/



