# CVE-2026-64581: xfrm: fix sk\_dst\_cache double-free in xfrm\_user\_policy()

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-08-05 · Modified: 2026-10-19
- Aliases: UBUNTU-CVE-2026-64581, DEBIAN-CVE-2026-64581
- Record: https://cvemate.com/vulnerability/CVE-2026-64581 · JSON: https://cvemate.com/vulnerability/CVE-2026-64581/json

## Description

```text
In the Linux kernel, the following vulnerability has been resolved:

xfrm: fix sk_dst_cache double-free in xfrm_user_policy()

xfrm_user_policy() clears the socket dst cache with __sk_dst_reset(),
i.e. the non-atomic __sk_dst_set(sk, NULL): it reads sk_dst_cache with
rcu_dereference_protected(), stores NULL and dst_release()s the old dst.
That is only safe if no other thread modifies sk_dst_cache concurrently.

For a connected UDP socket that does not hold: the transmit fast path
(udp_sendmsg -> sk_dst_check -> sk_dst_reset) resets the cache locklessly
with an atomic xchg(). A per-socket policy change racing a send can make
both sides observe the same old dst and each dst_release() it, dropping
the socket's single reference twice and freeing the xfrm_dst bundle while
it is still referenced:

  BUG: KASAN: slab-use-after-free in dst_release
  Write of size 4 at addr ffff88801897b6c0 by task exploit/155
  Call Trace:
   ...
   dst_release (... ./include/linux/rcuref.h:109)
   xfrm_user_policy (./include/net/sock.h:2239 ./include/net/sock.h:2256 net/xfrm/xfrm_state.c:3053)
   do_ip_setsockopt (net/ipv4/ip_sockglue.c:1347)
   ip_setsockopt (net/ipv4/ip_sockglue.c:1417)
   do_sock_setsockopt (net/socket.c:2368)
   __sys_setsockopt (net/socket.c:2393)
   __x64_sys_setsockopt (net/socket.c:2396)
   do_syscall_64 (arch/x86/entry/syscall_64.c:94)
   entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)

Reachable by an unprivileged user via a user+network namespace.

Use the atomic sk_dst_reset() so the cache is cleared and released with a
single xchg(): whichever side wins releases the dst once, the other sees
NULL and does nothing. Behaviour is otherwise unchanged.
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.121%, percentile 2.102%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 173)

- debian linux (Debian): \< 6.1.187-1 \| \< 6.12.107-1 \| \< 7.1.6-1
- debian linux-6.12 (Debian): \< 6.12.107-1~deb12u1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-202.212 \| \< 6.8.0-149.149 \| \< 7.0.0-38.38
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1119.126 \| \< 6.8.0-1069.74 \| \< 7.0.0-1014.14
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1119.126~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.17 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1069.74~22.04.1
- ubuntu linux-aws-7.0 (Ubuntu): \< 7.0.0-1014.14~24.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1119.126+fips1 \| \< 6.8.0-1069.74+fips1

## References (first 20 of 37)

- <https://git.kernel.org/stable/c/e8686fd8d18b99f3a9038683045b2f2338a7706d>
- <https://git.kernel.org/stable/c/a9340ebdc13f8bb5063c0bc0b037ee7e640d4ae9>
- <https://git.kernel.org/stable/c/f833821e4b52ab6335d443ede5fb79c38e61d19a>
- <https://git.kernel.org/stable/c/f0ab9a71167bae308e05ab13b65e2007504a603f>
- <https://git.kernel.org/stable/c/8dd8929b71c4f06c614f8f54c2cc070453faae16>
- <https://git.kernel.org/stable/c/0ea8f06454012d9e7f9c6e6253df710949bf6294>
- <https://git.kernel.org/stable/c/96b678d08268b5f5c6fc99d4289d9b7e334fc683>
- <https://git.kernel.org/stable/c/c283e9ada7fcb7dd4b10592623086b2e6d2f9925>
- <https://ubuntu.com/security/CVE-2026-64581>
- <https://www.cve.org/CVERecord?id=CVE-2026-64581>
- <https://git.kernel.org/linus/c283e9ada7fcb7dd4b10592623086b2e6d2f9925>
- <https://ubuntu.com/security/notices/USN-8888-1>
- <https://ubuntu.com/security/notices/USN-8889-1>
- <https://ubuntu.com/security/notices/USN-8887-1>
- <https://ubuntu.com/security/notices/USN-8886-1>
- <https://ubuntu.com/security/notices/USN-8888-2>
- <https://ubuntu.com/security/notices/USN-8887-2>
- <https://ubuntu.com/security/notices/USN-8887-3>
- <https://security-tracker.debian.org/tracker/CVE-2026-64581>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-64581>

---

Data as of 2026-12-05T09:54:44.377Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
