android_kernel_motorola_sm6375/security/selinux
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Todd Kjos ea1a2391d5 BACKPORT: binder: use cred instead of task for selinux checks
commit 52f88693378a58094c538662ba652aff0253c4fe upstream.

Since binder was integrated with selinux, it has passed
'struct task_struct' associated with the binder_proc
to represent the source and target of transactions.
The conversion of task to SID was then done in the hook
implementations. It turns out that there are race conditions
which can result in an incorrect security context being used.

Fix by using the 'struct cred' saved during binder_open and pass
it to the selinux subsystem.

Cc: [email protected] # 5.14 (need backport for earlier stables)
Fixes: 79af73079d ("Add security hooks to binder and implement the hooks for SELinux.")
Suggested-by: Jann Horn <[email protected]>
Signed-off-by: Todd Kjos <[email protected]>
Acked-by: Casey Schaufler <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change-Id: I9053ce58e7449b92928ed8a17148a598b5c40f21
Bug: 200688826
[ resolved minor conflict ]
Signed-off-by: Todd Kjos <[email protected]>
2021-11-19 16:58:43 -08:00
..
include UPSTREAM: selinux: add proper NULL termination to the secclass_map permissions 2021-10-01 11:32:55 -07:00
ss ANDROID: selinux: modify RTM_GETNEIGH{TBL} 2021-06-21 08:31:02 +00:00
.gitignore
avc.c selinux: use __GFP_NOWARN with GFP_NOWAIT in the AVC 2021-07-19 08:53:10 +02:00
hooks.c BACKPORT: binder: use cred instead of task for selinux checks 2021-11-19 16:58:43 -08:00
ibpkey.c selinux: Fix error return code in sel_ib_pkey_sid_slow() 2020-11-18 19:20:30 +01:00
Kconfig
Makefile
netif.c
netlabel.c
netlink.c
netnode.c
netport.c
nlmsgtab.c ANDROID: selinux: modify RTM_GETNEIGH{TBL} 2021-06-21 08:31:02 +00:00
selinuxfs.c This is the 5.4.69 stable release 2020-10-01 18:00:35 +02:00
xfrm.c