Commit graph

61 commits

Author SHA1 Message Date
Inseob Kim
75806ef3c5 Minimize public policy
Ideally, public should only contain APIs (types / attributes) for
vendor. The other statements like allow/neverallow/typeattributes are
regarded as implementation detail for platform and should be in private.

Bug: 232023812
Test: m selinux_policy
Test: diff <(git diff --staged | grep "^-" | cut -b2- | sort) \
           <(git diff --staged | grep "^+" | cut -b2- | sort)
Test: remove comments on plat_sepolicy.cil, replace base_typeattr_*
      to base_typeattr and then compare old and new plat_sepolicy.cil
Change-Id: I5e7d2da4465ab0216de6bacdf03077d37f6ffe12
2024-03-28 00:33:46 +00:00
sandeepbandaru
600e395339 Adding on_device_intelligence selinux policy to allow system appliations to retrieve this service
Bug: 316589195
Test: flashed on device and ran service with a demo app
Change-Id: I708d715525dd1c4f3985dfcc1560383d045f1a6f
2024-03-11 11:33:18 +00:00
Alan Stokes
38131e7ba8 Add virtualization_maintenance_service
This is an AIDL service exposed by Virtualization Service to system
server (VirtualizationSystemService).

The implementation is Rust so no fuzzer is required.

I've put this behind the flag on general principle.

Bug: 294177871
Test: atest MicrodroidTests
Change-Id: Ia867fe27fb2e76d9688e4ba650ebf7b3f51ee597
2024-02-20 17:08:28 +00:00
Dan Shi
b230f4f10c Merge "Revert "audio: Provide a default implementation of IHalAdapterVe..."" into main 2024-02-01 21:57:51 +00:00
Dan Shi
0ad6f6bdd6 Revert "audio: Provide a default implementation of IHalAdapterVe..."
Revert submission 2929484-fix-b-321651892-ihaladapter

Reason for revert: possible cause of b/323385784

Reverted changes: /q/submissionid:2929484-fix-b-321651892-ihaladapter

Change-Id: I9664f8f9dd6eec159be7fbf3b148a12d44cef582
2024-02-01 19:32:34 +00:00
Mikhail Naganov
c301f8ef3d Merge "audio: Provide a default implementation of IHalAdapterVendorExtension" into main 2024-02-01 16:48:06 +00:00
Mikhail Naganov
00c2fedc5a audio: Provide a default implementation of IHalAdapterVendorExtension
This service is used by the audio server for translating
between legacy string KV pairs and AIDL vendor parameters.
It resides on the system_ext partition.

Since it has to be implemented by every SoC vendor, provide
an example implementation. This example service is added
to CF and GSI system_ext. Vendors can use their own names
and policy labels, the only thing that the audio server
depends on is the AIDL interface.

There is no fuzzer for this service because the example
implementation only contains trivial code (interface
methods are stubbed out).

Bug: 321651892
Test: atest audiorouting_tests
Change-Id: I8ab922660a30ffd44772987204ac4a28c1007c66
2024-01-26 15:35:51 -08:00
Haining Chen
982295a6af Add sepolicy for adaptive auth service
Bug: 285053096
Test: m -j
Change-Id: I549de0536071ff5622c54e86927b1f20dab9d007
2024-01-24 15:47:14 -08:00
Tom Chan
4409ea458f Update wearable_sensing_service to app_api_service
Being a system_api_service prevents non-privileged apps from getting a reference to WearableSensingManager via Context#getSystemService (it returns null). CTS tests are run as non-privileged apps, so we need this change to properly test the API.

The API methods are protected by a signature|privileged permission. CTS tests can gain this permission by adopting the Shell's permission identity, but it can't get around the SELinux policy.

wearable_sensing_service is mostly modelled after ambient_context_service, which is an app_api_service, so we believe this change is fine from a security's perspective.

Test: A CTS test can get a WearableSensingManager via Context#getSystemService after this change.

Change-Id: I9d854353f48ff7b3fa5a07527bee0bcc83cb6236
2023-12-18 22:02:06 +00:00
George Chan
09a7dd1714 Merge "Added system_api_service to bg_install_control_service" into main 2023-11-22 22:32:00 +00:00
George Chan
7d0df3459b Added system_api_service to bg_install_control_service
Bug: 296060433
Test: m
Change-Id: I7b0a20991a417aefae99b4c206ca8234d85ed615
2023-11-22 21:52:58 +00:00
Inseob Kim
094e8e81a2 Flag-guard vfio_handler policies
vfio_handler will be active only if device assignment feature is turned
on.

Bug: 306563735
Test: microdroid tests with and without the flag
Change-Id: I5559dfca1a29852b65481c95f37edc9977ee9d7d
2023-11-22 05:28:20 +00:00
Xin Li
e07dbe0a63 Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: Id2cc5dbbafffb4633706e5cc728cb44abd417340
Change-Id: I77e68f17a1273958bcdc32b5a4b6a0ff3ffdfd2a
2023-08-23 17:20:59 -07:00
Inseob Kim
825056de9a Add permission for VFIO device binding
vfio_handler will bind platform devices to VFIO driver, and then
return a file descriptor containing DTBO. This change adds
permissions needed for that.

Bug: 278008182
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid \
      --devices /sys/bus/platform/devices/16d00000.eh --protected
Change-Id: Ie947adff00d138426d4703cbb8e7a8cd429c2272
2023-08-02 15:06:51 +09:00
Dave Mankoff
665cad0d2c SE Linux perimissions for Feature Flags Service
Bug: 279054964
Test: build && flash
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a1f8ca3cd3c4861a06c5042148aab6623a563651)
Merged-In: I5fffaccba61e218496ac82ccf9ba308cf9892868
Change-Id: I5fffaccba61e218496ac82ccf9ba308cf9892868
2023-06-26 13:42:45 +00:00
Charlie Wang
bf61b00eb7 SELinux policy changes for Wearable Sensing APIs.
API changes are in ag/20407841. Please note we're still going through
security reviews here: b/249996246 and will incorporate feedback as we
go through the process. These selinux policies will enable the
WearableSensingService to run and unblock upstream development work.

Test: Ensure no build failures, ensure no SecurityException on boot
Bug: 249135378, 244181656
Ignore-AOSP-First: to prevent new feature leak.
Change-Id: I597827766cc3ed68ae65fb177f518eaf874f1eda
2022-12-05 09:20:14 -08:00
Wenhao Wang
e825ad2a62 Add sepolicy for background_install_control service
The background_install_control service is going to detect
background installed apps and provide the list of such apps.

Bug: 244216300
Test: manual
Change-Id: I6500f29ee063da4a3bc18e109260de419dd39218
2022-10-24 11:26:35 -07:00
Vikram Gaur
d25c80a951 Add SELinux policy changes for rkpd
This is a part of changes to bring up Remote Key Provisioning Daemon
module. See packages/modules/RemoteKeyProvisioning for more info.

Change-Id: Iae4e98176491637acb03e2e09b9d8dbc269be616
Test: atest rkpd_client_test
2022-09-23 05:09:00 +00:00
Kathy Chen
4ce608cf25 Merge "SELinux policy changes for AmbientContext system API." am: 7bb9120ba7 am: 49527e07b6 am: f46b2a87dd am: ad1efe3c75
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1920077

Change-Id: Ib119d650516410479097ba7e339529660f9ffa16
2022-01-21 22:54:30 +00:00
Kathy Chen
082263f3bc SELinux policy changes for AmbientContext system API.
Context about this is on ag/16302285

Test: Ensure no build failures, ensure no SecurityException on boot
Bug: 192476579
Change-Id: If5ba2fa41975acf91c0002a0f301da11eaebd6d2
2022-01-21 20:12:54 +00:00
Treehugger Robot
e88ae7f583 Merge "Add selinux policy for new BinaryTransparencyService" am: 158927ed5c am: c39826824d am: 53fab93545 am: d65a7b8b68
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1954957

Change-Id: I45a2571e463975829393a214f0e6c061ecbfdcd1
2022-01-21 20:09:37 +00:00
Treehugger Robot
158927ed5c Merge "Add selinux policy for new BinaryTransparencyService" 2022-01-21 19:10:31 +00:00
Victor Hsieh
ba185494c0 Merge "Remove compos_internal_service" am: 2413e27cc6 am: 9d77739f87 am: 162ab210a4 am: dc6b9aa742
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1953531

Change-Id: I0d06b4186b0f05901b26e2e6b0aab988f8f6d8b8
2022-01-19 23:16:02 +00:00
Billy Lau
8bb3ed7451 Add selinux policy for new BinaryTransparencyService
Bug: 197684182

Test: Manually verified that BinaryTransparencyService is correctly
started and running.

Change-Id: I4eaf5698dd2edb428205afcd57c22502d56d2ec2
2022-01-19 14:45:45 -08:00
Victor Hsieh
6f6815efde Remove compos_internal_service
Bug: 210998077
Test: m; TH
Change-Id: Id3c7fcab56de5f71b00e21bd53829b2471e07d77
2022-01-18 12:51:55 -08:00
Treehugger Robot
27af0aa678 Merge "Add sepolicy for logd and logcat services" am: d6a5b604ce am: 47f5daf227 am: 75852fc484 am: e646c94505
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1948849

Change-Id: Ibdec9f256a5602f2bf08e8992ceb7206111671ca
2022-01-14 21:43:37 +00:00
Wenhao Wang
6a656c0b67 Add sepolicy for logd and logcat services
The logd binder service is on logd side.
The logcat binder service is on system_server side.
These two binder services facilitate the binder RPC
between logd and system_server.

Bug: 197901557
Test: manual
Change-Id: I5f08bbb44a88dc72302331ab11c7d54f94db16ac
2022-01-13 11:38:43 -08:00
Treehugger Robot
ea6e9e3d3c Merge "Allow untrusted apps to access incidentcompanion" am: f650c54ee1 am: 5e310aa786 am: 9edd7274c4 am: f5fb14c0be
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1913754

Change-Id: I97f4ba0c6e50835df2f4fd146ed91f7a9d0b6075
2022-01-05 22:25:44 +00:00
Treehugger Robot
f650c54ee1 Merge "Allow untrusted apps to access incidentcompanion" 2022-01-05 21:10:55 +00:00
Xiaowen Lei
dfd02c5633 Update sepolicy for service renaming in ag/16267310.
Note: the service was renamed following ApiLint.kt suggestions.

Ignore-AOSP-First: tied to launch of new upcoming hardware.

Test: atest CtsAppTestCases:CommunalManagerTest

Bug: 206054365
Change-Id: Ieca5eba540e77af09d6a1cfe03cc29a988503b5b
2021-12-08 23:24:16 +00:00
Jeffrey Huang
d93b2e18c3 Allow untrusted apps to access incidentcompanion
Bug: 206548410
Test: m -j
Change-Id: I93b9e983149ab5b303bc34e3de094c1481c35dc9
2021-12-07 12:20:11 -08:00
Treehugger Robot
c1c5601718 Merge "Mark safety_center_service as app_api_service in SELinux Policy." am: 441be957ca am: db3248e228 am: addafb6515 am: cb8e5617b2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1899011

Change-Id: Ie151c6ff65fb0144248ae15d1e92585bae8a2ec8
2021-11-22 13:47:08 +00:00
Treehugger Robot
441be957ca Merge "Mark safety_center_service as app_api_service in SELinux Policy." 2021-11-22 12:54:32 +00:00
Treehugger Robot
b3b0846894 Merge "Split composd's service in two" am: 6d485dfd89 am: c995fd7ac3 am: 3ecbd02bf9 am: f619dc9cc5
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1897594

Change-Id: Icf41c3fcea975ef45106d6c00801d745cdb72460
2021-11-22 12:06:47 +00:00
Treehugger Robot
6d485dfd89 Merge "Split composd's service in two" 2021-11-22 11:19:40 +00:00
Alan Stokes
8788f7afe2 Split composd's service in two
They are served by the same process but have different clients:
- the main interface is exposed to system server;
- the internal interface is called by odrefresh when spawned by composd.

Test: compos_cmd forced-compile-test
Bug: 199147668
Change-Id: Ie1561b7700cf633d7d5c8df68ff58797a8d8bced
2021-11-22 09:36:45 +00:00
Elliot Sisteron
6703102c79 Mark safety_center_service as app_api_service in SELinux Policy.
This is to make the SafetyCenterManager usable in CTS tests.
Test: SafetyCenterManager CTS test in ag/16284943
Bug: 203098016

Change-Id: I28a42da32f1f7f93c45294c7e984e6d1fd2cdd8d
2021-11-20 00:14:50 +00:00
Elliot Sisteron
956af8cf23 SELinux policy changes for SafetyCenter APIs. am: 67cedde1fe am: 1e50a0757d am: 752ac29b40 am: 04b94a68d0
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1897505

Change-Id: I3db204d5f45624afd652aa6fa6cce68961f28925
2021-11-19 17:04:42 +00:00
Elliot Sisteron
67cedde1fe SELinux policy changes for SafetyCenter APIs.
Context about this is on ag/16182563.

Test: Ensure no build failures, ensure no SecurityException on boot when
SafetyCenterService is added as boot phase
Bug: 203098016

Change-Id: I4c20980301a3d0f53e6d8cba0b56ae0992833c30
2021-11-19 14:32:11 +00:00
Treehugger Robot
a25119d31d Merge "Sepolicy for StatsBootstrapAtomService" am: b8f39c49f5 am: ad9ebec821 am: eb4e7c5aeb am: 3b5dd9e542
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1885105

Change-Id: Ida683a048e57c3512552e5fce0ade87dfcbccd0e
2021-11-19 00:40:21 +00:00
Tej Singh
980ea0bed3 Sepolicy for StatsBootstrapAtomService
This is the selinux changes required to create
StatsBootstrapAtomService, a lightweight proxy service in system server
to allow processes in the bootstrap namespace to log atoms to statsd.

Test: statsbootstrap is successfully published
Bug: 204889815
Change-Id: I5e44f7a65b98b8eebd8da6d35ae6094ce5e177f2
2021-11-08 23:28:21 -08:00
Lucas Silva
e56afbd06d Add sepolicy changes for new communal system service.
Ignore-AOSP-First: tied to launch of new upcoming hardware
Test: locally on device
Bug: 191994709
Bug: 191996331
Bug: 200324021
Change-Id: I2c1072c720658159a50905d20ca02a13e1b1c128
2021-10-15 19:15:54 +00:00
Alan Stokes
d376e2041f Initial sepolicy for composd
Add what we need to allow composd to run and expose an AIDL service.

Also delete the policy for compsvc; we never access it in the host
now, and the real policy is in microdroid. Retain the compos_exec
type, since it is referenced in the APEX sepolicy.

Bug: 186126194
Test: adb shell cmd -w android.system.composd; no denials.
Change-Id: I5f06b2b01852cdebd2d67009b363ec08b17ce33a
2021-09-13 10:33:53 +01:00
Collin Fijalkovich
6f4cfe8709 Configure sepolicy for TracingServiceProxy
Configures sepolicy to allow for the new TracingServiceProxy system
services, and to allow Perfetto to access the service.

Bug: 175591887
Test: Validated the service started successfullyy, and invoked via CLI
Change-Id: Idb6438948a9d96063f8455544b97ef66267cde23
2021-02-05 11:04:11 -08:00
Yi Jiang
7d7951bcbd Add a new selinux policy for the resolver service
Bug: 178151184
Test: manual
Change-Id: Ia44c50d24b3b5403b02ccc1b7873c7024b10e023
2021-01-21 16:55:49 -08:00
shubang
f8ab3eb1bb SE policy for tuner service.
Test: make; acloud;  tuner sample input
Change-Id: I651632ec7f4ba79d94738c11c343f63510e59aa6
2020-12-16 06:05:04 +00:00
Yi Kong
239c85dd0d Add sepolicy for profcollectd
This does not yet list all the required capabilities for profcollectd,
but it at least allows the service to start under permissive mode.

Bug: 79161490
Test: start profcollectd
Change-Id: I92c6192fa9b31840b2aba26f83a6dc9f9e835030
2020-07-01 23:44:37 +08:00
Jeffrey Huang
215dd2aa9b system_server: create StatsManagerService
Refactor to split the logic within statscompanion_service
The goal of the refactor is to simplify the binder calls to statsd

This service will talk to statsd.

At the end of the refactor, this service should be the only
service that talks to statsd.

Bug: 146074223
Test: Manual by creating the service with empty implementation
Change-Id: Ib9c2e10ec195d41062f1001e5a82b374696de939
2019-12-16 11:50:16 -08:00
Tri Vo
bfcddbe25e sepolicy: remove ashmemd
Bug: 139855428
Test: m selinux_policy
Change-Id: I8d7f66b16be025f7cb9c5269fae6fd7540c2fdc9
2019-09-27 17:43:53 +00:00
Steven Moreland
92f72cd22d Add uce service to core policy.
This service is requested by AOSP framework, but there is no context for
it defined.

Bug: 136023468
Test: N/A
Change-Id: Ibc5b048aaa1c9eda7b9180caca92cb876c3f6b28
Merged-In: Ibc5b048aaa1c9eda7b9180caca92cb876c3f6b28
(cherry picked from commit 67cb30fabf)
2019-08-19 12:29:39 -07:00