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 36 additions and 28 deletions
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute lmkd coredomain;
init_daemon_domain(lmkd)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute logd coredomain;
init_daemon_domain(logd)
# logd is not allowed to write anywhere other than /data/misc/logd, and then
......
typeattribute logpersist coredomain;
# android debug log storage in logpersist domains (eng and userdebug only)
userdebug_or_eng(`
......
# mdns daemon
typeattribute mdnsd coredomain;
typeattribute mdnsd mlstrustedsubject;
type mdnsd_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 mediacodec coredomain;
init_daemon_domain(mediacodec)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute mediadrmserver coredomain;
init_daemon_domain(mediadrmserver)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute mediaextractor coredomain;
init_daemon_domain(mediaextractor)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute mediametrics coredomain;
init_daemon_domain(mediametrics)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute mediaserver coredomain;
init_daemon_domain(mediaserver)
typeattribute modprobe coredomain;
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute mtp coredomain;
init_daemon_domain(mtp)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute netd coredomain;
init_daemon_domain(netd)
# Allow netd to spawn dnsmasq in it's own domain
......
# nfc subsystem
typeattribute nfc coredomain;
app_domain(nfc)
net_domain(nfc)
......
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute otapreopt_chroot coredomain;
# Allow to transition to postinstall_ota, to run otapreopt in its own sandbox.
domain_auto_trans(otapreopt_chroot, postinstall_file, postinstall_dexopt)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute otapreopt_slot coredomain;
# Technically not a daemon but we do want the transition from init domain to
# cppreopts to occur.
init_daemon_domain(otapreopt_slot)
typeattribute performanced coredomain;
init_daemon_domain(performanced)
......@@ -2,6 +2,7 @@
### Apps signed with the platform key.
###
typeattribute platform_app coredomain;
typeattribute platform_app domain_deprecated;
app_domain(platform_app)
......
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute postinstall coredomain;
domain_auto_trans(postinstall, otapreopt_chroot_exec, otapreopt_chroot)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute postinstall_dexopt coredomain;
# Run dex2oat/patchoat in its own sandbox.
# We have to manually transition, as we don't have an entrypoint.
domain_auto_trans(postinstall_dexopt, postinstall_file, dex2oat)
# type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this
typeattribute ppp coredomain;
domain_auto_trans(mtp, ppp_exec, ppp)
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