Diced: Add policy for diced the DICE daemon.

Bug: 198197213
Test: N/A
Change-Id: I5d0b06e3cd0c594cff6120856ca3bb4f7c1dd98d
This commit is contained in:
Janis Danisevskis 2021-11-09 17:49:02 -08:00
parent 8797f5841c
commit 2b6c6063ae
10 changed files with 43 additions and 0 deletions

View file

@ -749,6 +749,16 @@ class keystore2_key
use_dev_id use_dev_id
} }
class diced
{
demote
demote_self
derive
get_attestation_chain
use_seal
use_sign
}
class drmservice { class drmservice {
consumeRights consumeRights
setPlaybackStatus setPlaybackStatus

View file

@ -9,6 +9,10 @@
attestation_verification_service attestation_verification_service
camera2_extensions_prop camera2_extensions_prop
device_config_nnapi_native_prop device_config_nnapi_native_prop
dice_maintenance_service
dice_node_service
diced
diced_exec
extra_free_kbytes extra_free_kbytes
extra_free_kbytes_exec extra_free_kbytes_exec
hal_contexthub_service hal_contexthub_service

View file

@ -8,6 +8,7 @@ allow crash_dump {
-apexd -apexd
-bpfloader -bpfloader
-crash_dump -crash_dump
-diced
-init -init
-kernel -kernel
-keystore -keystore
@ -40,6 +41,7 @@ neverallow crash_dump {
apexd apexd
userdebug_or_eng(`-apexd') userdebug_or_eng(`-apexd')
bpfloader bpfloader
diced
init init
kernel kernel
keystore keystore

7
private/diced.te Normal file
View file

@ -0,0 +1,7 @@
typeattribute diced coredomain;
init_daemon_domain(diced)
# Talk to dice HAL.
# TODO uncomment when implemented.
# hal_client_domain(diced, hal_dice)

View file

@ -270,6 +270,7 @@
/system/bin/credstore u:object_r:credstore_exec:s0 /system/bin/credstore u:object_r:credstore_exec:s0
/system/bin/keystore u:object_r:keystore_exec:s0 /system/bin/keystore u:object_r:keystore_exec:s0
/system/bin/keystore2 u:object_r:keystore_exec:s0 /system/bin/keystore2 u:object_r:keystore_exec:s0
/system/bin/diced u:object_r:diced_exec:s0
/system/bin/fingerprintd u:object_r:fingerprintd_exec:s0 /system/bin/fingerprintd u:object_r:fingerprintd_exec:s0
/system/bin/gatekeeperd u:object_r:gatekeeperd_exec:s0 /system/bin/gatekeeperd u:object_r:gatekeeperd_exec:s0
/system/bin/tombstoned u:object_r:tombstoned_exec:s0 /system/bin/tombstoned u:object_r:tombstoned_exec:s0

View file

@ -23,6 +23,7 @@ userdebug_or_eng(`
allow llkd { allow llkd {
domain domain
-apexd -apexd
-diced
-kernel -kernel
-keystore -keystore
-init -init

View file

@ -163,5 +163,8 @@ class keystore2 # userspace
# Keystore 2.0 key permissions # Keystore 2.0 key permissions
class keystore2_key # userspace class keystore2_key # userspace
# Diced permissions
class diced # userspace
class drmservice # userspace class drmservice # userspace
# FLASK # FLASK

View file

@ -65,6 +65,8 @@ android.os.UpdateEngineStableService u:object_r:update_engine_stable_servic
android.security.apc u:object_r:apc_service:s0 android.security.apc u:object_r:apc_service:s0
android.security.authorization u:object_r:authorization_service:s0 android.security.authorization u:object_r:authorization_service:s0
android.security.compat u:object_r:keystore_compat_hal_service:s0 android.security.compat u:object_r:keystore_compat_hal_service:s0
android.security.dice.IDiceMaintenance u:object_r:dice_maintenance_service:s0
android.security.dice.IDiceNode u:object_r:dice_node_service:s0
android.security.identity u:object_r:credstore_service:s0 android.security.identity u:object_r:credstore_service:s0
android.security.keystore u:object_r:keystore_service:s0 android.security.keystore u:object_r:keystore_service:s0
android.security.legacykeystore u:object_r:legacykeystore_service:s0 android.security.legacykeystore u:object_r:legacykeystore_service:s0

11
public/diced.te Normal file
View file

@ -0,0 +1,11 @@
type diced, domain;
type diced_exec, system_file_type, exec_type, file_type;
binder_use(diced)
binder_service(diced)
add_service(diced, dice_node_service)
add_service(diced, dice_maintenance_service)
# Check SELinux permissions.
selinux_check_access(diced)

View file

@ -8,6 +8,8 @@ type batteryproperties_service, app_api_service, ephemeral_app_api_service, serv
type bluetooth_service, service_manager_type; type bluetooth_service, service_manager_type;
type cameraserver_service, service_manager_type; type cameraserver_service, service_manager_type;
type default_android_service, service_manager_type; type default_android_service, service_manager_type;
type dice_maintenance_service, service_manager_type;
type dice_node_service, service_manager_type;
type dnsresolver_service, service_manager_type; type dnsresolver_service, service_manager_type;
type drmserver_service, service_manager_type; type drmserver_service, service_manager_type;
type dumpstate_service, service_manager_type; type dumpstate_service, service_manager_type;