CVE-2026-98031: nexthop: Initialize extack in remove_nh_grp_entry()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
nexthop: Initialize extack in remove_nh_grp_entry()
remove_nh_grp_entry() prints the extack message when a listener fails to replace the reduced nexthop group. However, extack is not initialized and listeners are not required to set a message when returning an error. Neither netdevsim nor mlxsw do so when an allocation fails, resulting in the dereference of an uninitialized stack pointer.
Fix by zero-initializing extack, as was done in commit 6347c5314cee ("nexthop: initialize extack in nh_res_bucket_migrate()").
The Linux kernel CVE team has assigned CVE-2026-98031 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.11 with commit 833a1065eeb14437a9a0dfa9dad06ea09894e0b5 and fixed in 6.12.111 with commit 030c878eaedf0449e2b5401a0a0146d0afcc645e Issue introduced in 5.11 with commit 833a1065eeb14437a9a0dfa9dad06ea09894e0b5 and fixed in 6.18.53 with commit d643cea4248668dc493c513aa7cbc6505eb1a4a9 Issue introduced in 5.11 with commit 833a1065eeb14437a9a0dfa9dad06ea09894e0b5 and fixed in 7.2.7 with commit d80677ad7aa5bebfccfd58caa4852b65abe70561 Issue introduced in 5.11 with commit 833a1065eeb14437a9a0dfa9dad06ea09894e0b5 and fixed in 7.3-rc3 with commit 5bd9e4e7cdaa03879e9b73b12ab52cceb1edd55b
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-98031
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/nexthop.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/030c878eaedf0449e2b5401a0a0146d0afcc645e https://git.kernel.org/stable/c/d643cea4248668dc493c513aa7cbc6505eb1a4a9 https://git.kernel.org/stable/c/d80677ad7aa5bebfccfd58caa4852b65abe70561 https://git.kernel.org/stable/c/5bd9e4e7cdaa03879e9b73b12ab52cceb1edd55b