Commit graph

29394 commits

Author SHA1 Message Date
Inseob Kim
58f2b83eaa Merge "Adding sepolicy testcase for system_ext and product." 2021-05-20 09:25:14 +00:00
Hangyu Kuang
f7578e0b04 Merge "Allow mediaserver start transcoding service." 2021-05-18 06:13:17 +00:00
hkuang
de370e5161 Allow mediaserver start transcoding service.
Bug: 187271658
Test: atest MediaTranscodeManagerTest; unit tests
Change-Id: I847a83ec3e0d852266b7b0c624767e72d48b45d5
2021-05-17 13:52:38 -07:00
Christian Wailes
82ce869794 Merge "Added SELinux context for dalvik.vm.dexopt.thermal-cutoff property" 2021-05-17 16:15:40 +00:00
Bram Bonné
40bf1a6a70 Merge "Enforce RTM_GETLINK restrictions on all apps" 2021-05-17 13:28:28 +00:00
Treehugger Robot
0ac8b754cb Merge "Revert "Revert "Check that tracefs files are labelled as tracefs_type""" 2021-05-14 23:41:37 +00:00
Hridya Valsaraju
edccaa87aa Revert "Revert "Check that tracefs files are labelled as tracefs_type""
This reverts commit a00863e4d8.

All dependencies for this patch are now merged.

Bug: 184381659
Test: atest
android.security.cts.SELinuxHostTest#testTracefsTypeViolators

Change-Id: Ic268b24222a87cd9f7ff9158eb16a20f1cb3ecbb
2021-05-14 14:06:14 -07:00
Yabin Cui
4c26361472 Merge "Allow simpleperf_app_runner to write to shell pipe fds." 2021-05-14 20:45:39 +00:00
Yabin Cui
d34a1dd223 Allow simpleperf_app_runner to write to shell pipe fds.
Currently simpleperf knows whether an app is debuggable or profileable
by running commands via run-as and simpleperf_app_runner and seeing if
they fail. This isn't convenient. So we want simpleperf_app_runner to
pass app type to simpleperf through pipe fds.

Bug: 186469540
Test: run CtsSimpleperfTestCases.
Change-Id: Ia2d276def83361336bb25d9cf367073a01cb4932
2021-05-14 10:16:24 -07:00
Treehugger Robot
9327c4f1cc Merge "Allow /dev/dma_heap directory to be readable" 2021-05-14 05:10:33 +00:00
Hridya Valsaraju
920939df71 Allow /dev/dma_heap directory to be readable
Allow everyone to read /dev/dma_heap so that they can query the set of
available heaps with the GetDmabufHeapList() API in libdmabufheap.
This patch fixes the following denials that happen when clients use the
API:

avc: denied { read } for name="dma_heap" dev="tmpfs" ino=369
scontext=u:r:mediaswcodec:s0 tcontext=u:object_r:dmabuf_heap_device:s0
tclass=dir permissive=0
9507:05-12 17:19:59.567  1647  1647 W com.android.systemui: type=1400
audit(0.0:93): avc: denied { read } for
comm=4E444B204D65646961436F6465635F name="dma_heap" dev="tmpfs" ino=369
scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:dmabuf_heap_device:s0 tclass=dir permissive=0
app=com.android.systemui

Test: manual
Bug: 184397788
Change-Id: I84672bc0be5b409cd49080501d0bf3c269ca610c
2021-05-14 05:09:30 +00:00
liuyg
04c85dcfc4 Revert "Allow the MediaProvider app to set FUSE passthrough property"
This reverts commit c1e2918fd9.

Reason for revert: Build broke

Change-Id: I4b95e977cf66c586b0d0b465f1b3654c01074152
2021-05-13 18:18:28 +00:00
Alessio Balsini
c1e2918fd9 Allow the MediaProvider app to set FUSE passthrough property
Allow the MediaProvider app to write the system property
fuse.passthrough.enabled in case FUSE passthrough is enabled.
The need for this additional system property is due to the ScopedStorage
CTS tests that are assuming FUSE passtrhough is always on for devices
supporting it, but there may be some cases (e.g., GSI mixed builds)
where this is not possible true and the feature is disabled at runtime,
thus causing the tests to fail.
This additional system property is only set when FUSE passthrough is
actually being used by the system.

Bug: 186635810
Test: CtsScopedStorageDeviceOnlyTest
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I623042d67399253a9167188c3748d93eb0f2d41f
2021-05-13 17:38:16 +00:00
Nikita Ioffe
4274f98522 Add neverallow rules around who can mount/unmount /apex
Test: m
Bug: 188002184
Change-Id: I8f46896edbee7b68df6f1e3008ff4141df164e4c
2021-05-13 13:05:58 +01:00
Chris Wailes
2e44672a75 Added SELinux context for dalvik.vm.dexopt.thermal-cutoff property
Test: Boot
Bug: 165935246
Change-Id: I266623fab1053ad1e058f041ccbe39880d74b768
2021-05-12 17:23:49 -07:00
Treehugger Robot
965cad9626 Merge "Add sepolicy for com.android.compos" 2021-05-12 15:19:04 +00:00
P.Adarsh Reddy
07dd59ff14 Adding sepolicy testcase for system_ext and product.
Types defined in system_ext/public or product/public
can be referenced by vendor side so it is important
to make sure functionality is not broken across version
bumps. So we are adding the treble sepolicy test cases
for system_ext and product sepolicy.

Bug: 173571515
Change-Id: Ia45979497029f83b1ae6712d2d26ffab263a7f91
2021-05-12 18:14:26 +05:30
Yo Chiang
bb8d0050d9 Merge "Revert "se_compat_cil: Prepend generated files with a header"" 2021-05-12 05:35:51 +00:00
Yo Chiang
7c3ecf1356 Revert "se_compat_cil: Prepend generated files with a header"
This reverts commit b44e506223.

Reason for revert: secilc is fixed by aosp/1701846, so the workaround is no longer needed

Bug: 183362912
Test: S GSI on R CF boot test
Change-Id: Ic73c7cea1ebe42b483049cbc29f192e738748894
2021-05-12 01:54:27 +00:00
Shawn Willden
4361ef2724 Merge "TEMP" 2021-05-11 22:53:43 +00:00
Max Bires
2189a1a447 TEMP
Have system server add keystore2 stacktraces for ANR reporting

Test: ANR something
Bug: 184006658
Change-Id: I75892479cb59a8ae79cb9555b731dce479175aff
2021-05-11 22:52:05 +00:00
Victor Hsieh
7b68126421 Add sepolicy for com.android.compos
This is to unblock the apex setup.

There is only a system_file in the context, but we might need more
specific ones later.

Bug: 186126404
Test: m

Change-Id: Icf713c9bb92e7f7402c0b45bd0f1b06e9cb35d2b
2021-05-11 14:07:57 -07:00
JJ Lee
dcc9b45e3b Add ro.audio.offload_wakelock to audio_config_prop
Add ro.audio.offload_wakelock to audio_config_prop to allow
AudioFlinger to read this property.

Bug: 178789331
Test: build pass, property can be successfully set and read
Signed-off-by: JJ Lee <leejj@google.com>
Change-Id: I4650e03eb0a406b7531c08001adcfebe822bd75b
2021-05-10 14:36:15 +08:00
Xin Li
945c456807 DO NOT MERGE - Mark RQ2A.210105.001 as merged.
Bug: 180401296
Merged-In: Ifbb111dbee0429d8aaea4688c0390ee80e25cb22
Change-Id: I8f6ea01c2aba66ed72afb27f3b21aa1daf83a432
2021-05-07 14:32:31 -07:00
Vova Sharaienko
ad8cf2fe1b Merge "Stats: Marked service as app_api_service" 2021-05-07 16:05:57 +00:00
Inseob Kim
5f831c37f9 Merge "Migrate precompiled sepolicy hashes to Android.bp" 2021-05-06 23:59:18 +00:00
Vova Sharaienko
a96cb4d339 Stats: Marked service as app_api_service
Marked the fwk_stats_service service as app_api_service so that
it can be reached by apps (also means that it's stable)

Bug: 185789914
Test: Build, flash, boot & and logcat | grep "SELinux"
Change-Id: Ifbb111dbee0429d8aaea4688c0390ee80e25cb22
2021-05-06 22:03:47 +00:00
David Anderson
deef325f8f Merge "Allow fastbootd to mount /metadata in recovery." 2021-05-06 17:34:08 +00:00
Treehugger Robot
9395fb4b78 Merge "Add profile saver properties to selinux rules" 2021-05-06 16:01:15 +00:00
Inseob Kim
731182a4a1 Migrate precompiled sepolicy hashes to Android.bp
Bug: 33691272
Test: build with odm and build without odm
Test: boot and see precompiled sepolicy used
Change-Id: Id84cca38f81ba3ecf7480d41a704085c7fff8b87
2021-05-06 11:44:37 +00:00
Nathalie Le Clair
ce32e9bcdb Merge "Add existing ro.hdmi sysprop to sepolicy" 2021-05-06 06:30:30 +00:00
Calin Juravle
4e3599e2f9 Add profile saver properties to selinux rules
Test: manual

Bug: 184714236
Bug: 185979271
Change-Id: I5135e182ba26150cd917ded72d2af72c1c5b15a1
2021-05-05 17:12:22 -07:00
David Anderson
018004d9d1 Allow fastbootd to mount /metadata in recovery.
It is important that fastbootd is able to mount /metadata in recovery, in
order to check whether Virtual A/B snapshots are present. This is
enabled on userdebug builds, but currently fails on user builds.

Fixes:

        audit: type=1400 audit(7258310.023:24): avc:  denied  { mount } for pid=511 comm="fastbootd" name="/" dev="sda15" ino=2 scontext=u:r:fastbootd:s0 tcontext=u:object_r:labeledfs:s0 tclass=filesystem permissive=0

Bug: 181097763
Test: fastboot flash on user build
Change-Id: I1abeeaa3109e08755a1ba44623a46b12d9bfdedc
2021-05-05 16:37:56 -07:00
Hridya Valsaraju
b99176333a Merge "Allow multiple heaps to use the system-secure vendor heap category" 2021-05-05 20:10:50 +00:00
Hridya Valsaraju
f35c70b0dd Merge changes If26ba23d,Ibea38822
* changes:
  Revert "Revert "Exclude vendor_modprobe from debugfs neverallow restrictions""
  Revert "Revert "Add neverallows for debugfs access""
2021-05-05 17:31:35 +00:00
Eric Biggers
740f9b72fa Merge "Allow dumpstate to signal keystore to dump its stack" 2021-05-05 16:16:15 +00:00
Nathalie Le Clair
f696109b23 Add existing ro.hdmi sysprop to sepolicy
Bug: 186998799
Test: make
Change-Id: If99e3c029b992cea5b4af1b4f062d3b19e601df9
2021-05-05 09:06:09 +02:00
Songchun Fan
633f7ca868 [sepolicy] allow system server to read incfs metrics from sysfs
Address denial messages like:

05-05 05:02:21.480  1597  1597 W Binder:1597_12: type=1400 audit(0.0:140): avc: denied { read } for name="reads_delayed_min" dev="sysfs" ino=107358 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

BUG: 184844615
Test: atest android.cts.statsdatom.incremental.AppErrorAtomTests#testAppCrashOnIncremental
Change-Id: I201e27e48a08f99f41a030e06c6f22518294e056
2021-05-04 22:56:41 -07:00
Hridya Valsaraju
498318cc65 Revert "Revert "Exclude vendor_modprobe from debugfs neverallow restrictions""
This reverts commit 231c04b2b9.

Now that b/186727553 is fixed, it should be safe to revert this revert.

Test: build
Bug: 184381659
Change-Id: If26ba23df19e9854a121bbcf10a027c738006515
2021-05-04 22:07:08 -07:00
Hridya Valsaraju
23f9f51fcd Revert "Revert "Add neverallows for debugfs access""
This reverts commit e95e0ec0a5.

Now that b/186727553 is fixed, it should be safe to revert this revert.

Test: build
Bug: 184381659
Change-Id: Ibea3882296db880f5cafe4f9efa36d79a183c8a1
2021-05-04 22:06:46 -07:00
Eric Biggers
f9519a6d3f Allow dumpstate to signal keystore to dump its stack
This is needed to debug hangs in keystore2.

Restricted to debuggable builds for now.

Bug: 186879912
Test: 'adb bugreport', then find the stack traces for keystore2 in the
      "VM TRACES JUST NOW" section of the main bugreport file.
Change-Id: I4434cab7e79cb4aae8bbb2e3a8abff02e0073c13
2021-05-04 21:09:35 -07:00
Lalit Maganti
6c03124c3c Merge "sepolicy: allow traced_probes to access statsd socket" 2021-05-04 19:04:45 +00:00
Treehugger Robot
22c7415dbf Merge "Revert "Revert "Add a neverallow for debugfs mounting""" 2021-05-04 16:58:40 +00:00
Alex Hong
ec6d12f2bf Label the odm_dlkm properties in "odm_dlkm/etc/build.prop"
Test: make selinux_policy
Bug: 185920634
Change-Id: I09eec15a8a2e2b2f64075f148b414bf89f8ebcd6
2021-05-04 16:06:50 +08:00
Hridya Valsaraju
15f0f9234c Give mediatranscoding access to the DMA-BUF system heap
Fixes the following denials:

avc: denied { getattr } for path="/dev/dma_heap/system" dev="tmpfs"
ino=534 scontext=u:r:mediatranscoding:s0
tcontext=u:object_r:dmabuf_system_heap_device:s0 tclass=chr_file
permissive=0

Bug: 185867872
Test: No more DMA-BUF heap related denials from
CtsMediaTranscodingTestCases

Change-Id: I45b57b45e0db996f08b82618dcd085ba0f7e6ef6
2021-05-03 16:49:16 -07:00
Hridya Valsaraju
a2a2d9cbbd Add missing permissions for Cuttlefish to support GSI testing
Once b/186727553 is fixed, booting GSI on cuttlefish will no longer load
cuttlefish's system_ext sepolicy. These domains are all private and
hence the permissions are being added to system/sepolicy to avoid
making them public(especially mediatranscoding that was changed from
public to private in Android S).

Test: build, boot
Change-Id: I4a78030015fff147545bb627c9e62afbd0daa9d7
2021-05-03 16:49:07 -07:00
Hridya Valsaraju
a885dd84c7 Revert "Revert "Add a neverallow for debugfs mounting""
This reverts commit f9dbb72654.
Issues with GSI testing fixed with
https://android-review.googlesource.com/c/platform/build/+/1686425/

Bug: 184381659
Test: manual
Change-Id: Icd07430c606e294dfaad2fc9b37d34e3dae8cbfc
2021-05-02 21:41:53 -07:00
Treehugger Robot
351331b015 Merge "Revert^4 "Build userdebug_plat_sepolicy.cil with Android.bp"" 2021-05-02 23:54:40 +00:00
Shawn Willden
bdc4f744da Merge "Allowing userdebug/eng builds crash dump access to ks" 2021-04-30 22:19:04 +00:00
Max Bires
f09391624a Allowing userdebug/eng builds crash dump access to ks
This will make debugging of keystore issues in dogfood populations much
easier than it previously was, as developers will have detailed crash
dump reporting on any issues that do occur.

Bug: 186868271
Bug: 184006658
Test: crash dumps appear if keystore2 explodes
Change-Id: Ifb36cbf96eb063c9290905178b2fdc5934050b99
2021-04-30 18:50:54 +00:00