Skip to content
Snippets Groups Projects
Commit f5446eb1 authored by Alex Klyubin's avatar Alex Klyubin
Browse files

Vendor domains must not use Binder

On PRODUCT_FULL_TREBLE devices, non-vendor domains (except vendor
apps) are not permitted to use Binder. This commit thus:
* groups non-vendor domains using the new "coredomain" attribute,
* adds neverallow rules restricting Binder use to coredomain and
  appdomain only, and
* temporarily exempts the domains which are currently violating this
  rule from this restriction. These domains are grouped using the new
  "binder_in_vendor_violators" attribute. The attribute is needed
  because the types corresponding to violators are not exposed to the
  public policy where the neverallow rules are.

Test: mmm system/sepolicy
Test: Device boots, no new denials
Test: In Chrome, navigate to ip6.me, play a YouTube video
Test: YouTube: play a video
Test: Netflix: play a movie
Test: Google Camera: take a photo, take an HDR+ photo, record video with
      sound, record slow motion video with sound. Confirm videos play
      back fine and with sound.
Bug: 35870313
Change-Id: I0cd1a80b60bcbde358ce0f7a47b90f4435a45c95
parent 93f99cb1
No related branches found
No related tags found
No related merge requests found
Showing
with 37 additions and 27 deletions
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute drmserver coredomain;
init_daemon_domain(drmserver)
type_transition drmserver apk_data_file:sock_file drmserver_socket;
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute dumpstate coredomain;
init_daemon_domain(dumpstate)
# Execute and transition to the vdc domain
......
......@@ -11,6 +11,8 @@
###
### PackageManager flags an app as ephemeral at install time.
typeattribute ephemeral_app coredomain;
net_domain(ephemeral_app)
app_domain(ephemeral_app)
......
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute fingerprintd coredomain;
init_daemon_domain(fingerprintd)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute fsck coredomain;
init_daemon_domain(fsck)
typeattribute fsck_untrusted coredomain;
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute gatekeeperd coredomain;
init_daemon_domain(gatekeeperd)
type hal_allocator_default, domain;
type hal_allocator_default, domain, coredomain;
hal_server_domain(hal_allocator_default, hal_allocator)
type hal_allocator_default_exec, exec_type, file_type;
......
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute healthd coredomain;
init_daemon_domain(healthd)
# Allow callback to storaged batteryproperties listener
......
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute hwservicemanager coredomain;
init_daemon_domain(hwservicemanager)
typeattribute idmap coredomain;
typeattribute incident coredomain;
type incident_exec, exec_type, file_type;
# switch to incident domain for incident command
......
typeattribute incidentd coredomain;
init_daemon_domain(incidentd)
type incidentd_exec, exec_type, file_type;
binder_use(incidentd)
......
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute init coredomain;
tmpfs_domain(init)
# Transitions to seclabel processes in init.rc
......
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute inputflinger coredomain;
init_daemon_domain(inputflinger)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute install_recovery coredomain;
init_daemon_domain(install_recovery)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute installd coredomain;
init_daemon_domain(installd)
# Run dex2oat in its own sandbox.
......
......@@ -6,6 +6,8 @@
### and AID_ISOLATED_END (99999).
###
typeattribute isolated_app coredomain;
app_domain(isolated_app)
# Access already open app data files received over Binder or local socket IPC.
......
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute kernel coredomain;
domain_auto_trans(kernel, init_exec, init)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute keystore coredomain;
init_daemon_domain(keystore)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment