# CVE-2023-52772: af\_unix: fix use-after-free in unix\_stream\_read\_actor()

> 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.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-05-21T15:30:54.292Z
- **Modified:** 2026-08-05T09:11:21.348Z

## Who should check

- Anyone running Linux \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< 75bcfc188abf4fae9c1d5f5dc0a03540be602eef; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< d179189eec426fe4801e4b91efa1889faed12700; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< eae0b295ce16d8c8b4114c3037993191b4bb92f0; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< 069a3ec329ff43e7869a3d94c62cd03203016bce; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< 4b7b492615cf3017190f55444f7016812b66611d
- Anyone running Linux 5.15

## Description

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

af\_unix: fix use-after-free in unix\_stream\_read\_actor()

syzbot reported the following crash \[1\]

After releasing unix socket lock, u-\>oob\_skb can be changed
by another thread. We must temporarily increase skb refcount
to make sure this other thread will not free the skb under us.

\[1\]

BUG: KASAN: slab-use-after-free in unix\_stream\_read\_actor+0xa7/0xc0 net/unix/af\_unix.c:2866
Read of size 4 at addr ffff88801f3b9cc4 by task syz-executor107/5297

CPU: 1 PID: 5297 Comm: syz-executor107 Not tainted 6.6.0-syzkaller-15910-gb8e3a87a627b \#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
Call Trace:
\<TASK\>
\_\_dump\_stack lib/dump\_stack.c:88 \[inline\]
dump\_stack\_lvl+0xd9/0x1b0 lib/dump\_stack.c:106
print\_address\_description mm/kasan/report.c:364 \[inline\]
print\_report+0xc4/0x620 mm/kasan/report.c:475
kasan\_report+0xda/0x110 mm/kasan/report.c:588
unix\_stream\_read\_actor+0xa7/0xc0 net/unix/af\_unix.c:2866
unix\_stream\_recv\_urg net/unix/af\_unix.c:2587 \[inline\]
unix\_stream\_read\_generic+0x19a5/0x2480 net/unix/af\_unix.c:2666
unix\_stream\_recvmsg+0x189/0x1b0 net/unix/af\_unix.c:2903
sock\_recvmsg\_nosec net/socket.c:1044 \[inline\]
sock\_recvmsg+0xe2/0x170 net/socket.c:1066
\_\_\_\_sys\_recvmsg+0x21f/0x5c0 net/socket.c:2803
\_\_\_sys\_recvmsg+0x115/0x1a0 net/socket.c:2845
\_\_sys\_recvmsg+0x114/0x1e0 net/socket.c:2875
do\_syscall\_x64 arch/x86/entry/common.c:51 \[inline\]
do\_syscall\_64+0x3f/0x110 arch/x86/entry/common.c:82
entry\_SYSCALL\_64\_after\_hwframe+0x63/0x6b
RIP: 0033:0x7fc67492c559
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 \<48\> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc6748ab228 EFLAGS: 00000246 ORIG\_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 000000000000001c RCX: 00007fc67492c559
RDX: 0000000040010083 RSI: 0000000020000140 RDI: 0000000000000004
RBP: 00007fc6749b6348 R08: 00007fc6748ab6c0 R09: 00007fc6748ab6c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc6749b6340
R13: 00007fc6749b634c R14: 00007ffe9fac52a0 R15: 00007ffe9fac5388
\</TASK\>

Allocated by task 5295:
kasan\_save\_stack+0x33/0x50 mm/kasan/common.c:45
kasan\_set\_track+0x25/0x30 mm/kasan/common.c:52
\_\_kasan\_slab\_alloc+0x81/0x90 mm/kasan/common.c:328
kasan\_slab\_alloc include/linux/kasan.h:188 \[inline\]
slab\_post\_alloc\_hook mm/slab.h:763 \[inline\]
slab\_alloc\_node mm/slub.c:3478 \[inline\]
kmem\_cache\_alloc\_node+0x180/0x3c0 mm/slub.c:3523
\_\_alloc\_skb+0x287/0x330 net/core/skbuff.c:641
alloc\_skb include/linux/skbuff.h:1286 \[inline\]
alloc\_skb\_with\_frags+0xe4/0x710 net/core/skbuff.c:6331
sock\_alloc\_send\_pskb+0x7e4/0x970 net/core/sock.c:2780
sock\_alloc\_send\_skb include/net/sock.h:1884 \[inline\]
queue\_oob net/unix/af\_unix.c:2147 \[inline\]
unix\_stream\_sendmsg+0xb5f/0x10a0 net/unix/af\_unix.c:2301
sock\_sendmsg\_nosec net/socket.c:730 \[inline\]
\_\_sock\_sendmsg+0xd5/0x180 net/socket.c:745
\_\_\_\_sys\_sendmsg+0x6ac/0x940 net/socket.c:2584
\_\_\_sys\_sendmsg+0x135/0x1d0 net/socket.c:2638
\_\_sys\_sendmsg+0x117/0x1e0 net/socket.c:2667
do\_syscall\_x64 arch/x86/entry/common.c:51 \[inline\]
do\_syscall\_64+0x3f/0x110 arch/x86/entry/common.c:82
entry\_SYSCALL\_64\_after\_hwframe+0x63/0x6b

Freed by task 5295:
kasan\_save\_stack+0x33/0x50 mm/kasan/common.c:45
kasan\_set\_track+0x25/0x30 mm/kasan/common.c:52
kasan\_save\_free\_info+0x2b/0x40 mm/kasan/generic.c:522
\_\_\_\_kasan\_slab\_free mm/kasan/common.c:236 \[inline\]
\_\_\_\_kasan\_slab\_free+0x15b/0x1b0 mm/kasan/common.c:200
kasan\_slab\_free include/linux/kasan.h:164 \[inline\]
slab\_free\_hook mm/slub.c:1800 \[inline\]
slab\_free\_freelist\_hook+0x114/0x1e0 mm/slub.c:1826
slab\_free mm/slub.c:3809 \[inline\]
kmem\_cache\_free+0xf8/0x340 mm/slub.c:3831
kfree\_skbmem+0xef/0x1b0 net/core/skbuff.c:1015
\_\_kfree\_skb net/core/skbuff.c:1073 \[inline\]
consume\_skb net/core/skbuff.c:1288 \[inline\]
consume\_skb+0xdf/0x170 net/core/skbuff.c:1282
queue\_oob net/unix/af\_unix.c:2178 \[inline\]
u
---truncated---

## Affected and fixed versions

- Linux: \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< 75bcfc188abf4fae9c1d5f5dc0a03540be602eef; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< d179189eec426fe4801e4b91efa1889faed12700; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< eae0b295ce16d8c8b4114c3037993191b4bb92f0; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< 069a3ec329ff43e7869a3d94c62cd03203016bce; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< 4b7b492615cf3017190f55444f7016812b66611d (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

- Upgrade Linux to 4b7b492615cf3017190f55444f7016812b66611d or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-52772.md
Affected: Linux >= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, < 75bcfc188abf4fae9c1d5f5dc0a03540be602eef; >= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, < d179189eec426fe4801e4b91efa1889faed12700; >= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, < eae0b295ce16d8c8b4114c3037993191b4bb92f0; >= 876c14ad014d0e39c57cbfd…
Fixed in: Linux 75bcfc188abf4fae9c1d5f5dc0a03540be602eef, Linux 069a3ec329ff43e7869a3d94c62cd03203016bce, Linux 4b7b492615cf3017190f55444f7016812b66611d

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-2023-52772 being exploited?

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

### How serious is CVE-2023-52772?

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

### Which versions are affected by CVE-2023-52772?

Linux \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< 75bcfc188abf4fae9c1d5f5dc0a03540be602eef; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< d179189eec426fe4801e4b91efa1889faed12700; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< eae0b295ce16d8c8b4114c3037993191b4bb92f0; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< 069a3ec329ff43e7869a3d94c62cd03203016bce; \>= 876c14ad014d0e39c57cbfde53e13d17cdb6d645, \< 4b7b492615cf3017190f55444f7016812b66611d; Linux 5.15.

### Is there a fix for CVE-2023-52772?

Yes. Fixed in Linux 75bcfc188abf4fae9c1d5f5dc0a03540be602eef, Linux 069a3ec329ff43e7869a3d94c62cd03203016bce, Linux 4b7b492615cf3017190f55444f7016812b66611d. Upgrade Linux to 4b7b492615cf3017190f55444f7016812b66611d or later.

### How do I check if I'm affected by CVE-2023-52772?

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/75bcfc188abf4fae9c1d5f5dc0a03540be602eef>
- patch: <https://git.kernel.org/stable/c/d179189eec426fe4801e4b91efa1889faed12700>
- patch: <https://git.kernel.org/stable/c/eae0b295ce16d8c8b4114c3037993191b4bb92f0>
- patch: <https://git.kernel.org/stable/c/069a3ec329ff43e7869a3d94c62cd03203016bce>
- patch: <https://git.kernel.org/stable/c/4b7b492615cf3017190f55444f7016812b66611d>

## 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-2023-52772>

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