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-98372 Overview
CVE-2026-98372 is a stack out-of-bounds read vulnerability in the Linux kernel's IP Traffic Flow Security (IP-TFS) implementation within the xfrm subsystem. The flaw resides in iptfs_skb_reset_frag_walk() in net/xfrm/xfrm_iptfs.c, where an unbounded loop advances past the fixed-size on-stack frags[MAX_SKB_FRAGS + 1] array. A crafted IP-TFS (AGGFRAG) payload delivered to an IPTFS Security Association (SA) can trigger the condition from the network receive path, reading adjacent stack memory. The issue reaches the function through iptfs_skb_can_add_frags(), which calls the walk routine without the offset guard that its sibling iptfs_skb_add_frags() already enforces.
Critical Impact
Remote attackers able to send crafted ESP traffic to a host with an active IPTFS SA can trigger kernel stack memory disclosure or potential denial of service via the receive path.
Affected Products
- Linux kernel versions containing the xfrm IPTFS implementation in net/xfrm/xfrm_iptfs.c
- Distributions shipping the vulnerable iptfs_skb_reset_frag_walk() logic
- Systems configured with IP-TFS (AGGFRAG) IPsec Security Associations
Discovery Timeline
- 2026-10-06 - CVE-2026-98372 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-98372
Vulnerability Analysis
The defect is a stack-based out-of-bounds read [CWE-125] in the kernel's IP-TFS reassembly code. iptfs_skb_reset_frag_walk() locates the fragment containing a caller-supplied offset by walking walk->frags[] using the loop:
while (offset >= walk->past + walk->frags[walk->fragi].len) walk->past += walk->frags[walk->fragi++].len;
The loop increments walk->fragi and dereferences walk->frags[walk->fragi] without comparing fragi against walk->nr_frags. When the requested offset meets or exceeds the total length spanned by the current fragments, fragi advances past nr_frags and off the end of the fixed-size frags[MAX_SKB_FRAGS + 1] on-stack array, reading uninitialized stack memory. KASAN confirms the condition with a stack-out-of-bounds report at iptfs_skb_reset_frag_walk+0x235/0x250.
Root Cause
The root cause is an inconsistent precondition check between two callers. iptfs_skb_add_frags() guards the walk with if (!walk->nr_frags || offset >= walk->total + walk->initial_offset) return len;. iptfs_skb_can_add_frags() lacks this guard and invokes iptfs_skb_reset_frag_walk() unconditionally. Its internal fragi < walk->nr_frags bound check executes only after the out-of-range walk completes, which is too late to prevent the invalid read.
Attack Vector
The vulnerability is reachable from the network receive path. An attacker sends a crafted IP-TFS AGGFRAG payload to a host with an active IPTFS SA. The packet traverses ip_rcv() → xfrm4_esp_rcv() → xfrm_input() → iptfs_input() → iptfs_input_ordered() → iptfs_reassem_cont() → iptfs_skb_can_add_frags(), where the offset exceeds the fragment total and triggers the stack read. Exploitation requires only that the target accept ESP traffic for an IPTFS-configured SA.
No verified proof-of-concept code is published. See the kernel patch references for the precise fix diff.
Detection Methods for CVE-2026-98372
Indicators of Compromise
- KASAN kernel log entries containing BUG: KASAN: stack-out-of-bounds in iptfs_skb_reset_frag_walk
- Unexpected kernel oops or warning messages originating from net/xfrm/xfrm_iptfs.c on hosts running IPTFS SAs
- Anomalous ESP/AGGFRAG packet patterns targeting IPTFS endpoints with unusually large fragment offsets
Detection Strategies
- Enable KASAN on test and staging kernels to surface out-of-bounds reads in the xfrm IPTFS code path
- Audit running kernel versions against the fixed commits 7e1c6884, d042487d, and da56d0ee to identify unpatched hosts
- Correlate IPsec SA configuration inventories with network telemetry to locate systems exposing IPTFS to untrusted peers
Monitoring Recommendations
- Forward dmesg and /var/log/kern.log to a central logging platform and alert on KASAN, iptfs_, or xfrm_input stack traces
- Monitor IPsec and ESP flow counters for unexpected fragmentation patterns on IPTFS tunnels
- Track kernel package versions across the fleet and flag hosts missing the upstream xfrm iptfs fix
How to Mitigate CVE-2026-98372
Immediate Actions Required
- Apply the upstream kernel patches 7e1c6884, d042487d, and da56d0ee or install a vendor kernel update that incorporates them
- Reboot affected hosts after kernel update to ensure the patched xfrm module is loaded
- Restrict ESP ingress to known IPsec peers using host and network firewall rules until patches are deployed
Patch Information
The fix extends iptfs_skb_can_add_frags() with the same up-front guard already present in iptfs_skb_add_frags(), preventing the walk from being entered with an out-of-range offset. When the guard triggers, the caller falls back to the existing linearize-and-copy path, which is safe. Patch commits are published upstream: Kernel Patch 7e1c6884, Kernel Patch d042487d, and Kernel Patch da56d0ee.
Workarounds
- Disable IP-TFS Security Associations on hosts that do not require AGGFRAG transport
- Limit ESP peering to authenticated, trusted endpoints via iptables, nftables, or upstream network ACLs
- Isolate IPTFS-enabled gateways behind rate-limited interfaces to reduce exposure while patching is scheduled
# Example: verify running kernel and restrict ESP to a known peer until patched
uname -r
sudo nft add rule inet filter input ip saddr != 203.0.113.10 ip protocol esp drop
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

