patch "binder: prevent transactions to context manager from its own process." added to char-misc-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
binder: prevent transactions to context manager from its own process.
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 49ed96943a8e0c62cc5a9b0a6cfc88be87d1fcec Mon Sep 17 00:00:00 2001
From: Hridya Valsaraju <[email protected]>
Date: Mon, 15 Jul 2019 12:18:04 -0700
Subject: binder: prevent transactions to context manager from its own process.
Currently, a transaction to context manager from its own process is prevented by checking if its binder_proc struct is the same as that of the sender. However, this would not catch cases where the process opens the binder device again and uses the new fd to send a transaction to the context manager.
--- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/android/binder.c +1 -1
@@ -2988,7 +2988,7 @@ static void binder_transaction(struct binder_proc *proc,else return_error =BR_DEAD_REPLY ;mutex_unlock (&context->context_mgr_node_lock); -if (target_node && target_proc == proc) { +if (target_node && target_proc->pid == proc->pid) {binder_user_error ("%d:%d got transaction to context manager from process owning it\n" , proc->pid, thread->pid); return_error =BR_FAILED_REPLY ;
Signature · 1 line
2.22.0