Skip to content
Commit 68abe9ae authored by Todd Kjos's avatar Todd Kjos Committed by Greg Kroah-Hartman
Browse files

binder: use cred instead of task for getsecid

commit 4d5b5539 upstream.

Use the 'struct cred' saved at binder_open() to lookup
the security ID via security_cred_getsecid(). This
ensures that the security context that opened binder
is the one used to generate the secctx.

Cc: stable@vger.kernel.org # 5.4+
Fixes: ec74136d

 ("binder: create node flag to request sender's security context")
Signed-off-by: default avatarTodd Kjos <tkjos@google.com>
Suggested-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Acked-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 46088365
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment