Commit graph

77 commits

Author SHA1 Message Date
Roshan Pius
7c539b1c96 sepolicy: Add permissions for wpa_supplicant binder
Add the necessary permissions for |wpa_supplicant| to expose a binder
interface. This binder interface will be used by the newly added
|wificond| service (and potentially system_server).
|wpa_supplicant| also needs to invoke binder callbacks on |wificond|.

Changes in the CL:
1. Allow |wpa_supplicant| to register binder service.
2. Allow |wpa_supplicant| to invoke binder calls on |wificond|.
3. Allow |wificond| to invoke binder calls on |wpa_supplicant|

Denials:
06-30 08:14:42.788   400   400 E SELinux : avc:  denied  { add } for
service=wpa_supplicant pid=20756 uid=1010 scontext=u:r:wpa:s0
tcontext=u:object_r:default_android_service:s0 tclass=service_manager
permissive=1

BUG:29877467
TEST: Compiled and ensured that the selinux denials are no longer
present in logs.
TEST: Ran integration test to find the service.

Change-Id: Ib78d8e820fc81b2c3d9260e1c877c5faa9f1f662
(cherry picked from commit 18883a93b7)
2016-08-26 13:13:51 -07:00
Ningyuan Wang
b83c8cb139 sepolicy: add sepolicy binder support for wificond
This allows wificond to publish binder interface using
service manager.

Denial warnings:

wificond: type=1400 audit(0.0:8): avc:
denied { call } for scontext=u:r:wificond:s0
tcontext=u:r:servicemanager:s0 tclass=binder permissive=1

wificond: type=1400 audit(0.0:9): avc:
denied { transfer } for scontext=u:r:wificond:s0
tcontext=u:r:servicemanager:s0 tclass=binder permissive=1

servicemanager: type=1400
audit(0.0:10): avc: denied { search } for name="6085" dev="proc"
ino=40626 scontext=u:r:servicemanager:s0 tcontext=u:r:wificond:s0
tclass=dir permissive=1

servicemanager: type=1400
audit(0.0:11): avc: denied { read } for name="current" dev="proc"
ino=40641 scontext=u:r:servicemanager:s0 tcontext=u:r:wificond:s0
tclass=file permissive=1

servicemanager: type=1400
audit(0.0:12): avc: denied { open } for path="/proc/6085/attr/current"
dev="proc" ino=40641 scontext=u:r:servicemanager:s0
tcontext=u:r:wificond:s0 tclass=file permissive=1

servicemanager: type=1400
audit(0.0:13): avc: denied { getattr } for
scontext=u:r:servicemanager:s0 tcontext=u:r:wificond:s0 tclass=process
permissive=1

SELinux : avc:  denied  { add } for
service=wificond pid=6085 uid=0 scontext=u:r:wificond:s0
tcontext=u:object_r:wifi_service:s0 tclass=service_manager permissive=1

BUG=28867093
TEST=compile
TEST=use a client to call wificond service through binder

Change-Id: I9312892caff171f17b04c30a415c07036b39ea7f
(cherry picked from commit d56bcb1c54)
2016-08-26 13:13:51 -07:00
Philip Cuadra
96da70eb4f Add CAP_IPC_LOCK and pinner to system_server
Add pinner service to system_service services.
Add CAP_IPC_LOCK permissions to system_server in order to allow
system_server to pin more memory than the lockedmem ulimit.

bug 28251566

Change-Id: I990c73d25fce4f2cc9a2db0015aa238fa7b0e984
2016-05-04 17:39:41 -07:00
Lorenzo Colitti
3eae017f2f Merge "selinux changes for DNS metrics." into nyc-dev 2016-04-14 06:10:40 +00:00
Lorenzo Colitti
71d6ddc3ca selinux changes for DNS metrics.
1. Allow the system server to create the dns_listener service.
2. Allow netd to use said service.

Change-Id: Ic6394d7b2bdebf1c4d6cf70a79754a4996e943e2
2016-04-14 00:14:58 +09:00
Peng Xu
7df44d8276 Allow all apps to discover contexthub_service
This allows system app, regular app as well as test app to access
ContextHubManager API. Additional "signature|privilige" permission
requirement (LOCATION_HARDWARE) still exist to prevent security
issues, misuse and abuse.

Change-Id: I47f3d243a3de7f1202c933fc715a935c43cf319b
2016-04-11 15:52:47 -07:00
Ruben Brunk
743969baea Update selinux policy for VrManager AIDL.
Bug: 27884853
Change-Id: I097306a324bdc25c5d22868f0342e175ce0dbb9a
2016-04-06 14:03:45 -07:00
Jesse Hall
59970a4ed3 Define gpu_service and allow surfaceflinger to provide it
Bug: 26620936 and 27352427
Change-Id: I3d6d2e479d95133693790a97827e45e9dd30bc4a
2016-04-01 02:38:37 +00:00
Vladislav Kuzkokov
b9562f1920 Allow access to IProxyService to untrusted apps.
Access to modifying methods of ProxyService is
checked in implementation.

Bug: 27337770
Change-Id: I718ea8f4fd6be940ee9ef57f0571d884a013489b
2016-03-22 14:35:13 +01:00
Peng Xu
1c50994e1b Create SELinux label for contexhub_service
SELinux label is created for contexthub_service system service.

ContextHub service manages all available context hubs and serves fulfil communication between apps
and underlying context hub hardware.

Change-Id: I8470fedd9c79a00012e1cdb9b548a1b632ba7de6
2016-03-15 15:44:49 -07:00
dcashman
027ec20696 Mark batteryproperties service as app_api_service.
Applications do not explicitly request handles to the batteryproperties
service, but the BatteryManager obtains a reference to it and uses it
for its underlying property queries.  Mark it as an app_api_service so
that all applications may use this API.  Also remove the batterypropreg
service label, as this does not appear to be used and may have been a
duplication of batteryproperties.  As a result, remove the
healthd_service type and replace it with a more specific
batteryproperties_service type.

(cherry-picked from commit: 9ed71eff4b)

Bug: 27442760
Change-Id: I537c17c09145b302728377bf856c1147e4cc37e9
2016-03-14 16:09:42 -07:00
Polina Bondarenko
d79d753ac2 Merge "Renamed hardwareproperties to hardware_properties" into nyc-dev 2016-03-14 17:41:58 +00:00
Polina Bondarenko
447fd30d21 Renamed hardwareproperties to hardware_properties
Bug: 27531271
Change-Id: I3c5eee86d09696373ab155f93ba6c85da224cb51
2016-03-09 18:13:11 +01:00
Makoto Onuki
def5d16e3c Merge "Add new system service "shortcut"." into nyc-dev 2016-03-07 23:08:43 +00:00
Makoto Onuki
7508224f61 Add new system service "shortcut".
Bug 27325877

Change-Id: Idf2f9ae816e1f3d822a6286a4cf738c14e29a45e
2016-03-01 15:12:11 -08:00
Fyodor Kupolov
3d564e52ef Add NetworkTimeUpdateService
NetworkTimeUpdateService has been registered as a system service, so that
its dump state can be included into bugreports.

Bug: 23983739
Change-Id: I0d364009ba4630dcfd1d22c647195e33eedaa4e0
2016-02-26 17:21:47 -08:00
Daniel Sandler
0a5f3d4626 Merge "Allow access to the daydream ("dreams") service." into nyc-dev 2016-02-23 19:12:39 +00:00
Dan Sandler
00004ba1ff Allow access to the daydream ("dreams") service.
Bug: 26804329
Change-Id: I7b789c6fe8411e3a4a718da86d442a0f48c5c310
2016-02-23 13:19:14 -05:00
Lorenzo Colitti
a92c7fe3fb Merge "Allow the framework to communicate with netd via a binder service" into nyc-dev 2016-02-23 08:39:02 +00:00
Tao Bao
11727c9912 Merge "Add recovery service." into nyc-dev 2016-02-22 19:24:25 +00:00
Tao Bao
45f8e4af03 Add recovery service.
RecoverySystemService is separated from PowerManagerService as a
dedicated system service to handle recovery related requests (such as
invoking uncrypt to uncrypt an OTA package on /data or to set up /
clear the bootloader control block (i.e. /misc) and etc).

The matching CL in frameworks/base is in:
  Change-Id: Ic606fcf5b31c54ce54f0ab12c1768fef0fa64560.

Bug: 26830925
Change-Id: Iee0583c458f784bfa422d0f7af5d1f2681d9609e
(cherry picked from commit 65b5fde912)
2016-02-22 10:39:18 -08:00
Lorenzo Colitti
24dcc8b1ce Allow the framework to communicate with netd via a binder service
This will allow us to provide a better interface between Java
services (e.g., ConnectivityService) and netd than the current
FrameworkListener / NativeDaemonConnector interface which uses
text strings over a Unix socket.

Bug: 27239233
Change-Id: If40582ae2820e54f1960556b7bf7e88d98c525af
2016-02-19 00:22:37 +09:00
Polina Bondarenko
8a6bbb1ffe Allow gatekeeper to find hardwareproperties service.
Bug: 26945055
Change-Id: I5745d02be9889f6a0e02de12bd8d8f2808de9ce0
2016-02-17 14:23:56 +01:00
Jeff Tinker
0d5bac13e1 Add mediadrm service
Part of media security hardening

This is an intermediate step toward moving
mediadrm to a new service separate from mediaserver.
This first step allows mediadrmservice to run based
on the system property media.mediadrmservice.enable
so it can be selectively enabled on devices that
support using native_handles for secure buffers.

bug: 22990512
Change-Id: I2208c1e87a6bd8d5bfaed06b1fdcb0509c11cff2
2016-02-12 19:38:22 -08:00
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
Andreas Gampe
47ebae1a7a Selinux: introduce policy for OTA preopt
Add permissions to dex2oat, introduce otapreopt binary and otadexopt
service.

Bug: 25612095
Change-Id: I80fcba2785e80b2931d7d82bb07474f6cd0099f7
2016-02-04 16:58:43 -08: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
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
Jeff Vander Stoep
9d8728dbf8 grant country_detector_service app_api_service attribute
All apps should have access to the country_detector service.

avc:  denied  { find } for service=country_detector pid=1802 uid=1010002 scontext=u:r:untrusted_app:s0:c522,c768 tcontext=u:object_r:country_detector_service:s0 tclass=service_manager

Bug: 25766732
Change-Id: Ie3f1a801114030dada7ad70c715a62907a2d264f
2015-11-18 19:05:23 -08:00
Jeffrey Vander Stoep
0062aa1b81 Merge "grant country_detector_service app_api_service attribute"
am: 29a1e43ecf

* commit '29a1e43ecfd5825f37fd736ffca1a650ff5a7738':
  grant country_detector_service app_api_service attribute
2015-11-18 23:57:03 +00:00
Jeff Vander Stoep
1e1d65a392 grant country_detector_service app_api_service attribute
All apps should have access to the country_detector service.

avc:  denied  { find } for service=country_detector pid=1802 uid=1010002 scontext=u:r:untrusted_app:s0:c522,c768 tcontext=u:object_r:country_detector_service:s0 tclass=service_manager

Bug: 25766732
Change-Id: Ie3f1a801114030dada7ad70c715a62907a2d264f
2015-11-18 15:38:59 -08:00
Jeffrey Vander Stoep
7eb19e9d0e Merge "grant deviceidle_service app_api_service attribute" am: bcf31c786a am: e324735dde
am: 4e8c0a6207

* commit '4e8c0a620738fadf5b8bf96063befd71c88f4f75':
  grant deviceidle_service app_api_service attribute
2015-11-18 18:50:44 +00:00
Jeffrey Vander Stoep
e324735dde Merge "grant deviceidle_service app_api_service attribute"
am: bcf31c786a

* commit 'bcf31c786a5d0a18c04972255fb246777f3a1004':
  grant deviceidle_service app_api_service attribute
2015-11-17 22:22:22 +00:00
Jeff Vander Stoep
692bdc4404 grant deviceidle_service app_api_service attribute
avc:  denied  { find } for service=deviceidle pid=26116 uid=10007 scontext=u:r:untrusted_app:s0:c512,c768
tcontext=u:object_r:deviceidle_service:s0 tclass=service_manager

Bug: 25734577
Change-Id: I3c955e6df2186ad7adb6b599c5b6b802b8ecd8de
2015-11-17 13:10:46 -08:00
Marco Nelissen
0f754edf7b Update selinux policies for mediaextractor process
Change-Id: If761e0370bf9731a2856d0de2c6a6af1671143bd
2015-10-27 12:58:04 -07:00
Anthony Hugh
d19b20c30c Merge "Revert "Update sepolicy to allow ThermalObserver system service"" into cw-e-dev
am: 753148a869

* commit '753148a8691b7b5d29ee0ebab400c1eb7b2a7c27':
  Revert "Update sepolicy to allow ThermalObserver system service"
2015-10-22 22:27:54 +00:00
Anthony Hugh
2d8c2d9779 Revert "Update sepolicy to allow ThermalObserver system service"
This reverts commit cda36e31d1.
This will be moved to a device specific file.

BUG: 24555181

Change-Id: I0eb543211245c37da77bbf42449f70ff3fdf79ec
2015-10-22 21:58:51 +00:00
Jeff Vander Stoep
d77deee44f am 7f09a945: Policy for priv_app domain
* commit '7f09a94596be98415d0546d927c8a4bc15867621':
  Policy for priv_app domain
2015-10-19 10:42:34 -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
59bb0d4bc5 am 734e4d7c: Give services app_api_service attribute
* commit '734e4d7c5015a510ab20bfbc3c5a84667378764f':
  Give services app_api_service attribute
2015-10-18 09:15:25 -07:00
Jeff Vander Stoep
734e4d7c50 Give services app_api_service attribute
avc:  denied  { find } for service=network_management pid=4503 uid=10070 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:network_management_service:s0 tclass=service_manager
avc:  denied  { find } for service=netstats pid=4503 uid=10070 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:netstats_service:s0 tclass=service_manager permissive=0

Bug: 25022496
Change-Id: Ib6eac76b680fed3eca7e4942c6b0e375f12b6496
2015-10-17 19:24:11 +00:00