Commit graph

34 commits

Author SHA1 Message Date
dcashman
8f5a891ff8 Make voiceinteractionservice app_api_service.
Address the following denial from 3rd party voice interaction test:
SELinux : avc:  denied  { find } for service=voiceinteraction pid=30281 uid=10139 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:voiceinteraction_service:s0 tclass=service_manager permissive=0

Bug: 27105570
Change-Id: Ib87d364673cbc883df017bcda7fe1e854a76654f
2016-02-10 10:24:24 -08:00
Marco Nelissen
c3ba2e5130 selinux rules for codec process
Bug: 22775369

Change-Id: Ic6abe3d0e18ba6f7554d027e0ec05fd19011709b
2016-02-09 14:13:13 -08:00
Daichi Hirono
4e6d20c7ba Merge "Add SELinux label for app fuse." am: e3965aa295
am: 52719ea514

* commit '52719ea514f534743052eaf0986961a1eaa39c88':
  Add SELinux label for app fuse.
2016-02-06 07:23:32 +00:00
Daichi Hirono
e178ac5a71 Add SELinux label for app fuse.
The labels for filesystem and files are assigned by vold with using
context= mount option.

Change-Id: I8a9d701a46a333093a27107fc3c52b17a2af1a94
2016-02-05 16:10:53 +09:00
Marco Nelissen
b1bf83fd79 Revert "selinux rules for codec process"
This reverts commit 2afb217b68.

Change-Id: Ie2ba8d86f9c7078f970afbb06230f9573c28e0ed
2016-01-28 13:51:28 -08:00
Chien-Yu Chen
4000cc33de Merge "selinux: Update policies for cameraserver" 2016-01-28 02:04:43 +00:00
Daniel Cashman
8a7887470b Merge "Reduce accessibility of voiceinteraction_service." 2016-01-27 19:30:58 +00:00
Chien-Yu Chen
e0378303b5 selinux: Update policies for cameraserver
Update policies for cameraserver so it has the same permissions
as mediaserver.

Bug: 24511454
Change-Id: I1191e2ac36c00b942282f8dc3db9903551945adb
2016-01-27 11:29:11 -08:00
Marco Nelissen
87a79cf9dd Merge "selinux rules for codec process" 2016-01-27 17:46:47 +00:00
dcashman
aedf223656 Reduce accessibility of voiceinteraction_service.
The services under this label are not meant to be exposed to all apps.
Currently only priv_app needs access.

Bug: 26799206
Change-Id: I07c60752d6ba78f27f90bf5075bcab47eba90b55
2016-01-26 15:12:08 -08:00
Tao Bao
51523e59da resolve merge conflicts of 42baca019b to master.
Change-Id: I7fe13cbe563dcd2f286696010f0a5034dfee0202
2016-01-25 21:03:36 -08:00
Tao Bao
dce317cf43 Allow update_engine to use Binder IPC.
Register service with servicemanager and name the context.

avc: denied { call } for scontext=u:r:update_engine:s0 tcontext=u:r:servicemanager:s0 tclass=binder
avc: denied { add } for service=android.os.IUpdateEngine scontext=u:r:update_engine:s0 tcontext=u:object_r:update_engine_service:s0 tclass=service_manager

Also allow priv_app to communicate with update_engine.

avc: denied { find } for service=android.os.IUpdateEngine scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:update_engine_service:s0 tclass=service_manager
avc: denied { call } for scontext=u:r:priv_app:s0:c512,c768 tcontext=u:r:update_engine:s0 tclass=binder
avc: denied { call } for scontext=u:r:update_engine:s0 tcontext=u:r:priv_app:s0 tclass=binder

Change-Id: Ib4498717c1a72f5faab5ea04c636924ee4eb412c
2016-01-25 16:42:38 -08:00
Marco Nelissen
2afb217b68 selinux rules for codec process
Bug: 22775369
Change-Id: I9733457b85dbaeb872b8f4aff31d0b8808fa7d44
2016-01-22 14:43:14 -08:00
Nick Kralevich
1d221c1618 Merge "priv_app.te: drop auditallows on cache_recovery_file" am: 4cd2f53018
am: 7a8631c299

* commit '7a8631c2998db9ed1aefddf32943db7ed878efe3':
  priv_app.te: drop auditallows on cache_recovery_file
2016-01-16 20:31:14 +00:00
Nick Kralevich
b8d794a1e0 priv_app.te: drop auditallows on cache_recovery_file
This is actually used. Addresses the following SELinux audit logs:

  avc: granted { create } for comm="Thread-157" name="uncrypt_file" scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:cache_recovery_file:s0:c512,c768 tclass=file
  avc: granted { add_name } for comm="Thread-157" name="uncrypt_file" scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:cache_recovery_file:s0 tclass=dir
  avc: granted { write } for comm="Thread-157" path="/cache/recovery/uncrypt_file" dev="mmcblk0p38" ino=22 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:cache_recovery_file:s0:c512,c768 tclass=file
  avc: granted { write } for comm="Thread-157" path="/cache/recovery/command" dev="mmcblk0p38" ino=23 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:cache_recovery_file:s0:c512,c768 tclass=file
  avc: granted { setattr } for comm="Thread-157" name="uncrypt_file" dev="mmcblk0p38" ino=22 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:cache_recovery_file:s0:c512,c768 tclass=file

Change-Id: Idab00ebc8eacd7d8bb793b9342249227f91986a1
2016-01-16 08:02:21 -08:00
Nick Kralevich
bed9b3d212 priv_app.te: refine cache_recovery_file auditallow rules am: eb6656ce0d
am: a50a5eaacd

* commit 'a50a5eaacda693869f908deadf6301653f0cf555':
  priv_app.te: refine cache_recovery_file auditallow rules
2016-01-08 00:21:54 +00:00
Nick Kralevich
eb6656ce0d priv_app.te: refine cache_recovery_file auditallow rules
priv_app reads from /cache/recovery, but I'm still not sure if
it writes. Eliminate the read auditallow rules and allow the
writes to show up (if any).

Eliminates the following auditallow messages:

  avc: granted { search } for comm="IntentService[S" name="recovery" dev="mmcblk0p38" ino=12 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:cache_recovery_file:s0 tclass=dir
  avc: granted { getattr } for comm="Thread-1" path="/cache/recovery/last_install" dev="mmcblk0p27" ino=29891 scontext=u:r:priv_app:s0:c525,c768 tcontext=u:object_r:cache_recovery_file:s0 tclass=file
  avc: granted { read open } for comm="Thread-1" name="recovery" dev="mmcblk0p27" ino=29889 scontext=u:r:priv_app:s0:c525,c768 tcontext=u:object_r:cache_recovery_file:s0 tclass=dir

Change-Id: Ibc0640f5366aae50e3fd09d17657374390b24a5c
2016-01-07 16:13:59 -08:00
Jeff Vander Stoep
bb1ece494f app: expand socket ioctl restrictions to all apps
Exempt bluetooth which has net_admin capability.

Allow Droidguard to access the MAC address - droidguard runs in
priv_app domain.

Change-Id: Ia3cf07f4a96353783b2cfd7fc4506b7034daa2f1
2016-01-06 10:22:05 -08:00
Felipe Leme
e97bd887ca Creates a new permission for /cache/recovery am: 549ccf77e3
am: b16fc899d7

* commit 'b16fc899d718f91935932fb9b15de0a0b82835c8':
  Creates a new permission for /cache/recovery
2016-01-04 23:55:14 +00:00
dcashman
05e68e1269 resolve merge conflicts of 8350a7f152 to master.
Change-Id: I80109bb0167f06a8d39d8b036b3c487ec2f06124
2016-01-04 15:47:19 -08:00
Felipe Leme
549ccf77e3 Creates a new permission for /cache/recovery
This permission was created mostly for dumpstate (so it can include
recovery files on bugreports when an OTA fails), but it was applied to
uncrypt and recovery as well (since it had a wider access before).

Grant access to cache_recovery_file where we previously granted access
to cache_file. Add auditallow rules to determine if this is really
needed.

BUG: 25351711
Change-Id: I07745181dbb4f0bde75694ea31b3ab79a4682f18
2016-01-04 23:11:28 +00:00
dcashman
36f255ff52 Create sysfs_zram label.
Address following denials:
avc: denied { getattr } for path="/sys/devices/virtual/block/zram0/disksize" dev="sysfs" ino=14958 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
avc: denied { search } for name="zram0" dev="sysfs" ino=14903 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0
avc: denied { read } for name="mem_used_total" dev="sysfs" ino=14970 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
avc: denied { write } for name="uevent" dev="sysfs" ino=14904 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
avc: denied { open } for path="/sys/devices/virtual/block/zram0/uevent" dev="sysfs" ino=14904 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
avc: denied { read } for pid=348 comm="vold" name="zram0" dev="sysfs" ino=15223 scontext=u:r:vold:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0
avc: denied { search } for pid=3494 comm="ContactsProvide" name="zram0"dev="sysfs" ino=15223 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0

Bug: 22032619
Change-Id: I40cf918b7cafdba6cb3d42b04b1616a84e4ce158
2016-01-04 14:24:09 -08:00
Daichi Hirono
6dde20ed4d Add new rules for appfuse. am: a20802ddb8
am: 0912601e89

* commit '0912601e897905549292c15445acbf1225938f3d':
  Add new rules for appfuse.
2015-12-23 18:50:17 -08:00
Daichi Hirono
a20802ddb8 Add new rules for appfuse.
The new rules are used to allow to mount FUSE file system for priv-app.

Change-Id: I5ce2d261be501e2b3fef09b7666f1e5d1cddbe52
2015-12-24 11:32:41 +09:00
Marco Nelissen
b03831fe58 Add rules for running audio services in audioserver
audioserver has the same rules as mediaserver so there is
no loss of rights or permissions.

media.log moves to audioserver.

TBD: Pare down permissions.

Bug: 24511453
Change-Id: I0fff24c14b712bb3d498f75e8fd66c2eb795171d
2015-12-07 17:33:20 -08:00
Jeffrey Vander Stoep
977e0b1df7 Merge "Allow priv_apps to stat files on the system partition" am: 1d58b2fdea am: d95780ac93
am: 0636639880

* commit '0636639880d72c4d4d2177a6cb4530d1a112abff':
  Allow priv_apps to stat files on the system partition
2015-12-03 21:34:46 +00:00
Jeff Vander Stoep
2b56e4844e Allow priv_apps to stat files on the system partition
Allows safetynet to scan the system partition which is made up of
files labeled system_file (already allowed) and/or files with the
exec_type attribute.

Bug: 25821333
Change-Id: I9c1c9c11bc568138aa115ba83238ce7475fbc5e4
2015-12-03 13:00:07 -08:00
Jeff Vander Stoep
d20a46ef17 Create attribute for moving perms out of domain am: d22987b4da am: e2280fbcdd
am: b476b95488

* commit 'b476b954882a48bf2c27da0227209c197dcfb666':
  Create attribute for moving perms out of domain
2015-11-04 00:07:02 +00:00
Jeff Vander Stoep
d22987b4da Create attribute for moving perms out of domain
Motivation: Domain is overly permissive. Start removing permissions
from domain and assign them to the domain_deprecated attribute.
Domain_deprecated and domain can initially be assigned to all
domains. The goal is to not assign domain_deprecated to new domains
and to start removing domain_deprecated where it is not required or
reassigning the appropriate permissions to the inheriting domain
when necessary.

Bug: 25433265
Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
2015-11-03 23:11:11 +00:00
Marco Nelissen
0f754edf7b Update selinux policies for mediaextractor process
Change-Id: If761e0370bf9731a2856d0de2c6a6af1671143bd
2015-10-27 12:58:04 -07:00
Jeff Vander Stoep
bcbb32e763 grant priv_app access to /dev/mtp_usb
android.process.media needs access to mtp_usb when MTP is enabled.

Bug: 25074672
Change-Id: Ic48a3ba8e4395104b0b957f7a9bad69f0e5ee38e
2015-10-19 13:07:15 -07:00
Jeff Vander Stoep
7f09a94596 Policy for priv_app domain
Verifier needs access to apk files.
avc: denied { search } for pid=11905 comm="ackageinstaller" name="vmdl2040420713.tmp" dev="dm-2" ino=13647 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:apk_tmp_file:s0 tclass=dir permissive=0

Give bluetooth_manager_service and trust_service the app_api_service
attribute.
avc:  denied  { find } for service=bluetooth_manager pid=7916 uid=10058 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:bluetooth_manager_service:s0 tclass=service_manager permissive=0
avc:  denied  { find } for service=trust pid=25664 uid=10069 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:trust_service:s0 tclass=service_manager permissive=0

Bug: 25066911
Change-Id: I6be695546f8a951e3329c1ec412936b8637e5835
2015-10-19 10:35:20 -07:00
Jeff Vander Stoep
879df83384 Privileged apps require access to cache
gmscore uses cache for updates

Bug: 24977552
Change-Id: I45a713fcfc70b71a2de712e77b64fb9feab67dd7
2015-10-15 15:17:01 -07:00
Jeff Vander Stoep
ee9c0b5fb6 Add priv_app domain to global seapp_context
Assign priviliged apps not signed with the platform key to the priv_app
domain.

Bug: 22033466
Change-Id: Idf7fbe7adbdc326835a179b554f96951b69395bc
2015-10-14 21:23:54 +00:00