{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-68420",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-68420"
  ],
  "published": "2026-08-10T12:08:00Z",
  "summary": "xfrm: reject optional IPTFS templates in outbound policies",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm: reject optional IPTFS templates in outbound policies\n\nsyzbot reported a stack-out-of-bounds read in xfrm_state_find()\nwhich flows from xfrm_tmpl_resolve_one().\n\nCommit 3d776e31c841 (\"xfrm: Reject optional tunnel/BEET mode\ntemplates in outbound policies\") disallowed optional tunnel and\nBEET in outbound policies to prevent this. Later when IPTFS\nadded, it was not covered by that fix and can still trigger\nthe out-of-bounds read;\n\nExtend the check to disallow optional IPTFS in outbound policies\nas well. IPTFS should be identical to tunnel mode.\nIN and FWD policies are not affected: xfrm_tmpl_resolve_one()\nis only reachable via the outbound path.\n\nReproducer, before:\n\nip link add dummy0 type dummy\nip link set dummy0 up\nip addr add 10.1.1.1/24 dev dummy0\nip xfrm policy add src 10.1.1.1/32 dst 10.1.1.2/32 dir out tmpl\n  src fc00::dead:1 dst fc00::dead:2 proto esp reqid 1 mode iptfs\n  level use tmpl src fc00::dead:1 dst fc00::dead:2 proto esp reqid\n  2 mode transport\nping -W 1 -c 1 10.1.1.2\nPING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.\n\n[   64.168420] ==================================================================\n[   64.169977] BUG: KASAN: stack-out-of-bounds in __xfrm6_addr_hash+0x11e/0x170\n[   64.169977] Read of size 4 at addr ffff88800e1ffd20 by task ping/2844\n\n[   64.169977] CPU: 2 UID: 0 PID: 2844 Comm: ping Not tainted 7.1.0-rc7-00180-geb23b588430a #98 PREEMPT(full)\n[   64.169977] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014\n[   64.169977] Call Trace:\n[   64.169977]  <TASK>\n[   64.169977]  dump_stack_lvl+0x47/0x70\n[   64.169977]  ? __xfrm6_addr_hash+0x11e/0x170\n[   64.169977]  print_report+0x152/0x4b0\n[   64.169977]  ? ksys_mmap_pgoff+0x6d/0xa0\n[   64.169977]  ? entry_SYSCALL_64_after_hwframe+0x76/0x7e\n[   64.169977]  ? rcu_read_unlock_sched+0xa/0x20\n[   64.169977]  ? __virt_addr_valid+0x21b/0x230\n[   64.169977]  ? __xfrm6_addr_hash+0x11e/0x170\n[   64.169977]  kasan_report+0xa8/0xd0\n[   64.169977]  ? __xfrm6_addr_hash+0x11e/0x170\n[   64.169977]  __xfrm6_addr_hash+0x11e/0x170\n[   64.169977]  __xfrm_dst_hash+0x24/0xc0\n[   64.169977]  xfrm_state_find+0xa2d/0x2f90\n[   64.169977]  ? __pfx_xfrm_state_find+0x10/0x10\n[   64.169977]  ? __pfx_ftrace_graph_ret_addr+0x10/0x10\n[   64.169977]  ? __pfx_ftrace_graph_ret_addr+0x10/0x10\n[   64.169977]  xfrm_tmpl_resolve_one+0x210/0x570\n[   64.169977]  ? __pfx_xfrm_tmpl_resolve_one+0x10/0x10\n[   64.169977]  ? __pfx_stack_trace_consume_entry+0x10/0x10\n[   64.169977]  ? kernel_text_address+0x5b/0x80\n[   64.169977]  ? __kernel_text_address+0xe/0x30\n[   64.169977]  ? unwind_get_return_address+0x5e/0x90\n[   64.169977]  ? arch_stack_walk+0x8c/0xe0\n[   64.169977]  xfrm_tmpl_resolve+0x130/0x200\n[   64.169977]  ? __pfx_xfrm_tmpl_resolve+0x10/0x10\n[   64.169977]  ? __pfx_xfrm_policy_inexact_lookup_rcu+0x10/0x10\n[   64.169977]  ? __refcount_add_not_zero.constprop.0+0xb2/0x110\n[   64.169977]  ? __pfx___refcount_add_not_zero.constprop.0+0x10/0x10\n[   64.169977]  xfrm_resolve_and_create_bundle+0xd5/0x310\n[   64.169977]  ? __pfx_xfrm_resolve_and_create_bundle+0x10/0x10\n[   64.169977]  ? __pfx_xfrm_policy_lookup_bytype+0x10/0x10\n[   64.169977]  ? __pfx_xfrm_policy_lookup_bytype+0x10/0x10\n[   64.169977]  xfrm_lookup_with_ifid+0x3d8/0xb80\n[   64.169977]  ? __pfx_xfrm_lookup_with_ifid+0x10/0x10\n[   64.169977]  ? ip_route_output_key_hash+0xc6/0x110\n[   64.169977]  ? kasan_save_track+0x10/0x30\n[   64.169977]  xfrm_lookup_route+0x18/0xe0\n[   64.169977]  ip4_datagram_release_cb+0x4c9/0x530\n[   64.169977]  ? __pfx_ip4_datagram_release_cb+0x10/0x10\n[   64.169977]  ? do_raw_spin_lock+0x71/0xc0\n[   64.169977]  ? __pfx_do_raw_spin_lock+0x10/0x10\n[   64.169977]  release_sock+0xb0/0x170\n[   64.169977]  udp_connect+0x43/0x50\n[   64.169977]  __sys_connect+0xa6/0x100\n[   64.169977]  ? alloc_fd+0x2e9/0x300\n[   64.169977]  ? __pfx___sys_connect+0x10/0x10\n[   64.169977]  ? preempt_latency\n---truncated---",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:13",
        "name": "linux"
      },
      "versions": [
        "1:6.18.29-1+rpt1",
        "1:6.18.33-1+rpt1",
        "1:6.18.34-1+rpt1",
        "1:6.18.39-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-2712",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v6",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v7",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v8",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-2712",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v6",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v7",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v8",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-2712",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v6",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v7",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v8",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-2712",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-v6",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-v7",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-v8",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.39-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.18.29-1+rpt1": {
            "linux_commit": "66318c5b5cd8145a662303af12ed39ac07eb27cc",
            "upstream_version": "6.18.29",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.42"
          },
          "1:6.18.33-1+rpt1": {
            "linux_commit": "95b85bebbedcaedfa7ca79116ed38b7376fba412",
            "upstream_version": "6.18.33",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.42"
          },
          "1:6.18.34-1+rpt1": {
            "linux_commit": "c8c7494100e99ee05b11aaa4f0588a223a63d1af",
            "upstream_version": "6.18.34",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.42"
          },
          "1:6.18.39-1+rpt1": {
            "linux_commit": "60ea684a8ace97bb0db1a16e20753bdd6ab371ff",
            "upstream_version": "6.18.39",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.42"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-68420"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d7fc6f351c478586980a521d63b0214d9c055e78"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/9333f4b6f44858fc98eb12bf26b8d2959eb975d5"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ea528f18231ec0f33317be57f8866913b19aba6e"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-17T05:24:08Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.1,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The attacker must install an XFRM policy over the AF_KEY/XFRM netlink socket and then originate local traffic (connect()/sendto()) matching that policy, so the entire path requires local access to the machine; no remote packet reaches this code.\nAC:L - The reproducer is deterministic \u2014 add one outbound policy with an optional IPTFS template plus a following transport-mode template of a different family, then send one packet; no race, no memory-layout dependence, and CONFIG_XFRM is enabled on all mainstream distros.\nPR:L - xfrm_user_rcv_msg() checks netlink_net_capable(CAP_NET_ADMIN), which resolves to ns_capable(net->user_ns, CAP_NET_ADMIN); an unprivileged user obtains this with \"unshare -Urn\" and can create the dummy device, the policy, and the triggering traffic entirely inside that namespace.\nUI:N - The attacker performs every step \u2014 policy insertion and packet transmission \u2014 with no action by any other user or administrator.\nS:U - The out-of-bounds read stays within the kernel's own stack and the affected resources are managed by the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - __xfrm6_addr_hash() reads 16 bytes from a 4-byte on-stack IPv4 address, exposing adjacent kernel stack contents; with zeroed template addresses xfrm_init_tempstate() copies those bytes into the acquire state, which is broadcast to userspace via XFRM_MSG_ACQUIRE, leaking kernel stack data (potentially pointers usable for KASLR defeat).\nI:N - The defect is purely a read of out-of-bounds stack memory; no kernel memory is written out of bounds and no control-flow or data structure is corrupted by the attacker.\nA:H - The invalid access is a KASAN-detected stack out-of-bounds read that taints the kernel and terminates the machine on kernels built with KASAN or panic_on_warn, and the bogus state derived from garbage addresses can be re-triggered at will by an unprivileged user."
    }
  }
}
