UBUNTU-CVE-2026-98372: Medium severity ubuntu/linux-hwe-edge vulnerability
In the Linux kernel, the following vulnerability has been resolved: xfrm: iptfs: fix stack OOB read in iptfsskbresetfragwalk() iptfsskbresetfragwalk() advances to the fragment containing @offset with an unbounded loop: while (offset >= walk->past + walk->frags[walk->fragi].len) walk->past += walk->frags[walk->fragi++].len; walk->fragi is advanced and walk->frags[walk->fragi] is dereferenced without ever checking fragi against walk->nrfrags. When the requested offset is at or beyond the total length spanned by the walk's fragments, fragi runs past nrfrags and off the end of the fixed-size on-stack frags[MAXSKBFRAGS + 1] array, reading out-of-bounds stack memory. The two callers behave differently: iptfsskbaddfrags() already guards against this with if (!walk->nrfrags || offset >= walk->total + walk->initialoffset) return len; but iptfsskbcanaddfrags() has no such guard and calls iptfsskbresetfragwalk() unconditionally, so it performs the out-of-range walk. Its own "fragi < walk->nrfrags" bound check runs only afterwards, too late to prevent the read. This is reachable from the receive path: a crafted IP-TFS (AGGFRAG) payload delivered to an IPTFS SA drives iptfsreassemcont() -> iptfsskbcanaddfrags() with an offset past the fragment total, e.g.: BUG: KASAN: stack-out-of-bounds in iptfsskbresetfragwalk+0x235/0x250 Read of size 4 at addr ffff888008ad7210 by task repro/345 iptfsskbresetfragwalk+0x235/0x250 net/xfrm/xfrmiptfs.c:392 iptfsskbcanaddfrags+0x155/0x310 net/xfrm/xfrmiptfs.c:420 iptfsreassemcont+0xcf8/0x1140 net/xfrm/xfrmiptfs.c:902 iptfsinputordered+0x552/0x670 net/xfrm/xfrmiptfs.c:1280 iptfsinput+0x3d6/0xde0 net/xfrm/xfrmiptfs.c:1741 xfrminput+0x282f/0x6140 net/xfrm/xfrminput.c:700 xfrm4esprcv+0x93/0x120 net/ipv4/xfrm4protocol.c:104 iprcv+0x278/0x2d0 net/ipv4/ipinput.c:612 Give iptfsskbcanaddfrags() the same up-front guard that iptfsskbaddfrags() already has, so the walk is never entered with an out-of-range offset. When it triggers, the caller falls back to the existing linearize-and-copy path, which is safe.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1