# CVE-2025-38236: af\_unix: Don't leave consecutive consumed OOB skbs.

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; 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.29% (percentile 14, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-07-08T07:35:23.238Z
- **Modified:** 2026-10-15T01:06:56.710Z

## Who should check

- Anyone running Linux \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 523edfed4f68b7794d85b9ac828c5f8f4442e4c5; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< a12237865b48a73183df252029ff5065d73d305e; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< fad0a2c16062ac7c606b93166a7ce9d265bab976; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 61a9ad7b69ce688697e5f63332f03e17725353bc; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 8db4d2d026e6e3649832bfe23b96c4acff0756db; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 32ca245464e1479bfea8592b9db227fdc1641705
- Anyone running Linux 5.15

## Description

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

af\_unix: Don't leave consecutive consumed OOB skbs.

Jann Horn reported a use-after-free in unix\_stream\_read\_generic().

The following sequences reproduce the issue:

  $ python3
  from socket import \*
  s1, s2 = socketpair(AF\_UNIX, SOCK\_STREAM)
  s1.send(b'x', MSG\_OOB)
  s2.recv(1, MSG\_OOB)     \# leave a consumed OOB skb
  s1.send(b'y', MSG\_OOB)
  s2.recv(1, MSG\_OOB)     \# leave a consumed OOB skb
  s1.send(b'z', MSG\_OOB)
  s2.recv(1)              \# recv 'z' illegally
  s2.recv(1, MSG\_OOB)     \# access 'z' skb (use-after-free)

Even though a user reads OOB data, the skb holding the data stays on
the recv queue to mark the OOB boundary and break the next recv().

After the last send() in the scenario above, the sk2's recv queue has
2 leading consumed OOB skbs and 1 real OOB skb.

Then, the following happens during the next recv() without MSG\_OOB

  1. unix\_stream\_read\_generic() peeks the first consumed OOB skb
  2. manage\_oob() returns the next consumed OOB skb
  3. unix\_stream\_read\_generic() fetches the next not-yet-consumed OOB skb
  4. unix\_stream\_read\_generic() reads and frees the OOB skb

, and the last recv(MSG\_OOB) triggers KASAN splat.

The 3. above occurs because of the SO\_PEEK\_OFF code, which does not
expect unix\_skb\_len(skb) to be 0, but this is true for such consumed
OOB skbs.

  while (skip \>= unix\_skb\_len(skb)) {
    skip -= unix\_skb\_len(skb);
    skb = skb\_peek\_next(skb, &sk-\>sk\_receive\_queue);
    ...
  }

In addition to this use-after-free, there is another issue that
ioctl(SIOCATMARK) does not function properly with consecutive consumed
OOB skbs.

So, nothing good comes out of such a situation.

Instead of complicating manage\_oob(), ioctl() handling, and the next
ECONNRESET fix by introducing a loop for consecutive consumed OOB skbs,
let's not leave such consecutive OOB unnecessarily.

Now, while receiving an OOB skb in unix\_stream\_recv\_urg(), if its
previous skb is a consumed OOB skb, it is freed.

\[0\]:
BUG: KASAN: slab-use-after-free in unix\_stream\_read\_actor (net/unix/af\_unix.c:3027)
Read of size 4 at addr ffff888106ef2904 by task python3/315

CPU: 2 UID: 0 PID: 315 Comm: python3 Not tainted 6.16.0-rc1-00407-gec315832f6f9 \#8 PREEMPT(voluntary)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-4.fc42 04/01/2014
Call Trace:
 \<TASK\>
 dump\_stack\_lvl (lib/dump\_stack.c:122)
 print\_report (mm/kasan/report.c:409 mm/kasan/report.c:521)
 kasan\_report (mm/kasan/report.c:636)
 unix\_stream\_read\_actor (net/unix/af\_unix.c:3027)
 unix\_stream\_read\_generic (net/unix/af\_unix.c:2708 net/unix/af\_unix.c:2847)
 unix\_stream\_recvmsg (net/unix/af\_unix.c:3048)
 sock\_recvmsg (net/socket.c:1063 (discriminator 20) net/socket.c:1085 (discriminator 20))
 \_\_sys\_recvfrom (net/socket.c:2278)
 \_\_x64\_sys\_recvfrom (net/socket.c:2291 (discriminator 1) net/socket.c:2287 (discriminator 1) net/socket.c:2287 (discriminator 1))
 do\_syscall\_64 (arch/x86/entry/syscall\_64.c:63 (discriminator 1) arch/x86/entry/syscall\_64.c:94 (discriminator 1))
 entry\_SYSCALL\_64\_after\_hwframe (arch/x86/entry/entry\_64.S:130)
RIP: 0033:0x7f8911fcea06
Code: 5d e8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 75 19 83 e2 39 83 fa 08 75 11 e8 26 ff ff ff 66 0f 1f 44 00 00 48 8b 45 10 0f 05 \<48\> 8b 5d f8 c9 c3 0f 1f 40 00 f3 0f 1e fa 55 48 89 e5 48 83 ec 08
RSP: 002b:00007fffdb0dccb0 EFLAGS: 00000202 ORIG\_RAX: 000000000000002d
RAX: ffffffffffffffda RBX: 00007fffdb0dcdc8 RCX: 00007f8911fcea06
RDX: 0000000000000001 RSI: 00007f8911a5e060 RDI: 0000000000000006
RBP: 00007fffdb0dccd0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000202 R12: 00007f89119a7d20
R13: ffffffffc4653600 R14: 0000000000000000 R15: 0000000000000000
 \</TASK\>

Allocated by task 315:
 kasan\_save\_stack (mm/kasan/common.c:48)
 kasan\_save\_track (mm/kasan/common.c:60 (discriminator 1) mm/kasan/common.c:69 (discriminator 1))
 \_\_kasan\_slab\_alloc (mm/kasan/common.c:348)
 kmem\_cache\_alloc\_
---truncated---

## Affected and fixed versions

- Linux: \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 523edfed4f68b7794d85b9ac828c5f8f4442e4c5; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< a12237865b48a73183df252029ff5065d73d305e; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< fad0a2c16062ac7c606b93166a7ce9d265bab976; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 61a9ad7b69ce688697e5f63332f03e17725353bc; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 8db4d2d026e6e3649832bfe23b96c4acff0756db; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 32ca245464e1479bfea8592b9db227fdc1641705 (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

- Upgrade Linux to 32ca245464e1479bfea8592b9db227fdc1641705 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-38236.md
Affected: Linux >= 314001f0bf927015e459c9d387d62a231fe93af3, < 523edfed4f68b7794d85b9ac828c5f8f4442e4c5; >= 314001f0bf927015e459c9d387d62a231fe93af3, < a12237865b48a73183df252029ff5065d73d305e; >= 314001f0bf927015e459c9d387d62a231fe93af3, < fad0a2c16062ac7c606b93166a7ce9d265bab976; >= 314001f0bf927015e459c9d…
Fixed in: Linux 523edfed4f68b7794d85b9ac828c5f8f4442e4c5, Linux 61a9ad7b69ce688697e5f63332f03e17725353bc, Linux 8db4d2d026e6e3649832bfe23b96c4acff0756db, Linux 32ca245464e1479bfea8592b9db227fdc1641705

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-2025-38236 being exploited?

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

### How serious is CVE-2025-38236?

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

### Which versions are affected by CVE-2025-38236?

Linux \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 523edfed4f68b7794d85b9ac828c5f8f4442e4c5; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< a12237865b48a73183df252029ff5065d73d305e; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< fad0a2c16062ac7c606b93166a7ce9d265bab976; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 61a9ad7b69ce688697e5f63332f03e17725353bc; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 8db4d2d026e6e3649832bfe23b96c4acff0756db; \>= 314001f0bf927015e459c9d387d62a231fe93af3, \< 32ca245464e1479bfea8592b9db227fdc1641705; Linux 5.15.

### Is there a fix for CVE-2025-38236?

Yes. Fixed in Linux 523edfed4f68b7794d85b9ac828c5f8f4442e4c5, Linux 61a9ad7b69ce688697e5f63332f03e17725353bc, Linux 8db4d2d026e6e3649832bfe23b96c4acff0756db, Linux 32ca245464e1479bfea8592b9db227fdc1641705. Upgrade Linux to 32ca245464e1479bfea8592b9db227fdc1641705 or later.

### How do I check if I'm affected by CVE-2025-38236?

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/523edfed4f68b7794d85b9ac828c5f8f4442e4c5>
- patch: <https://git.kernel.org/stable/c/a12237865b48a73183df252029ff5065d73d305e>
- patch: <https://git.kernel.org/stable/c/fad0a2c16062ac7c606b93166a7ce9d265bab976>
- patch: <https://git.kernel.org/stable/c/61a9ad7b69ce688697e5f63332f03e17725353bc>
- patch: <https://git.kernel.org/stable/c/8db4d2d026e6e3649832bfe23b96c4acff0756db>
- patch: <https://git.kernel.org/stable/c/32ca245464e1479bfea8592b9db227fdc1641705>
- other: <https://project-zero.issues.chromium.org/issues/423023990>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>

## 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-2025-38236>

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