CVE-2026-31531
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel6.18-modules-extra | Amazon Linux | 1:6.18.25-55.108.amzn2023 |
| linux-vmware-6.12 | Chainguard | 6.12.85-r0 |
| linux-aws-6.12 | Chainguard | 6.12.85-r0 |
| kernel-livepatch-6.12.83-113.160 | Amazon Linux | 1:1.0-0.amzn2023 |
| kernel6.18-devel | Amazon Linux | 1:6.18.25-55.108.amzn2023 |
| kernel6.18-headers | Amazon Linux | 1:6.18.25-55.108.amzn2023 |
| perf6.12 | Amazon Linux | 1:6.12.83-113.160.amzn2023 |
| linux-qemu-6.18 | Chainguard | 6.18.31-r0 |
| kernel6.12-modules-extra-common | Amazon Linux | 1:6.12.83-113.160.amzn2023 |
| python3-perf6.12 | Amazon Linux | 1:6.12.83-113.160.amzn2023 |
| kernel6.12-tools-devel | Amazon Linux | 1:6.12.83-113.160.amzn2023 |
| linux-gcp-6.12 | Chainguard | 6.12.85-r0 |
1 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 430a049190de3c9e219f43084de9f1122da04570, 430a049190de3c9e219f43084de9f1122da04570, 430a049190de3c9e219f43084de9f1122da04570 |
| Linux | Linux | 5.3, 0, 6.1.191 |
| amazon:2023 | kernel6.18-modules-extra | 0 |
| chainguard | linux-vmware-6.12 | 0 |
| chainguard | linux-aws-6.12 | 0 |
| amazon:2023 | kernel-livepatch-6.12.83-113.160 | 0 |
| amazon:2023 | kernel6.18-devel | 0 |
| amazon:2023 | kernel6.18-headers | 0 |
| amazon:2023 | perf6.12 | 0 |
| chainguard | linux-qemu-6.18 | 0 |
| amazon:2023 | kernel6.12-modules-extra-common | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel6.12-tools-devel | 0 |
| chainguard | linux-gcp-6.12 | 0 |
| linux | linux_kernel | 5.3, 5.3, 5.3 |
| amazon:2023 | kernel6.12-tools | 0 |
| amazon:2023 | kernel6.18-tools | 0 |
| amazon:2023 | python3-perf6.18 | 0 |
| chainguard | linux-aws-6.18 | 0 |
| Linux | Linux | 7.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