CVE-2026-99121: ipv4: avoid divide by zero in fib_rebalance
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ipv4: avoid divide by zero in fib_rebalance
fib_rebalance() computes the total eligible nexthop weight in one pass and programs upper bounds in a second pass. A concurrent change to ignore_routes_with_linkdown can make the first pass return zero while the second pass sees an eligible nexthop, resulting in division by zero.
If the first pass reports a zero total, set each nexthop upper bound to -1 and skip the division. This matches the IPv6 fix in commit d2c26c2911dd ("ipv6: avoid divide by zero in rt6_multipath_rebalance") and preserves the lock-free rebalance path.
The Linux kernel CVE team has assigned CVE-2026-99121 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.4 with commit 0e884c78ee19e902f300ed147083c28a0c6302f0 and fixed in 6.18.59 with commit 5dac5c7ba8f5f3fb4bf29f2a2c3cb552f5b83c8f Issue introduced in 4.4 with commit 0e884c78ee19e902f300ed147083c28a0c6302f0 and fixed in 7.2.13 with commit d5520e815c4b1427104ce1428ee23821f2aa824d Issue introduced in 4.4 with commit 0e884c78ee19e902f300ed147083c28a0c6302f0 and fixed in 7.3 with commit 5046d2880fec7d49ebed2fd2866747ee1d06ad71
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-2026-99121
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/ipv4/fib_semantics.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/5dac5c7ba8f5f3fb4bf29f2a2c3cb552f5b83c8f https://git.kernel.org/stable/c/d5520e815c4b1427104ce1428ee23821f2aa824d https://git.kernel.org/stable/c/5046d2880fec7d49ebed2fd2866747ee1d06ad71