VDB

CVE-2026-31531

CVE-2026-31531 PUBLISHED

ipv4: nexthop: allocate skb dynamically in rtm_get_nexthop()

Reported by linux · Published April 23, 2026

In the Linux kernel, the following vulnerability has been resolved: ipv4: nexthop: allocate skb dynamically in rtm_get_nexthop() When querying a nexthop object via RTM_GETNEXTHOP, the kernel currently allocates a fixed-size skb using NLMSG_GOODSIZE. While sufficient for single nexthops and small Equal-Cost Multi-Path groups, this fixed allocation fails for large nexthop groups like 512 nexthops. This results in the following warning splat: WARNING: net/ipv4/nexthop.c:3395 at rtm_get_nexthop+0x176/0x1c0, CPU#20: rep/4608 [...] RIP: 0010:rtm_get_nexthop (net/ipv4/nexthop.c:3395) [...] Call Trace: <TASK> rtnetlink_rcv_msg (net/core/rtnetlink.c:6989) netlink_rcv_skb (net/netlink/af_netlink.c:2550) netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344) netlink_sendmsg (net/netlink/af_netlink.c:1894) ____sys_sendmsg (net/socket.c:721 net/socket.c:736 net/socket.c:2585) ___sys_sendmsg (net/socket.c:2641) __sys_sendmsg (net/socket.c:2671) do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) </TASK> Fix this by allocating the size dynamically using nh_nlmsg_size() and using nlmsg_new(), this is consistent with nexthop_notify() behavior. In addition, adjust nh_nlmsg_size_grp() so it calculates the size needed based on flags passed. While at it, also add the size of NHA_FDB for nexthop group size calculation as it was missing too. This cannot be reproduced via iproute2 as the group size is currently limited and the command fails as follows: addattr_l ERROR: message exceeded bound of 1048

EPSS 0.16% · 5.7th percentile

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel6.18-modules-extraAmazon Linux1:6.18.25-55.108.amzn2023
linux-vmware-6.12Chainguard6.12.85-r0
linux-aws-6.12Chainguard6.12.85-r0
kernel-livepatch-6.12.83-113.160Amazon Linux1:1.0-0.amzn2023
kernel6.18-develAmazon Linux1:6.18.25-55.108.amzn2023
kernel6.18-headersAmazon Linux1:6.18.25-55.108.amzn2023
perf6.12Amazon Linux1:6.12.83-113.160.amzn2023
linux-qemu-6.18Chainguard6.18.31-r0
kernel6.12-modules-extra-commonAmazon Linux1:6.12.83-113.160.amzn2023
python3-perf6.12Amazon Linux1:6.12.83-113.160.amzn2023
kernel6.12-tools-develAmazon Linux1:6.12.83-113.160.amzn2023
linux-gcp-6.12Chainguard6.12.85-r0

1 more packages have a fixed version. See every fix in Lookup.

Risk scores

EPSS Score
0.16%
5.7th percentile

Affected products

VendorProductVersions
LinuxLinux430a049190de3c9e219f43084de9f1122da04570, 430a049190de3c9e219f43084de9f1122da04570, 430a049190de3c9e219f43084de9f1122da04570
LinuxLinux5.3, 0, 6.1.191
amazon:2023kernel6.18-modules-extra0
chainguardlinux-vmware-6.120
chainguardlinux-aws-6.120
amazon:2023kernel-livepatch-6.12.83-113.1600
amazon:2023kernel6.18-devel0
amazon:2023kernel6.18-headers0
amazon:2023perf6.120
chainguardlinux-qemu-6.180
amazon:2023kernel6.12-modules-extra-common0
amazon:2023python3-perf6.120
amazon:2023kernel6.12-tools-devel0
chainguardlinux-gcp-6.120
linuxlinux_kernel5.3, 5.3, 5.3
amazon:2023kernel6.12-tools0
amazon:2023kernel6.18-tools0
amazon:2023python3-perf6.180
chainguardlinux-aws-6.180
LinuxLinux7.0, 6.19.14, 430a049190de3c9e219f43084de9f1122da04570

…and 15 more

Timeline

  • Apr 22, 2026 CVE Published
  • Apr 24, 2026 Security Advisory (97 in total, the first dated here)
  • May 18, 2026 EPSS Score (26 in total, the first dated here)
  • Jul 17, 2026 Coalition ESS Score
  • Aug 11, 2026 Distribution Patch (92 in total, the first dated here)
  • Oct 30, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-31531
vulnetix vdb fixes CVE-2026-31531

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-31531/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›