CVE-2026-64581: xfrm: fix sk_dst_cache double-free in xfrm_user_policy()

Published Aug 5, 2026
·
Updated

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

xfrm: fix skdstcache double-free in xfrmuserpolicy()

xfrmuserpolicy() clears the socket dst cache with skdstreset(), i.e. the non-atomic skdstset(sk, NULL): it reads skdstcache with rcudereferenceprotected(), stores NULL and dstrelease()s the old dst. That is only safe if no other thread modifies skdstcache concurrently.

For a connected UDP socket that does not hold: the transmit fast path (udpsendmsg -> skdstcheck -> skdstreset) 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 dstrelease() it, dropping the socket's single reference twice and freeing the xfrmdst bundle while it is still referenced:

BUG: KASAN: slab-use-after-free in dstrelease Write of size 4 at addr ffff88801897b6c0 by task exploit/155 Call Trace: ... dstrelease (... ./include/linux/rcuref.h:109) xfrmuserpolicy (./include/net/sock.h:2239 ./include/net/sock.h:2256 net/xfrm/xfrmstate.c:3053) doipsetsockopt (net/ipv4/ipsockglue.c:1347) ipsetsockopt (net/ipv4/ipsockglue.c:1417) dosocksetsockopt (net/socket.c:2368) syssetsockopt (net/socket.c:2393) x64syssetsockopt (net/socket.c:2396) dosyscall64 (arch/x86/entry/syscall64.c:94) entrySYSCALL64afterhwframe (arch/x86/entry/entry64.S:121)

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

Use the atomic skdstreset() 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.

Affected Software

1 affected component
Linux Kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch xfrm: fix sk_dst_cache double-free in xfrm_user_policy()

Event History

Aug 5, 2026
CVE Published
via MITRE·08:09 AM
Data Sourced
via MITRE·08:09 AM
Description
Data Sourced
via NVD·08:16 AM
Description
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-64581?

CVE-2026-64581 is rated with a risk score of 65.

2

How do I fix CVE-2026-64581?

To fix CVE-2026-64581, ensure that your Linux kernel is updated to the version that includes the patch for this vulnerability.

3

What type of vulnerability is CVE-2026-64581?

CVE-2026-64581 is classified as a Use After Free vulnerability in the Linux kernel.

4

What components are affected by CVE-2026-64581?

CVE-2026-64581 specifically affects the xfrm_user_policy function in the Linux kernel.

5

When was CVE-2026-64581 published?

CVE-2026-64581 was published on August 5, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203