Commit graph

8240 commits

Author SHA1 Message Date
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
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
Kalesh Singh
98f63495b2 Add sepolicy for Multi-Gen LRU sysfs control
init is allowed to enable/disable MG-LRU.

Bug: 227651406
Bug: 228525049
Test: setprop persist.device_config.mglru_native.lru_gen_config
Test: verify no avc denials in logcat
Change-Id: I20223f3628cb6909c3fd2eb2b821ff2d52202dd2
2022-04-08 13:37:50 -07:00
Kalesh Singh
9e25714cd7 Add sepolicy for mglru_native flag namespace
Bug: 227651406
Bug: 228525049
Change-Id: I9311b23bd10573fcdb62aba65eb2c6e3d177b467
2022-04-08 13:37:34 -07:00
Treehugger Robot
6d0b6a3011 Merge "Fix gmscore selinux denial on rmdir/setattr" 2022-04-08 02:20:32 +00:00
Treehugger Robot
3979818095 Merge "Allow Bluetooth to link files - Robust Caching requires it" 2022-04-08 01:05:21 +00:00
Treehugger Robot
64c11995d2 Merge "Selinux setup for /data/misc/odsign/metrics/" 2022-04-07 20:30:41 +00:00
Kelvin Zhang
4d59166d11 Fix gmscore selinux denial on rmdir/setattr
Partners reported an OTA failure caused by selinux denial. GMSCore is
trying to call setattr()/rmdir() on /data/ota_package. Give GMSCore
proper permissions to do so.

Test: th
Bug: 227422503
Change-Id: Ic64ce88e137976149813888a0d6d2910fda359e7
2022-04-07 09:23:19 -07:00
Jakub Pawlowski
86f7945647 Allow Bluetooth to link files - Robust Caching requires it
Bug: 154056389
Change-Id: I8e80c9c7fa4ec295ee315aed701e51177fb0f210
2022-04-07 16:25:33 +02:00
Shikha Panwar
36daf98e45 Selinux setup for /data/misc/odsign/metrics/
odsign will be writing(metrics) to file
/data/misc/odsign/metrics/odsign-metrics.txt & system_server needs from it.

Test: adb pull /data/misc/odsign/metrics/odsign-metrics.txt after reboot
Bug: 202926606
Change-Id: I020efcee8ca7f5b81f1aa3374bbf2b3a7403186d
2022-04-07 14:18:37 +00:00
Treehugger Robot
0c4e1373a8 Merge "Selinux configs for enabling tombstones be passed to host" 2022-04-07 13:25:46 +00:00
Steven Moreland
90bc7c36d9 Merge "crosvm: netlink perms for acpi" 2022-04-06 18:10:05 +00:00
Dorin Drimus
5691bf26c8 Add sepolicy for BLE Privacy sysprop
Bug: 224176587
Bug: 227605076
Change-Id: Ia2a2e59a51914885253871d39fe61a51f5dec06f
Test: Build, only sysprop definition.
2022-04-06 09:29:55 +00:00
Shikha Panwar
a9f1dc9708 Selinux configs for enabling tombstones be passed to host
For Guest: tombstone_tranmit needs permissions for:
1. keeping track of files being written on /data/tombstones.
2. creating vsock socket to talk to virtualizationservice (to forward
   these tombstones)

These permissions will be similar to tombstone_tarnsmit on cuttlefish
(device/google/cuttlefish/guest/monitoring/tombstone_transmit/tombstone_transmit.cpp)

For Host (virtualizationservice) needs:
1. permission to  connect to tombstoned.
2. permission to use fd belonging to tombstoned.
3. append and related permissions on tombstone_data file.

Test: Tested by crashing a process in guest (started using microdroid
demo)

Change-Id: Ifd0728d792bda98ba139f18fa9406494a714879d
2022-04-05 13:09:04 +00:00
Ryan Savitski
6111f0cfc8 allow system_app domain to be profiled
An example app in this domain is com.android.settings.

This was an accidental omission from https://r.android.com/1966610.
Context and rationale remain the same as for that patch, please see the
bug.

Tested: both traced_perf and heapprofd successfully profiled the
settings app with the right additional profileability permissions on a
user build (beta candidate).
Bug: 217368496
Change-Id: Id8a9e16dab7774f8840cdd6b74d59f70584b5156
2022-04-05 01:56:18 +00:00
Steven Moreland
c1e8eb5226 crosvm: netlink perms for acpi
Required by crosvm update.

Bug: 228077254
Bug: 226645768
Test: CompOsTestCase progress
Change-Id: I25e9aa257a26992e48e99e02f04195be52a24194
2022-04-04 20:20:24 +00:00
Max Bires
aaacfdb054 Add ro.remote_provisioning.*.rkp_only properties.
These properties are used to inform keystore2 and the RemoteProvisioner
app how they should behave in the system in the event that RKP keys are
exhausted. The usual behavior in a hybrid system is not to take any
action and fallback to the factory provisioned key if key attestation is
requested and no remotely provisioned keys are available.

However, there are instances where this could happen on a device that
was intended to be RKP only, in which case the system needs to know that
it should go ahead and attempt to remotely provision new certificates or
throw an error in the case where none are available.

Test: New properties are accessible from the two domains
Change-Id: I8d6c9e650566499bf08cfda2f71c64d5c2b26fd6
2022-04-04 11:23:12 -07:00
Andy Yu
9e96849345 SEPolicy: Add read permission to traced_probes
Allow traced_probes to read file
/data/system/game_mode_intervention.list

Bug: 219543620
Doc: go/game-dashboard-information-to-perfetto
Test: manual
Change-Id: I16962d2e544959d00a8d4cf32e6ca9c5bef73064
2022-04-01 16:19:14 -07:00
Lorenzo Colitti
bf8af42bf5 Merge "Connectivity Native AIDL interface Sepolicy" 2022-04-01 21:46:37 +00:00
Neha Pattan
dcb324bdb3 Merge "Sepolicy changes for adding new system service for AdServices." 2022-04-01 18:38:07 +00:00
Thiébaud Weksteen
3ad1431a04 Merge "Remove bug_map entry for system_server" 2022-03-31 23:00:09 +00:00
Andy Yu
6a10d563ea Merge "Add label and permission for game_mode_intervention.list" 2022-03-30 19:35:59 +00:00
Thiébaud Weksteen
5c5e0f7ecc Remove bug_map entry for system_server
The permission was granted in 6390b3f.

Bug: 216097542
Bug: 73128755
Test: m selinux_policy
Change-Id: I7b1883a46f3972ed722ebc2844ecdbf24abf0ce1
2022-03-30 02:31:43 +00:00