ipv6: Fix ECMP sibling count mismatch when clearing RTF_ADDRCONF
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
| No fix yet |
In the Linux kernel, the following vulnerability has been resolved:
ipv6: Fix ECMP sibling count mismatch when clearing RTF_ADDRCONF
syzbot reported a kernel BUG in fib6_add_rt2node() when adding an IPv6 route. [0]
Commit f72514b3c569 ("ipv6: clear RA flags when adding a static route") introduced logic to clear RTF_ADDRCONF from existing routes when a static route with the same nexthop is added. However, this causes a problem when the existing route has a gateway.
When RTF_ADDRCONF is cleared from a route that has a gateway, that route becomes eligible for ECMP, i.e. rt6_qualify_for_ecmp() returns true. The issue is that this route was never added to the fib6_siblings list.
This leads to a mismatch between the following counts:
- The sibling count computed by iterating fib6_next chain, which includes the newly ECMP-eligible route
- The actual siblings in fib6_siblings list, which does not include that route
From the CVE record · Linux
The Linux kernel can miscount IPv6 ECMP routes after clearing a flag on an existing route with a gateway. Adding a subsequent ECMP route can trigger a kernel BUG. The reported crash occurred during local route addition; the input does not establish authentication requirements or user interaction.
Engineers running the Linux kernel should check their kernel version against the vendor advisory; affected versions are not specified in the input.