CVE-2026-31531
ipv4: nexthop: allocate skb dynamically in rtm_get_nexthop()
Description
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
INFO
Published Date :
April 23, 2026, 12:17 p.m.
Last Modified :
Nov. 11, 2026, 11:10 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | [email protected] |
Solution
- Update the Linux kernel to the latest version.
- Apply the provided kernel patch for nexthop allocation.
- Ensure nh_nlmsg_size() and nh_nlmsg_size_grp() are updated.
- Adjust nexthop group size calculations.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-31531.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-31531 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-31531
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-31531 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-31531 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Nov. 11, 2026
Action Type Old Value New Value Added Translation Title: Linux Kernel, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: ipv4: nexthop: asignar skb dinámicamente en rtm_get_nexthop() Al consultar un objeto nexthop a través de RTM_GETNEXTHOP, el kernel actualmente asigna un skb de tamaño fijo usando NLMSG_GOODSIZE. Si bien es suficiente para nexthops individuales y grupos pequeños de rutas de costo igual (Equal-Cost Multi-Path), esta asignación fija falla para grupos grandes de nexthops como 512 nexthops. Esto resulta en el siguiente ’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) [...] Rastro de llamada: [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] Solucione esto asignando el tamaño dinámicamente usando nh_nlmsg_size() y usando nlmsg_new(), esto es consistente con el comportamiento de nexthop_notify(). Además, ajuste nh_nlmsg_size_grp() para que calcule el tamaño necesario basado en las banderas pasadas. Ya que estamos, también agregue el tamaño de NHA_FDB para el cálculo del tamaño del grupo nexthop, ya que también faltaba. Esto no puede ser reproducido a través de iproute2 ya que el tamaño del grupo está actualmente limitado y el comando falla de la siguiente manera: addattr_l ERROR: el mensaje excedió el límite de 1048 -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Nov. 05, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-31531', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-11-05T21:37:53.479222Z'} -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 30, 2026
Action Type Old Value New Value Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/31xxx/CVE-2026-31531.json">CVE-2026-31531</a> Added Reference https://git.kernel.org/stable/c/5f479aac1262959e54cdd978d873be5f202e2a40 -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 21, 2026
Action Type Old Value New Value Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/31xxx/CVE-2026-31531.json">CVE-2026-31531</a> Added Reference https://git.kernel.org/stable/c/14cf0cd35361f4e94824bf8a42f72713d7702a73 Added Reference https://git.kernel.org/stable/c/18a4543c1750f96be63e349936d2dfdcb360b2dc Added Reference https://git.kernel.org/stable/c/40bd39e383a0478fd5c221f393df05fd9d70cfbc Added Reference https://git.kernel.org/stable/c/615517f3f8d53b0cf41507c7599971e17adfdfa5 Added Reference https://git.kernel.org/stable/c/635038fe19db391117e66b46bdc2b6e447ac801d Removed Reference https://git.kernel.org/stable/c/14cf0cd35361f4e94824bf8a42f72713d7702a73 Removed Reference https://git.kernel.org/stable/c/40bd39e383a0478fd5c221f393df05fd9d70cfbc Removed Reference https://git.kernel.org/stable/c/615517f3f8d53b0cf41507c7599971e17adfdfa5 Removed Reference https://git.kernel.org/stable/c/635038fe19db391117e66b46bdc2b6e447ac801d Removed Reference Type https://git.kernel.org/stable/c/14cf0cd35361f4e94824bf8a42f72713d7702a73 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/40bd39e383a0478fd5c221f393df05fd9d70cfbc Types: Patch Removed Reference Type https://git.kernel.org/stable/c/615517f3f8d53b0cf41507c7599971e17adfdfa5 Types: Patch Removed Reference Type https://git.kernel.org/stable/c/635038fe19db391117e66b46bdc2b6e447ac801d Types: Patch -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '430a049190de3c9e219f43084de9f1122da04570', 'lessThan': '615517f3f8d53b0cf41507c7599971e17adfdfa5', 'versionType': 'git'}, {'status': 'affected', 'version': '430a049190de3c9e219f43084de9f1122da04570', 'lessThan': '40bd39e383a0478fd5c221f393df05fd9d70cfbc', 'versionType': 'git'}, {'status': 'affected', 'version': '430a049190de3c9e219f43084de9f1122da04570', 'lessThan': '635038fe19db391117e66b46bdc2b6e447ac801d', 'versionType': 'git'}, {'status': 'affected', 'version': '430a049190de3c9e219f43084de9f1122da04570', 'lessThan': '14cf0cd35361f4e94824bf8a42f72713d7702a73', 'versionType': 'git'}], 'programFiles': ['net/ipv4/nexthop.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '5.3'}, {'status': 'unaffected', 'version': '0', 'lessThan': '5.3', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.12.83', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.18.24', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '6.19.14', 'versionType': 'semver', 'lessThanOrEqual': '6.19.*'}, {'status': 'unaffected', 'version': '7.0', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['net/ipv4/nexthop.c'], 'defaultStatus': 'affected'}] -
Initial Analysis by [email protected]
Apr. 28, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Added CWE NVD-CWE-noinfo Added CPE Configuration OR *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:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.13 up to (excluding) 6.18.24 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 6.19.14 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.3 up to (excluding) 6.12.83 Added Reference Type kernel.org: https://git.kernel.org/stable/c/14cf0cd35361f4e94824bf8a42f72713d7702a73 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/40bd39e383a0478fd5c221f393df05fd9d70cfbc Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/615517f3f8d53b0cf41507c7599971e17adfdfa5 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/635038fe19db391117e66b46bdc2b6e447ac801d Types: Patch -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Apr. 23, 2026
Action Type Old Value New Value Added Description 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 Added Reference https://git.kernel.org/stable/c/14cf0cd35361f4e94824bf8a42f72713d7702a73 Added Reference https://git.kernel.org/stable/c/40bd39e383a0478fd5c221f393df05fd9d70cfbc Added Reference https://git.kernel.org/stable/c/615517f3f8d53b0cf41507c7599971e17adfdfa5 Added Reference https://git.kernel.org/stable/c/635038fe19db391117e66b46bdc2b6e447ac801d