UBUNTU-CVE-2026-68420: Medium severity ubuntu/linux-hwe-edge vulnerability
In the Linux kernel, the following vulnerability has been resolved: xfrm: reject optional IPTFS templates in outbound policies syzbot reported a stack-out-of-bounds read in xfrmstatefind() which flows from xfrmtmplresolveone(). Commit 3d776e31c841 ("xfrm: Reject optional tunnel/BEET mode templates in outbound policies") disallowed optional tunnel and BEET in outbound policies to prevent this. Later when IPTFS added, it was not covered by that fix and can still trigger the out-of-bounds read; Extend the check to disallow optional IPTFS in outbound policies as well. IPTFS should be identical to tunnel mode. IN and FWD policies are not affected: xfrmtmplresolveone() is only reachable via the outbound path. Reproducer, before: ip link add dummy0 type dummy ip link set dummy0 up ip addr add 10.1.1.1/24 dev dummy0 ip xfrm policy add src 10.1.1.1/32 dst 10.1.1.2/32 dir out tmpl src fc00::dead:1 dst fc00::dead:2 proto esp reqid 1 mode iptfs level use tmpl src fc00::dead:1 dst fc00::dead:2 proto esp reqid 2 mode transport ping -W 1 -c 1 10.1.1.2 PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data. [ 64.168420] ================================================================== [ 64.169977] BUG: KASAN: stack-out-of-bounds in xfrm6addrhash+0x11e/0x170 [ 64.169977] Read of size 4 at addr ffff88800e1ffd20 by task ping/2844 [ 64.169977] CPU: 2 UID: 0 PID: 2844 Comm: ping Not tainted 7.1.0-rc7-00180-geb23b588430a #98 PREEMPT(full) [ 64.169977] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 64.169977] Call Trace: [ 64.169977] <TASK> [ 64.169977] dumpstacklvl+0x47/0x70 [ 64.169977] ? xfrm6addrhash+0x11e/0x170 [ 64.169977] printreport+0x152/0x4b0 [ 64.169977] ? ksysmmappgoff+0x6d/0xa0 [ 64.169977] ? entrySYSCALL64afterhwframe+0x76/0x7e [ 64.169977] ? rcureadunlocksched+0xa/0x20 [ 64.169977] ? virtaddrvalid+0x21b/0x230 [ 64.169977] ? xfrm6addrhash+0x11e/0x170 [ 64.169977] kasanreport+0xa8/0xd0 [ 64.169977] ? xfrm6addrhash+0x11e/0x170 [ 64.169977] xfrm6addrhash+0x11e/0x170 [ 64.169977] xfrmdsthash+0x24/0xc0 [ 64.169977] xfrmstatefind+0xa2d/0x2f90 [ 64.169977] ? pfxxfrmstatefind+0x10/0x10 [ 64.169977] ? pfxftracegraphretaddr+0x10/0x10 [ 64.169977] ? pfxftracegraphretaddr+0x10/0x10 [ 64.169977] xfrmtmplresolveone+0x210/0x570 [ 64.169977] ? pfxxfrmtmplresolveone+0x10/0x10 [ 64.169977] ? pfxstacktraceconsumeentry+0x10/0x10 [ 64.169977] ? kerneltextaddress+0x5b/0x80 [ 64.169977] ? kerneltextaddress+0xe/0x30 [ 64.169977] ? unwindgetreturnaddress+0x5e/0x90 [ 64.169977] ? archstackwalk+0x8c/0xe0 [ 64.169977] xfrmtmplresolve+0x130/0x200 [ 64.169977] ? pfxxfrmtmplresolve+0x10/0x10 [ 64.169977] ? pfxxfrmpolicyinexactlookuprcu+0x10/0x10 [ 64.169977] ? refcountaddnotzero.constprop.0+0xb2/0x110 [ 64.169977] ? pfxrefcountaddnotzero.constprop.0+0x10/0x10 [ 64.169977] xfrmresolveandcreatebundle+0xd5/0x310 [ 64.169977] ? pfxxfrmresolveandcreatebundle+0x10/0x10 [ 64.169977] ? pfxxfrmpolicylookupbytype+0x10/0x10 [ 64.169977] ? pfxxfrmpolicylookupbytype+0x10/0x10 [ 64.169977] xfrmlookupwithifid+0x3d8/0xb80 [ 64.169977] ? pfxxfrmlookupwithifid+0x10/0x10 [ 64.169977] ? iprouteoutputkeyhash+0xc6/0x110 [ 64.169977] ? kasansavetrack+0x10/0x30 [ 64.169977] xfrmlookuproute+0x18/0xe0 [ 64.169977] ip4datagramreleasecb+0x4c9/0x530 [ 64.169977] ? pfxip4datagramreleasecb+0x10/0x10 [ 64.169977] ? dorawspinlock+0x71/0xc0 [ 64.169977] ? pfxdorawspinlock+0x10/0x10 [ 64.169977] releasesock+0xb0/0x170 [ 64.169977] udpconnect+0x43/0x50 [ 64.169977] sysconnect+0xa6/0x100 [ 64.169977] ? allocfd+0x2e9/0x300 [ 64.169977] ? pfxsysconnect+0x10/0x10 [ 64.169977] ? preemptlatency ---truncated---
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1014.14~24.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17~24.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-fde-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1016.16~24.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1014.14~24.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-38.38~24.04.4 - Upgrade
Upgrade
ubuntu/linux-nvidia-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1024.25~24.04.1 - Upgrade
Upgrade
ubuntu/linux-oracle-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1013.13~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-38.38.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-38.38 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1014.14 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 7.0.0-1016.16 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1014.14 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 7.0.0-1008.9 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1015.15 - Upgrade
Upgrade
ubuntu/linux-nvidia-bosto a version that resolves this vulnerability.Fixed in 7.0.0-2022.23 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1015.15 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1013.13 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 7.0.0-38.38.1 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-38.38.1 - Configuration
Reject or remove optional IPTFS templates from outbound XFRM policies; IPTFS templates should not be configured as optional in the outbound path.
Linux kernel XFRM outbound policies Optional IPTFS templates = disallowed
Event History
Frequently Asked Questions
Which systems and traffic paths are affected?
Only the XFRM outbound policy path is affected. Inbound (IN) and forwarding (FWD) policies are not affected because the vulnerable template-resolution function is reachable only through outbound processing.
What configuration is required to trigger the issue?
An attacker or local user needs the ability to create or modify an outbound XFRM policy containing an optional IPTFS template. The reproducer uses an outbound ESP policy with an IPTFS template at level "use" followed by a transport-mode template.
How can I identify a potentially vulnerable policy configuration?
Review outbound XFRM policies for templates using IPTFS mode with an optional level, such as "level use." Policies limited to IN or FWD directions are not affected by this issue.
What mitigation is available if an updated kernel cannot be deployed immediately?
Do not allow creation of outbound XFRM policies with optional IPTFS templates. Restrict the ability to administer XFRM/IPsec policy configuration to trusted users and processes.