]> git.baikalelectronics.ru Git - kernel.git/commit
binder: fix possible UAF when freeing buffer
authorTodd Kjos <tkjos@android.com>
Wed, 12 Jun 2019 20:29:27 +0000 (13:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jun 2019 08:35:55 +0000 (10:35 +0200)
commit40a869b2389e71555b90411c78e6941bbc476bf5
treed96c2242a45c688ac249891b7a4d39851a2b2e19
parentec8f9a588835751ed53997b66268126ce6d039c2
binder: fix possible UAF when freeing buffer

There is a race between the binder driver cleaning
up a completed transaction via binder_free_transaction()
and a user calling binder_ioctl(BC_FREE_BUFFER) to
release a buffer. It doesn't matter which is first but
they need to be protected against running concurrently
which can result in a UAF.

Signed-off-by: Todd Kjos <tkjos@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder.c