Commit graph

675 commits

Author SHA1 Message Date
Eric Biggers
2b7e9943d9 Merge "Restore permission for shell to list /sys/class/block" am: cc0f64416f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1797007

Change-Id: I60b12f2a7cb088b8e648149d9356f9b00f97adbe
2021-08-17 19:17:07 +00:00
Eric Biggers
8b2b951349 Restore permission for shell to list /sys/class/block
As a side effect, commit ec50aa5180 ("Allow the init and apexd
processes to read all block device properties") removed permission for
the shell context to list the /sys/class/block directory.  There is a
CTS test that relies on this (CtsNativeEncryptionTestCases), so grant
permission to do this again.

Bug: 196521739
Bug: 194450129
Test: Before this change, 'adb shell ls /sys/class/block' fails.
      After this change, 'adb shell ls /sys/class/block' succeeds.
Change-Id: I87cb90880f927db1385887b35c84f4dd7f95021b
2021-08-16 10:54:44 -07:00
Paul Crowley
cb00759831 Merge "Allow vold to deleteAllKeys in Keystore" am: d46569c261 am: 66b0b41923
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1789529

Change-Id: I03d240d980763f3a84971f185f207204bac2602d
2021-08-11 18:13:25 +00:00
Paul Crowley
bf29c3a2dc Allow vold to deleteAllKeys in Keystore
Add deleteAllKeys to IKeystoreMaintenance and allow vold to call it.
Allow vold to read the property
`ro.crypto.metadata_init_delete_all_keys.enabled`

Bug: 187105270
Test: booted twice on Cuttlefish
Change-Id: I2fb0e94db9d35c1f19ca7acb2f541cfb13c23524
2021-08-10 21:51:09 -07:00
Bart Van Assche
7efcbf568c Allow the init and apexd processes to read all block device properties am: ec50aa5180 am: b00618fb9f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1783947

Change-Id: Iac344ff86cae6870c6f29fc2b4fb5529482a4219
2021-08-10 01:54:52 +00:00
Bart Van Assche
ec50aa5180 Allow the init and apexd processes to read all block device properties
Addressing b/194450129 requires configuring the I/O scheduler and the
queue depth of loop devices. Doing this in a generic way requires
iterating over the block devices under /sys/class/block and also to
examine the properties of the boot device (/dev/sda). Hence this patch
that allows 'init' and 'apexd' to read the properties of all block
devices. The patch that configures the queue depth is available at
https://android-review.googlesource.com/c/platform/system/core/+/1783847.

Test: Built Android images, installed these on an Android device and verified that modified init and apexd processes do not trigger any SELinux complaints.
Change-Id: Icb62449fe0d21b3790198768a2bb8e808c7b968e
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-08-09 13:46:41 -07:00
Martijn Coenen
025423495e Merge "Allow shell to read odsign properties." am: a194f2737e am: ee5b30b948
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1787990

Change-Id: I293034ab8a42c7b79f0db2b1004094ea9594fcbf
2021-08-09 07:19:16 +00:00
Martijn Coenen
a194f2737e Merge "Allow shell to read odsign properties." 2021-08-09 06:45:56 +00:00
Martijn Coenen
fd6d708cc1 Allow shell to read odsign properties.
The shell context can invoke app_process (ART runtime), which in turn
reads odsign_prop to determine whether we determined that the generated
artifacts are valid. Since this was denied until now, app processes
invoked through shell would fall back to JIT Zygote. This is probably
fine, but since fixing the denial is really simple (and not risky), this
option might be preferred over adding it to the bug map.

Bug: 194630189
Test: `adb shell sm` no longer generates a denial
Change-Id: Ia7c10aec53731e5fabd05f036b12e10d63878a30
2021-08-06 08:40:40 +02:00
Bart Van Assche
920fb6cb48 Merge "init.te: Allow init to modify the properties of loop devices" am: cb779773b7 am: a953822b61
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1782387

Change-Id: I783a810622dc05fc2eb667268596d50c4b21430e
2021-08-05 17:10:39 +00:00
Bart Van Assche
9059e215dc init.te: Allow init to modify the properties of loop devices
The init process configures swapping over zram over a loop device. An
I/O scheduler is associated with the loop device. Tests have shown that
no I/O scheduler works better than the default, mq-deadline. Hence
allow the init process to configure the loop device I/O scheduler.

Without this patch, the following SELinux denials are reported during
boot:

1     1 I auditd  : type=1400 audit(0.0:4): avc: denied { read write } for comm="init" name="scheduler" dev="sysfs" ino=78312 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_loop:s0 tclass=file permissive=0
1     1 I auditd  : type=1400 audit(0.0:4): avc: denied { read write } for comm="init" name="scheduler" dev="sysfs" ino=78312 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_loop:s0 tclass=file permissive=0

Bug: 194450129
Test: Built Android images and installed these on an Android device.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Change-Id: I0af0a92c53bb1f68b57f6814c431a7f03d8ea967
2021-08-04 11:48:14 -07:00
Martijn Coenen
3ca856a1a9 Merge "Allow odsign to stop itself." am: 359aea7d49 am: 632c8e428f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1779988

Change-Id: I863a95342f0a37f14107827df145a49f2a911c19
2021-07-28 12:20:34 +00:00
Martijn Coenen
359aea7d49 Merge "Allow odsign to stop itself." 2021-07-28 11:50:22 +00:00
Martijn Coenen
5f21a0fa92 Allow odsign to stop itself.
Carve out a label for the property, and allow odsign to set it.

Bug: 194334176
Test: no denials
Change-Id: I9dafefabc27c679ed9f36e617e824f44f3b16bbd
2021-07-28 10:50:35 +02:00
Jiakai Zhang
7f60ff9cda Track system_server->apex_art_data_file denial. am: 329cbf4d4e am: 82a576c1a4
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1771168

Change-Id: Ic90844a9811fcd55283acd10db3d930707d3af9c
2021-07-24 10:06:37 +00:00
Jiakai Zhang
329cbf4d4e Track system_server->apex_art_data_file denial.
The denial occurs when system_server dynamically loads AOT artifacts at
runtime.

Sample message:
type=1400 audit(0.0:4): avc: denied { execute } for comm="system_server" path="/data/misc/apexdata/com.android.art/dalvik-cache/arm64/system@framework@com.android.location.provider.jar@classes.odex" dev="dm-37" ino=296 scontext=u:r:system_server:s0 tcontext=u:object_r:apex_art_data_file:s0 tclass=file permissive=0

Currently, system_server is only allowed to load AOT artifacts at startup. odrefresh compiles jars in SYSTEMSERVERCLASSPATH, which are supposed to be loaded by system_server at startup. However, com.android.location.provider is a special case that is not only loaded at startup, but also loaded dynamically as a shared library, causing the denial.

Therefore, this denial is currently expected. We need to compile com.android.location.provider so that its AOT artifacts can be picked up at system_server startup, but we cannot allow the artifacts to be loaded dynamically for now because further discussion about its security implications is needed. We will find a long term solution to this, tracked by b/194054685.

Test: Presubmits
Bug: 194054685

Change-Id: I3850ae022840bfe18633ed43fb666f5d88e383f6
2021-07-24 09:42:03 +08:00
Orion Hodson
5194040519 Merge "postinstall_dexopt: allow reading odsign.verification.status" am: ae132647b1 am: 14b66293ba
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1771328

Change-Id: I1b7b3d5f34c4fff9ba4282afa2cdec97895bfd6e
2021-07-20 11:21:34 +00:00
Orion Hodson
ae132647b1 Merge "postinstall_dexopt: allow reading odsign.verification.status" 2021-07-20 10:58:57 +00:00
Daniel Norman
072de7b4b2 Merge "Rename vpnprofilestore to legacykeystore in 31.0 mapping files." am: f541acd250 am: ffb2010a0a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1771593

Change-Id: I7699781df4dccce679a8baccdb5e47074e0fb3db
2021-07-20 00:44:25 +00:00
Orion Hodson
5fcce9ded3 postinstall_dexopt: allow reading odsign.verification.status
Allows dexopt to read odsign verification status and use on-device
generated artifacts when dexopting after an OTA.

Bug: 194069492
Test: manually apply ota, see no denials for reading property
Change-Id: I97acfc17ffd9291d1a81906c75039f01624dff0f
2021-07-19 20:37:20 +01:00
Daniel Norman
31aaac3f18 Rename vpnprofilestore to legacykeystore in 31.0 mapping files.
This service was renamed in
commit 8aaf796f980f21a8acda73180a876095b960fc28
after the mapping files were originally created in
commit 4f20ff73ee.

Bug: 191304621
Test: Merge redfin_vf_s T-based system with S-based vendor.
Change-Id: I3430f13a3438c06c6cb469a35a80390f83b1c0b4
2021-07-19 11:51:14 -07:00
Orion Hodson
638ee80658 Add get_prop(odsign_prop) to incidentd.te am: 6f9b65aac7
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15235557

Change-Id: Ia3383c71d0d855db09c197db8c311d38afc59625
2021-07-12 20:31:38 +00:00
Hasini Gunasinghe
806c7eb133 Allow keystore to read and write keystore.crash_count system property.
Additionally, remove the obsolete permission which allows keystore to
register callbacks with statsd. There's no direct communication between
keystore and statsd now.

Ignore-AOSP-First: Resolving merge conflicts.
Bug: 188590587
Test: statsd TestDrive script.
Merged-In: I31d202751ba78bb547822020260a7e366cb8826e

Change-Id: I31d202751ba78bb547822020260a7e366cb8826e
2021-07-09 16:20:07 +00:00
Orion Hodson
6f9b65aac7 Add get_prop(odsign_prop) to incidentd.te
Prevents SELinux denial when capturing a bugreport.

Bug: 192895524
Bug: 193084909
Bug: 193096842
Bug: 193097008
Bug: 193097511
Bug: 193097845
Bug: 193097886
Ignore-AOSP-First: cherry pick of https://r.android.com/1761447
Test: adb bugreport and check no denial in logcat.
Change-Id: Ide5d95782929836cffc5b3921bffae3295773532
2021-07-09 16:03:35 +01:00
Hasini Gunasinghe
2a5ab82215 Merge "Allow keystore to read and write keystore.crash_count system property." into sc-dev 2021-07-09 00:08:41 +00:00
Hasini Gunasinghe
4fa6b1a037 Allow keystore to read and write keystore.crash_count system property.
Additionally, remove the obsolete permission which allows keystore to
register callbacks with statsd. There's no direct communication between
keystore and statsd now.

Ignore-AOSP-First: No mergepath to AOSP.
Bug: 188590587
Test: statsd TestDrive script.
Merged-In: I31d202751ba78bb547822020260a7e366cb8826e

Change-Id: I31d202751ba78bb547822020260a7e366cb8826e
2021-07-08 17:54:58 +00:00
Hasini Gunasinghe
9fe1532ade Allow keystore to read and write keystore.crash_count system property.
Additionally, remove the obsolete permission which allows keystore to
register callbacks with statsd. There's no direct communication between
keystore and statsd now.

Ignore-AOSP-First: No mergepath to AOSP.
Bug: 188590587
Test: statsd TestDrive script.
Merged-In: I31d202751ba78bb547822020260a7e366cb8826e

Change-Id: I31d202751ba78bb547822020260a7e366cb8826e
2021-07-08 14:29:44 +00:00
Orion Hodson
2e7eebe266 Merge "Allow app_zygote to read zygote_tmpfs." into sc-dev am: b03c657b2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15179050

Change-Id: Id46091314cb8d3f3c8e36c4c3bbabb6401920110
2021-07-05 15:41:51 +00:00
Orion Hodson
b03c657b2b Merge "Allow app_zygote to read zygote_tmpfs." into sc-dev 2021-07-05 15:31:17 +00:00
Martijn Coenen
67db7e2d88 Allow app_zygote to read zygote_tmpfs.
app_zygote inherits tmpfs files from zygote, and needs to be able to
stat them after fork.

Bug: 192634726
Bug: 192572973
Bug: 119800099
Test: forrest
Ignore-AOSP-First: cherry pick of https://r.android.com/1753279
Change-Id: I6ddf433dbbf4a894fcb6d35c0cb723444d360e47
2021-07-05 13:54:28 +00:00
Jayant Chowdhary
487df8589b Merge "Define property ro.camera.enableCamera1MaxZsl" into sc-dev am: cf2b1eff87
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14683766

Change-Id: I21a6b1cc1e6311c256110d2764300617fe583173
2021-07-02 23:18:27 +00:00
Jayant Chowdhary
cf2b1eff87 Merge "Define property ro.camera.enableCamera1MaxZsl" into sc-dev 2021-07-02 23:05:50 +00:00
Orion Hodson
e0641bba4d Allow zygotes and installd to read odsign properties am: be6873bd15
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15175855

Change-Id: Ib72bda2605e614e4e1224d2ffe2e2693c842adfe
2021-07-02 17:48:39 +00:00
Orion Hodson
be6873bd15 Allow zygotes and installd to read odsign properties
(cherry picked from commit f135ce393c)
Bug: 192049377
Test: manual
Ignore-AOSP-First: cherry pick of https://r.android.com/1753264
Change-Id: I3e8ee380fe38e1bd6cc90a568b10b97f877e68fa
2021-07-02 11:57:24 +01:00
Jayant Chowdhary
8394a04840 Define property ro.camera.enableCamera1MaxZsl
Bug: 184617195

Test: atest CameraGLTest.java (basic validity)

Change-Id: I30f8fb647cb8f67ff75d41718e3cc475d206a29a
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2021-07-01 08:15:39 -07:00
Nicolas Geoffray
08395f47ea Merge "Fix braino in dexoptanalyzer policy and add dex2oat postinstall rule." into sc-dev am: b3b0d4da94
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15130061

Change-Id: Ic7a53f2139871dbf457f70ebb6d7db4d9ef9aa4c
2021-07-01 09:44:28 +00:00
Nicolas Geoffray
b3b0d4da94 Merge "Fix braino in dexoptanalyzer policy and add dex2oat postinstall rule." into sc-dev 2021-07-01 09:31:02 +00:00
Hasini Gunasinghe
4334d35f01 Add keystore permission for metrics re-routing.
Keystore2 atoms need to be rounted to statsd via a proxy.
The proxy needs to have this permission in order to pull metrics from
keystore.

Ignore-AOSP-First: No mergepath to AOSP.
Bug: 188590587
Test: Statsd Testdrive script
Change-Id: Ic94f4bb19a08b6300cfd2d3ed09b31d5b7081bfd
Merged-In: Ic94f4bb19a08b6300cfd2d3ed09b31d5b7081bfd
(cherry picked from commit 61d07e7ce0)
2021-06-30 17:02:14 -07:00
Janis Danisevskis
e1a289b66f Merge "Rename vpnprofilestore to legacykeystore." into sc-dev am: adb49d3df6
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14981212

Change-Id: Ie341418b9491cd93e2af1ebe354f943e8ff85499
2021-06-30 19:57:20 +00:00
Janis Danisevskis
adb49d3df6 Merge "Rename vpnprofilestore to legacykeystore." into sc-dev 2021-06-30 19:42:27 +00:00
Janis Danisevskis
4678660d83 Rename vpnprofilestore to legacykeystore.
Bug: 191373871
Test: N/A
Merged-In: I3f11827909bd37a2127069de82670776a8e192b3
Change-Id: I3f11827909bd37a2127069de82670776a8e192b3
2021-06-30 12:40:39 -07:00
Jeff Vander Stoep
97dee733c4 system_app: remove adb data loader permissions am: 16b7d5d829 am: d775d04e7e am: c493691bac
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: Icd3b3313c18c866e71e84668d44f79116e3566b4
2021-06-30 17:32:46 +00:00
Jeff Vander Stoep
c493691bac system_app: remove adb data loader permissions am: 16b7d5d829 am: d775d04e7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: I32ce439f2aac808a2510673c56c034828ee52f90
2021-06-30 17:24:00 +00:00
Jeff Vander Stoep
d775d04e7e system_app: remove adb data loader permissions am: 16b7d5d829
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14881537

Change-Id: I9899465b81011dbbec2a468111ad6ab8b357f081
2021-06-30 17:12:51 +00:00
Janis Danisevskis
ab433c765b Rename vpnprofilestore to legacykeystore.
Ignore-AOSP-First: No mergepath from AOSP.
Bug: 191373871
Test: N/A
Change-Id: I3f11827909bd37a2127069de82670776a8e192b3
2021-06-30 09:36:30 -07:00
Hasini Gunasinghe
7611870f49 Merge "Add keystore permission for metrics re-routing." into sc-dev am: 898fc5b39b
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/14937250

Change-Id: I881b239515d17f81099ed16d519e1071e80c68ea
2021-06-30 13:32:33 +00:00
Hasini Gunasinghe
898fc5b39b Merge "Add keystore permission for metrics re-routing." into sc-dev 2021-06-30 13:07:22 +00:00
Orion Hodson
702ff51093 Merge "Allow system_server_startup to load system server odex files" into sc-dev am: ae1b59975a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/sepolicy/+/15108690

Change-Id: I38627ced50e40958caa3decba8068cb9a9de76fb
2021-06-29 16:09:39 +00:00
Orion Hodson
ae1b59975a Merge "Allow system_server_startup to load system server odex files" into sc-dev 2021-06-29 16:05:36 +00:00
Nicolas Geoffray
92b18f575d Fix braino in dexoptanalyzer policy and add dex2oat postinstall rule.
Test: m
Bug: 190817237
Change-Id: I4f73d7a137f2e2ee9497ca5e4c8ef28b3f86c35c
(cherry picked from commit f82451e0a4)
2021-06-29 14:15:48 +01:00