Commit graph

8165 commits

Author SHA1 Message Date
Sal Savage
45b7782c2b Merge "Add sepolicy for Battery Service client role sysprop" 2022-03-15 01:31:07 +00:00
Treehugger Robot
2c905846fa Merge "system_dlkm: allow dumpstate/bugreport to getattr" 2022-03-13 22:22:54 +00:00
Sal Savage
73fdf668af Add sepolicy for Battery Service client role sysprop
Bug: 224176587
Test: Build, this change only defines the sysprop policy
Change-Id: I27fe872955e45e241948e966b3b10834cfd36135
2022-03-12 15:10:48 -08:00
Ramji Jiyani
3b59a537fc system_dlkm: allow dumpstate/bugreport to getattr
Bug: 223332748
Bug: 223755339
Test: atest SELinuxHostTest#testNoBugreportDenials
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Ic0bd8f641cd47cc13df8ec9384e44a7e22e1431e
2022-03-11 21:21:57 +00:00
Lokesh Gidra
f8d3a6b9a1 Merge "Add userfaultfd selinux policy for app_zygote" 2022-03-10 15:16:34 +00:00
Lokesh Gidra
b016e51150 Add userfaultfd selinux policy for app_zygote
Like zygote, webview_zygote, add userfaultfd policy for app_zygote as
well.

Bug: 160737021
Test: manual (use userfaultfd in an app-zygote)
Change-Id: I42f558c5b646bb0bd83b81fddfb608567f95c811
2022-03-09 21:50:52 -08:00
Carlos Llamas
75821321c7 sepolicy: allow access to binderfs feature files
The binder driver now advertises the features it supports through
individual files under /dev/binderfs/features/*. Let all domains have
access to these files to determine how to interact with the driver.

Bug: 191910201
Tested: clients are able to read feature files via libbinder
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Ice5de9efee74e571ef0a23ce093af162fc3b276e
2022-03-09 08:55:10 -08:00
Alan Stokes
b02ac32420 Allow piping VM failure reason
Allow crosvm to write a VM failure reason to virtualizationservice via the pipe provided.

Fixes this denial: avc: denied { write } for path="pipe:[95872]"
dev="pipefs" ino=95872 scontext=u:r:crosvm:s0
tcontext=u:r:virtualizationservice:s0 tclass=fifo_file

Bug: 220071963
Test: Run VM, no denial.
Change-Id: I3beedc5e715aa33209d3df0cae05f45f31e79e66
2022-03-09 14:32:50 +00:00
Xin Li
631f68045e Merge "Merge Android 12L" 2022-03-08 06:53:24 +00:00
Evan Rosky
bd4cd1ac70 Merge "Add a persist.wm.debug property type and associated permissions" 2022-03-08 01:42:55 +00:00
Christopher Morin
e65a7b3e2b Merge "Allow dumpstate to create tmpfs files" 2022-03-08 00:34:42 +00:00
Evan Rosky
5cfdf2bd6e Add a persist.wm.debug property type and associated permissions
This is intended for wm properties related to wmshell/sysui.
Using this context allows sysui to manipulate these properties
in debug builds.

Bug: 219067621
Test: manual
Change-Id: I5808bf92dbba37e9e6da5559f8e0a5fdac016bf3
2022-03-07 19:44:59 +00:00
Michael Eastwood
b7c5fe9d56 Allow vendor domain to communicate with traced. am: 670b38baa9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2009117

Change-Id: I87a0933db89b416a50072fbad8f21884f327d554
2022-03-07 15:55:11 +00:00
Michael Eastwood
670b38baa9 Allow vendor domain to communicate with traced.
This is necessary for vendor code to be able to send trace packets to
Perfetto, which we are doing as part of an effort to provide more
detailed profiling of some vendor code.

Bug: 222684359
Test: (with downstream policy updates) m selinux_policy
Change-Id: I5ab1c04290f69e391d66a76c262d75cadb794f8d
2022-03-04 08:30:29 -08:00
sandrom
6bfe9b9115 Allow apexd to enable fsverity on /metadata am: 6446490287
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1979766

Change-Id: I8bed12a4fe8145d50edf9b2425f1bf97d3b21772
2022-03-02 08:21:21 +00:00
sandrom
6446490287 Allow apexd to enable fsverity on /metadata
Bug: 218672709
Test: manual tests

Change-Id: Idaead3ecd3f3488512908febbdc368e184b7bca9
2022-03-01 16:33:55 +00:00
Thiébaud Weksteen
3886aa5237 Merge "Remove bug_map for hal_wifi_default" am: 8ce2e156d0
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2001830

Change-Id: I1e1a6e65af7e4b4cfd4db5f5a6af3f66b970e793
2022-03-01 09:40:38 +00:00
Thiébaud Weksteen
8ce2e156d0 Merge "Remove bug_map for hal_wifi_default" 2022-03-01 09:06:30 +00:00
Thiébaud Weksteen
b8abcadd5b Remove bug_map for hal_wifi_default
Bug: 220258444
Test: build & boot cuttlefish
Change-Id: I3b5c0ad1b9cbdca5f86e7615d243192163b99aaf
2022-02-28 14:30:22 +11:00
Alan Stokes
4c79e09417 Allow shell to read updated APEXes am: 5490752cfc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1998997

Change-Id: I85fe4921c571f90e9f1fd321d460832c1fed192f
2022-02-25 15:06:53 +00:00
Alan Stokes
5490752cfc Allow shell to read updated APEXes
This is useful for certain tests. Note that it is already possible to
access these files without root via adb pull, since adbd has
access. Shell also already has access to non-updated APEXes on
/system/apex.

Bug: 220918654
Test: adb unroot; pm install --apex /data/apex/decompressed/X.decompressed.apex
Change-Id: I35725499365b297a64c9005c8e45325531d3991d
2022-02-25 12:16:14 +00:00
Daniele Di Proietto
60f6de3137 Silence error when traced_probes invokes atrace with pipes am: 6872b1db69
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1998990

Change-Id: I4ce4bb1bd4ec6c745e7cbe4add540432a95746d8
2022-02-24 15:47:43 +00:00
Daniele Di Proietto
6872b1db69 Silence error when traced_probes invokes atrace with pipes
perfetto traced_probes executes atrace with a pipe for stdout/stderr.
That aleady works because atrace can `write` onto traced_probes's pipes.

Now traced_probes needs to invoke atrace at boot time. This revealed a
problem (I'm pretty sure it was an existing problem and it was
completely harmless):

```
02-23 22:00:41.951   605   605 I auditd  : type=1400 audit(0.0:94): avc:
denied { getattr } for comm="atrace" path="pipe:[17964]" dev="pipefs"
ino=17964 scontext=u:r:atrace:s0 tcontext=u:r:traced_probes:s0
tclass=fifo_file permissive=0
```

atrace doesn't just need `write` permissions on its
stdout/stderr pipes, it also needs `getattr` permissions (probably
because of [this][1]?)

[1]: https://cs.android.com/android/platform/superproject/+/master:bionic/libc/bionic/libc_init_common.cpp;l=156;drc=7a2386bf89f9bfd4e53eba9304e4239b3fdf0d06)
Bug: 219393750
Change-Id: I53b0f60cdd763863c834a883fbb77664e528dd15
2022-02-24 13:14:04 +00:00
Alan Stokes
d4f00ed894 Allow piping console output to clients am: 23161e51cc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1997006

Change-Id: I94b59f8e7c92affdea59010257142f26479dc312
2022-02-24 10:15:37 +00:00
Alan Stokes
23161e51cc Allow piping console output to clients
Any virtualization service client should be able to use a pipe for the
VM log fds.

We previously had some support for this in crosvm (but appdomain is
the wrong label), but not for virtualizationservice. Instead I've
centralised it in the virtualizationservice_use macro so it applies to
exactly those things that can start a VM.

I've removed read permission from crosvm; it doesn't seem to be
needed, and logically it shouldn't be.

Test: Patch in https://r.android.com/1997004, see no denials
Change-Id: Ia9cff469c552dd297ed02932e9e91a5a8cc2c13f
2022-02-23 17:28:49 +00:00
Treehugger Robot
7be1327191 Merge "Remove now-unused permissions" am: 383b946787
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1995010

Change-Id: I69b69cf867775d892b0ec3a7dd34f741dffa84b2
2022-02-23 16:36:40 +00:00
Treehugger Robot
383b946787 Merge "Remove now-unused permissions" 2022-02-23 11:23:25 +00:00
Alan Stokes
0c5449b193 Remove now-unused permissions
CompOS no longer talks directly to DICE (compos_key_helper does). odsign
no longer promotes or deletes instance CompOS files, and the key files
don't exist any more.

Bug: 218494522
Test: Manual; trigger compilation, reboot & watch odsign
Change-Id: Ibc251180122e6e4789b4be5669da3da67517b49c
2022-02-22 17:40:05 +00:00
Treehugger Robot
27553e2b3e Merge "Add ro.lmk.stall_limit_critical property policies" am: ffad0ee0e1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1992292

Change-Id: Ie94a54c2fcd4f206fde3a840ab5c448725e4430a
2022-02-22 11:19:32 +00:00
Suren Baghdasaryan
e121dc5ae2 Add ro.lmk.stall_limit_critical property policies
Add policies to control ro.lmk.stall_limit_critical lmkd property.

Bug: 205182133
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ie5e68dc358c1657501cb59afaba0385697210ccf
2022-02-18 13:39:28 -08:00
Yabin Cui
06e7873d64 Merge "profcollectd: allow to request wakelock from system_suspend." am: 2f2ff42a24
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1989138

Change-Id: Iddf70d8dcf23d2ba00f15d09a9dfe5573aaf763a
2022-02-18 16:40:35 +00:00
Yabin Cui
2f2ff42a24 Merge "profcollectd: allow to request wakelock from system_suspend." 2022-02-18 16:16:01 +00:00
Treehugger Robot
33f0d49ae4 Merge "SELinux issues:" am: c9ab4a420c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1991271

Change-Id: I08990e0ad83b7a090838d7837d303aa52bca201e
2022-02-18 10:07:53 +00:00
Treehugger Robot
c9ab4a420c Merge "SELinux issues:" 2022-02-18 09:42:04 +00:00
Treehugger Robot
46aba72e48 Merge "Modify sepolicy for compos key changes" am: 5273f3a486
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1988307

Change-Id: I09762bb3672b50549dcd492f9d8031e552825576
2022-02-18 09:24:42 +00:00
Treehugger Robot
6ee88d68eb Merge "dontaudit denial on the odex file of location provider." am: c1e11bbea5
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1988446

Change-Id: I65f3a3cf6530bc50ac66c34b216b767b04f41bb6
2022-02-18 09:23:58 +00:00
Treehugger Robot
5273f3a486 Merge "Modify sepolicy for compos key changes" 2022-02-18 09:03:30 +00:00
Shashwat Razdan
d581bd244d SELinux issues:
```
02-18 01:02:35.599     1     1 I auditd  : type=1107 audit(0.0:149): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=vendor.wlan.firmware.version pid=478 uid=1010 gid=1010 scontext=u:r:hal_wifi_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0'
02-18 01:02:35.599     1     1 I auditd  : type=1107 audit(0.0:150): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc: denied { set } for property=vendor.wlan.driver.version pid=478 uid=1010 gid=1010 scontext=u:r:hal_wifi_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0'
```


Bug: 220258444
Change-Id: I5a99d1895d5ef9c5e784cf9e92c0c8847da21b58
Test: Presubmits
2022-02-18 07:38:19 +00:00
Yabin Cui
409d019f9b profcollectd: allow to request wakelock from system_suspend.
Bug: 219934028
Test: run profcollectd and
Test: dumpsys suspend_control_internal --wakelocks
Change-Id: I3cefb0139781a6d5cf32507871f0f7f2b8306614
2022-02-17 10:20:08 -08:00
Alan Stokes
766caba5de Modify sepolicy for compos key changes
Add the compos_key_helper domain for the process which has access to
the signing key, make sure it can't be crashdumped. Also extend that
protection to diced & its HAL.

Rename compos_verify_key to compos_verify, because it doesn't verify
keys any more.

Move exec types used by Microdroid to file.te in the host rather than
their own dedicated files.

Bug: 218494522
Test: atest CompOsSigningHostTest CompOsDenialHostTest
Change-Id: I942667355d8ce29b3a9eb093e0b9c4f6ee0df6c1
2022-02-17 12:14:40 +00:00
Jiakai Zhang
bf58100685 dontaudit denial on the odex file of location provider.
Bug: 194054685
Test: Presubmits
Change-Id: Ia636f7b32251c3b8cb018fee9216e5968d4e95ff
2022-02-16 14:12:49 +00:00
Xin Li
f1f2839e6e Merge "Merge sc-v2-dev-plus-aosp-without-vendor@8084891" into stage-aosp-master 2022-02-14 17:31:17 +00:00
Chris Morin
1d88bf547e Allow dumpstate to create tmpfs files
dumpstate needs to be able to create tmpfs files for it's upcoming use
of memfd_create.

Test: Generate bugreport
Change-Id: I4ce19635d9b76929b05d85bdba89340e5d5399d1
2022-02-12 13:52:39 -08:00
Ramji Jiyani
ba8615a186 Merge "system_dlkm: sepolicy: add system_dlkm_file_type" 2022-02-11 18:36:04 +00:00
Xin Li
77c821174e Merge sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I129b5cb74259c9c028483e84c9b2ac3597c24701
Change-Id: I47ca55be668b9b2aabf86963b65b1403130ab802
2022-02-11 06:58:07 +00:00
Ramji Jiyani
4a556890f9 system_dlkm: sepolicy: add system_dlkm_file_type
Add new attribute system_dlkm_file_type for
/system_dlkm partition files.

Bug: 218392646
Bug: 200082547
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I193c3f1270f7a1b1259bc241def3fe51d77396f3
2022-02-11 04:19:33 +00:00
Florian Mayer
94782041d1 Merge "[MTE] Add property to specify default MTE mode for apps." 2022-02-10 23:38:23 +00:00
Treehugger Robot
f07e7c31a4 Merge "dmesgd: sepolicies" 2022-02-10 21:00:56 +00:00
Treehugger Robot
48f59f9ec2 Merge changes from topic "revert-1979386-revert-1967140-EVS_sepolicy_updates_T-MBLQTXKQEY-UVTCTRHQWF"
* changes:
  Revert^2 "Updates sepolicy for EVS HAL"
  Revert^2 "Adds a sepolicy for EVS manager service"
2022-02-10 20:50:42 +00:00
Kevin Jeon
25dfbfec14 Merge "Make Traceur seapp_context reflect platform status" 2022-02-10 19:09:45 +00:00