Skip to content

Commit

Permalink
remove system_server_startup domain
Browse files Browse the repository at this point in the history
APEX isn't used for out-of-band updates by GrapheneOS, so this extra
attack surface is not required.
  • Loading branch information
thestinger committed Sep 10, 2020
1 parent f73af4d commit 53ec5c3
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 66 deletions.
1 change: 0 additions & 1 deletion prebuilts/api/29.0/private/domain.te
Expand Up @@ -196,7 +196,6 @@ neverallow {
with_asan(`-asan_extract')
-shell
userdebug_or_eng(`-su')
-system_server_startup # for memfd backed executable regions
-app_zygote
-webview_zygote
-zygote
Expand Down
2 changes: 1 addition & 1 deletion prebuilts/api/29.0/private/seapp_contexts
Expand Up @@ -138,7 +138,7 @@ neverallow user=shell name=((?!com\.android\.shell).)*
# Ephemeral Apps must run in the ephemeral_app domain
neverallow isEphemeralApp=true domain=((?!ephemeral_app).)*

isSystemServer=true domain=system_server_startup
isSystemServer=true domain=system_server

user=_app seinfo=platform name=com.android.traceur domain=traceur_app type=app_data_file levelFrom=all
user=system seinfo=platform domain=system_app type=system_app_data_file
Expand Down
5 changes: 0 additions & 5 deletions prebuilts/api/29.0/private/system_server.te
Expand Up @@ -992,11 +992,6 @@ neverallow system_server ashmem_device:chr_file execute;
# TODO: deal with tmpfs_domain pub/priv split properly
neverallow system_server system_server_tmpfs:file execute;

# Resources handed off by system_server_startup
allow system_server system_server_startup:fd use;
allow system_server system_server_startup_tmpfs:file { read write map };
allow system_server system_server_startup:unix_dgram_socket write;

# Allow system server to communicate to apexd
allow system_server apex_service:service_manager find;
allow system_server apexd:binder call;
Expand Down
23 changes: 0 additions & 23 deletions prebuilts/api/29.0/private/system_server_startup.te

This file was deleted.

6 changes: 3 additions & 3 deletions prebuilts/api/29.0/private/zygote.te
Expand Up @@ -14,7 +14,7 @@ allow zygote self:global_capability_class_set setpcap;

# Switch SELinux context to app domains.
allow zygote self:process setcurrent;
allow zygote system_server_startup:process dyntransition;
allow zygote system_server:process dyntransition;
allow zygote appdomain:process dyntransition;
allow zygote webview_zygote:process dyntransition;
allow zygote app_zygote:process dyntransition;
Expand Down Expand Up @@ -149,11 +149,11 @@ dontaudit zygote self:global_capability_class_set sys_resource;
# written on appdomain are applied to all app processes.
# This is achieved by ensuring that it is impossible for zygote to
# setcon (dyntransition) to any types other than those associated
# with appdomain plus system_server_startup, webview_zygote and
# with appdomain plus system_server, webview_zygote and
# app_zygote.
neverallow zygote ~{
appdomain
system_server_startup
system_server
webview_zygote
app_zygote
}:process dyntransition;
Expand Down
1 change: 0 additions & 1 deletion private/domain.te
Expand Up @@ -196,7 +196,6 @@ neverallow {
with_asan(`-asan_extract')
-shell
userdebug_or_eng(`-su')
-system_server_startup # for memfd backed executable regions
-app_zygote
-webview_zygote
-zygote
Expand Down
2 changes: 1 addition & 1 deletion private/seapp_contexts
Expand Up @@ -138,7 +138,7 @@ neverallow user=shell name=((?!com\.android\.shell).)*
# Ephemeral Apps must run in the ephemeral_app domain
neverallow isEphemeralApp=true domain=((?!ephemeral_app).)*

isSystemServer=true domain=system_server_startup
isSystemServer=true domain=system_server

user=_app seinfo=platform name=com.android.traceur domain=traceur_app type=app_data_file levelFrom=all
user=system seinfo=platform domain=system_app type=system_app_data_file
Expand Down
5 changes: 0 additions & 5 deletions private/system_server.te
Expand Up @@ -992,11 +992,6 @@ neverallow system_server ashmem_device:chr_file execute;
# TODO: deal with tmpfs_domain pub/priv split properly
neverallow system_server system_server_tmpfs:file execute;

# Resources handed off by system_server_startup
allow system_server system_server_startup:fd use;
allow system_server system_server_startup_tmpfs:file { read write map };
allow system_server system_server_startup:unix_dgram_socket write;

# Allow system server to communicate to apexd
allow system_server apex_service:service_manager find;
allow system_server apexd:binder call;
Expand Down
23 changes: 0 additions & 23 deletions private/system_server_startup.te

This file was deleted.

6 changes: 3 additions & 3 deletions private/zygote.te
Expand Up @@ -14,7 +14,7 @@ allow zygote self:global_capability_class_set setpcap;

# Switch SELinux context to app domains.
allow zygote self:process setcurrent;
allow zygote system_server_startup:process dyntransition;
allow zygote system_server:process dyntransition;
allow zygote appdomain:process dyntransition;
allow zygote webview_zygote:process dyntransition;
allow zygote app_zygote:process dyntransition;
Expand Down Expand Up @@ -149,11 +149,11 @@ dontaudit zygote self:global_capability_class_set sys_resource;
# written on appdomain are applied to all app processes.
# This is achieved by ensuring that it is impossible for zygote to
# setcon (dyntransition) to any types other than those associated
# with appdomain plus system_server_startup, webview_zygote and
# with appdomain plus system_server, webview_zygote and
# app_zygote.
neverallow zygote ~{
appdomain
system_server_startup
system_server
webview_zygote
app_zygote
}:process dyntransition;
Expand Down

0 comments on commit 53ec5c3

Please sign in to comment.