CVE-2022-50240

HIGH

Linux Kernel 4.20-5.19.1 - Use-After-Free in Binder VMA Pointer Handling

Title source: llm
STIX 2.1

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]

Scores

CVSS v3 7.8
EPSS 0.0015
EPSS Percentile 4.9%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Details

CWE
CWE-416
Status published
Products (20)
linux/Kernel 4.20.0 - 5.4.224linux
linux/Kernel 5.11.0 - 5.15.61linux
linux/Kernel 5.16.0 - 5.18.18linux
linux/Kernel 5.19.0 - 5.19.2linux
linux/Kernel 5.5.0 - 5.10.154linux
Linux/Linux < 4.20
Linux/Linux 4.20
Linux/Linux 5.10.154 - 5.10.*
Linux/Linux 5.15.61 - 5.15.*
Linux/Linux 5.18.18 - 5.18.*
... and 10 more
Published Sep 15, 2025
Tracked Since Feb 18, 2026