# CVE-2023-52438: binder: fix use-after-free in shinker's callback

> 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 18, 2026-11-28)
- **CWE:** CWE-416
- **Published:** 2024-02-20T18:34:48.694Z
- **Modified:** 2026-08-05T09:09:55.580Z

## Who should check

- Anyone running Linux \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< a53e15e592b4dcc91c3a3b8514e484a0bdbc53a3; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< c8c1158ffb007197f31f9d9170cf13e4f34cbb5c; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< 8ad4d580e8aff8de2a4d57c5930fcc29f1ffd4a6; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< 9fa04c93f24138747807fe75b5591bb680098f56; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< a49087ab93508b60d9b8add91707a22dda832869; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< e074686e993ff1be5f21b085a3b1b4275ccd5727; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< 3f489c2067c5824528212b0fc18b28d51332d906
- Anyone running Linux 4.20

## Description

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

binder: fix use-after-free in shinker's callback

The mmap read lock is used during the shrinker's callback, which means
that using alloc-\>vma pointer isn't safe as it can race with munmap().
As of commit dd2283f2605e ("mm: mmap: zap pages with read mmap\_sem in
munmap") the mmap lock is downgraded after the vma has been isolated.

I was able to reproduce this issue by manually adding some delays and
triggering page reclaiming through the shrinker's debug sysfs. The
following KASAN report confirms the UAF:

  ==================================================================
  BUG: KASAN: slab-use-after-free in zap\_page\_range\_single+0x470/0x4b8
  Read of size 8 at addr ffff356ed50e50f0 by task bash/478

  CPU: 1 PID: 478 Comm: bash Not tainted 6.6.0-rc5-00055-g1c8b86a3799f-dirty \#70
  Hardware name: linux,dummy-virt (DT)
  Call trace:
   zap\_page\_range\_single+0x470/0x4b8
   binder\_alloc\_free\_page+0x608/0xadc
   \_\_list\_lru\_walk\_one+0x130/0x3b0
   list\_lru\_walk\_node+0xc4/0x22c
   binder\_shrink\_scan+0x108/0x1dc
   shrinker\_debugfs\_scan\_write+0x2b4/0x500
   full\_proxy\_write+0xd4/0x140
   vfs\_write+0x1ac/0x758
   ksys\_write+0xf0/0x1dc
   \_\_arm64\_sys\_write+0x6c/0x9c

  Allocated by task 492:
   kmem\_cache\_alloc+0x130/0x368
   vm\_area\_alloc+0x2c/0x190
   mmap\_region+0x258/0x18bc
   do\_mmap+0x694/0xa60
   vm\_mmap\_pgoff+0x170/0x29c
   ksys\_mmap\_pgoff+0x290/0x3a0
   \_\_arm64\_sys\_mmap+0xcc/0x144

  Freed by task 491:
   kmem\_cache\_free+0x17c/0x3c8
   vm\_area\_free\_rcu\_cb+0x74/0x98
   rcu\_core+0xa38/0x26d4
   rcu\_core\_si+0x10/0x1c
   \_\_do\_softirq+0x2fc/0xd24

  Last potentially related work creation:
   \_\_call\_rcu\_common.constprop.0+0x6c/0xba0
   call\_rcu+0x10/0x1c
   vm\_area\_free+0x18/0x24
   remove\_vma+0xe4/0x118
   do\_vmi\_align\_munmap.isra.0+0x718/0xb5c
   do\_vmi\_munmap+0xdc/0x1fc
   \_\_vm\_munmap+0x10c/0x278
   \_\_arm64\_sys\_munmap+0x58/0x7c

Fix this issue by performing instead a vma\_lookup() which will fail to
find the vma that was isolated before the mmap lock downgrade. Note that
this option has better performance than upgrading to a mmap write lock
which would increase contention. Plus, mmap\_write\_trylock() has been
recently removed anyway.

## Affected and fixed versions

- Linux: \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< a53e15e592b4dcc91c3a3b8514e484a0bdbc53a3; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< c8c1158ffb007197f31f9d9170cf13e4f34cbb5c; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< 8ad4d580e8aff8de2a4d57c5930fcc29f1ffd4a6; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< 9fa04c93f24138747807fe75b5591bb680098f56; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< a49087ab93508b60d9b8add91707a22dda832869; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< e074686e993ff1be5f21b085a3b1b4275ccd5727; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< 3f489c2067c5824528212b0fc18b28d51332d906 (cvelist)
- Linux: 4.20 (cvelist)

## Mitigation

- Upgrade Linux to 3f489c2067c5824528212b0fc18b28d51332d906 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-52438. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52438.md
Affected: Linux >= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, < a53e15e592b4dcc91c3a3b8514e484a0bdbc53a3; >= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, < c8c1158ffb007197f31f9d9170cf13e4f34cbb5c; >= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, < 8ad4d580e8aff8de2a4d57c5930fcc29f1ffd4a6; >= dd2283f2605e3b3e9c61bca…
Fixed in: Linux 8ad4d580e8aff8de2a4d57c5930fcc29f1ffd4a6, Linux 9fa04c93f24138747807fe75b5591bb680098f56, Linux 3f489c2067c5824528212b0fc18b28d51332d906

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-52438 being exploited?

There is no confirmed exploitation: CVE-2023-52438 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-28).

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

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

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

Linux \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< a53e15e592b4dcc91c3a3b8514e484a0bdbc53a3; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< c8c1158ffb007197f31f9d9170cf13e4f34cbb5c; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< 8ad4d580e8aff8de2a4d57c5930fcc29f1ffd4a6; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< 9fa04c93f24138747807fe75b5591bb680098f56; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< a49087ab93508b60d9b8add91707a22dda832869; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< e074686e993ff1be5f21b085a3b1b4275ccd5727; \>= dd2283f2605e3b3e9c61bcae844b34f2afa4813f, \< 3f489c2067c5824528212b0fc18b28d51332d906; Linux 4.20.

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

Yes. Fixed in Linux 8ad4d580e8aff8de2a4d57c5930fcc29f1ffd4a6, Linux 9fa04c93f24138747807fe75b5591bb680098f56, Linux 3f489c2067c5824528212b0fc18b28d51332d906. Upgrade Linux to 3f489c2067c5824528212b0fc18b28d51332d906 or later.

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

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/a53e15e592b4dcc91c3a3b8514e484a0bdbc53a3>
- patch: <https://git.kernel.org/stable/c/c8c1158ffb007197f31f9d9170cf13e4f34cbb5c>
- patch: <https://git.kernel.org/stable/c/8ad4d580e8aff8de2a4d57c5930fcc29f1ffd4a6>
- patch: <https://git.kernel.org/stable/c/9fa04c93f24138747807fe75b5591bb680098f56>
- patch: <https://git.kernel.org/stable/c/a49087ab93508b60d9b8add91707a22dda832869>
- patch: <https://git.kernel.org/stable/c/e074686e993ff1be5f21b085a3b1b4275ccd5727>
- patch: <https://git.kernel.org/stable/c/3f489c2067c5824528212b0fc18b28d51332d906>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00016.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-2023-52438>

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