2015-09-22 19:56:03 +02:00
|
|
|
# mediaextractor - multimedia daemon
|
2016-09-13 06:15:15 +02:00
|
|
|
type mediaextractor, domain;
|
2015-09-22 19:56:03 +02:00
|
|
|
type mediaextractor_exec, exec_type, file_type;
|
|
|
|
|
|
|
|
typeattribute mediaextractor mlstrustedsubject;
|
|
|
|
|
|
|
|
binder_use(mediaextractor)
|
|
|
|
binder_call(mediaextractor, binderservicedomain)
|
|
|
|
binder_call(mediaextractor, appdomain)
|
|
|
|
binder_service(mediaextractor)
|
|
|
|
|
2017-01-19 22:23:52 +01:00
|
|
|
add_service(mediaextractor, mediaextractor_service)
|
2017-01-24 21:53:45 +01:00
|
|
|
allow mediaextractor mediametrics_service:service_manager find;
|
2016-11-01 01:02:32 +01:00
|
|
|
allow mediaextractor mediacasserver_service:service_manager find;
|
2015-09-22 19:56:03 +02:00
|
|
|
|
2016-09-10 01:27:17 +02:00
|
|
|
allow mediaextractor system_server:fd use;
|
|
|
|
|
|
|
|
r_dir_file(mediaextractor, cgroup)
|
|
|
|
allow mediaextractor proc_meminfo:file r_file_perms;
|
|
|
|
|
2017-03-07 03:13:05 +01:00
|
|
|
crash_dump_fallback(mediaextractor)
|
|
|
|
|
2015-09-22 19:56:03 +02:00
|
|
|
###
|
|
|
|
### neverallow rules
|
|
|
|
###
|
|
|
|
|
|
|
|
# mediaextractor should never execute any executable without a
|
|
|
|
# domain transition
|
|
|
|
neverallow mediaextractor { file_type fs_type }:file execute_no_trans;
|
2016-01-05 17:54:11 +01:00
|
|
|
|
2017-02-16 21:34:51 +01:00
|
|
|
# The goal of the mediaserver split is to place media processing code into
|
|
|
|
# restrictive sandboxes with limited responsibilities and thus limited
|
|
|
|
# permissions. Example: Audioserver is only responsible for controlling audio
|
|
|
|
# hardware and processing audio content. Cameraserver does the same for camera
|
|
|
|
# hardware/content. Etc.
|
|
|
|
#
|
|
|
|
# Media processing code is inherently risky and thus should have limited
|
|
|
|
# permissions and be isolated from the rest of the system and network.
|
|
|
|
# Lengthier explanation here:
|
|
|
|
# https://android-developers.googleblog.com/2016/05/hardening-media-stack.html
|
2016-04-23 00:34:40 +02:00
|
|
|
neverallow mediaextractor domain:{ tcp_socket udp_socket rawip_socket } *;
|