CVE-2026-64109: af_unix: Fix UAF read of tail->len in unix_stream_data_wait()

Published Jul 19, 2026
·
Updated

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

afunix: Fix UAF read of tail->len in unixstreamdatawait()

unixstreamdatawait() does skbpeektail(&sk->skreceivequeue) without holding any lock that prevents SKBs on that queue from being dequeued and freed. This has been the case since commit 79f632c71bea ("unix/stream: fix peeking with an offset larger than data in queue"). The first consequence of this is that the pointer comparison tail != last can be false even if last semantically refers to an already-freed SKB while tail is a new SKB allocated at the same address; which can cause unixstreamdatawait() to wrongly keep blocking after new data has arrived, but only in a weird scenario where a peeking recv() and a normal recv() on the same socket are racing, which is probably not a real problem.

But since commit 2b514574f7e8 ("net: afunix: implement splice for stream afunix sockets"), tail is actually dereferenced, which can cause UAF in the following race scenario (where testsetup() runs single-threaded, and afterwards, testthread1() and testthread2() run concurrently in two threads: static int socks[2]; void testsetup(void) { socketpair(AFUNIX, SOCKSTREAM, 0, socks); send(socks[1], "A", 1, 0); int peekoff = 1; setsockopt(socks[0], SOLSOCKET, SOPEEKOFF, &peekoff, sizeof(peekoff)); } void testthread1(void) { char dummy; recv(socks[0], &dummy, 1, MSGPEEK); } void testthread2(void) { char dummy; recv(socks[0], &dummy, 1, 0); shutdown(socks[1], SHUTWR); }

when racing like this: thread1 thread2 unixstreamreadgeneric mutexlock(&u->iolock) skbpeek(&sk->skreceivequeue) skbpeeknext(skb, &sk->skreceivequeue) mutexunlock(&u->iolock) unixstreamreadgeneric unixstatelock(sk) skbpeek(&sk->skreceivequeue) unixstateunlock(sk) unixstreamdatawait unixstatelock(sk) tail = skbpeektail(&sk->skreceivequeue) spinlock(&sk->skreceivequeue.lock) skbunlink(skb, &sk->skreceivequeue) spinunlock(&sk->skreceivequeue.lock) consumeskb(skb) [frees the SKB] tail != last: false tail: true tail->len != lastlen UAF

Fix the UAF by removing the read of tail->len; checking tail->len would only make sense if SKBs in the receive queue of a UNIX socket could grow, which can no longer happen.

Kuniyuki explained:

When commit 869e7c62486e ("net: afunix: implement stream sendpage support") added sendpage() support, data could be appended to the last skb in the receiver's queue. That's why we needed to check if the length of the last skb was changed while waiting for new data in unixstreamdatawait(). However, commit a0dbf5f818f9 ("afunix: Support MSGSPLICEPAGES") and commit 57d44a354a43 ("unix: Convert unixstreamsendpage() to use MSGSPLICEPAGES") refactored sendmsg(), and now data is always added to a new skb.

That means this fix is not suitable for kernels before 6.5.

Affected Software

9 affected components
Linux Kernel<6.5
Linux Linux kernel>=4.2<6.6.143
Linux Linux kernel>=6.7<6.12.92
Linux Linux kernel>=6.13<6.18.34
Linux Linux kernel>=6.19<7.0.11
Linux Linux kernel=7.1-rc1
Linux Linux kernel=7.1-rc2
Linux Linux kernel=7.1-rc3
Linux Linux kernel=7.1-rc4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.5

Event History

Jul 19, 2026
CVE Published
via MITRE·03:40 PM
Data Sourced
via MITRE·03:40 PM
DescriptionSeverity
Data Sourced
via NVD·04:17 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-64109?

The severity of CVE-2026-64109 is high, with a CVSS score of 8.8.

2

How do I fix CVE-2026-64109?

To fix CVE-2026-64109, update your Linux kernel to the latest stable version that includes the relevant patches.

3

What is the risk associated with CVE-2026-64109?

CVE-2026-64109 has a risk rating of 72, indicating a significant potential for exploitation.

4

What does CVE-2026-64109 affect?

CVE-2026-64109 affects the Linux kernel, specifically the af_unix implementation.

5

How was CVE-2026-64109 discovered?

CVE-2026-64109 was discovered due to a use-after-free vulnerability in the unix_stream_data_wait() function.

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