CVE-2026-98853: net: gso: limit recursive IP-in-IP segmentation
In the Linux kernel, the following vulnerability has been resolved:
net: gso: limit recursive IP-in-IP segmentation
IP-in-IP GSO can re-enter inetgsosegment() or ipv6gsosegment() for each nested IP header. encaplevel tracks header bytes, not callback depth, so a deep chain can exhaust the kernel stack. Making inetgsosegment() stackable introduced unbounded IPv4 nesting; IPIP GSO/TSO later made the path reachable. The IPv6 stackable path was introduced separately and uses the same guard.
Count IPv4 and IPv6 GSO handler entries in skbgsocb, initialized once per top-level GSO operation and preserved across GRE/UDP context changes. Use the existing IPTUNNELRECURSIONLIMIT for both handlers. The first five entries pass, and the sixth returns -EINVAL before dispatching another GSO callback.
Affected Software
Event History
Frequently Asked Questions
What conditions are needed to trigger the kernel stack exhaustion path?
The path requires deeply nested IP-in-IP traffic reaching GSO segmentation. Each nested IP header can re-enter the IPv4 or IPv6 GSO segmentation handler, allowing callback recursion to grow until the kernel stack is exhausted.
Are both IPv4 and IPv6 affected?
Yes. The issue applies to the stackable IPv4 and IPv6 GSO segmentation paths; both now use the same IP_TUNNEL_RECURSION_LIMIT guard.
How does the fix limit recursion?
The fix counts IPv4 and IPv6 GSO handler entries in skb_gso_cb for each top-level GSO operation, preserving that count across GRE and UDP context changes. The first five entries are allowed, while a sixth entry returns -EINVAL before another GSO callback is dispatched.