# CVE-2026-64109: af\_unix: Fix UAF read of tail-\>len in unix\_stream\_data\_wait()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 4, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2026-07-19T15:40:11.510Z
- **Modified:** 2026-10-19T21:17:23.517Z

## Who should check

- Anyone running Linux \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< 26342087fac93b3932e6af61dc91ec029cb8a623; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< 38bccb927d83d7d52e5b20015a172a0b6101d11e; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< acdff9907478e82208475b1151700d0b71dcdc63; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< 5f162f95a95834f06a8ec6140889272ad12e842f; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< be309f8eae8b474a4a617eaae01324da996fc719
- Anyone running Linux 4.2

## Description

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

af\_unix: Fix UAF read of tail-\>len in unix\_stream\_data\_wait()

unix\_stream\_data\_wait() does skb\_peek\_tail(&sk-\>sk\_receive\_queue) 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 unix\_stream\_data\_wait() 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: af\_unix: implement splice for stream
af\_unix sockets"), \`tail\` is actually dereferenced, which can cause UAF in
the following race scenario (where test\_setup() runs single-threaded,
and afterwards, test\_thread1() 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 unix\_stream\_data\_wait().
\>
\> However, commit a0dbf5f818f9 ("af\_unix: Support MSG\_SPLICE\_PAGES") and
\> commit 57d44a354a43 ("unix: Convert unix\_stream\_sendpage() to use
\> MSG\_SPLICE\_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.

## Affected and fixed versions

- Linux: \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< 26342087fac93b3932e6af61dc91ec029cb8a623; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< 38bccb927d83d7d52e5b20015a172a0b6101d11e; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< acdff9907478e82208475b1151700d0b71dcdc63; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< 5f162f95a95834f06a8ec6140889272ad12e842f; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< be309f8eae8b474a4a617eaae01324da996fc719 (cvelist)
- Linux: 4.2 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-64109. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-64109.md
Affected: Linux >= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, < 26342087fac93b3932e6af61dc91ec029cb8a623; >= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, < 38bccb927d83d7d52e5b20015a172a0b6101d11e; >= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, < acdff9907478e82208475b1151700d0b71dcdc63; >= 2b514574f7e88c8498027ee…
Fixed in: Linux 26342087fac93b3932e6af61dc91ec029cb8a623, Linux 38bccb927d83d7d52e5b20015a172a0b6101d11e, Linux 5f162f95a95834f06a8ec6140889272ad12e842f

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-64109 being exploited?

There is no confirmed exploitation: CVE-2026-64109 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-64109?

High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-64109?

Linux \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< 26342087fac93b3932e6af61dc91ec029cb8a623; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< 38bccb927d83d7d52e5b20015a172a0b6101d11e; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< acdff9907478e82208475b1151700d0b71dcdc63; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< 5f162f95a95834f06a8ec6140889272ad12e842f; \>= 2b514574f7e88c8498027ee366fd6e7aae5aa4b5, \< be309f8eae8b474a4a617eaae01324da996fc719; Linux 4.2.

### Is there a fix for CVE-2026-64109?

Yes. Fixed in Linux 26342087fac93b3932e6af61dc91ec029cb8a623, Linux 38bccb927d83d7d52e5b20015a172a0b6101d11e, Linux 5f162f95a95834f06a8ec6140889272ad12e842f. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-64109?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/26342087fac93b3932e6af61dc91ec029cb8a623>
- patch: <https://git.kernel.org/stable/c/38bccb927d83d7d52e5b20015a172a0b6101d11e>
- patch: <https://git.kernel.org/stable/c/acdff9907478e82208475b1151700d0b71dcdc63>
- patch: <https://git.kernel.org/stable/c/5f162f95a95834f06a8ec6140889272ad12e842f>
- patch: <https://git.kernel.org/stable/c/be309f8eae8b474a4a617eaae01324da996fc719>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-64109>

HTML: <https://flawdb.com/CVE-2026-64109> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-64109>
