OSDN Git Service

FROMLIST: binder: fix memory corruption in binder_transaction binder
authorXu YiPing <xuyiping@hisilicon.com>
Mon, 22 May 2017 18:26:23 +0000 (11:26 -0700)
committerTodd Kjos <tkjos@google.com>
Tue, 5 Sep 2017 19:11:58 +0000 (19:11 +0000)
commitab10c4d8d6f5a42665e61acec78d64e021f4b68c
tree84103bf78ccb9c3306b76fcb6a041094662d9e89
parentcff17411c160fced8aaa0a4eb9c0149cf24c91e8
FROMLIST: binder: fix memory corruption in binder_transaction binder

(from https://patchwork.kernel.org/patch/9939405/)

commit 7a4408c6bd3e ("binder: make sure accesses to proc/thread are
safe") made a change to enqueue tcomplete to thread->todo before
enqueuing the transaction. However, in err_dead_proc_or_thread case,
the tcomplete is directly freed, without dequeued. It may cause the
thread->todo list to be corrupted.

So, dequeue it before freeing.

Bug: 65333488
Change-Id: Id063a4db18deaa634f4d44aa6ebca47bea32537a
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
drivers/android/binder.c