CVE-2022-50240
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-09-15

Last updated on: 2025-11-24

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: android: binder: stop saving a pointer to the VMA Do not record a pointer to a VMA outside of the mmap_lock for later use. This is unsafe and there are a number of failure paths *after* the recorded VMA pointer may be freed during setup. There is no callback to the driver to clear the saved pointer from generic mm code. Furthermore, the VMA pointer may become stale if any number of VMA operations end up freeing the VMA so saving it was fragile to being with. Instead, change the binder_alloc struct to record the start address of the VMA and use vma_lookup() to get the vma when needed. Add lockdep mmap_lock checks on updates to the vma pointer to ensure the lock is held and depend on that lock for synchronization of readers and writers - which was already the case anyways, so the smp_wmb()/smp_rmb() was not necessary. [[email protected]: fix drivers/android/binder_alloc_selftest.c]
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-09-15
Last Modified
2025-11-24
Generated
2026-05-07
AI Q&A
2025-09-15
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 5 associated CPEs
Vendor Product Version / Range
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a use-after-free (UAF) issue in the Linux kernel's binder driver. It occurs because the binder code assumed that holding a read lock on the mmap was sufficient to protect a pointer to a virtual memory area (vma). However, a change in the kernel caused the mmap lock to be downgraded during munmap(), allowing the vma to be freed while still being accessed by binder_update_page_range(). This race condition can lead to binder accessing freed memory, causing a use-after-free bug.


How can this vulnerability impact me? :

This vulnerability can lead to use-after-free conditions in the kernel, which may cause system instability, crashes, or potentially allow an attacker to execute arbitrary code or escalate privileges by exploiting the freed memory access.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability is a use-after-free (UAF) issue in the Linux kernel binder driver related to mmap locking. Detection would typically involve monitoring kernel logs for KASAN (Kernel Address Sanitizer) reports indicating use-after-free errors in binder_update_page_range or vm_insert_page. You can check dmesg or kernel logs for such errors. Specific commands to detect this include: 1) dmesg | grep -i kasan 2) journalctl -k | grep -i kasan 3) Checking for binder-related errors in kernel logs. There are no direct network detection commands since this is a kernel memory corruption issue.


What immediate steps should I take to mitigate this vulnerability?

The immediate mitigation is to apply the patch that reverts binder_update_page_range() to take the mmap write lock instead of the read lock, preventing the race condition causing the use-after-free. This patch is specific to stable kernel branches 5.4 and 5.10. Alternatively, upgrading to a newer kernel version where binder no longer caches a pointer to the VMA and uses vma_lookup() avoids this issue. Since this is a kernel vulnerability, updating the kernel to a fixed version is the recommended mitigation.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart