Commit graph

45506 commits

Author SHA1 Message Date
Inseob Kim
e28eb52f4e Revert^2 "Fix freeze test condition to board api"
f3fad1a66b

Change-Id: I19b36342de003a32a2c76fb513382f1b34cf5a7e
2024-02-13 02:19:48 +00:00
Ikjoon Jang
f3fad1a66b Revert "Fix freeze test condition to board api"
Revert submission 2952245-vfrc_as_tot_sepolicy

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=mainline_modules_arm64-mainline-userdebug&lkgb=11421838&lkbb=11421957&fkbb=11421841, b/324335916

Reverted changes: /q/submissionid:2952245-vfrc_as_tot_sepolicy

Bug: 324335916
Change-Id: Iada55b1298872ae2f2ff4112726dcbcd089597f1
2024-02-08 04:45:26 +00:00
Ikjoon Jang
82126e9d77 Revert "Add 1000000.0 mapping file temporarily"
Revert submission 2952245-vfrc_as_tot_sepolicy

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=mainline_modules_arm64-mainline-userdebug&lkgb=11421838&lkbb=11421957&fkbb=11421841, b/324335916

Reverted changes: /q/submissionid:2952245-vfrc_as_tot_sepolicy

Bug: 324335916
Change-Id: I9375f4d467596bc961527216b3f68c0f21016ca3
2024-02-08 02:54:29 +00:00
Inseob Kim
dd3910bbe6 Add 1000000.0 mapping file temporarily
Will be removed once new ToT (202404) propagates.

Bug: 314010177
Test: build and boot
Test: TH
Change-Id: I6913e953aa479eaf0be15ddf9fd8047b00d58fe3
2024-01-17 16:09:35 +09:00
Inseob Kim
7a235a4d9d Fix freeze test condition to board api
Bug: 314010177
Test: build and boot
Change-Id: I5ccd1018a0dadb5259ac23a18635951cee107421
2024-01-17 16:09:23 +09:00
Jeff Pu
a2ca79aff5 Merge "Support Face Virtual HAL operation latency randomization" into main 2024-01-16 20:05:41 +00:00
Sungtak Lee
45906c7d9a Allow hal_codec2_server to read fifo_file from non-isolated apps
Bug: 254050314
Test: m
Change-Id: I5f645988264523cfae5ffcf299691473be41c2ac
2024-01-13 00:56:39 +00:00
Pawan Wagh
d4205898ec Add statsd service fuzzer to bindings
Test: m
Bug: 232439428
Change-Id: I7f6a2b8f4f00f38863d7d0d9d12370f23d9d556b
2024-01-12 22:10:28 +00:00
Pawan Wagh
25b1829463 Merge "Allow binder calls from system app to update engine" into main 2024-01-12 19:42:36 +00:00
Treehugger Robot
b09d3d4210 Merge "Allow hal_codec2_server to read fifo_file from platform_app" into main 2024-01-12 17:54:04 +00:00
Sungtak Lee
4fe99d06b2 Allow hal_codec2_server to read fifo_file from platform_app
Test: m
Bug: 254050314
Bug: 319322499
Bug: 319532612
Change-Id: I9c2fd760f4069f7c0b3e7c22ac104da4e1373006
2024-01-11 18:50:56 +00:00
Radu Solea
c477a4ad32 Merge "Add sepolicy for suspend.debug.wakestats_log.enabled" into main 2024-01-11 18:09:25 +00:00
Ján Sebechlebský
9416a4c91e Merge "Allow binder calls between virtual_camera / mediaserver & codecs." into main 2024-01-11 11:53:47 +00:00
Kangping Dong
582f3b2e34 Merge "[Thread] move Thread settings data to APEX data dir" into main 2024-01-09 11:58:42 +00:00
Akilesh Kailash
8765b78c68 Merge "snapuserd: sepolicy for setting task-profiles" into main 2024-01-09 04:51:32 +00:00
Inseob Kim
1968b0b14a Merge "Remove hack regarding vFRC versioning" into main 2024-01-08 01:03:13 +00:00
Pawan Wagh
c35c8affc3 Allow binder calls from system app to update engine
Allow system_app to call update engine and update engine
to call callback registered by system app.

Test: m Settings && adb install -r
$ANDROID_PRODUCT_OUT/system_ext/priv-app/Settings/Settings.apk,
Update using 16k dev option.
Bug: 295573133

Change-Id: Ice7e75f86283637ad67a675682ecd0d27038d9e7
2024-01-05 21:25:40 +00:00
Mitch Phillips
179712163e [automerger skipped] Allow persist.arm64.memtag.* sysprops to be changed on user devices. am: f00e88b648 -s ours
am skip reason: Merged-In Ie495f6f9ad43146a0bfcd5bb291fca3760467370 with SHA-1 980c33614e is already in history

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2895200

Change-Id: If342c7411a202b239631bf90ac5083223bfe6656
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-05 01:11:57 +00:00
Inseob Kim
6a03f9df6a Remove hack regarding vFRC versioning
Bug: 314010177
Test: TH
Change-Id: Ife9dfcda62ea61b7af6a34d19be2433820237d28
2024-01-05 01:02:18 +00:00
Radu Solea
82db343e27 Add sepolicy for suspend.debug.wakestats_log.enabled
Add initial sepolicy for suspend.debug.wakestats_log.enabled
Allow set from init
Allow read by system suspend

Bug: 301657457
Test: manual
Change-Id: I1123e169d69eadb909ed474c0c246a8a45eab2f0
Signed-off-by: Radu Solea <radusolea@google.com>
2024-01-04 15:45:39 -08:00
Jeff Pu
16ea68ff90 Support Face Virtual HAL operation latency randomization
Bug: 294254230
Test: atest android.hardware.biometrics.face.*
Change-Id: I40b71a6eba91615d44b0bdcc977e3a51cec83ca1
2024-01-04 17:29:24 -05:00
Alex Xu
245f91399e Merge "Update sepolicy for security_state service to include ephermeral API." into main 2024-01-04 20:27:37 +00:00
Kyle Zhang
da5a09bcf9 Add neverallow rule for force l3 prop
Bug: 299987160
Change-Id: I17a02316a725578fbc5595ba88cb7ba9b1fd82e8
2024-01-04 01:07:41 +00:00
Alex Xu
dc265f5426 Update sepolicy for security_state service to include ephermeral API.
security_state service manages security state (e.g. SPL) information across partitions, modules, etc.

Bug: 315895055
Test: N/A
Change-Id: Iee761f8a33f70e8c6bc03849c021f4e165c6f6db
2024-01-03 20:58:23 +00:00
Kangping Dong
e21496b105 [Thread] move Thread settings data to APEX data dir
This commit includes two sepolicy changes:
1. change threadnetwork data file to
/data/misc/apexdata/com.android.tethering/threadnetwork
2. use apex_tethering_data_file for files under
   /data/misc/apexdata/com.android.tethering

The background is that the Thread daemon (ot_daemon) is merged into the
Tethering mainline module, which means the the Tehtering module now has
code running in both system_server and the standalone unprivileged
ot_daemon process. To prevent ot_daemon from accessing other
apex_system_server_data_file dirs, here use the specific
apex_tethering_data_file for both Tethering and Thread files (A
subdirectory threadnetwork/ will be created for Thread at runtime). This
is similar to apex_art_data_file and apex_virt_data_file.

Note that a file_contexts rule like
```
/data/misc/apexdata/com\.android\.tethering/threadnetwork(/.*)?  u:object_r:apex_threadnetwork_data_file:s0
```
won't work because the threadnetwork/ subdir doesn't exist before the
sepolicy rules are evaluated.

Bug: 309932508
Test: manually verified that Thread settings file can be written to
      /data/misc/apexdata/com.android.tethering/threadnetwork
Change-Id: I66539865ef388115c8e9b388b43291d8faf1f384
2024-01-03 23:01:24 +08:00
Mitch Phillips
f00e88b648 Allow persist.arm64.memtag.* sysprops to be changed on user devices.
Looks like we missed this, and so non-rooted locked devices can't override the persistent sysprops. On Pixel 8 for example, we ship with 'persist.arm64.memtag.system_server=off' by default (from some droidfood carry-overs), and this can't be edited (https://googleprojectzero.blogspot.com/2023/11/first-handset-with-mte-on-market.html).

We should allow these advanced users to set all the MTE properties on the device that they own, and they can already control the non-persistent properties.

Test: N/A
Bug: N/A
(cherry picked from https://android-review.googlesource.com/q/commit:980c33614e691dde070b59bc746bd252b6edb189)
Merged-In: Ie495f6f9ad43146a0bfcd5bb291fca3760467370
Change-Id: Ie495f6f9ad43146a0bfcd5bb291fca3760467370
Bug: 309888546
2024-01-03 10:43:58 +00:00
Inseob Kim
7bb2d4aa8b Allow microdroid's init to load vendor modules
Test: boot microdroid with customized rc script
Change-Id: Ic00a18f409d97f5c21912e3cf5dbb9110adc2269
2024-01-03 09:35:43 +09:00
Inseob Kim
fb0ed7fcc4 Fix denial due to vfio_handler's IBoundDevice
As virtualizationmanager holds references to IBoundDevice returned by
vfio_handler, virtualizationmanager should also have permission to
binder_call.

Bug: 278008519
Test: boot microdroid with assigned devices
Change-Id: I7b87de099b0731c386666cec215807dc39d8c89c
2024-01-03 09:35:43 +09:00
Akilesh Kailash
047bc6669f snapuserd: sepolicy for setting task-profiles
Post OTA reboot, snapshot-merge threads will be run in the background cgroup so that they don't run on big cores. Hence, use SetTaskProfiles() API to move the thread to the relavant cgroup.

When setting SetTaskProfile API, /dev/cpuset/background/tasks path
is accessed which requires process to be in system group.

Use setgid to move the task to system group.

Bug: 311233916
Test: OTA on Pixel 6 - Verify that merge threads are not run on big
cores
Change-Id: Ie4921910985292b0b05f4ffc70b0d08ad9e4a662
Signed-off-by: Akilesh Kailash <akailash@google.com>
2023-12-29 23:02:17 +00:00
Jan Sebechlebsky
0fd6d1bd26 Allow binder calls between virtual_camera / mediaserver &
codecs.

This is required to allow Surface originating from
virtual_camera to be used by mediaserver & writen
to by codecs(for example to decode video into the
surface usign MediaPlayer).

Bug: 301023410
Test: Virtual Camera Test app
Change-Id: I2cac88accd4e1777f6c441c012cd0d36579a55e5
2023-12-27 17:26:52 +01:00
Treehugger Robot
24d52ac42a Merge "Change sepolicy version format for vFRC" into main 2023-12-22 02:25:15 +00:00
Steven Moreland
c0b40ed274 Merge "dumpstate += config_gz permission" into main 2023-12-21 23:23:20 +00:00
Alan Stokes
4639e046bc Merge "Allow su to access virtualization" into main 2023-12-21 09:04:27 +00:00
Steven Moreland
832dc374a6 dumpstate += config_gz permission
Bug: 317262099
Test: bugreport & check contents
Change-Id: Idd7ab04954e26a7b210c232ae8ac114b7ff64bf7
2023-12-21 01:22:13 +00:00
Tom Chan
58a63988e3 Merge "Update wearable_sensing_service to app_api_service" into main 2023-12-20 18:44:31 +00:00
Devin Moore
babb7070a5 Merge "Allow hidl_allocator_default service to set its own prop" into main 2023-12-20 16:46:01 +00:00
Alan Stokes
8b4d612fd7 Allow su to access virtualization
Use our standard macro for granting all the necessary permissions
instead of copying a part of it.

Add ioctl access for all clients for Unix stream sockets & pipes; this
allows them to be used for stdin/stdout without triggering
denials. (Only unpriv_sock_ioctls can be used.)

Together this allows a root shell to use `vm run` without getting
spurious denials such as:

avc:  denied  { ioctl } for  comm="crosvm" path="socket:[835168]"
dev="sockfs" ino=835168 ioctlcmd=0x5401 scontext=u:r:crosvm:s0
tcontext=u:r:su:s0 tclass=unix_stream_socket permissive=0

Bug: 316048644
Test: adb root,  adb shell /apex/com.android.virt/bin/vm run-microdroid
Test: atest MicrodroidTests
Change-Id: Ib5186c70714e295a770896cf8b628384f410b94d
2023-12-20 14:55:28 +00:00
Jeff Pu
6f873ffe82 Merge "Face Virtual HAL lockout support" into main 2023-12-20 14:45:23 +00:00
Alan Stokes
b5061088c8 Merge "Tweak sysfs_dt_avf permissions" into main 2023-12-20 09:41:02 +00:00
Jeff Pu
3c79af1f7c Face Virtual HAL lockout support
Bug: 294254230
Test: atest android.hardware.biometrics.face.FakeLockoutTrackerTest
Change-Id: If7fb024b2ab5d017f5255edf484c487f5406bb9b
2023-12-19 13:28:25 -05:00
Alan Stokes
ac5044870b Tweak sysfs_dt_avf permissions
Allow r_file_perms rather than just open+read, mainly because I saw
this denial:

avc:  denied  { getattr } for  comm="binder:11247_2"
path="/sys/firmware/devicetree/base/avf/guest/common/log"
dev="sysfs" ino=16469 scontext=u:r:virtualizationmanager:s0
tcontext=u:object_r:sysfs_dt_avf:s0 tclass=file permissive=0

Also refactor slightly in microdroid_manager.te.

Test: TH
Change-Id: If2963441b3490a502c293c7a7cdd204d9db7d48a
2023-12-19 17:42:05 +00:00
Devin Moore
01b91e790d Allow hidl_allocator_default service to set its own prop
This prop is read in its .rc file to stop the service. Otherwise,
evertyime the service exits, it is restarted.
We don't want it to be `oneshot` because under normal operation, it
should be restarted if it exits/crashes.

Test: remove kTempHidlSupport && m && launch_cvd
Bug: 218588089

Change-Id: I9a4c61778c244a08ff753689604e79168058dd4c
2023-12-19 17:05:59 +00:00
David Drysdale
f17cc16425 Merge "Add the fuzzer for ISecretkeeper/nonsecure" into main 2023-12-19 15:26:21 +00:00
Alessandra Loro
587d6a2846 Merge "Revert "bug_map selinux test failure"" into main 2023-12-19 14:47:37 +00:00
David Drysdale
7e09f9ceef Add the fuzzer for ISecretkeeper/nonsecure
Test: N/A
Bug: 291228655
Change-Id: Ie67905f0703762198339ff80e9ae8d10b06eba3f
2023-12-19 09:49:26 +00:00
Inseob Kim
3e34b72f9c Change sepolicy version format for vFRC
sepolicy versioning is for system <-> vendor compatibility. This changes
sepolicy version format from sdk version (e.g. 34.0) to vendor api
version (e.g. 202404.0).

Bug: 314010177
Test: build and boot
Change-Id: I2422c416b7fb85af64c8c835497bbecd2e10e2ab
2023-12-19 13:35:38 +09:00
Hang Shi
cb24b4facf Merge "Bluetooth LMP Events: Add Lmp Events Hal" into main 2023-12-19 02:34:53 +00:00
Marie Matheson
289c8c0bb7 [automerger skipped] Allow isolated to read staged apks am: 7b73ec2605 -s ours
am skip reason: Merged-In I7226bae79344c3b2a5a0f59940dde6d64a8a7ea1 with SHA-1 cf2694bf86 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2879648

Change-Id: I266f1286f87d37d3d48429e36bbab6fb174050ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 23:32:46 +00:00
Tom Chan
4409ea458f Update wearable_sensing_service to app_api_service
Being a system_api_service prevents non-privileged apps from getting a reference to WearableSensingManager via Context#getSystemService (it returns null). CTS tests are run as non-privileged apps, so we need this change to properly test the API.

The API methods are protected by a signature|privileged permission. CTS tests can gain this permission by adopting the Shell's permission identity, but it can't get around the SELinux policy.

wearable_sensing_service is mostly modelled after ambient_context_service, which is an app_api_service, so we believe this change is fine from a security's perspective.

Test: A CTS test can get a WearableSensingManager via Context#getSystemService after this change.

Change-Id: I9d854353f48ff7b3fa5a07527bee0bcc83cb6236
2023-12-18 22:02:06 +00:00
Peter Collingbourne
fe69f400db Merge "Mount /tmp as tmpfs." into main 2023-12-18 21:39:38 +00:00