]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rust_binder: use current_euid() for transaction sender identity
authorJann Horn <jannh@google.com>
Fri, 13 Feb 2026 21:37:31 +0000 (22:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Feb 2026 05:35:18 +0000 (21:35 -0800)
Binder currently uses from.process.task.euid() as the transaction sender
EUID, where from.process.task is the main thread of the process that opened
/dev/binder. That's not clean; use the subjective EUID of the current task
instead.

Signed-off-by: Jann Horn <jannh@google.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260213-binder-uid-v1-2-7b795ae05523@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder/transaction.rs

index 75e6f5fbaaae5a574b49a1b8a5f2ead1d2e51895..10af40527ca7ce4de71c15d81cc71478bfe44604 100644 (file)
@@ -107,7 +107,7 @@ impl Transaction {
             debug_id,
             target_node: Some(target_node),
             from_parent,
-            sender_euid: from.process.task.euid(),
+            sender_euid: Kuid::current_euid(),
             from: from.clone(),
             to,
             code: trd.code,
@@ -147,7 +147,7 @@ impl Transaction {
             debug_id,
             target_node: None,
             from_parent: None,
-            sender_euid: from.process.task.euid(),
+            sender_euid: Kuid::current_euid(),
             from: from.clone(),
             to,
             code: trd.code,