Commit graph

33758 commits

Author SHA1 Message Date
Paul Thomson
0a15c840fd Add additional sepolicy rules for gpuservice am: 4c834adc0a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1952258

Change-Id: I074f45e1aeebfa1e8f387bd469b91a54f6247008
2022-01-17 19:24:09 +00:00
Valentin Iftime
e1a4b8c705 Add sepolicy for external lazy camera HALs
Test: atest CtsCameraTestCases

Bug: 191248460

Testt: m
Test: presubmit

Change-Id: Ia3b07247f9929c1898efa86d892ea8ad3c2041dc
2022-01-17 18:48:00 +01:00
Paul Thomson
4c834adc0a Add additional sepolicy rules for gpuservice
Allow gpuservice to access read/write BPF maps.

Bug: b/213577594
Change-Id: I487754c008a53819715a6bfc5da10182d87de413
2022-01-17 16:34:03 +00:00
Alan Stokes
50d2195cab Allow compos to use diced
Bug: 214233409
Test: composd_cmd dice
Change-Id: I82b4bd87db879f378d2fafb6e2db7e2544fef5de
2022-01-17 15:48:00 +00:00
Alan Stokes
f3ec0742ed Add diced security class
Add diced to security_class and access_vectors so it can check its
permissions in side Microdroid.

This was part of commit 2b6c6063ae
outside the VM.

Bug: 214231981
Test: composd_cmd dice
Change-Id: Ia503db183d16a4efcb975f654bb4483df44f51ad
2022-01-17 15:42:32 +00:00
Jiyong Park
ecd849c707 Merge "Add policies for diced and hal_dice in microdroid" am: 2832f957e7
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1946767

Change-Id: I5fc5de094c890c8eb962d035849ef1101e99a229
2022-01-17 13:48:33 +00:00
Jiyong Park
2832f957e7 Merge "Add policies for diced and hal_dice in microdroid" 2022-01-17 13:29:34 +00:00
Andrew Walbran
e9f167c46a Merge "Allow crosvm to mlock VM memory." am: a0b12be876
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1948554

Change-Id: Ib0123f55a81cb3f86a0d0cf7f2813e729862f380
2022-01-17 12:12:53 +00:00
Andrew Walbran
a0b12be876 Merge "Allow crosvm to mlock VM memory." 2022-01-17 11:58:08 +00:00
Inseob Kim
76423be012 Merge "Add a skeleton sepolicy compat generator" am: 9a8ffe8cf1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1951042

Change-Id: I3d23d35abec24e3875a760eaf7367548b21353c4
2022-01-17 11:37:26 +00:00
Inseob Kim
9a8ffe8cf1 Merge "Add a skeleton sepolicy compat generator" 2022-01-17 11:27:15 +00:00
Inseob Kim
29e357e898 Add a skeleton sepolicy compat generator
sepolicy_generate_compat will be used to generate compat files for ToT,
based on the mapping file from aosp_arm64-userdebug target of {ver}
source tree. For now, it only supports downloading a mapping file
system/etc/selinux/mapping/{ver}.cil from the Android build server.

Bug: 214336258
Test: sepolicy_generate_compat --branch sc-v2-dev --version 32.0
Change-Id: I48043c71a6866aa385ecd67462f7678561cc5a38
2022-01-17 17:05:46 +09:00
Hungming Chen
7f4a2ab9fe clatd: remove spurious privs
Since the clatd has some code cleanup, these privs are not required
anymore.

Bug: 212345928
Test: manual test
1. Connect to ipv6-only wifi.
2. Try IPv4 traffic.
   $ ping 8.8.8.8

Change-Id: Ib801a190f9c14ee488bc77a43ac59c78c44773ab
2022-01-16 14:28:57 +08:00
Yabin Cui
f17fb4270c Add sepolicy for simpleperf_boot.
simpleperf_boot is the secontext used to run simpleperf from init,
to generate boot-time profiles.

Bug: 214731005
Test: run simpleperf manually
Change-Id: I6f37515681f4963faf84cb1059a8d5845c2fe5a5
2022-01-15 16:12:51 -08:00
Treehugger Robot
47f5daf227 Merge "Add sepolicy for logd and logcat services" am: d6a5b604ce
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1948849

Change-Id: I962d6dee287b1d91e522f6a516ce7ee1f3bcda09
2022-01-14 20:56:32 +00:00
Treehugger Robot
d6a5b604ce Merge "Add sepolicy for logd and logcat services" 2022-01-14 20:44:35 +00:00
Nikita Ioffe
b5e83ea3cf Merge "Move allow rules from public/app.te to private/app.te" am: 52e44e8022
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1949596

Change-Id: I054ea64ddb7dd4d333c41d42b8c9116bda449d73
2022-01-14 18:04:16 +00:00
Nikita Ioffe
52e44e8022 Merge "Move allow rules from public/app.te to private/app.te" 2022-01-14 17:47:29 +00:00
Gabriel Biren
3d0529483b Add supplicant service to the dumpstate
exceptions and dontaudit lists.

wpa_supplicant does not have a dump() method, so
dumpstate shouldn't need to access this HAL.

Bug: 213616004
Test: Treehugger tests
Change-Id: I5a0d80725434b56c9663948c3727faea9fb38db6
2022-01-14 17:17:31 +00:00
Andrew Walbran
ed82cc82be Allow crosvm to mlock VM memory.
Bug: 204298056
Change-Id: I5b00273ffa37d4c1ea2f26bb40822abd0d094d90
2022-01-14 13:47:05 +00:00
Lais Andrade
b9e7afda53 Merge "Revert "Migrate contexts tests to Android.bp"" am: 8bd664ba28
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1949061

Change-Id: Idf7ca0242d1c4b9eb3f7342245a9d2bee940d987
2022-01-14 12:32:56 +00:00
Lais Andrade
8bd664ba28 Merge "Revert "Migrate contexts tests to Android.bp"" 2022-01-14 12:14:40 +00:00
Inseob Kim
baa93cc651 Revert "Migrate contexts tests to Android.bp"
This reverts commit f612656adf.

Reason for revert: breaking amlogic build

Change-Id: I129b5cb74259c9c028483e84c9b2ac3597c24701
2022-01-14 06:13:28 +00:00
Inseob Kim
3ad72effaf Merge "Migrate contexts tests to Android.bp" am: 9a9994de28
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1925693

Change-Id: If5b66450ed73810c9c51c75b9444e7744a9954e5
2022-01-14 04:47:56 +00:00
Inseob Kim
9a9994de28 Merge "Migrate contexts tests to Android.bp" 2022-01-14 04:25:03 +00:00
Maciej Żenczykowski
36c4a97895 Merge "Add clatd to apex/com.android.tethering-file_contexts" am: 334d21491d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1926907

Change-Id: I0f95775889c1466c7c22b2518067b1ff98dc84ba
2022-01-14 03:39:14 +00:00
Maciej Żenczykowski
334d21491d Merge "Add clatd to apex/com.android.tethering-file_contexts" 2022-01-14 03:22:34 +00:00
Inseob Kim
f612656adf Migrate contexts tests to Android.bp
Now that we have sepolicy module in Android.bp, we can migrate contexts
tests. Also vendor_service_contexts_test will be run, as we now include
vendor_service_contexts unconditionally.

Unfortunately, vendor_service_contexts_test is now broken, due to a
malformed type hal_power_stats_vendor_service. We will temporarily
exempt the type from the test, to speed up migrating to Android.bp.

Bug: 33691272
Test: m selinux_policy and see tests running
Test: add a malformed type other than hal_power_stats_vendor_service and
      run tests
Change-Id: Ic60eb38b9a7c79006f0b5ff4453768e03006604b
2022-01-14 10:59:59 +09:00
Akilesh Kailash
f3262f89ef Merge "New property to control Async I/O for snapuserd" am: 9de6ad61ff
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1936919

Change-Id: Idb6562dd22d874b98db12493437a9615a8eee113
2022-01-14 00:20:25 +00:00
Akilesh Kailash
9de6ad61ff Merge "New property to control Async I/O for snapuserd" 2022-01-14 00:06:23 +00:00
Nikita Ioffe
269e7cfc51 Move allow rules from public/app.te to private/app.te
Allow rules in public/*.te can only reference types defined in
public/*.te files. This can be quite cumbersome in cases a rule needs to
be updated to reference a type that is only defined in private/*.te.

This change moves all the allow rules from public/app.te to
private/app.te to make it possible to reference private types in the
allow rules.

Bug: 211761016
Test: m
Test: presubmit
Change-Id: I0c4a3f1ef568bbfdfb2176869fcd92ee648617fa
Merged-In: I0c4a3f1ef568bbfdfb2176869fcd92ee648617fa
2022-01-13 22:56:14 +00:00
John Wu
cd5cf383f1 Add keystore2 LIST permission to system_server
This is required for listing all key aliases of other APP domains' keys
in order to migrate keys on behalf of the updated app by PMS.

Test: builds
Bug: 211665859
Change-Id: I541fb81e6186288a1e852ce60882651f838e36dc
2022-01-13 14:26:28 -08:00
Wenhao Wang
6a656c0b67 Add sepolicy for logd and logcat services
The logd binder service is on logd side.
The logcat binder service is on system_server side.
These two binder services facilitate the binder RPC
between logd and system_server.

Bug: 197901557
Test: manual
Change-Id: I5f08bbb44a88dc72302331ab11c7d54f94db16ac
2022-01-13 11:38:43 -08:00
Jiyong Park
1d9c9ba231 use dalvik.vm.boot-dex2oat-threads inside microdroid
Previously, all dalvik.vm.* properties were not used / ignored in
Microdroid. However this change makes use of
dalvik.vm.boot-dex2oat-threads which controls the concurrency level of
dex2oat.

Specifically, on the host-side, the number of vCPUs in the compos VM is
configured from the system property having the same name. Then inside
the compos VM, compsvc which runs in the compos domain, sets the system
property to be the number of vCPUs in the VM. In other words, the system
properties get the same value both in the host and the guest VMs. Then
finally, the dex2oat process running inside the VM reads the system
property and configures its concurrency level accordingly.

Bug: 197358423
Test: run compos

Change-Id: I8d2394a7192a7b55a910f317e12e2b1f60b89636
2022-01-14 00:40:49 +09:00
Akilesh Kailash
5c5fd255d2 New property to control Async I/O for snapuserd
io_uring_setup() system call requires ipc_lock.

(avc: denied { ipc_lock } for comm="snapuserd" capability=14 scontext=u:r:snapuserd:s0 tcontext=u:r:snapuserd:s0 tclass=capability permissive=0)

Add selinux policy.

Bug: 202784286
Test: OTA tests
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I806714c7ade0a5d4821b061396c9f064ee5ed8b6
2022-01-13 06:27:46 +00:00
Treehugger Robot
92509fdf37 Merge "Allow authfs to read extra APK mount" am: 70cd2da646
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1937797

Change-Id: Ie777cd2676ea60b13bc9e96bbde599b01615d3df
2022-01-13 01:21:38 +00:00
Treehugger Robot
70cd2da646 Merge "Allow authfs to read extra APK mount" 2022-01-13 01:06:01 +00:00
Jeremy Meyer
bebb429e43 Merge "Add resources_manager_service" am: 0f72360b2f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1944288

Change-Id: I240261561b71f71c74d728c8e4a4ed7f6133fbe4
2022-01-12 21:01:31 +00:00
Jeremy Meyer
0f72360b2f Merge "Add resources_manager_service" 2022-01-12 20:41:28 +00:00
Treehugger Robot
5af1fc8bef Merge "Make virtual_device_service accessible from CTS" am: b4cc3b36f4
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1912337

Change-Id: Ida8d75500acfe02e8bff86793c8776a28ee7411e
2022-01-12 18:34:43 +00:00
Treehugger Robot
b4cc3b36f4 Merge "Make virtual_device_service accessible from CTS" 2022-01-12 18:28:15 +00:00
Yabin Cui
f288523c0c Restrict write access to etm sysfs interface. am: 927d7a752b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1945414

Change-Id: I9512f82d34bb747bdc3d042a63df655fe6741799
2022-01-12 18:26:45 +00:00
Jiyong Park
8948c1ce4b Add policies for diced and hal_dice in microdroid
Bug: 214231981
Test: run microdroid and check diced is up and running
Change-Id: I605d7d6a790b8a14e575e67e1dcf02eaf7a5eafc
2022-01-13 01:37:00 +09:00
Colin Cross
6c7f937235 Remove deprecated ToMakePath calls
ToMakePath is a noop now, remove the calls to it.

Bug: 204136549
Test: m checkbuild
Change-Id: I01b865614f50a57ab357c5ffb8843ebcb382df20
2022-01-11 19:35:43 -08:00
Yabin Cui
927d7a752b Restrict write access to etm sysfs interface.
Bug: 213519191
Test: boot device
Change-Id: I40d110baea5593a597efa3c14fd0adecee23fc0f
2022-01-11 14:12:52 -08:00
Maurice Lam
2e38cfa2f7 Make virtual_device_service accessible from CTS
This is safe because methods in VirtualDeviceManager are guarded by
the internal|role permission CREATE_VIRTUAL_DEVICE, and all subseuqent
methods can only be called on the returned binder.

Fixes: 209527778
Test: Manual
Change-Id: I60a5cf76eec1e45803cf09ab4924331f7c12ced4
2022-01-11 13:21:14 -08:00
Treehugger Robot
97e23e0f40 Merge "Support for APEX updatable sepolicy" am: 175f50137e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1922440

Change-Id: I27c61f26a7aa167d8003387c902f4396768bc1d5
2022-01-11 14:06:52 +00:00
Treehugger Robot
175f50137e Merge "Support for APEX updatable sepolicy" 2022-01-11 13:49:24 +00:00
Jeff Vander Stoep
f9348b5509 Support for APEX updatable sepolicy
Builds:
 - sepolicy_test - file that init mounts in /dev/selinux to demonstrate
   that updatable sepolicy is loaded.
 - apex_sepolicy.cil - Initially includes a rule allowing shell
   to read sepolicy_test.
 - apex_file_contexts - Initially includes mapping of
    /dev/selinux/sepolicy_test.
 - apex_sepolicy.sha256. Used by init to determine of
    precompiled_sepolicy can be used.
 - apex_service_contexts - Currently empty.
 - apex_property_contexts - Currently empty.
 - apex_seapp_contexts - Currently empty.

Bug: 199914227
Test: Build, boot, ls -laZ /dev/selinux/sepolicy_test
Change-Id: I6aa625dda5235c6e7a0cfff777a9e15606084c12
2022-01-11 12:52:09 +01:00
Hungming Chen
5934dd8c90 Add clatd to apex/com.android.tethering-file_contexts
clatd binary is starting to be shipped by apex since T+ release
and the shipped clatd is belong to u:object_r:clatd_exec:s0.

Test: manual test
1. Connect to ipv6-only wifi.
2. Make IPv4 traffic.
   $ ping 8.8.8.8

Change-Id: I4f6f0944e94e165983a19a5d3c3a117274f6bbac
2022-01-11 17:04:05 +08:00