CVE-2025-38176: binder: fix use-after-free in binderfs_evict_inode()

Published Jul 4, 2025
·
Updated

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

binder: fix use-after-free in binderfsevictinode()

Running 'stress-ng --binderfs 16 --timeout 300' under KASAN-enabled kernel, I've noticed the following:

BUG: KASAN: slab-use-after-free in binderfsevictinode+0x1de/0x2d0 Write of size 8 at addr ffff88807379bc08 by task stress-ng-binde/1699

CPU: 0 UID: 0 PID: 1699 Comm: stress-ng-binde Not tainted 6.14.0-rc7-g586de92313fc-dirty #13 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-3.fc41 04/01/2014 Call Trace: <TASK> dumpstacklvl+0x1c2/0x2a0 ? pfxdumpstacklvl+0x10/0x10 ? pfxprintk+0x10/0x10 ? pfxlockrelease+0x10/0x10 ? virtaddrvalid+0x18c/0x540 ? virtaddrvalid+0x469/0x540 printreport+0x155/0x840 ? virtaddrvalid+0x18c/0x540 ? virtaddrvalid+0x469/0x540 ? physaddr+0xba/0x170 ? binderfsevictinode+0x1de/0x2d0 kasanreport+0x147/0x180 ? binderfsevictinode+0x1de/0x2d0 binderfsevictinode+0x1de/0x2d0 ? pfxbinderfsevictinode+0x10/0x10 evict+0x524/0x9f0 ? pfxlockrelease+0x10/0x10 ? pfxevict+0x10/0x10 ? dorawspinunlock+0x4d/0x210 ? rawspinunlock+0x28/0x50 ? iput+0x697/0x9b0 dentrykill+0x209/0x660 ? shrinkkill+0x8d/0x2c0 shrinkkill+0xa9/0x2c0 shrinkdentrylist+0x2e0/0x5e0 shrinkdcacheparent+0xa2/0x2c0 ? pfxshrinkdcacheparent+0x10/0x10 ? pfxlockrelease+0x10/0x10 ? pfxdorawspinlock+0x10/0x10 doonetree+0x23/0xe0 shrinkdcacheforumount+0xa0/0x170 genericshutdownsuper+0x67/0x390 killlittersuper+0x76/0xb0 binderfskillsuper+0x44/0x90 deactivatelockedsuper+0xb9/0x130 cleanupmnt+0x422/0x4c0 ? lockdephardirqson+0x9d/0x150 taskworkrun+0x1d2/0x260 ? pfxtaskworkrun+0x10/0x10 resumeusermodework+0x52/0x60 syscallexittousermode+0x9a/0x120 dosyscall64+0x103/0x210 ? asmsysvecapictimerinterrupt+0x1a/0x20 entrySYSCALL64afterhwframe+0x77/0x7f RIP: 0033:0xcac57b Code: c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 f3 0f 1e fa 31 f6 e9 05 00 00 00 0f 1f 44 00 00 f3 0f 1e fa b8 RSP: 002b:00007ffecf4226a8 EFLAGS: 00000246 ORIGRAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007ffecf422720 RCX: 0000000000cac57b RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007ffecf422850 RBP: 00007ffecf422850 R08: 0000000028d06ab1 R09: 7fffffffffffffff R10: 3fffffffffffffff R11: 0000000000000246 R12: 00007ffecf422718 R13: 00007ffecf422710 R14: 00007f478f87b658 R15: 00007ffecf422830 </TASK>

Allocated by task 1705: kasansavetrack+0x3e/0x80 kasankmalloc+0x8f/0xa0 kmalloccachenoprof+0x213/0x3e0 binderfsbinderdevicecreate+0x183/0xa80 binderctlioctl+0x138/0x190 x64sysioctl+0x120/0x1b0 dosyscall64+0xf6/0x210 entrySYSCALL64afterhwframe+0x77/0x7f

Freed by task 1705: kasansavetrack+0x3e/0x80 kasansavefreeinfo+0x46/0x50 kasanslabfree+0x62/0x70 kfree+0x194/0x440 evict+0x524/0x9f0 dounlinkat+0x390/0x5b0 x64sysunlink+0x47/0x50 dosyscall64+0xf6/0x210 entrySYSCALL64afterhwframe+0x77/0x7f

This 'stress-ng' workload causes the concurrent deletions from 'binderdevices' and so requires full-featured synchronization to prevent list corruption.

I've found this issue independently but pretty sure that syzbot did the same, so Reported-by: and Closes: should be applicable here as well.

Affected Software

6 affected components
Linux Linux kernel
Linux Linux kernel>=6.14.1<6.14.11
Linux Linux kernel>=6.15<6.15.2
Linux Linux kernel=6.14
Linux Linux kernel=6.14-rc6
Linux Linux kernel=6.14-rc7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel binderfs_evict_inode use-after-free to a version that resolves this vulnerability.

    Patch binder: fix use-after-free in binderfs_evict_inode()

Event History

Jul 4, 2025
CVE Published
via MITRE·10:39 AM
Data Sourced
via MITRE·10:39 AM
DescriptionSeverity
Data Sourced
via NVD·11:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-38176?

CVE-2025-38176 has been classified as having a significant severity due to its potential for exploitation leading to use-after-free vulnerabilities.

2

How do I fix CVE-2025-38176?

To fix CVE-2025-38176, update to the latest version of the Linux kernel where this vulnerability has been resolved.

3

What systems are affected by CVE-2025-38176?

CVE-2025-38176 affects various versions of the Linux kernel that utilize the binder filesystem.

4

What type of vulnerability is CVE-2025-38176?

CVE-2025-38176 is a use-after-free vulnerability that occurs in the binder filesystem component of the Linux kernel.

5

What are the potential impacts of CVE-2025-38176?

Exploitation of CVE-2025-38176 could lead to crashes or arbitrary code execution within the kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203