Commit graph

8261 commits

Author SHA1 Message Date
Treehugger Robot
25a665ded7 Merge "Allow deleting old virtualization files" 2022-05-03 09:28:57 +00:00
Treehugger Robot
1d79fd5071 Merge "[MS82.3] Add sepolicy to access connectivity apex directory" 2022-05-03 08:00:18 +00:00
Richard Chang
0b25ca45cf Merge "Allow vendor services to access vendor_system_native_prop" 2022-05-03 07:48:51 +00:00
Jiyong Park
8a5c1598ca 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.

Bug: 231080171
Test: run MicrodroidDemoApp on a user build
Merged-In: Ie0b1b9801dd7726633f97456a38bc0ea349013db
Change-Id: Ie0b1b9801dd7726633f97456a38bc0ea349013db
2022-05-03 14:38:28 +09:00
Richard Chang
af8fac1c56 Allow vendor services to access vendor_system_native_prop
Bug: 226456604
Test: Build
Change-Id: Icc11b9bf06fd0fb8069388ca5a32e8aedf1743a8
2022-05-03 04:19:07 +00:00
Treehugger Robot
4410dab4de Merge changes from topic "33.0_sepolicy_mapping_file"
* changes:
  Add 33.0 mapping files
  platform/system/sepolicy - SEPolicy Prebuilts for Tiramisu
2022-05-03 00:32:17 +00:00
Treehugger Robot
fe1ad47b3b Merge "Add "ro.hardware.egl_legacy" for ANGLE system driver" 2022-05-02 18:41:39 +00:00
Inseob Kim
4ae05118c1 Add 33.0 mapping files
Steps taken to produce the mapping files:

0. Add 33.0 prebuilts to prebuilts/api/33.0/.

1. Add the following Android.bp modules.

    33.0.board.compat.map
    33.0.board.compat.cil
    33.0.board.ignore.map
    plat_33.0.cil
    system_ext_33.0.cil
    product_33.0.cil
    33.0.ignore.cil
    system_ext_33.0.ignore.cil
    product_33.0.ignore.cil
    33.0.compat.cil
    system_ext_33.0.compat.cil

2. Touch the following three files.

    private/compat/33.0/33.0.cil
    private/compat/33.0/33.0.compat.cil
    private/compat/33.0/33.0.ignore.cil

3. Add 33.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS on
build/make/core/config.mk. Note that we don't update
sepolicy_major_vers to 33, but just update compat versions.

4. Run the following command.

    $ source build/make/rbesetup.sh && lunch aosp_arm64-userdebug
    $ m sepolicy_generate_compat
    $ sepolicy_generate_compat --branch=tm-dev \
        --build latest --target-version 33.0 \
        --latest-version 32.0

This change also enables treble_sepolicy_tests_33.0 and installs
33.0.cil mapping file onto the device.

Test: m treble_sepolicy_tests_33.0
Test: m 33.0_compat_test
Test: m slinux_policy
Change-Id: Ie969ff0372ff1268776165cee5cb5b07d303453c
2022-05-02 14:12:28 +09:00
Ian Elliott
92251f5d15 Add "ro.hardware.egl_legacy" for ANGLE system driver
This supports the ability to switch between ANGLE and a legacy GLES
driver in cases when transitioning from a legacy GLES driver to ANGLE
as the system driver.  With ANGLE as the GLES system driver, the
platform needs a way to identify the legacy GLES driver, so that it
can be used for particular applications.

Test: CtsAngleDeveloperOptionHostTest
Bug: 224558229
Change-Id: I359b37daa96eb6f8424bde530bb1ac79affd1b04
2022-04-29 18:35:16 -06:00
Yu Shan
d5af7b7cea Allow vehicle_binding_util to access AIDL VHAL.
AIDL service requires binder_use not hwbinder_use.

Test: None
Bug: None
Change-Id: Ic2245c4b1961cc3a5bbd61a1cb6134d92b8752c1
2022-04-29 16:39:03 -07:00
Alan Stokes
c88f0efe3e 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
Change-Id: I4a31e437344974597fc5280d898f23780a820f16
(cherry picked from commit 8e06fb4109)
2022-04-29 10:56:34 +00:00
Eric Biggers
a77c2963e9 Merge "zygote.te: clean up and tighten app data isolation rules" 2022-04-28 17:51:53 +00:00
Treehugger Robot
4fe6bd16f3 Merge "Revert "Fix bootchart on android12"" 2022-04-28 15:52:46 +00:00
Treehugger Robot
8594b156af Merge "Prevent sandbox executing from sdk_sandbox_data_file" 2022-04-28 06:28:08 +00:00
Eric Biggers
9f07ea5442 zygote.te: clean up and tighten app data isolation rules
Group together the rules for setting up app data isolation and get all
the comments up-to-date.  Also remove some parts that aren't needed:

- 'allow zygote mnt_expand_file:dir mounton;' -- not needed.  It might
  have been thought that this was needed for mounting tmpfs on
  /mnt/expand/$volume/user{,_de}, but those have type system_data_file.

- 'allow zygote mnt_expand_file:dir relabelto;' -- not needed, as
  nothing is ever relabeled to this type.

- 'allow zygote media_rw_data_file:dir getattr;' -- not needed to create
  bind mounts.  The similar rules for user_profile_* don't include this.

- 'allow zygote mirror_data_file:dir r_dir_perms;' -- tighten to just
  the required search permission.

- 'allow zygote system_data_file:dir getattr;' -- redundant with 'allow
  zygote system_data_file:dir r_dir_perms;', and not needed for the
  stated reason of "Get inode of directories for app data isolation".

Test: booted Cuttlefish, no denials seen.
Change-Id: Id77b8c81625fd785a5d0d88c37d7c85b8fff7244
2022-04-27 21:59:27 +00:00
Shiwangi Shah
bb270f64c9 Merge "Add ephemeral service access to sdk sandbox" 2022-04-27 14:35:54 +00:00
Shiwangi Shah
48b2b33844 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

Change-Id: If7bcb8b8de62d408bd4af848b43abca853c93758
2022-04-27 09:21:02 +00:00
Sal Savage
9f3d766633 Merge "Update LE Audio profile names to be in line with spec and implementation" 2022-04-26 21:21:52 +00:00
Jooyung Han
613519f7c8 Revert "Fix bootchart on android12"
This reverts commit d338d0ef55.

Reason for revert: The original problem was due to failing to switch mount namespace when bootchart is on (see b/229983560) but this doesn't fix it but only suppresses the symptom. aosp/2073287 fixes the original problem.

Change-Id: I6538de37872e718291e78b591a1ae43e83f7a3e3
2022-04-26 03:40:23 +00:00
Junyu Lai
c43dbf8dec [MS82.3] Add sepolicy to access connectivity apex directory
Test: m
Bug: 230289468
Change-Id: I7e43c09f929a418c6c7b6bcfc3696a242c19f2d8
2022-04-26 02:20:30 +00:00
Bram Bonne
078b43cd40 Prevent sandbox executing from sdk_sandbox_data_file
Bug: 215105355
Test: make
Change-Id: I73c6a0d5034f194bf7149336fdac1db51a2b151d
2022-04-25 13:28:52 +02:00
Sal Savage
a529796057 Update LE Audio profile names to be in line with spec and implementation
Bug: 217448211
Test: atest BluetoothInstrumentationTests
Merged-In: If27874ca20be1db032519b2168631c3b651a0522
Change-Id: If27874ca20be1db032519b2168631c3b651a0522
2022-04-22 22:57:56 +00:00
Treehugger Robot
2f666d5fc0 Merge "Add vibrator and power HALs to Watchdog dumps" 2022-04-22 17:39:58 +00:00
Felipe Leme
c696791a7f Merge "Allow apps to read system_user_mode_emulation_prop." 2022-04-22 15:25:13 +00:00
Michael Wright
d5d2f60795 Add vibrator and power HALs to Watchdog dumps
Test: adb shell am hang --allow-restart, check Last ANR for stacks
Fixes: 211998169
Change-Id: I7cad1e57caed5eb8a5c0092548362fd0a6b1d98d
2022-04-22 14:32:14 +00:00
Felipe Leme
b85242c00f Allow apps to read system_user_mode_emulation_prop.
As it's used by UserManager...

Test: sesearch --allow -s appdomain -t system_user_mode_emulation_prop $ANDROID_PRODUCT_OUT/vendor/etc/selinux/precompiled_sepolicy
Bug: 226643927

Change-Id: I1134a9e0b8ae758e3ebef054b96f9e3237a2401f
2022-04-21 18:49:12 -07:00
Joe Bolinger
197b314b4b Add virtual fingerprint instance to policy.
Bug: 228638448
Change-Id: Id9cd3565d731ba98f18e91c50fc19b6820bf3172
Test: N/A
2022-04-21 22:57:01 +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
1ebfb867a8 Merge "Grants clatd privs since forked by system server" 2022-04-21 14:00:23 +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
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
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
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
Roshan Pius
47bddcd065 sepolicy: Allow uwb module access to CE directories for UWB
Denial logs:
04-15 17:02:48.616  1811  1811 W binder:1811_6: type=1400 audit(0.0:7): avc: denied { write } for name="com.android.uwb" dev="dm-41" ino=6916 scontext=u:r:system_server:s0 tcontext=u:object_r:apex_module_data_file:s0 tclass=dir permissive=0

Bug: 229410097
Change-Id: I86df5f20dda483aa0579a55e1b040c277906db1b
Test: Manual tests
2022-04-15 20:37:24 +00:00
Richard Chang
1c8df204ff Merge "sepolicy: allow vendor system native experiments property" 2022-04-15 03:47:28 +00:00
Martin Stjernholm
1e0b4a5b98 /apex/com.android.art/bin/dex2oat is a symlink, so allow reading it
from the shell.

This fixes a regression from https://r.android.com/1921457, so that
dex2oat without a path can still be run from the adb shell. That CL
removed the symlink from /system/bin, which means the shell finds it in
/apex/com.android.art/bin instead, and hence it needs to be covered by
this sepolicy.

Test: adb unroot && adb shell dex2oat
Bug: 218986148
Bug: 124106384
Change-Id: Ic52b30e0974829b5e5cde5106e6c4eec9f61eec6
2022-04-14 17:52:51 +01:00
Thiébaud Weksteen
6a2fbfa84c Track sys_module permission for system_server
04-02 11:47:07.529  1827  1827 I auditd  : type=1400 audit(0.0:4): avc:
denied { sys_module } for comm="system_server" capability=16
scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0
tclass=capability permissive=0

Bug: 228030183
Test: boot, check that auditd parses bug_map correctly
Change-Id: I6861a864a28577fc7841f5591fb7e1f3879a40d4
2022-04-13 10:48:13 +10:00
Treehugger Robot
b1f61ba51b Merge "surfaceflinger: allow to be profiled by perfetto on release builds" 2022-04-12 23:45:21 +00:00
Ryan Savitski
20d0aca7e6 surfaceflinger: allow to be profiled by perfetto on release builds
This is a key system process for certain performance investigations, so
allow perfetto profiling of its native heap and general callstack
sampling. This is already allowed on debuggable builds via domain.te.

In addition to the sepolicy, the profiler itself does checks on whether
to allow profiling. At the time of writing, profiling requests coming
from "shell" for surfaceflinger will be disallowed (as it is a native
process running as "system"). However profiling requests coming from the
platform via "statsd" will be allowed.

Bug: 217368496
Tested: profiled surfaceflinger on local internal/master sargo-user build
Change-Id: Ib092064ea911aed08d981adc823cd871fc271a96
2022-04-12 23:41:14 +00:00
Mitch Phillips
8cd32cd93e [GWP-ASan] Add sysprop, allow shell and system apps to set it.
Bug: 219651032
Test: atest bionic-unit-tests

Change-Id: Ic4804ce0e4f3b6ba8eb8d82aca11b400b45c03dc
2022-04-12 13:20:05 -07:00
Kalesh Singh
6ba41462d5 Merge changes from topic "mglru-exp"
* changes:
  Add sepolicy for Multi-Gen LRU sysfs control
  Add sepolicy for mglru_native flag namespace
2022-04-12 13:48:48 +00:00
Richard Chang
7057e4abca sepolicy: allow vendor system native experiments property
Grant system_server and flags_health_check permission to set the
properties that correspond to vendor system native experiments.

Bug: 226456604
Test: Build
Change-Id: Ib2420cf6eaf1645e7f938db32c93d085dd8950a3
2022-04-12 08:11:53 +00:00
Dorin Drimus
0681757821 Merge "Add sepolicy for BLE Privacy sysprop" 2022-04-11 20:29:34 +00:00