diff --git a/private/audioserver.te b/private/audioserver.te index 17abd837d7c4210aa95e02fe02ea31ba86513e38..95a752169c29b52077ff61e8acfb6481d0473237 100644 --- a/private/audioserver.te +++ b/private/audioserver.te @@ -43,5 +43,14 @@ allow audioserver audio_data_file:file create_file_perms; # domain transition neverallow audioserver { file_type fs_type }:file execute_no_trans; -# audioserver should never need network access. Disallow network sockets. +# 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 neverallow audioserver domain:{ tcp_socket udp_socket rawip_socket } *; diff --git a/public/cameraserver.te b/public/cameraserver.te index aa7d107f3ea4b6de727393eb50c5406ccda0fe91..f2364a7aec4648371a6f385c6b8e19574e40e94c 100644 --- a/public/cameraserver.te +++ b/public/cameraserver.te @@ -29,5 +29,14 @@ allow cameraserver surfaceflinger_service:service_manager find; # domain transition neverallow cameraserver { file_type fs_type }:file execute_no_trans; -# cameraserver should never need network access. Disallow network sockets. +# 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 neverallow cameraserver domain:{ tcp_socket udp_socket rawip_socket } *; diff --git a/public/mediacodec.te b/public/mediacodec.te index 6b4d677181d06f033860e1e990822302d9cfad1e..f8986de0c81c69aedb1430e968cba8425776212e 100644 --- a/public/mediacodec.te +++ b/public/mediacodec.te @@ -31,5 +31,14 @@ allow mediacodec system_file:dir { open read }; # domain transition neverallow mediacodec { file_type fs_type }:file execute_no_trans; -# mediacodec should never need network access. Disallow network sockets. +# 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 neverallow mediacodec domain:{ tcp_socket udp_socket rawip_socket } *; diff --git a/public/mediaextractor.te b/public/mediaextractor.te index deecc00ba393b3cabceac23d2b20d34fb0f085b1..dc7c90e0a4f069af830511bbffc9ec0a15132742 100644 --- a/public/mediaextractor.te +++ b/public/mediaextractor.te @@ -25,5 +25,14 @@ allow mediaextractor proc_meminfo:file r_file_perms; # domain transition neverallow mediaextractor { file_type fs_type }:file execute_no_trans; -# mediaextractor should never need network access. Disallow network sockets. +# 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 neverallow mediaextractor domain:{ tcp_socket udp_socket rawip_socket } *; diff --git a/public/mediametrics.te b/public/mediametrics.te index 84d184bd9ceffc511b47c2821981bfdf0451b07a..ce2dab7226e4c5e087f99fb677d864b6d9a66d35 100644 --- a/public/mediametrics.te +++ b/public/mediametrics.te @@ -22,5 +22,14 @@ allow mediametrics proc_meminfo:file r_file_perms; # domain transition neverallow mediametrics { file_type fs_type }:file execute_no_trans; -# mediametrics should never need network access. Disallow network sockets. +# 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 neverallow mediametrics domain:{ tcp_socket udp_socket rawip_socket } *;