Commit graph

8588 commits

Author SHA1 Message Date
Rubin Xu
8ff276e8d2 Allow Bluetooth stack to read security log sysprop
Bluetooth stack needs to read persist.logd.security and
ro.organization_owned sysprop (via __android_log_security())
to control security logging for Bluetooth events.

Bug: 232283779
Test: manual
Change-Id: Ic8162cd4a4436981a15acea6ac75079081790525
(cherry picked from commit a274858e3b)
Merged-In: Ic8162cd4a4436981a15acea6ac75079081790525
2022-05-25 21:05:02 +00:00
Sanjana Sunil
709b339420 Merge "Allow zygote to relabel sdk_sandbox_system_data_file" into tm-dev 2022-05-25 15:06:14 +00:00
Sanjana Sunil
898723d045 Allow zygote to relabel sdk_sandbox_system_data_file
To perform sdk sandbox data isolation, the zygote gets the selinux label
of SDK sandbox storage (e.g. /data/misc_{ce,de}/<user-id>/sdksandbox)
before tmpfs is mounted onto /data/misc_{ce,de} (or other volumes). It
relabels it back once bind mounting of required sandbox data is done.
This change allows for the zygote to perform these operations.

Bug: 214241165
Test: atest SdkSandboxStorageHostTest
Ignore-AOSP-First: Already merged in aosp

Change-Id: Ie8fd1f478fd12141bd6240cee96d0c3da55ba7a0
Merged-In: I28d1709ab4601f0fb1788435453ed19d023dc80b
2022-05-24 14:11:50 +00:00
Nicolas Geoffray
5c8171c478 Merge "sysfs_fs_f2fs for zygote." into tm-dev 2022-05-19 13:39:17 +00:00
Nicolas Geoffray
d68b089d59 sysfs_fs_f2fs for zygote.
Test: boot
Bug: 223366272
Ignore-AOSP-First: will merge in aosp
Change-Id: I163c343d8af9c578c840d7c710854fce15c29903
2022-05-18 17:24:44 +01:00
Mohammad Samiul Islam
ef1698a878 Create a separate label for sandbox root directory
Currently, app process can freely execute path at
`/data/misc_ce/0/sdksandbox/<package-name>` since it's labeled as system
file. They can't read or write, but use 403/404
error to figure out if an app is installed or not.

By changing the selinux label of the parent directory:
`/data/misc_ce/0/sdksandbox`, we can restrict app process from executing
inside the directory and avoid the privacy leak.

Sandbox process should only have "search" permission on the new label so
that it can pass through it to its data directory located in
`/data/misc_ce/0/sdksandbox/<package-name>/<per-sdk-dir>`.

Bug: 214241165
Test: atest SdkSandboxStorageHostTest
Test: `adb shell cd /data/misc_ce/0/sdksandbox` gives error
Test: manual test to verify webview still works
Ignore-AOSP-First: Test is missing in AOSP. Will cherry-pick to AOSP
                   once merged here.
Change-Id: Id8771b322d4eb5532eaf719f203ca94035e2a8ed
2022-05-17 17:23:31 +00:00
Richard Chang
ee5fc96178 Allow vendor services to access vendor_system_native_prop
Bug: 226456604
Bug: 223685902
Test: Build
Ignore-AOSP-First: Already merged in aosp/2083463
Merged-In: Icc11b9bf06fd0fb8069388ca5a32e8aedf1743a8
Change-Id: Ie95ca796656d7727540db67feef31e28e2c602b0
2022-05-13 17:57:18 +00:00
Keith Mok
53d07785f6 Merge "Revert "Revert "Allow vehicle_binding_util to access AIDL VHAL. am: d5af7b7cea am: 565699bc61 am: e4ddf119a1 am: 54e7d19e1d am: 3686a43f8f""" into tm-dev 2022-05-12 16:26:22 +00:00
Victor Hsieh
05d625ef62 Merge "Allow composd to pass some system properties to CompOS" into tm-dev 2022-05-12 15:30:40 +00:00
Shiwangi Shah
796a25a034 Merge "Add services and allow app to write to sdk_sandbox" into tm-dev 2022-05-12 11:04:02 +00:00
Keith Mok
f906da515c Revert "Revert "Allow vehicle_binding_util to access AIDL VHAL. am: d5af7b7cea am: 565699bc61 am: e4ddf119a1 am: 54e7d19e1d am: 3686a43f8f""
This reverts commit 2140c74523.

Reason for revert: Added a fix for that (to update the 33.0 sepolicy api)

Change-Id: I2e738618026df6475de7baf1551a031b86c28590
2022-05-11 18:14:06 +00:00
Tyler Gunn
2140c74523 Revert "Allow vehicle_binding_util to access AIDL VHAL. am: d5af7b7cea am: 565699bc61 am: e4ddf119a1 am: 54e7d19e1d am: 3686a43f8f"
This reverts commit c8b6c1fb79.

Reason for revert: Breaking TM-DEV build targets.

Change-Id: Ibc0f119110178b5b1aefc2ea9269fa4b644be2ba
2022-05-11 17:40:58 +00:00
Victor Hsieh
9561e19573 Allow composd to pass some system properties to CompOS
Bug: 231579544
Test: see allowlisted system properties in the VM
Ignore-AOSP-First: Cherry-pick from AOSP
Change-Id: Idb263087639e4677e437ac2fcd2726ee71547f48
Merged-In: Idb263087639e4677e437ac2fcd2726ee71547f48
2022-05-11 09:05:12 -07:00
Shiwangi Shah
4aad91d920 Add services and allow app to write to sdk_sandbox
We might want to change this in later android versions.

Ignore-AOSP-First: Already merged via aosp/2051365
Bug: b/228159127
Bug: b/227745962
Bug: b/229251344
Test: Manual
Change-Id: I8f425cc9f2759a29bdd2e6218ad0a1c40750e4f5
Merged-In: I8f425cc9f2759a29bdd2e6218ad0a1c40750e4f5
Merged-In: I2e308ca9ce58e71ac9d7d9b0fa515bdf2f5dfa1f
(cherry picked from commit 13bdca21d5)
(cherry picked from commit ce2b6da673)
2022-05-11 15:52:51 +00:00
Treehugger Robot
bad95e0764 [MS82.3] Add sepolicy to access connectivity apex directory
Test: m
Bug: 230289468
Change-Id: I7e43c09f929a418c6c7b6bcfc3696a242c19f2d8
Merged-In: I7e43c09f929a418c6c7b6bcfc3696a242c19f2d8
(cherry picked from commit 441c149894)
2022-05-11 15:26:55 +08:00
Yu Shan
c8b6c1fb79 Allow vehicle_binding_util to access AIDL VHAL. am: d5af7b7cea am: 565699bc61 am: e4ddf119a1 am: 54e7d19e1d am: 3686a43f8f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2082539

Bug: 204367810
Change-Id: I25b954b1a57b43f0fb12aa9f465e5364015fbe76
Merged-In: I25b954b1a57b43f0fb12aa9f465e5364015fbe76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
(cherry picked from commit 1f8d95a2ac)
2022-05-04 18:35:53 +00:00
Bram Bonné
c5ae3ca682 Merge "Prevent sandbox executing from sdk_sandbox_data_file" into tm-dev 2022-05-04 08:01:03 +00:00
TreeHugger Robot
0e7ba3367d Merge "Add ephemeral service access to sdk sandbox" into tm-dev 2022-05-03 18:33:15 +00:00
TreeHugger Robot
c93b72d11c Merge "Allow crosvm to write shell_data_file" into tm-dev 2022-05-03 14:09:07 +00:00
Jiyong Park
8608c7798f Allow crosvm to write shell_data_file
The compliance tests rely on this.

Ignore-AOSP-First: will cherry-pick to AOSP

Bug: 230660133
Test: run MicrodroidHostTests on a user build
Change-Id: Ic061632d80285182ec2ae7d31f3527948702cf32
2022-05-03 14:35:15 +09:00
Jiyong Park
0dda188cad Allow untrusted app to use virtualizationservice - even on user builds
This only makes it difficult to run (test/demo) apps using AVF. They
have to be pre-installed on the device which is infeasible on
user-build devices.

Removing the guard so that untrusted apps can use virtualizationservice
even on user builds. Note that the use is still gated by the
MANAGE_VIRTUAL_MACHINE permission, which can be granted only by
pre-installing or explicitly via `adb shell pm grant`. So there's no
risk of 3p apps downloaded from the net having its own VM.

Ignore-AOSP-First: will cherry-pick to AOSP

Bug: 231080171
Test: run MicrodroidDemoApp on a user build
Change-Id: Ie0b1b9801dd7726633f97456a38bc0ea349013db
2022-05-02 13:00:06 +09:00
Alan Stokes
8e06fb4109 Allow deleting old virtualization files
Allow init to use toolbox to rm -rf stale files under /data/misc/virtualizationservice.

Bug: 230056726
Test: Create fake stale dir+file, see them deleted
Ignore-AOSP-First: Needed in T, will CP to aosp
Change-Id: I4a31e437344974597fc5280d898f23780a820f16
2022-04-28 10:58:43 +01:00
Bram Bonne
fa56130d4b Prevent sandbox executing from sdk_sandbox_data_file
Bug: 215105355
Test: make
Change-Id: I73c6a0d5034f194bf7149336fdac1db51a2b151d
Merged-In: I73c6a0d5034f194bf7149336fdac1db51a2b151d
(cherry picked from commit I73c6a0d5034f194bf7149336fdac1db51a2b151d)
2022-04-28 11:00:49 +02:00
Shiwangi Shah
09e3838d9b Add ephemeral service access to sdk sandbox
Add some services ephemeral service has access to.
We will steadily restrict this list further based on
testing and requirements for rubidium.

Test: Manual
Bug: b/227745962
Bug: b/227581095
Ignore-AOSP-First: Already merged via aosp/2051365
Change-Id: If7bcb8b8de62d408bd4af848b43abca853c93758
Merged-In: If7bcb8b8de62d408bd4af848b43abca853c93758
(cherry picked from commit 48b2b33844)
2022-04-27 14:55:52 +00:00
Sal Savage
5ed8b65061 Merge "Update LE Audio profile names to be in line with spec and implementation" into tm-dev 2022-04-22 22:06:46 +00:00
TreeHugger Robot
7155b1dd49 Merge "Add vibrator and power HALs to Watchdog dumps" into tm-dev 2022-04-22 19:54:00 +00:00
Michael Wright
c296764ae4 Add vibrator and power HALs to Watchdog dumps
Test: adb shell am hang --allow-restart, check Last ANR for stacks
Fixes: 211998169
Ignore-AOSP-First: Cherry-pick to T
Change-Id: I7cad1e57caed5eb8a5c0092548362fd0a6b1d98d
2022-04-22 15:26:58 +01:00
Mitch Phillips
a4e951b3bf Merge "[GWP-ASan] Add sysprop, allow shell and system apps to set it." am: 800e948e61 am: e3256e3d21 am: 41949ce19f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2040964

Change-Id: I93cc3b9a1ff2fe74bea47ed0e7898daf7fef4a4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 19:18:20 +00:00
Seth Moore
17f6ea42a0 Merge "Allow the remote provisioner app to set rkp_only properties" am: 222e99e26f am: 6252da2cd1 am: 9905fc4a41
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2069269

Change-Id: I93de9d208a9e74011e53230e76d0837008d4264c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 18:25:10 +00:00
Mitch Phillips
800e948e61 Merge "[GWP-ASan] Add sysprop, allow shell and system apps to set it." 2022-04-21 18:12:43 +00:00
Seth Moore
222e99e26f Merge "Allow the remote provisioner app to set rkp_only properties" 2022-04-21 17:23:11 +00:00
Maciej Żenczykowski
58613fdcbc Merge "Grants clatd privs since forked by system server" am: 1ebfb867a8 am: 25192167a1 am: 90917bdb88
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1951036

Change-Id: I23d75e84037faaaebf5db34d92556c1adcf9951f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 14:34:12 +00:00
Maciej Żenczykowski
1ebfb867a8 Merge "Grants clatd privs since forked by system server" 2022-04-21 14:00:23 +00:00
Treehugger Robot
967b1bf766 Merge "Track sys_module permission for system_server" am: bd3e8d9520 am: 0bd269a7c8 am: be5064c7e3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2063148

Change-Id: I039d90d8d087bd40fdc3dd4bb9f53475ad8905a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 09:15:36 +00:00
Treehugger Robot
bd3e8d9520 Merge "Track sys_module permission for system_server" 2022-04-21 07:20:26 +00:00
Alistair Delva
ce19c41b8f Merge "Adds GPU sepolicy to support devices with DRM gralloc/rendering" 2022-04-21 04:21:45 +00:00
Seth Moore
8bfdd82123 Allow the remote provisioner app to set rkp_only properties
The properties for rkp_only are no longer read only.

This allows remote provisioner unit tests to enable/disable the remote
provisioning only mode, which is required to fully verify functionality.

Test: RemoteProvisionerUnitTests
Bug: 227306369
Change-Id: I8006712a49c4d0605f6268068414b49714bbd939
2022-04-20 17:15:20 -07:00
Treehugger Robot
b4e33383f4 Merge "Adds system_user_mode_emulation_prop property." am: 7c9e7bbb11 am: a8176be752 am: 1745cf4d37
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2069890

Change-Id: I076fcc5ad4d166d3272ca01df9ee25b2b997cce2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 23:56:42 +00:00
Felipe Leme
9a385b2112 Adds system_user_mode_emulation_prop property.
It will be used by system_server only (i.e., not even Shell) to let
developers change the system user mode (to be headless or full).

Test: sesearch --allow -t system_user_mode_emulation_prop $ANDROID_PRODUCT_OUT/vendor/etc/selinux/precompiled_sepolicy

Bug: 226643927

Change-Id: Iaba42fd56dce0d8d794ef129634df78f9599260f
2022-04-20 13:28:01 -07:00
Treehugger Robot
f222a5573d Merge "crosvm can access data_shell_file on user builds" am: d222ea676b am: af42eee34c am: 178a031dce
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2064912

Change-Id: I7ddc8fdcd1fbdcc62f684bc1d5f4c7724ee24138
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 06:24:26 +00:00
Treehugger Robot
d0c5796ee1 Merge "/apex/com.android.art/bin/dex2oat is a symlink, so allow reading it from the shell." am: b87591b7c6 am: e5defcf3d4 am: 28092b79f5
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2063854

Change-Id: Idf8ab3f470faab31ec46ead48191152b1361e570
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 06:22:55 +00:00
Eric Biggers
20dcec9d16 Merge "Remove some FDE rules and update comments" am: b83a6d1168 am: fa1f9cb2b8 am: 1eacebf142
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2065887

Change-Id: I98e0e9f1c6131617119aa966bb88d7ec229b1d66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 06:14:22 +00:00
Treehugger Robot
d222ea676b Merge "crosvm can access data_shell_file on user builds" 2022-04-20 05:32:32 +00:00
Treehugger Robot
b87591b7c6 Merge "/apex/com.android.art/bin/dex2oat is a symlink, so allow reading it from the shell." 2022-04-20 05:19:16 +00:00
Jiyong Park
cdd5e07956 crosvm can access data_shell_file on user builds
Some of our CTS tests require that crosvm to have read/write access to
files on /data/local/tmp/virt which is labeled as data_shell_file.
Since CTS tests should pass on user builds, grant the access in user
builds as well.

Note that the open access is still disallowed in user builds.

Bug: 222013014
Test: run cts
Change-Id: I4f93ac64d72cfe63275f04f2c5ea6fb99e9b5874
2022-04-20 08:35:19 +09:00
Eric Biggers
b83a6d1168 Merge "Remove some FDE rules and update comments" 2022-04-19 16:47:27 +00:00
Jason Macnak
a93398051c Adds GPU sepolicy to support devices with DRM gralloc/rendering
... such as Cuttlefish (Cloud Android virtual device) which has a
DRM virtio-gpu based gralloc and (sometimes) DRM virtio-gpu based
rendering (when forwarding rendering commands to the host machine
with Mesa3D in the guest and virglrenderer on the host).

After this change is submitted, changes such as aosp/1997572 can
be submitted to removed sepolicy that is currently duplicated
across device/google/cuttlefish and device/linaro/dragonboard as
well.

Adds a sysfs_gpu type (existing replicated sysfs_gpu definitions
across several devices are removed in the attached topic). The
uses of `sysfs_gpu:file` comes from Mesa using libdrm's
`drmGetDevices2()` which calls into `drmParsePciDeviceInfo()` to
get vendor id, device id, version etc.

Bug: b/161819018
Test: launch_cvd
Test: launch_cvd --gpu_mode=gfxstream
Change-Id: I4f7d4b0fb90bfeef72f94396ff0c5fe44d53510c
Merged-In: I4f7d4b0fb90bfeef72f94396ff0c5fe44d53510c
2022-04-18 17:30:56 -07:00
Jason Macnak
365024e53f Adds GPU sepolicy to support devices with DRM gralloc/rendering
... such as Cuttlefish (Cloud Android virtual device) which has a
DRM virtio-gpu based gralloc and (sometimes) DRM virtio-gpu based
rendering (when forwarding rendering commands to the host machine
with Mesa3D in the guest and virglrenderer on the host).

After this change is submitted, changes such as aosp/1997572 can
be submitted to removed sepolicy that is currently duplicated
across device/google/cuttlefish and device/linaro/dragonboard as
well.

Adds a sysfs_gpu type (existing replicated sysfs_gpu definitions
across several devices are removed in the attached topic). The
uses of `sysfs_gpu:file` comes from Mesa using libdrm's
`drmGetDevices2()` which calls into `drmParsePciDeviceInfo()` to
get vendor id, device id, version etc.

Ignore-AOSP-First: must be submitted in internal as a topic first to
                   avoid having duplicate definitions of sysfs_gpu
                   in projects that are only available in internal

Bug: b/161819018
Test: launch_cvd
Test: launch_cvd --gpu_mode=gfxstream
Change-Id: I4f7d4b0fb90bfeef72f94396ff0c5fe44d53510c
Merged-In: I4f7d4b0fb90bfeef72f94396ff0c5fe44d53510c
2022-04-18 12:56:38 -07:00
Roshan Pius
733f399fa0 sepolicy: Allow uwb module access to CE directories for UWB am: 47bddcd065 am: 0bad2ae587 am: 2179e841c0
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2065410

Change-Id: I20397385c180758cd5cce3eef56e1fe27b9f9f9b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-16 02:58:08 +00:00
Eric Biggers
9bf0a0c141 Remove some FDE rules and update comments
Now that FDE (Full Disk Encryption) is no longer supported, the SELinux
policy doesn't need to support it.  Remove two rules that are no longer
needed.  Also update some comments that implied that other rules were
needed only because of FDE support, when actually they are still needed
for other reasons.  Finally, fix some outdated documentation links.

Bug: 208476087
Change-Id: I4e03dead91d34fcefdfcdc68d44dd97f433d6eaf
2022-04-15 21:06:51 +00:00