Commit graph

1340 commits

Author SHA1 Message Date
Seigo Nonaka
9c3707f76a Add /data/fonts/files directory
The updated font files will be stored to /data/fonts/files and
all application will read it for drawing text.
Thus, /data/fonts/files needs to be readable by apps and only writable
by system_server (and init).

Bug: 173517579
Test: atest CtsGraphicsTestCases
Test: Manually done
Change-Id: Ia76b109704f6214eb3f1798e8d21260343eda231
2021-01-22 11:58:55 -08:00
Yurii Zubrytskyi
314e6d9450 Merge "IncFS: update SE policies for the new API" 2021-01-21 18:00:33 +00:00
Yifan Hong
3f43fa8596 Merge "Add health storage AIDL service." 2021-01-20 19:45:15 +00:00
Lev Proleev
2cb8a59de8 Merge "Add sepolicy for NNAPI AIDL HAL service" 2021-01-20 19:37:01 +00:00
Lev Proleev
e4414bf228 Add sepolicy for NNAPI AIDL HAL service
This is a shared part that all NN HAL users otherwise would have to
define themselves.

Bug: 172922059
Test: m
Test: VtsHalNeuralnetworksTest on master (locally)
Change-Id: I3616d0afbb115bc0feaed00488855646633da915
2021-01-20 19:34:06 +00:00
Treehugger Robot
c774ceacdd Merge "Change SELinux policy for speech recognizer." 2021-01-20 18:31:26 +00:00
Yurii Zubrytskyi
80dfa06984 IncFS: update SE policies for the new API
IncFS in S adds a bunch of new ioctls, and requires the users
to read its features in sysfs directory. This change adds
all the features, maps them into the processes that need to
call into them, and allows any incfs user to query the features

Bug: 170231230
Test: incremental unit tests
Change-Id: Ieea6dca38ae9829230bc17d0c73f50c93c407d35
2021-01-19 12:57:15 -08:00
Treehugger Robot
706d5feee2 Merge "Add sepolicy for new system service: media_communication_service" 2021-01-19 18:02:59 +00:00
Gavin Corkery
bd6a8d0746 Merge "Add sepolicy for RebootReadinessDetector" 2021-01-19 09:54:24 +00:00
Orion Hodson
74b129b77c Merge "Permissions for odrefresh and /data/misc/apexdata/com.android.art" 2021-01-19 09:37:36 +00:00
Sergey Volnov
2a682a00d5 Change SELinux policy for speech recognizer.
Bug: 176578753
Test: manual verification ($ adb shell service list)
Change-Id: I3ebf6f5d45d65578b2eaf7efac073731afd10a58
2021-01-18 18:08:48 +00:00
Yifan Hong
06e4b8417a Add health storage AIDL service.
Test: adb shell sm idle-maint run
Bug: 177470478
Change-Id: Id7ee5af64e8d21eafd041c9e8fa1382f65a3958b
2021-01-15 18:23:01 -08:00
Treehugger Robot
0941c2022d Merge "Add policy for IKeystoreAuthorization AIDL service." 2021-01-15 19:53:16 +00:00
Hasini Gunasinghe
1a5c2f4ced Add policy for IKeystoreAuthorization AIDL service.
The interaface now provided by IKeystoreAuthorization AIDL interface was
previously provided by Keystore AIDL interface.

This CL adds policy to allow Keystore2 to register
IKeystoreAuthorization aidl service and to allow service manager to
look up and connect to the service.

Bug: 159475191
Test: Needs to be tested in runtime
Change-Id: I56829a8764e0efe55efdc92b75d7a3d918a20dae
2021-01-15 09:43:22 -08:00
Gavin Corkery
e92af1c283 Add sepolicy for RebootReadinessDetector
Test: Builds
Bug: 161353402
Change-Id: I3778e00ee249f5ab1904737196b282de1d315846
2021-01-15 10:56:26 +00:00
Shashwat Razdan
fbe18136fe Merge "Changes in SELinux Policy for smartspace API" 2021-01-15 01:13:32 +00:00
Shashwat Razdan
c97620be76 Changes in SELinux Policy for smartspace API
Bug: 176851064
Test: manual verification ($ adb shell service list)
Change-Id: I2bfa765a7b04f46b22836d295613e629348afbc6
2021-01-14 20:54:03 +00:00
Primiano Tucci
9dd873d725 Merge "Allow dumpstate to snapshot traces and attach them to bug reports" 2021-01-14 18:59:40 +00:00
Mitch Phillips
e0bab54ba6 Merge "[MTE] Add memtag sysprop sepolicy." 2021-01-13 18:07:36 +00:00
Orion Hodson
8f75f76fbd Permissions for odrefresh and /data/misc/apexdata/com.android.art
odrefresh is the process responsible for checking and creating ART
compilation artifacts that live in the ART APEX data
directory (/data/misc/apexdata/com.android.art).

There are two types of change here:

1) enabling odrefresh to run dex2oat and write updated boot class path
   and system server AOT artifacts into the ART APEX data directory.

2) enabling the zygote and assorted diagnostic tools to use the
   updated AOT artifacts.

odrefresh uses two file contexts: apex_art_data_file and
apex_art_staging_data_file. When odrefresh invokes dex2oat, the
generated files have the apex_art_staging_data_file label (which allows
writing). odrefresh then moves these files from the staging area to
their installation area and gives them the apex_art_data_file label.

Bug: 160683548
Test: adb root && adb shell /apex/com.android.art/bin/odrefresh
Change-Id: I9fa290e0c9c1b7b82be4dacb9f2f8cb8c11e4895
2021-01-13 10:38:22 +00:00
Marco Ballesio
3eabc1d541 sepolicy: allow system_server to read /proc/locks
Access to /proc/locks is necessary to activity manager to determine
wheter a process holds a lock or not prior freezing it.

Test: verified access of /proc/locks while testing other CLs in the same
topic.
Bug: 176928302

Change-Id: I14a65da126ff26c6528edae137d3ee85d3611509
2021-01-12 10:47:58 -08:00
Primiano Tucci
2f99809c43 Allow dumpstate to snapshot traces and attach them to bug reports
Feature description: if a background trace is happening at the
time dumpstate is invoked, the tracing daemon will snapshot
the trace into a fixed path (/data/misc/perfetto-traces/bugreport/).
Dumpstate will attach the trace, if present, to the bugreport.
From a SELinux viewpoint this involves the following permissions:
- Allow dumpstate to exec+trans perfetto --save-for-bugreport
  (this will just send an IPC to traced, which will save the trace).
- Allow dumpstate to list, read and unlink the trace file.
- Create a dedicated label for bugreport traces, to prevent that
  dumpstate gets access to other traces not meant for bug reporting.

Note that this does NOT allow dumpstate to serialze arbitary traces.
Traces must be marked as "eligible for bugreport" upfront in the
trace config (which is not under dumpstate control), by
setting bugreport_score > 0.

Design doc: go/perfetto-betterbug

Bug: 170334305
Test: manual:
      1. start a perfetto trace with bugreport_score > 0
      2. adb shell dumpstate
      3. check that the bugreport zip contains the trace

Change-Id: I259c3ee9d5be08d6b22c796b32875d7de703a230
2021-01-12 14:06:24 +00:00
Joanne Chung
8327dc1fb1 Merge "Add rule for new system service" 2021-01-12 11:54:53 +00:00
Joanne Chung
993aeab1c7 Add rule for new system service
- Update policy for new system service, used for AiAi/Apps to
  present data in their UI.

Bug: 173243538
Bug: 176208267
Test: manual. Can boot to home and get manager successfully.
Change-Id: Ie88c6fa7ed80c0d695daaa7a9c92e11ce0fed229
2021-01-12 18:00:17 +08:00
ChengYou Ho
f4f75d088a Add sepolicy for authsecret AIDL HAL
Bug: 176107318
Change-Id: I49bc68fb5a92bcbc2f1d2c78f0741f8eff97fc06
2021-01-12 06:01:22 +00:00
Mitch Phillips
eaf1404d8a [MTE] Add memtag sysprop sepolicy.
These flags should be writeable to the shell for both root and non-root
users. They should be readable everywhere, as they're read in libc
during initialization (and there's nothing secret to hide). We just
don't want to allow apps to set these properties.

These properties are non-persistent, are for local developer debugging
only.

Bug: 135772972
Bug: 172365548
Test: `adb shell setprop memtag.123 0` in non-root shell succeeds.
Change-Id: If9ad7123829b0be27c29050f10081d2aecdef670
2021-01-11 08:35:58 -08:00
ChengYou Ho
553afe7242 Add sepolicy for oemlock aidl HAL
Bug: 176107318
Change-Id: I26f8926401b15136f0aca79b3d5964ab3b59fbdd
2021-01-11 05:57:17 +00:00
Gavin Corkery
b46e956d97 Merge "Add sepolicy for /metadata/watchdog" 2021-01-08 08:20:45 +00:00
Hyundo Moon
8b0456720a Add sepolicy for new system service: media_communication_service
Bug: 175511943
Test: Manaully (in internal master)
Change-Id: Ic2b6f2634c0e82348482b246cddae42da606591c
2021-01-08 17:18:30 +09:00
Gavin Corkery
b0aae28b41 Add sepolicy for /metadata/watchdog
See go/rescue-party-reboot for more context.

One integer will be stored in a file in this
directory, which will be read and then deleted at the
next boot. No userdata is stored.

Test: Write and read from file from PackageWatchdog
Bug: 171951174

Change-Id: I18f59bd9ad324a0513b1184b2f4fe78c592640db
2021-01-07 19:42:56 +00:00
Shubang Lu
ba4e6b89aa Merge "SE policy for tuner service." 2021-01-07 18:34:36 +00:00
Peiyong Lin
30b809bd97 Merge "Add SEPolicy rules for game service." 2020-12-29 22:18:24 +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
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
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
shubang
f8ab3eb1bb SE policy for tuner service.
Test: make; acloud;  tuner sample input
Change-Id: I651632ec7f4ba79d94738c11c343f63510e59aa6
2020-12-16 06:05:04 +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
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
772d6b425a Merge "Add policy for the android protected confirmation service." 2020-12-15 05:26:17 +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
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
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