mediaserver: remove /system/bin/toolbox exec access
In Android 5.1, mediaserver couldn't execute any file on
/system. This slightly regressed due to
8a0c25efb0
, which granted mediaserver
access to execute /system/bin/toolbox and /system/bin/toybox
Revoke that unneeded access and add a neverallow rule to prevent
regressions.
TODO: Remove toolbox_exec:file execute permissions from domain.te
and add it back to the specific domains that need it.
Change-Id: Ia7bc6028a9ffb723d4623d91cbe15c8c1bbb2eb9
This commit is contained in:
parent
031e5ce9c5
commit
bf65c7ef5f
2 changed files with 10 additions and 2 deletions
|
@ -110,8 +110,8 @@ allow domain system_file:file execute;
|
|||
allow domain system_file:lnk_file r_file_perms;
|
||||
|
||||
# Run toolbox.
|
||||
# Kernel and init never run anything without changing domains.
|
||||
allow { domain -kernel -init } toolbox_exec:file rx_file_perms;
|
||||
# Kernel, init, and mediaserver never run anything without changing domains.
|
||||
allow { domain -kernel -init -mediaserver } toolbox_exec:file rx_file_perms;
|
||||
|
||||
# Read files already opened under /data.
|
||||
allow domain system_data_file:dir { search getattr };
|
||||
|
|
|
@ -105,3 +105,11 @@ allow mediaserver drmserver:drmservice {
|
|||
finalizeDecryptUnit
|
||||
pread
|
||||
};
|
||||
|
||||
###
|
||||
### neverallow rules
|
||||
###
|
||||
|
||||
# mediaserver should never execute any executable without a
|
||||
# domain transition
|
||||
neverallow mediaserver { file_type fs_type }:file execute_no_trans;
|
||||
|
|
Loading…
Reference in a new issue