Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98240 Overview
CVE-2026-98240 is a Linux kernel vulnerability in the IP tunnel subsystem. The flaw resides in the ip_tun_parse_opts_geneve() function within the networking stack. The function references options_len before initializing it, causing the destination pointer calculation for memcpy() to operate on a zero-sized buffer. On kernels built with GCC 15 or later and CONFIG_FORTIFY_SOURCE, the fortified memcpy() detects the buffer overflow and triggers a kernel panic at lib/string_helpers.c:1044. A local user with network configuration capabilities can trigger the condition by adding a route with Geneve encapsulation options.
Critical Impact
Local triggering of a kernel panic through standard ip route add commands with Geneve encapsulation options, resulting in denial of service on affected Linux systems.
Affected Products
- Linux kernel (upstream)
- Linux kernel stable branches referenced in commits 0f6a6be, 455ebea, and 9907325
- Distributions shipping kernels built with CONFIG_FORTIFY_SOURCE and GCC 15+
Discovery Timeline
- 2026-10-06 - CVE-2026-98240 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-98240
Vulnerability Analysis
The vulnerability lies in ip_tun_parse_opts_geneve(), which parses Geneve tunnel options supplied through netlink attributes. The function computes the destination buffer with ip_tunnel_info_opts(info) + opts_len, then calls memcpy(opt->opt_data, nla_data(attr), data_len) to copy user-supplied option bytes.
Because options_len is assigned only after the copy executes, the destination resolves to a zero-length region. The fortified memcpy() detects the mismatch between the declared destination size (0) and the requested write (4 bytes in the proof-of-concept) and aborts with a kernel BUG().
Reproduction uses standard iproute2 commands:
ip link add d0 type dummy
ip link set d0 up
ip route add 10.30.0.0/16 encap ip id 300 geneve_opts 4660:66:11223344 dev d0
The resulting panic surfaces in ip_tun_parse_opts.part.0.cold and ip_tun_build_state. The upstream fix initializes the counter before the options buffer is referenced, matching the pattern already used by tunnel_key_opts_set().
Root Cause
The root cause is uninitialized memory use combined with an out-of-bounds write condition detected by fortify instrumentation. The options_len counter is referenced before assignment, causing pointer arithmetic that targets a zero-sized destination buffer.
Attack Vector
Triggering the panic requires local access with CAP_NET_ADMIN to configure routes with Geneve encapsulation options. The attack vector is local and requires elevated capability, but on multi-tenant systems or containers granted CAP_NET_ADMIN, the condition can crash the host kernel.
// Vulnerability pattern (described, not synthesized)
// attr = tb[LWTUNNEL_IP_OPT_GENEVE_DATA];
// data_len = nla_len(attr); // e.g., 4
// opt = ip_tunnel_info_opts(info) + opts_len; // opts_len still 0 / dest size 0
// memcpy(opt->opt_data, nla_data(attr), data_len); // fortify BUG
Detection Methods for CVE-2026-98240
Indicators of Compromise
- Kernel panic logs referencing ip_tun_parse_opts.part.0.cold and ip_tun_build_state in the stack trace.
- dmesg entries containing memcpy: detected buffer overflow with 0 byte destination size.
- Unexpected system reboots or hangs following ip route add commands using geneve_opts.
Detection Strategies
- Audit ip route and netlink RTM_NEWROUTE operations that include lightweight tunnel encapsulation attributes.
- Monitor kernel ring buffer and journald output for fortify-source BUG() messages tied to string_helpers.c:1044.
- Correlate crash telemetry with workloads granted CAP_NET_ADMIN, including containers and network orchestration agents.
Monitoring Recommendations
- Centralize kernel crash dumps and panic logs for rapid identification of repeated triggers.
- Track issuance of LWTUNNEL_IP_OPT_GENEVE_DATA netlink attributes from non-infrastructure workloads.
- Alert on container or pod restarts correlated with host kernel panics on nodes running susceptible kernels.
How to Mitigate CVE-2026-98240
Immediate Actions Required
- Apply the upstream Linux kernel patches referenced by commits 0f6a6be, 455ebea, and 9907325 as soon as distribution builds are available.
- Restrict CAP_NET_ADMIN on untrusted workloads, including unprivileged container runtimes.
- Prioritize patching on hosts built with GCC 15 and CONFIG_FORTIFY_SOURCE, where the panic is reliably triggered.
Patch Information
The fix initializes options_len before the destination pointer is computed, aligning the Geneve parser with the existing behavior in tunnel_key_opts_set(). Patches are available in the mainline and stable trees via Kernel Git Commit 0f6a6be, Kernel Git Commit 455ebea, and Kernel Git Commit 9907325.
Workarounds
- Drop CAP_NET_ADMIN from workloads and container profiles that do not require network configuration privileges.
- Block or audit creation of lightweight tunnel routes with Geneve options until kernels are patched.
- Where feasible, deploy kernels without CONFIG_FORTIFY_SOURCE panic-on-detect is unacceptable, understanding that this preserves the underlying bug and is not a security fix.
# Example: remove CAP_NET_ADMIN from a container runtime profile
docker run --cap-drop=NET_ADMIN <image>
# Example: audit route additions with Geneve encapsulation via auditd
auditctl -a always,exit -F arch=b64 -S sendto -F key=lwt-geneve
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

