blob: 2c5d1cb77fe3a3c2c1c57f64c5c7d813349859bb [file] [log] [blame]
Ernie Hsu3b4a36a2024-07-17 10:04:25 +00001type mediacodec_google, domain;
2type mediacodec_google_exec, exec_type, vendor_file_type, file_type;
3
4init_daemon_domain(mediacodec_google)
5
Ernie Hsubbe999c2024-07-18 10:41:41 +00006hal_server_domain(mediacodec_google, hal_codec2)
7
8hal_client_domain(mediacodec_google, hal_graphics_allocator)
9
10allow mediacodec_google dmabuf_system_heap_device:chr_file r_file_perms;
11
12# mediacodec_google should never execute any executable without a domain transition
13neverallow mediacodec_google { file_type fs_type }:file execute_no_trans;
14
15# Media processing code is inherently risky and thus should have limited
16# permissions and be isolated from the rest of the system and network.
17# Lengthier explanation here:
18# https://android-developers.googleblog.com/2016/05/hardening-media-stack.html
19neverallow mediacodec_google domain:{ udp_socket rawip_socket } *;
20neverallow mediacodec_google { domain userdebug_or_eng(`-su') }:tcp_socket *;