Staging: android: binder: Fix use-after-free bug
authorArve Hjønnevåg <arve@android.com>
Thu, 8 Mar 2012 23:43:36 +0000 (15:43 -0800)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 25 Apr 2012 22:25:10 +0000 (01:25 +0300)
commitd39865097978b37f0ce45b954c3d7f49706d08ac
tree25eacdac686035918e52ab03e7d63756cab2c832
parent854f943d103dbf786279b401e70f75b7d9aafb67
Staging: android: binder: Fix use-after-free bug

binder_update_page_range could read freed memory if the vma of the
selected process was freed right before the check that the vma
belongs to the mm struct it just locked.

If the vm_mm pointer in that freed vma struct had also been rewritten
with a value that matched the locked mm struct, then the code would
proceed and possibly modify the freed vma.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/binder.c