net/sched: Fix ethx:ingress -> ethy:egress -> ethx:ingress mirred loop
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
7.0.127.1In the Linux kernel, the following vulnerability has been resolved:
net/sched: Fix ethx:ingress -> ethy:egress -> ethx:ingress mirred loop
When mirred redirects to ingress (from either ingress or egress) the loop state from sched_mirred_dev array dev is lost because of 1) the packet deferral into the backlog and 2) the fact the sched_mirred_dev array is cleared. In such cases, if there was a loop we won't discover it.
Here's a simple test to reproduce: ip a add dev port0 10.10.10.11/24
tc qdisc add dev port0 clsact tc filter add dev port0 egress protocol ip \ prio 10 matchall action mirred ingress redirect dev port1
tc qdisc add dev port1 clsact tc filter add dev port1 ingress protocol ip \ prio 10 matchall action mirred egress redirect dev port0
ping -c 1 -W0.01 10.10.10.10
From the CVE record · Linux
The Linux kernel's net/sched mirred handling can lose loop-tracking state when a packet is redirected to ingress. With a mirred rule loop configured, a packet can repeatedly traverse ingress and egress redirects without the loop being detected. The input does not specify attacker access or authentication requirements.
Engineers running Linux kernels with tc mirred redirect rules should check their deployments; affected versions are not specified.