CVE-2026-31531

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
23/04/2026
Last modified:
28/04/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

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:*:*:*:*:*:*