Commit graph

6338 commits

Author SHA1 Message Date
Kalesh Singh
aab7a73868 Sepolicy for mm events trace instance
Allow traced_probes read write access to configure
mm_events trace instance and poll trace_pipe_raw

Bug: 155928119
Test: No denials in logcat
Change-Id: Ib65ab2e7be8daa6b8c412ffea909072583db7002
2021-01-25 12:01:27 -05:00
Nazanin Bakhshi
51872d888d Merge "Revert "hal_can_*: use hal_attribute_service"" 2020-12-29 22:57:03 +00:00
Nazanin Bakhshi
061b56b497 Revert "hal_can_*: use hal_attribute_service"
This reverts commit c8e937efe5.

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?build-cop=true, bug 176180039>

Change-Id: I0aff6ebba8b6a7a45af7229a0506f0426a8ebadf
2020-12-29 22:53:29 +00:00
Peiyong Lin
30b809bd97 Merge "Add SEPolicy rules for game service." 2020-12-29 22:18:24 +00:00
Steven Moreland
8e5c457f2e Merge "hal_can_*: use hal_attribute_service" 2020-12-29 20:43:20 +00:00
Chiachang Wang
bd15e9ac63 Merge "Add new selinux type for radio process" 2020-12-29 00:24:12 +00:00
Peiyong Lin
9449176122 Add SEPolicy rules for game service.
Bug: b/174956354
Test: manual
Change-Id: Ife1aac3435427f89f5701e4ead0763839f01d61b
2020-12-24 18:46:25 -08:00
Chiachang Wang
813c25fc91 Add new selinux type for radio process
ConnectivityService is going to become mainline and can not
access hidden APIs. Telephony and Settings were both accessing
the hidden API ConnectivityManager#getMobileProvisioningUrl.
Moving #getMobileProvisioningUrl method into telephony means
that there is one less access to a hidden API within the overall
framework since the Connectivity stack never needed this value.
Thus, move getMobileProvisioningUrl parsing to telephony surface
and provide the corresponding sepolicy permission for its access.

The exsting radio_data_file is an app data type and may allow
more permission than necessary. Thus create a new type and give
the necessary read access only.

Bug: 175177794
Test: verify that the radio process could read
      /data/misc/radio/provisioning_urls.xml successfully
Change-Id: I191261a57667dc7936c22786d75da971f94710ef
2020-12-24 15:11:15 +08:00
Steven Moreland
c8e937efe5 hal_can_*: use hal_attribute_service
This macro creates the necessary neverallow to assert the
hal_can_*_{client,server} attribute has exclusive ownership of
the service.

Bug: 176180039
Test: build/TH
Change-Id: I876b50e4184ef787117d5ca67c7fbd522d82687c
2020-12-23 01:36:02 +00:00
Kalesh Singh
24ada7dbee Reland: Memtrack HAL stable aidl sepolicy
Bug: 175021432
Test: Check logcat for denials
Change-Id: Id92fc543791072d8682e3a89cbf08370007108bf
2020-12-22 16:08:53 -05:00
Treehugger Robot
831fddd794 Merge "Allow coredomain access to only approved categories of vendor heaps" 2020-12-21 20:34:06 +00:00
Treehugger Robot
0afbe0eb98 Merge "Clean up keymint service policy." 2020-12-17 20:40:08 +00:00
Hridya Valsaraju
8c9cf62edb Allow coredomain access to only approved categories of vendor heaps
One of the advantages of the DMA-BUF heaps framework over
ION is that each heap is a separate char device and hence
it is possible to create separate sepolicy permissions to restrict
access to each heap.
In the case of ION, allocation in every heap had to be done through
/dev/ion which meant that there was no away to restrict allocations in
a specific heap.

This patch intends to restrict coredomain access to only approved
categories of vendor heaps. Currently, the only identified category
as per partner feedback is the system-secure heap which is defined
as a heap that allocates from protected memory.

Test: Build, video playback works on CF with ION disabled and
without sepolicy denials
Bug: 175697666

Change-Id: I923d2931c631d05d569e97f6e49145ef71324f3b
2020-12-16 10:08:54 -08:00
Joel Galenson
1c7eb3c3bd Clean up keymint service policy.
Test: VtsAidlKeyMintTargetTest
Change-Id: Id6e83d63ffb1de7c48dbdf435fd9988e9174cfe2
2020-12-16 08:59:09 -08:00
Florian Mayer
ed3ad1d253 Allow heapprofd to read packages.list.
This is so it can check profileability.

Bug: 153139002
Change-Id: I3d3c23f8f8bc564bc1c2b3f7cdeab2d32f084917
2020-12-16 14:35:32 +00:00
Janis Danisevskis
de98dd9726 Merge changes Icb1f60b3,I935f2383
* changes:
  Allow keystore to talk to keymint
  Add policy for the security compatibility hal service.
2020-12-16 01:24:33 +00:00
Kalesh Singh
3619437561 Merge "Revert "Memtrack HAL stable aidl sepolicy"" 2020-12-16 00:48:06 +00:00
Kalesh Singh
5db6857fe1 Revert "Memtrack HAL stable aidl sepolicy"
Revert "Add android.hardware.memtrack-unstable-ndk_platform"

Revert submission 1518702-memtrack-aidl

Reason for revert: Broken tests and boot time regressions
Reverted Changes:
Ic4dd70e2c:Add android.hardware.memtrack-unstable-ndk_platfor...
Iaf99d0ca4:Add stable aidl memtrack HAL to product packages
Iac54ae2ba:Add stable aidl memtrack hal to vndk list
If310210a3:libmemtrack: Add support for AIDL memtrack HAL
Ib6c634def:Memtrack HAL: Add stable AIDL implementation
I5e1d0e006:Memtrack HAL stable aidl sepolicy

Change-Id: I0c55ee100c7fd8d09a5b188a39b17c95c8a43c39
2020-12-16 00:19:38 +00:00
Janis Danisevskis
bd464a9543 Allow keystore to talk to keymint
Test: None
Change-Id: Icb1f60b3c2971488a6a890c063d4e4babab2b2f2
2020-12-15 08:25:42 -08:00
Janis Danisevskis
191940036b Add policy for the security compatibility hal service.
This service manager is registered by Keystore 2.0 to lookup legacy
wrapper services.

Keystore 2.0 is now written in rust. We have AIDL binding for rust but
no HIDL binding. Keystore 2.0 has to support legacy HIDL based
interfaces. So we implement the AIDL KeyMint interface in terms of the
legacy HIDL Keymaster <=  V4.1 devices in C++. This wrapper is linked
into the Keystore 2.0 process but it cannot be called directly but must
be treated like a remote binder instead. However, we cannot register
these wrappers directly, because a) we are not a vendor component, and
b) it would conflict with genuine KeyMint devices on newer devices. So
Instead we register Keystore 2.0 itself as a legacy service provider.
Which it can query itself for the legacy wrappers if it does not find
a genuine KeyMint implementation to connect to.

Bug: 171351607
Test: Keystore 2.0 can register this Service and lookup legacy wrapper
      services.
Change-Id: I935f23837721ce126531236f4920dba469a47be4
2020-12-15 08:23:52 -08:00
Alan Stokes
63d875612f Merge "Split user_profile_data_file label." 2020-12-15 14:25:51 +00:00
Treehugger Robot
14a15d900b Merge "sepolicy: Add the dmabuf system-uncached heap" 2020-12-15 06:16:50 +00:00
Treehugger Robot
772d6b425a Merge "Add policy for the android protected confirmation service." 2020-12-15 05:26:17 +00:00
Treehugger Robot
8b20383b12 Merge "Fix malformed property_contexts entry" 2020-12-15 01:28:33 +00:00
Treehugger Robot
6d560dee90 Merge "Memtrack HAL stable aidl sepolicy" 2020-12-14 18:36:10 +00:00
Hyunyoung Song
9f198f1c68 Merge "New system service: search_ui_service" 2020-12-14 16:36:02 +00:00
Inseob Kim
d3dbcc1b82 Fix malformed property_contexts entry
Prefix entries should not have the suffix '*'.

Test: set property and invoke getprop -Z
Change-Id: I33dc7c6ac1bc05ecc1e3a7b331bc827717afa252
2020-12-14 13:24:14 +00:00
Shawn Willden
b41f4985a9 Revert^2 "Move keymint to android.hardware.security."
16d61d0383


Bug: 175345910
Bug: 171429297
Exempt-From-Owner-Approval: re-landing topic with no changes in this CL.
Change-Id: I1352c6b46b007dba3448b3c9cbdf454d7862a176
2020-12-11 20:36:53 +00:00
Mohammad Islam
7a3be4d80e Merge "Allow priv_app read access to /data/app-staging directory" 2020-12-11 20:01:02 +00:00
Alan Stokes
7aa40413ae Split user_profile_data_file label.
user_profile_data_file is mlstrustedobject. And it needs to be,
because we want untrusted apps to be able to write to their profile
files, but they do not have levels.

But now we want to apply levels in the parent directories that have
the same label, and we want them to work so they need to not be
MLS-exempt. To resolve that we introduce a new label,
user_profile_root_file, which is applied to those directories (but no
files). We grant mostly the same access to the new label as
directories with the existing label.

Apart from appdomain, almost every domain which accesses
user_profile_data_file, and now user_profile_root_file, is already
mlstrustedsubject and so can't be affected by this change. The
exception is postinstall_dexopt which we now make mlstrustedobject.

Bug: 141677108
Bug: 175311045
Test: Manual: flash with wipe
Test: Manual: flash on top of older version
Test: Manual: install & uninstall apps
Test: Manual: create & remove user
Test: Presubmits.
Change-Id: I4e0def3d513b129d6c292f7edb076db341b4a2b3
2020-12-11 17:35:06 +00:00
Jeff Vander Stoep
2eaa33d95e Untrusted_app: audit NETLINK_ROUTE bind and RTM_GETLINK
Test: build
Bug: 170188668
Bug: 170214442
Change-Id: I79384318ad4031b4bf14ae243e41f01469288e55
2020-12-11 14:10:19 +01:00
John Stultz
f30cc10961 sepolicy: Add the dmabuf system-uncached heap
This should match policy for the system heap as they both map to
the ION system heap with the ION_FLAG_CACHED flag on or off.

Change-Id: Ib2929b84a2f8092adcf2f874ad6ccdfe068fe6dc
Signed-off-by: John Stultz <john.stultz@linaro.org>
2020-12-11 07:07:51 +00:00
Mohammad Samiul Islam
a45cddae5e Allow priv_app read access to /data/app-staging directory
During staged installation, we no longer create duplicate sessions for
verification purpose. Instead, we send the original files in
/data/app-staging folder to package verifiers for verification. That
means, Phonesky needs access to /data/app-staging folder to be able to
verify the apks inside it.

Bug: 175163376
Test: atest StagedInstallTest#testPlayStoreCanReadAppStagingDir
Test: atest StagedInstallTest#testAppStagingFolderCannotBeReadByNonPrivApps
Change-Id: I5cbb4c8b7dceb63954c747180b39b4a21d2463af
2020-12-10 23:46:15 +00:00
Shawn Willden
feaa06f90e Merge "Move keymint to android.hardware.security." 2020-12-10 22:49:14 +00:00
Selene Huang
2c3bdb28de Move keymint to android.hardware.security.
Test: VtsAidlKeyMintTargetTest
Change-Id: I098711e7ddbcac0fc761801a1bf582a71a8f9baa
2020-12-10 19:12:29 +00:00
Janis Danisevskis
d5ad76b0c4 Add policy for the android protected confirmation service.
This is the service offered by Keystore 2.0 to provide APC service to
application. It was formerly part of the IKeystoreService interface.
Not it is an interface in ints own right.

Test: Keystore 2.0 can register the apc service interface.
      Apps can lookup and call this interface.
Bug: 159341464
Change-Id: I058adf0021d9b89f4eac7534e366c29071f0f98b
2020-12-10 10:58:11 -08:00
Treehugger Robot
c0d1040d58 Merge "Export ro.vendor.product.cpu.abilist*" 2020-12-10 09:01:40 +00:00
Treehugger Robot
60e32df155 Merge "Allow PermissonController to find app_api_service and system_api_service." am: a56c9eb016
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1519814

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I45dad0c44cdcf3d0cdd7e41bf5414d98db651610
2020-12-09 15:55:28 +00:00
Treehugger Robot
a56c9eb016 Merge "Allow PermissonController to find app_api_service and system_api_service." 2020-12-09 15:25:42 +00:00
Treehugger Robot
56d552af6d Merge "system_app: remove adb data loader permissions" am: db87cdf6a8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1520729

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I24c9712f07b70e9ecadfc0e4ff46a92157a86938
2020-12-09 11:25:06 +00:00
Hai Zhang
86e10ef55d Allow PermissonController to find app_api_service and system_api_service.
PermissionController is updatable, so we may need to call new APIs in newer versions.

Change-Id: I0a6657ad1f27e1e2fdc320184268966009d3a4fc
2020-12-09 11:10:06 +00:00
Treehugger Robot
db87cdf6a8 Merge "system_app: remove adb data loader permissions" 2020-12-09 10:36:14 +00:00
Jeff Vander Stoep
07aee66679 system_app: remove adb data loader permissions
Per schfan@ these are no longer needed.

Test: build
Change-Id: Idda1d9775fdd38cbd53c3652b567ddfc5beca0a6
2020-12-09 08:58:23 +01:00
Christian Wailes
06e163b290 Merge "Added permissions for new dexopt flags." am: 93e6997181
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1480337

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I882363b3cf293f5bac811e5d6b2c914935b6031a
2020-12-09 01:22:52 +00:00
Christian Wailes
93e6997181 Merge "Added permissions for new dexopt flags." 2020-12-09 00:00:26 +00:00
Hyunyoung Song
9b5f691ed1 New system service: search_ui_service
- Update policy for new system service, used for Launcher/Apps to
fetch and render search results in their UI.

Bug: 162234997
Test: manual verification ($ adb shell service list)


Reference CL: aosp/831251

Change-Id: If3ae22aa2ad1d13aeac3dfefc5244db4b1734d96
2020-12-08 15:55:01 -08:00
Maciej Żenczykowski
afd4d49733 Allow network_stack to synchronize the kernel rcu am: 5a7e49e525
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1516277

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I19840b4bafacb69561cec658b5a076988e4c4dc7
2020-12-08 22:47:33 +00:00
Kalesh Singh
545c5bfe47 Memtrack HAL stable aidl sepolicy
Bug: 175021432
Test: Check logcat for denials
Change-Id: I5e1d0e006d86a65552acb78c23b421155881555b
2020-12-08 14:09:09 -05:00
Maciej Żenczykowski
5a7e49e525 Allow network_stack to synchronize the kernel rcu
via opening/closing a PF_KEY socket (this mirrors netd's privs)

Bug: 173167302
Test: m
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia2c2cb52c4ec9149db29dc86a7927e3432bd2b9b
2020-12-08 14:49:20 +00:00
Adam Shih
9c9386d68d never allow untrusted apps accessing debugfs_tracing am: 2543715187
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1513758

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I28a14b4f551938725684dcd1153c48fc67d3da53
2020-12-08 02:26:32 +00:00