lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025061814-CVE-2022-50128-51bc@gregkh>
Date: Wed, 18 Jun 2025 13:03:13 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2022-50128: android: binder: stop saving a pointer to the VMA

From: Greg Kroah-Hartman <gregkh@...nel.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.

[akpm@...ux-foundation.org: fix drivers/android/binder_alloc_selftest.c]

The Linux kernel CVE team has assigned CVE-2022-50128 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 4.19 with commit da1b9564e85b1d7baf66cbfabcab27e183a1db63 and fixed in 5.15.61 with commit 622ef885a89ad04cfb76ee478fb44f051125d1f1
	Issue introduced in 4.19 with commit da1b9564e85b1d7baf66cbfabcab27e183a1db63 and fixed in 5.18.18 with commit 925e6b6f82c9c80ab3c17acbde8d16f349da7d26
	Issue introduced in 4.19 with commit da1b9564e85b1d7baf66cbfabcab27e183a1db63 and fixed in 5.19.2 with commit 1ec3f76a436d750fd5023caec5da0494fc2870d2
	Issue introduced in 4.19 with commit da1b9564e85b1d7baf66cbfabcab27e183a1db63 and fixed in 6.0 with commit a43cfc87caaf46710c8027a8c23b8a55f1078f19
	Issue introduced in 4.14.71 with commit 492519107c9d5ecfe3298586e3f5a33ac968b62c
	Issue introduced in 4.18.9 with commit 67b9876482580914cfd99d49b54c9b0ed88581a6

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2022-50128
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	drivers/android/binder_alloc.c
	drivers/android/binder_alloc.h
	drivers/android/binder_alloc_selftest.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/622ef885a89ad04cfb76ee478fb44f051125d1f1
	https://git.kernel.org/stable/c/925e6b6f82c9c80ab3c17acbde8d16f349da7d26
	https://git.kernel.org/stable/c/1ec3f76a436d750fd5023caec5da0494fc2870d2
	https://git.kernel.org/stable/c/a43cfc87caaf46710c8027a8c23b8a55f1078f19

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ