CVE-2026-64538: ipv6: Fix null-ptr-deref in fib6_nh_mtu_change().

Greg Kroah-Hartman <[email protected]> Mon, 27 Jul 2026 22:10:36 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072735-CVE-2026-64538-1a88@gregkh>
From: Greg Kroah-Hartman <[email protected]>

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

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

ipv6: Fix null-ptr-deref in fib6_nh_mtu_change().

fib6_nh_mtu_change() re-fetches idev via __in6_dev_get(arg->dev) and
dereferences idev->cnf.mtu6 without a NULL check. addrconf_ifdown()
clears dev->ip6_ptr with RCU_INIT_POINTER() after rt6_disable_ip() has
released tb6_lock, so the RA-driven MTU walk can observe a NULL idev and
oops. The caller rt6_mtu_change_route() guards its own __in6_dev_get(),
but this re-fetch is unguarded; nexthop-backed routes survive
addrconf_ifdown()'s flush, so the walk still reaches it after ip6_ptr is
nulled.

Return 0 when idev is NULL, matching rt6_mtu_change_route() and the
fib6_mtu() fix in commit 5ad509c1fdad ("ipv6: Fix null-ptr-deref in
fib6_mtu().").

  Oops: general protection fault, ... KASAN: null-ptr-deref in range
        [0x00000000000002a8-0x00000000000002af]
  RIP: 0010:fib6_nh_mtu_change+0x203/0x990
   rt6_mtu_change_route+0x141/0x1d0
   __fib6_clean_all+0xd0/0x160
   rt6_mtu_change+0xb4/0x100
   ndisc_router_discovery+0x24b5/0x2cb0
   icmpv6_rcv+0x12e9/0x1710
   ipv6_rcv+0x39b/0x410

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


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

	Issue introduced in 5.3 with commit c0b220cf7d80eb8a36ae9f12cae6df4577a6814e and fixed in 5.10.261 with commit d08d019f2f43a6f9a71e81868bbc326b3afaf37b
	Issue introduced in 5.3 with commit c0b220cf7d80eb8a36ae9f12cae6df4577a6814e and fixed in 5.15.212 with commit 1451deca9896957159f0666520a792c1b861af4f
	Issue introduced in 5.3 with commit c0b220cf7d80eb8a36ae9f12cae6df4577a6814e and fixed in 6.1.178 with commit b2c70dd3326809429b709a9c7e9220d29923051a
	Issue introduced in 5.3 with commit c0b220cf7d80eb8a36ae9f12cae6df4577a6814e and fixed in 6.6.145 with commit 302d57ed7872838b40e56a868fb4c7da7da606e9
	Issue introduced in 5.3 with commit c0b220cf7d80eb8a36ae9f12cae6df4577a6814e and fixed in 6.12.97 with commit 80600b5d0f3ecb9324120dc95b5e915130f516c5
	Issue introduced in 5.3 with commit c0b220cf7d80eb8a36ae9f12cae6df4577a6814e and fixed in 6.18.40 with commit b0d0eb13a0441a8ebf4f227843deaf494f1e2c33
	Issue introduced in 5.3 with commit c0b220cf7d80eb8a36ae9f12cae6df4577a6814e and fixed in 7.1.5 with commit 6428634f7a0b7878144b4925c37856bef3224967
	Issue introduced in 5.3 with commit c0b220cf7d80eb8a36ae9f12cae6df4577a6814e and fixed in 7.2-rc1 with commit 46c3b8191aad3d032776bf3bebf03efdf5f4b905

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-64538
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/d08d019f2f43a6f9a71e81868bbc326b3afaf37b
	https://git.kernel.org/stable/c/1451deca9896957159f0666520a792c1b861af4f
	https://git.kernel.org/stable/c/b2c70dd3326809429b709a9c7e9220d29923051a
	https://git.kernel.org/stable/c/302d57ed7872838b40e56a868fb4c7da7da606e9
	https://git.kernel.org/stable/c/80600b5d0f3ecb9324120dc95b5e915130f516c5
	https://git.kernel.org/stable/c/b0d0eb13a0441a8ebf4f227843deaf494f1e2c33
	https://git.kernel.org/stable/c/6428634f7a0b7878144b4925c37856bef3224967
	https://git.kernel.org/stable/c/46c3b8191aad3d032776bf3bebf03efdf5f4b905