diff options
| author | Jann Horn <jannh@google.com> | 2026-02-13 22:37:31 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-26 21:35:18 -0800 |
| commit | d31ed22a0678da8948439c3009b01c4806a677c9 (patch) | |
| tree | 043ab1f0930c17b1914ae942ba24fb42f14656cc /drivers/android | |
| parent | 65b6721522892a4994472fbac41386c63c769511 (diff) | |
| download | lwn-d31ed22a0678da8948439c3009b01c4806a677c9.tar.gz lwn-d31ed22a0678da8948439c3009b01c4806a677c9.zip | |
rust_binder: use current_euid() for transaction sender identity
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>
Diffstat (limited to 'drivers/android')
| -rw-r--r-- | drivers/android/binder/transaction.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/android/binder/transaction.rs b/drivers/android/binder/transaction.rs index 75e6f5fbaaae..10af40527ca7 100644 --- a/drivers/android/binder/transaction.rs +++ b/drivers/android/binder/transaction.rs @@ -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, |
