Skip to contentSkip to conversation

CVE-2026-89790: ipv6: avoid divide by zero in rt6_multipath_rebalance

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

ipv6: avoid divide by zero in rt6_multipath_rebalance

rt6_multipath_rebalance() calculates the total eligible nexthop weight in one pass and programs upper bounds in a second pass. Since RTM_NEWROUTE is RTNL-free, a concurrent ignore_routes_with_linkdown update can make the first pass return zero while the second sees an eligible nexthop, causing rt6_upper_bound_set() to divide by zero.

UBSAN: division-overflow in net/ipv6/route.c:4845:17
Oops: divide error: 0000 [#1] SMP KASAN NOPTI
  rt6_upper_bound_set() net/ipv6/route.c:4845
  rt6_multipath_rebalance()
  fib6_add_rt2node()
  ip6_route_multipath_add()
  inet6_rtm_newroute()

Skip upper-bound calculation when the first pass reports a zero total. This respects the lock-free performance considerations here and solves insecure scenarios.

The Linux kernel CVE team has assigned CVE-2026-89790 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.16 with commit bd11ff421d36abdb585b9104fa70057bf01b3110 and fixed in 6.18.52 with commit f30cf8fd9872299c0c27f9916252ba2b9f422dce
	Issue introduced in 6.16 with commit bd11ff421d36abdb585b9104fa70057bf01b3110 and fixed in 7.2.6 with commit f82b5dbb2fef65b52a62d5ffe05e0483c4385a83
	Issue introduced in 6.16 with commit bd11ff421d36abdb585b9104fa70057bf01b3110 and fixed in 7.3-rc1 with commit d2c26c2911dd1a363c488add4fb63eb5f0f28f87

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-89790

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/ipv6/route.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/f30cf8fd9872299c0c27f9916252ba2b9f422dce
	https://git.kernel.org/stable/c/f82b5dbb2fef65b52a62d5ffe05e0483c4385a83
	https://git.kernel.org/stable/c/d2c26c2911dd1a363c488add4fb63eb5f0f28f87