CVE-2026-64109

Source
https://cve.org/CVERecord?id=CVE-2026-64109
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64109.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-64109
Downstream
Published
2026-07-19T15:40:11.510Z
Modified
2026-07-22T05:29:57.107647344Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H CVSS Calculator
Summary
af_unix: Fix UAF read of tail->len in unix_stream_data_wait()
Details

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 test_thread2() run concurrently in two threads:

static int socks[2];
void test_setup(void) {
  socketpair(AF_UNIX, SOCK_STREAM, 0, socks);
  send(socks[1], "A", 1, 0);
  int peekoff = 1;
  setsockopt(socks[0], SOL_SOCKET, SO_PEEK_OFF, &peekoff, sizeof(peekoff));
}
void test_thread1(void) {
  char dummy;
  recv(socks[0], &dummy, 1, MSG_PEEK);
}
void test_thread2(void) {
  char dummy;
  recv(socks[0], &dummy, 1, 0);
  shutdown(socks[1], SHUT_WR);
}

when racing like this:

thread1                       thread2
unix_stream_read_generic
  mutex_lock(&u->iolock)
  skb_peek(&sk->sk_receive_queue)
  skb_peek_next(skb, &sk->sk_receive_queue)
  mutex_unlock(&u->iolock)
                              unix_stream_read_generic
                                unix_state_lock(sk)
                                skb_peek(&sk->sk_receive_queue)
                                unix_state_unlock(sk)
  unix_stream_data_wait
    unix_state_lock(sk)
    tail = skb_peek_tail(&sk->sk_receive_queue)
                                spin_lock(&sk->sk_receive_queue.lock)
                                __skb_unlink(skb, &sk->sk_receive_queue)
                                spin_unlock(&sk->sk_receive_queue.lock)
                                consume_skb(skb) [frees the SKB]
    `tail != last`: false
    `tail`: true
    `tail->len != last_len` ***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: af_unix: 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 unixstreamdata_wait().

However, commit a0dbf5f818f9 ("afunix: Support MSGSPLICEPAGES") and commit 57d44a354a43 ("unix: Convert unixstreamsendpage() to use MSGSPLICE_PAGES") refactored sendmsg(), and now data is always added to a new skb.

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

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64109.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
2b514574f7e88c8498027ee366fd6e7aae5aa4b5
Fixed
26342087fac93b3932e6af61dc91ec029cb8a623
Fixed
38bccb927d83d7d52e5b20015a172a0b6101d11e
Fixed
acdff9907478e82208475b1151700d0b71dcdc63
Fixed
5f162f95a95834f06a8ec6140889272ad12e842f
Fixed
be309f8eae8b474a4a617eaae01324da996fc719

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64109.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.2.0
Fixed
6.6.143
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.92
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.34
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.0.11

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64109.json"