Commit graph

45490 commits

Author SHA1 Message Date
Yung Ti Su
ca6bf5e3f4 add persist.bluetooth.leaudio_offload.disabled to bluetooth_a2dp_offload_prop
Bug: 301213930
Test: manual

Change-Id: I5b8751a51afcfe852befe881de61c6bcf2951e43
Signed-off-by: Yung Ti Su <andysu@google.com>
2024-01-11 05:42:22 +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
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
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
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
Treehugger Robot
cbfdcc450e Merge "Revert "bugmap selinux failure"" into main 2023-12-18 16:01:25 +00:00
Alessandra Loro
b7d3e34182 Revert "bug_map selinux test failure"
This reverts commit 7a8028bbb4.

Reason for revert: Fixed via aosp/2869455

Bug: 308043377
Change-Id: I2b9a4094c1e19455ac135d204efe0811cb922ffa
2023-12-18 15:29:44 +00:00
Alessandra Loro
0a9f5d4c1f Revert "bugmap selinux failure"
This reverts commit 6aa75739d5.

Reason for revert: Fixed via aosp/2869455

Bug: 308043377
Change-Id: Id9d6e1abaa4b60b775123c0b7ba2f19368234848
2023-12-18 14:59:51 +00:00
Brian Lindahl
0027546b06 Merge "Revert "bugmap selinux failure"" into main 2023-12-18 14:29:22 +00:00
Marie Matheson
7b73ec2605 Allow isolated to read staged apks
type=1400 audit(0.0:835): avc: denied { read }
for path="/data/app/vmdl1923101285.tmp/base.apk"
dev="dm-37" ino=29684
scontext=u:r:isolated_app:s0:c512,c768
tcontext=u:object_r:apk_tmp_file:s0 tclass=file
permissive=0

Bug: 308775782
Bug: 316442990
Test: Flashed to device with and without this change, confirmed that this
change allows an isolated process to read already opened staged apk file
(cherry picked from https://android-review.googlesource.com/q/commit:cf2694bf863fc31ac5862b92bb9258136de57932)
Merged-In: I7226bae79344c3b2a5a0f59940dde6d64a8a7ea1
Change-Id: I7226bae79344c3b2a5a0f59940dde6d64a8a7ea1
2023-12-17 23:46:04 +00:00
Peter Collingbourne
4912d266e1 Mount /tmp as tmpfs.
/tmp is a volatile temporary storage location for the shell user.
As with /data/local/tmp, it is owned by shell:shell and is chmod 771.

Bug: 311263616
Change-Id: Ice0229d937989b097971d9db434d5589ac2da99a
2023-12-15 16:46:46 -08:00
Treehugger Robot
f336eec750 Merge "traced_probes: allow perfetto to read /proc/pressure entries" into main 2023-12-15 23:06:32 +00:00
Jared Duke
8db0b2be1e traced_probes: allow perfetto to read /proc/pressure entries
Allow perfetto to read /proc/pressure/* entries for cpu/io/memory.

Test: Capture perfetto psi traces manually
Bug: 315152880
Change-Id: I08c3d3eca39ee65eb3f93d609a8ef7cf9c25f6a0
2023-12-15 19:15:57 +00:00
Yu-Ting Tseng
4de7a537b0 Merge "Revert^2 "Update uprobestats SELinux policy"" into main 2023-12-15 18:02:57 +00:00
Jiakai Zhang
32c47c94be Merge "Allow watchdog to dump artd." into main 2023-12-15 15:27:26 +00:00
Treehugger Robot
c45d9f8263 Merge "Revert^2 "virtualizationmanager is a client of secretkeeper"" into main 2023-12-15 12:37:43 +00:00
Shikha Panwar
c9b992126c Revert^2 "virtualizationmanager is a client of secretkeeper"
It ferries SecretManagement messages to/from Sk. Reflect this is
sepolicies.

Test: With topic, check selinux denials
Bug: 291213394
Change-Id: Ia0d25e46232d56c59fb18f8642767bfa2d5ffab1
2023-12-15 11:23:54 +00:00
Treehugger Robot
d5f372ff3c Merge "Add lmk pressure_after_kill_min_score prop" into main 2023-12-15 06:27:08 +00:00
Treehugger Robot
28b5f9afd4 Merge "Allow remount to update the super partition." into main 2023-12-15 01:43:49 +00:00
Yu-Ting Tseng
43cae4ea24 Revert^2 "Update uprobestats SELinux policy"
This reverts commit 5e1d7f1c85.

Reason for revert: retry with a fix to the failed tests

Test: atest art_standalone_oatdump_tests
Change-Id: I28872c643ba4ec07ef41b1f9be86036c592a6e4e
2023-12-14 17:17:18 -08:00
Matt Stephenson
531cdc930f Add lmk pressure_after_kill_min_score prop
Add ro.lmk.pressure_after_kill_min_score property to config.

Test: pressure_after_kill_min_score applies if SELinux is enabled
Bug: 316242513
Change-Id: Ie974fb3eddc0c1bc5c28b2c11d516b152c390396
2023-12-14 23:36:56 +00:00