CVE-2022-49988: binder_alloc: add missing mmap_lock calls when using the VMA
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
binder_alloc: add missing mmap_lock calls when using the VMA
Take the mmap_read_lock() when using the VMA in binder_alloc_print_pages() and when checking for a VMA in binder_alloc_new_buf_locked().
It is worth noting binder_alloc_new_buf_locked() drops the VMA read lock after it verifies a VMA exists, but may be taken again deeper in the call stack, if necessary.
The Linux kernel CVE team has assigned CVE-2022-49988 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.15.61 with commit 622ef885a89ad04cfb76ee478fb44f051125d1f1 and fixed in 5.15.64 with commit 577d9c05cc48c5242bcf719c06a5baf3105473ad Issue introduced in 5.19.2 with commit 1ec3f76a436d750fd5023caec5da0494fc2870d2 and fixed in 5.19.6 with commit 7b0163c1b07b7ff1717aa975821c40df98786ddc Issue introduced in 5.18.18 with commit 925e6b6f82c9c80ab3c17acbde8d16f349da7d26
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-49988
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
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/577d9c05cc48c5242bcf719c06a5baf3105473ad https://git.kernel.org/stable/c/7b0163c1b07b7ff1717aa975821c40df98786ddc https://git.kernel.org/stable/c/44e602b4e52f70f04620bbbf4fe46ecb40170bde