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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Mar 2012 21:14:08 +0000 (13:14 -0800)
commit2a90957f2cfc2bf0b705a62a97830cf0d42a5a40
treebda0725b758c48277d5d8c6e3ff7f2dca8ceec0b
parent06caa4174ef7ec0f9c1e7c898a52e737c4897714
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