CVE-2026-31531
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
23/04/2026
Last modified:
11/11/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ipv4: nexthop: allocate skb dynamically in rtm_get_nexthop()<br />
<br />
When querying a nexthop object via RTM_GETNEXTHOP, the kernel currently<br />
allocates a fixed-size skb using NLMSG_GOODSIZE. While sufficient for<br />
single nexthops and small Equal-Cost Multi-Path groups, this fixed<br />
allocation fails for large nexthop groups like 512 nexthops.<br />
<br />
This results in the following warning splat:<br />
<br />
WARNING: net/ipv4/nexthop.c:3395 at rtm_get_nexthop+0x176/0x1c0, CPU#20: rep/4608<br />
[...]<br />
RIP: 0010:rtm_get_nexthop (net/ipv4/nexthop.c:3395)<br />
[...]<br />
Call Trace:<br />
<br />
rtnetlink_rcv_msg (net/core/rtnetlink.c:6989)<br />
netlink_rcv_skb (net/netlink/af_netlink.c:2550)<br />
netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344)<br />
netlink_sendmsg (net/netlink/af_netlink.c:1894)<br />
____sys_sendmsg (net/socket.c:721 net/socket.c:736 net/socket.c:2585)<br />
___sys_sendmsg (net/socket.c:2641)<br />
__sys_sendmsg (net/socket.c:2671)<br />
do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94)<br />
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)<br />
<br />
<br />
Fix this by allocating the size dynamically using nh_nlmsg_size() and<br />
using nlmsg_new(), this is consistent with nexthop_notify() behavior. In<br />
addition, adjust nh_nlmsg_size_grp() so it calculates the size needed<br />
based on flags passed. While at it, also add the size of NHA_FDB for<br />
nexthop group size calculation as it was missing too.<br />
<br />
This cannot be reproduced via iproute2 as the group size is currently<br />
limited and the command fails as follows:<br />
<br />
addattr_l ERROR: message exceeded bound of 1048
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.3 (including) | 6.12.83 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.18.24 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.19 (including) | 6.19.14 (excluding) |
| cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/14cf0cd35361f4e94824bf8a42f72713d7702a73
- https://git.kernel.org/stable/c/18a4543c1750f96be63e349936d2dfdcb360b2dc
- https://git.kernel.org/stable/c/40bd39e383a0478fd5c221f393df05fd9d70cfbc
- https://git.kernel.org/stable/c/5f479aac1262959e54cdd978d873be5f202e2a40
- https://git.kernel.org/stable/c/615517f3f8d53b0cf41507c7599971e17adfdfa5
- https://git.kernel.org/stable/c/635038fe19db391117e66b46bdc2b6e447ac801d


