ipv4: fib: Don't ignore error route in local/main tables.
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f4530fa574df4d833506c53697ed1daa0d390bf4 · < 828fad4fd418bcdb9f5d66fec0d184c52a85ec31| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ipv4: fib: Don't ignore error route in local/main tables.
When CONFIG_IP_MULTIPLE_TABLES is enabled but no rule is added, fib_lookup() performs route lookup directly on two tables.
Since the first lookup does not properly bail out, the result of an error route in the merged local/main table could be overwritten by another route in the default table:
# unshare -n # ip link set lo up # ip route add 192.168.0.0/24 dev lo table 253 # ip route add unreachable 192.168.0.0/24 # ip route get 192.168.0.1 192.168.0.1 dev lo table default uid 0 cache <local>
Once a random rule is added, the error route is respected:
# ip rule add table 0 # ip rule del table 0 # ip route get 192.168.0.1 RTNETLINK answers: No route to host
Let's fix the inconsistent behaviour.
From the CVE record · Linux
The Linux kernel can ignore an error route in the local/main routing tables when CONFIG_IP_MULTIPLE_TABLES is enabled and no rule has been added. In that configuration, a lookup can return a route from the default table instead of the error route. The input does not establish whether an attacker can trigger this remotely or what access they would need.
Engineers running Linux kernels with CONFIG_IP_MULTIPLE_TABLES enabled should check their systems; affected versions were not provided.