Commit graph

83 commits

Author SHA1 Message Date
Automerger Merge Worker
7934472245 Merge "Add SELinux policy for credstore and update for IC HAL port from HIDL to AIDL." am: 1948c11d13 am: 19516eb39f am: 5d5da562ba
Change-Id: Id5d55d29f52b7ed56c16de946c4c0e5fdf054f35
2020-02-19 23:18:16 +00:00
David Zeuthen
02bf814aa2 Add SELinux policy for credstore and update for IC HAL port from HIDL to AIDL.
The credstore service is a system service which backs the
android.security.identity.* Framework APIs. It essentially calls into
the Identity Credential HAL while providing persistent storage for
credentials.

Bug: 111446262
Test: atest android.security.identity.cts
Test: VtsHalIdentityTargetTest
Test: android.hardware.identity-support-lib-test
Change-Id: I5cd9a6ae810e764326355c0842e88c490f214c60
2020-02-19 13:46:45 -05:00
Automerger Merge Worker
ebf15a6584 Sepolicy update for Automotive Display Service am: 741b9cd5ac am: 8f52ce8bea am: 2f75747305
Change-Id: If1d84379a1205c6dddf97fcf2eb8d2ca19f2732a
2020-01-21 21:04:03 +00:00
Haoxiang Li
741b9cd5ac Sepolicy update for Automotive Display Service
Bug: 140395359
Test: make sepolicy -j
Change-Id: Ib6ddf55210d8a8ee4868359c88e3d177edce9610
Signed-off-by: Changyeon Jo <changyeon@google.com>
2020-01-21 18:43:27 +00:00
Automerger Merge Worker
5a24828f3e Merge "Add SELinux policy for Identity Credential HAL" am: a5527b4e46 am: 8924b794a7 am: 700b98a507
Change-Id: If6578fc781106395bd8e47b13aba4994d41ba986
2020-01-15 23:43:10 +00:00
David Zeuthen
b8b5da4305 Add SELinux policy for Identity Credential HAL
Bug: 111446262
Test: VtsHalIdentityCredentialTargetTest
Change-Id: Icb5a0d8b24d463a2f1533f8dd3bfa84bf90acc6f
2020-01-14 20:13:39 -05:00
Tri Vo
a53cbc3e46 Merge "sepolicy: remove ashmemd" am: b398dbb9ea am: 5e7b366c16 am: 606fce3011
am: 78a5a2d4ad

Change-Id: I6220f15bc0f708a10bead4589e609bb020692f6f
2019-10-01 09:57:52 -07:00
Tri Vo
b398dbb9ea Merge "sepolicy: remove ashmemd" 2019-10-01 16:22:57 +00:00
Robert Shih
f58be478de Allow apps to access hal_drm
Bug: 134787536
Test: MediaDrmClearkeyTest#testClearKeyPlaybackCenc
Change-Id: I931ccdfa3b78c7210f9f94e94b48d2d6908a371d
Merged-In: I931ccdfa3b78c7210f9f94e94b48d2d6908a371d
2019-09-30 04:51:24 +00:00
Tri Vo
bfcddbe25e sepolicy: remove ashmemd
Bug: 139855428
Test: m selinux_policy
Change-Id: I8d7f66b16be025f7cb9c5269fae6fd7540c2fdc9
2019-09-27 17:43:53 +00:00
Robert Shih
6cf715b5fa Allow apps to access hal_drm
Bug: 134787536
Bug: 139315093
Test: MediaDrmClearkeyTest#testClearKeyPlaybackCenc
Change-Id: I931ccdfa3b78c7210f9f94e94b48d2d6908a371d
2019-09-26 23:14:46 +00:00
Jiyong Park
e95c704b6f Access to HALs from untrusted apps is blacklist-based
Before this change, access to HALs from untrusted apps was prohibited
except for the whitelisted ones like the gralloc HAL, the renderscript
HAL, etc. As a result, any HAL that is added by partners can't be
accessed from apps. This sometimes is a big restriction for them when
they want to access their own HALs in the same-process HALs running in
apps. Although this is a vendor-to-vendor communication and thus is not
a Treble violation, that was not allowed because their HALs are not in
the whitelist in AOSP.

This change fixes the problem by doing the access control in the
opposite way; access to HALs are restricted only for the blacklisted
ones.

All the hwservice context that were not in the whitelist are now put
to blacklist.

This change also removes the neverallow rule for the binder access to
the halserverdomain types. This is not needed as the protected
hwservices living in the HAL processes are already not accessible; we
have a neverallow rule for preventing hwservice_manager from finding
those protected hwservices from untrusted apps.

Bug: 139645938
Test: m

Merged-In: I1e63c11143f56217eeec05e2288ae7c91e5fe585
(cherry picked from commit 580375c923)

Change-Id: I4e611091a315ca90e3c181f77dd6a5f61d3a6468
2019-09-06 14:10:38 +09:00
Jiyong Park
580375c923 Access to HALs from untrusted apps is blacklist-based
Before this change, access to HALs from untrusted apps was prohibited
except for the whitelisted ones like the gralloc HAL, the renderscript
HAL, etc. As a result, any HAL that is added by partners can't be
accessed from apps. This sometimes is a big restriction for them when
they want to access their own HALs in the same-process HALs running in
apps. Although this is a vendor-to-vendor communication and thus is not
a Treble violation, that was not allowed because their HALs are not in
the whitelist in AOSP.

This change fixes the problem by doing the access control in the
opposite way; access to HALs are restricted only for the blacklisted
ones.

All the hwservice context that were not in the whitelist are now put
to blacklist.

This change also removes the neverallow rule for the binder access to
the halserverdomain types. This is not needed as the protected
hwservices living in the HAL processes are already not accessible; we
have a neverallow rule for preventing hwservice_manager from finding
those protected hwservices from untrusted apps.

Bug: 139645938
Test: m

Change-Id: I1e63c11143f56217eeec05e2288ae7c91e5fe585
2019-09-04 18:00:03 +09:00
Amy Zhang
c23667f999 Merge "Tuner Hal 1.0 Enable ITuner service" am: 3e7429359f am: 3b62596f4f am: 11739f3126 am: a588ba4e3e
am: 5bd0803562

Change-Id: I7dfa4df490f1365edcecaf69e2971378177d56ef
2019-08-15 16:07:07 -07:00
Amy
89b4bbd4d8 Tuner Hal 1.0 Enable ITuner service
Test: cuttlefish
Bug: 135708935
Change-Id: Ica063458860df45f0e2ab640a2ab35cd4da3da8e
2019-08-14 11:22:09 -07:00
Tomasz Wasilczyk
9794dd74a3 SEPolicy rules for CAN bus HAL am: 602b30302a am: 0540154021 am: 2f0ee4345f am: ce9863e755
am: b94bb81337

Change-Id: Id35783f576554cfce08126bc1ee0216af7fc70bd
2019-08-01 20:21:08 -07:00
Tomasz Wasilczyk
602b30302a SEPolicy rules for CAN bus HAL
Bug: 135918744
Test: VTS (separate new change)
Change-Id: Idd3ca882e3bd36b95a5412bdfbf6fe9d6e911ba9
2019-08-01 10:24:00 -07:00
Kalesh Singh
be95f9728f Merge "Sepolicy for IAshmem HIDL interface" am: b374835ffb am: 99a5e65385 am: 533363bb54
am: 2c45c52bad

Change-Id: I8808520448c0091211ba492a9fec9810917dd833
2019-05-30 01:07:25 -07:00
Kalesh Singh
46303aa1f7 Sepolicy for IAshmem HIDL interface
Change-Id: Id78f995661120f136d671ea0084db358e7662122
Bug: 133443879
Test: Manually check logcat for sepolicy denials (logcat | grep IAshmem)
2019-05-29 14:44:47 -07:00
Roshan Pius
56dfc06397 sepolicy: Remove offload HAL sepolicy rules
This is unused currently & there are no concrete plans to use it
in the future.

Bug: 130080335
Test: Device boots up & connects to networks.
Test: Will send for regression tests
Change-Id: I785389bc2c934c8792c8f631362d6aa0298007af
2019-05-01 12:48:45 -07:00
Jayant Chowdhary
ca41deb378 Add selinux rules for HIDL ICameraServer.
Bug: 110364143

Test: lshal->android.frameworks.cameraservice.service@2.0::ICameraService/default
      is registered.

Merged-In: I689ca5a570c169581b2bfb9d117fcdafced0a7e0
Change-Id: I689ca5a570c169581b2bfb9d117fcdafced0a7e0
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit 039d4151da)
2019-03-01 14:01:07 -08:00
Siarhei Vishniakou
434dd2d6c7 Merge "Permissions for InputClassifier HAL" am: 1531e72e76 am: f01aeef78c
am: 26670ab73f

Change-Id: I45ee39fb63dab2ec91a5a909e59c990bacc7c48a
2019-01-11 11:54:26 -08:00
Siarhei Vishniakou
41a871ba84 Permissions for InputClassifier HAL
Add the required permissions for the InputClassifier HAL.

Bug: 62940136
Test: no selinux denials in logcat when HAL is used inside input flinger.
Change-Id: Ibc9b115a83719421d56ecb4bca2fd196ec71fd76
2019-01-11 02:08:19 +00:00
Zachary Iqbal
4c7469ad38 Added placeholder SELinux policy for the biometric face HAL. am: 893272d883 am: f8be9cf1c0
am: ab1e43cdad

Change-Id: If9c63acee76a9574c2e2fdbd7a2796bf89d194cc
2018-12-28 13:00:42 -08:00
Zachary Iqbal
893272d883 Added placeholder SELinux policy for the biometric face HAL.
Notes:
- Added face hal domain, context and file types for the default
  SELinux policy.
- Please see aosp/q/topic:"Face+Authentication"

Bug: 80155388
Test: Built successfully.
Change-Id: I2e02cf6df009c5ca476dfd842b493c6b76b7712a
2018-12-28 12:23:56 -08:00
Nick Kralevich
b515b9b498 Merge "Ensure that hwservice_manager adds / finds make sense." am: f21085ca29 am: 4aa9123f1b
am: 5688729fd5

Change-Id: I2e121886c46909e8148f65e5e4980af797733295
2018-12-19 17:56:15 -08:00
Nick Kralevich
db43ee04eb Ensure that hwservice_manager adds / finds make sense.
Add a neverallow rule asserting that services registered or queried
through hwservicemanager must have the attribute hwservice_manager_type.
Attempting to add or query a service which does not have that
attribute is malformed policy.

Test: compiles
Change-Id: Ib498508694f478c396f2d9273abaccbff06975e6
2018-12-19 14:24:26 -08:00
Benjamin Schwartz
e7040eada0 Add power.stats HAL 1.0 sepolicy
Also giving statsd permission to access it. This change copies the internal sepolicy to AOSP.

Bug: 111185513
Bug: 120551881
Test: make
Change-Id: I7e0386777e05580299caf9b97cb7804459f1a9d0
2018-12-11 00:11:08 +00:00
Jayant Chowdhary
039d4151da Add selinux rules for HIDL ICameraServer.
Bug: 110364143

Test: lshal->android.frameworks.cameraservice.service@2.0::ICameraService/default
      is registered.

Change-Id: I689ca5a570c169581b2bfb9d117fcdafced0a7e0
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2018-11-12 10:42:29 -08:00
Jiwen 'Steve' Cai
f7e5c97853 Sepolicy for bufferhub hwservice am: d5c5ef900c am: eb5c4ed442
am: 034d4ed8b5

Change-Id: Ib7d67dbf594efa8c6d8a21ba27a0ee3e540d428c
2018-10-25 22:21:54 -07:00
Jiwen 'Steve' Cai
d5c5ef900c Sepolicy for bufferhub hwservice
Bug: 118124442
Test: device can boot with android.frameworks.bufferhub@1.0-service
      running
Change-Id: I1d186d5350671b0d2dd4e831429b8fba828316e0
2018-10-25 10:08:05 -07:00
Vinay Kalia
a4babcf2be Add power.stats HAL 1.0 sepolicy
BUG: 117424656
BUG: 111185513
Test: run vts -m VtsHalPowerStatsV1_0Target

Change-Id: Icb0790219df4189c0dabbe41221e69e56d000755
2018-10-23 18:12:10 +00:00
Howard Ro
b41dd1b54f Merge "Update sepolicies for stats hal"
am: aabee5fe5f

Change-Id: Ib271b23881eeff75f62613054714a11e8d67dc44
2018-10-02 14:06:31 -07:00
Howard Ro
578a189178 Update sepolicies for stats hal
Bug: 116732452
Test: No sepolicy violations observed with this change
(cherry picked from commit I1958182dd8ecc496625da2a2a834f71f5d43e7bb)

Change-Id: Ib386767d8acfacf9fedafd9a79dd555ce233f41c
2018-09-28 13:34:37 -07:00
Wei Wang
a15a0804bc Add atrace HAL 1.0 sepolicy
am: bc71a6109e

Change-Id: Iad34b6a0a8e4a9b885244804e07c93bc79f8731b
2018-09-27 16:27:11 -07:00
Wei Wang
bc71a6109e Add atrace HAL 1.0 sepolicy
Bug: 111098596
Test: atrace/systrace

(cherry picked from commit 9ed5cf6e43)

Change-Id: I97772ff21754d03a0aea0d53b39e8da5312a17c0
2018-09-27 23:18:29 +00:00
Howard Ro
9f9af0dbd2 Update sepolicies for stats hal
Bug: 116732452
Test: no sepolicy violations observed with this change
Change-Id: I1958182dd8ecc496625da2a2a834f71f5d43e7bb
2018-09-27 15:54:49 -07:00
Wei Wang
9ed5cf6e43 Add atrace HAL 1.0 sepolicy
Bug: 111098596
Test: atrace/systrace
Change-Id: I06ca76750d640c98849c475c8a237d62c8e582b9
2018-09-25 21:02:10 -07:00
Yifan Hong
fc433b5553 health.filesystem HAL renamed to health.storage
am: 1cef6a94eb

Change-Id: Ia7c2b0c347eb945777eac435c45df2683c556b80
2018-09-20 22:36:15 -07:00
Yifan Hong
1cef6a94eb health.filesystem HAL renamed to health.storage
...to reflect that the HAL operates on storage devices,
not filesystem.

Bug: 111655771
Test: compiles
Change-Id: Ibb0572cb1878359e5944aa6711331f0c7993ba6e
Merged-In: Ibb0572cb1878359e5944aa6711331f0c7993ba6e
2018-09-20 04:12:45 +00:00
Yifan Hong
145940f6cf health.filesystem HAL renamed to health.storage
...to reflect that the HAL operates on storage devices,
not filesystem.

Bug: 111655771
Test: compiles
Change-Id: Ibb0572cb1878359e5944aa6711331f0c7993ba6e
2018-09-19 12:01:10 -07:00
Tri Vo
e5374e6784 Sepolicy for system suspend HAL.
am: dac2a4a3a4

Change-Id: Ia03441639efe7f2147db104c7b1533b941c60f9e
2018-08-13 18:52:30 -07:00
Tri Vo
dac2a4a3a4 Sepolicy for system suspend HAL.
Bug: 78888165
Test: device can boot with HAL running.
Change-Id: I3bf7c8203e038b892176c97ec006152a2904c7be
2018-08-13 17:26:34 -07:00
Yifan Hong
562a0d2f97 Merge "Add sepolicy for health filesystem HAL" am: 3dd465a097
am: 33eee9c584

Change-Id: I84d7cc56ec9280957218357ed97c1ca606b24795
2018-08-10 16:10:17 -07:00
Yifan Hong
0814795c79 Add sepolicy for health filesystem HAL
Test: builds
Test: vts
Bug: 111655771
Change-Id: Iabad3d124bf476cb624addf7d7898e0c2894d550
2018-08-10 11:02:21 -07:00
Todd Poynor
c6afcb7fc0 remove thermalcallback_hwservice
This hwservice isn't registered with hwservicemanager but rather passed
to the thermal hal, so it doesn't need sepolicy associated with it to
do so.

Test: manual: boot, inspect logs
Test: VtsHalThermalV1_1TargetTest
Bug: 109802374
Change-Id: Ifb727572bf8eebddc58deba6c0ce513008e01861
Merged-In: Ifb727572bf8eebddc58deba6c0ce513008e01861
2018-06-29 23:01:43 +00:00
Pavel Maltsev
43e172af66 Move automotive HALs sepolicy to system/
Bug: 70637118
Test: build, flash and boot automotive builds

Change-Id: I6db23258de30174d6db09d241e91b08aa5afedef
Merged-In: I6db23258de30174d6db09d241e91b08aa5afedef
(cherry picked from commit 394dbe34a0)
2018-05-04 21:36:48 +00:00
Pawin Vongmasa
19a74ec88a Put in sepolicies for Codec2.0 services
Test: Builds

Bug: 64121714
Bug: 31973802
Change-Id: Id37be8726a8bb297e35bca494964fdbcc48c6a73
(cherry picked from commit 4be2889477)
2018-05-04 21:36:41 +00:00
Roshan Pius
d7b34a48ff sepolicy(hostapd): Add a HIDL interface for hostapd
* Note on cherry-pick: Some of the dependent changes are not in AOSP.
In order to keep hostapd running correctly in AOSP, I've modified this
change to only include policy additions.

Change sepolicy permissions to now classify hostapd as a HAL exposing
HIDL interface.

Sepolicy denial for accessing /data/vendor/misc/wifi/hostapd:
12-27 23:40:55.913  4952  4952 W hostapd : type=1400 audit(0.0:19): avc:
denied { write } for name="hostapd" dev="sda13" ino=4587601
scontext=u:r:hal_wifi_hostapd_default:s0
tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0

01-02 19:07:16.938  5791  5791 W hostapd : type=1400 audit(0.0:31): avc:
denied { search } for name="net" dev="sysfs" ino=30521
scontext=u:r:hal_wifi_hostapd_default:s0
tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0

Bug: 36646171
Test: Device boots up and able to turn on SoftAp.
Change-Id: Ibacfcc938deab40096b54b8d0e608d53ca91b947
Merged-In: Ibacfcc938deab40096b54b8d0e608d53ca91b947
(cherry picked from commit 5bca3e860d)
2018-05-04 21:36:24 +00:00
Pavel Maltsev
394dbe34a0 Move automotive HALs sepolicy to system/
Bug: 70637118
Test: build, flash and boot bat_land and owl automotive builds

Change-Id: I6db23258de30174d6db09d241e91b08aa5afedef
2018-04-23 15:46:41 -07:00