Commit graph

22476 commits

Author SHA1 Message Date
Orion Hodson
5527d706c7 Revert "sepolicy: rework ashmem_device permissions"
This reverts commit d9dcea570c.

Reason for revert: http://b/142742451

Change-Id: If46d6dcbb5df21bad8b6a8215d8c21c6b6733476
2019-10-15 21:16:06 +00:00
Orion Hodson
09d9076513 Revert "sepolicy: fix zygote JIT permissions w.r.t. ashmem"
This reverts commit 7120b72a9b.

Reason for revert: http://b/142742451

Change-Id: Ib857e0a56a83c0466b92f944421e3bd11c9279b4
2019-10-15 21:15:44 +00:00
Jeff Vander Stoep
28903d9829 untrusted_app_25: remove access to net.dns properties
Bug: 33308258
Test: build
Test: atest CtsSelinuxTargetSdk25TestCases
Change-Id: I0bd3dc60dd95e9fb621933f45115a42bbcbc2ccc
2019-10-15 21:17:29 +02:00
Tri Vo
12b508258b Merge "bug_map: track mediaswcodec ashmem denial"
am: 0ba37c9e81

Change-Id: I3055aabe3552434fff07c22c4959d5d1970acb00
2019-10-15 10:40:51 -07:00
Tri Vo
0ba37c9e81 Merge "bug_map: track mediaswcodec ashmem denial" 2019-10-15 17:08:43 +00:00
Tri Vo
145130670f bug_map: track mediaswcodec ashmem denial
Bug: 142679232
Test: n/a
Change-Id: Ie6a8e65ad175e2c2ab444381d3b05d0191cc0302
2019-10-15 09:57:55 -07:00
Inseob Kim
a7e339155e Merge "Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW"
am: dfc6975e5a

Change-Id: I7a971421a4d87a99b61e74b6b2ea6397831f57a1
2019-10-14 18:55:45 -07:00
Inseob Kim
dfc6975e5a Merge "Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW" 2019-10-15 01:29:06 +00:00
Henry Fang
b418dd991a Update sepolicy to support cas@1.2
Test: Manual
bug: 141783130
Change-Id: I973cb5d59d74c495eea18f4865baf0bd6f55e2fb
2019-10-14 17:37:17 -07:00
Inseob Kim
ed59c22ffc Add BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW
A new sysprop neverallow rules are mandatory only for devices launching
with R or later. For devices already launched, neverallow rules can be
relaxed with adding following line to BoardConfig.mk:

BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW := true

Bug: 131162102
Test: Set PRODUCT_SHIPPING_API_LEVEL := 30 and try building with
changing some system_public_prop to system_internal_prop
Test: m cts sepolicy_tests

Change-Id: Id978b4d81a8683a57304bb639961105e2d91fa9a
Merged-In: Id978b4d81a8683a57304bb639961105e2d91fa9a
(cherry picked from commit 3be11e7abb)
2019-10-15 09:25:57 +09:00
TreeHugger Robot
36c3ec1493 Merge "DO NOT MERGE - Merge QD1A.190821.011 into stage-aosp-master" into stage-aosp-master 2019-10-15 00:24:17 +00:00
Xin Li
7883f6b3c1 DO NOT MERGE - Merge QD1A.190821.011 into stage-aosp-master
Bug: 141248619
Change-Id: I3186316d366cc7c9fee29cef5d2cd6ef37ff3926
2019-10-14 22:53:21 +00:00
Evgenii Stepanov
7b49c478c8 Merge "Property contexts for ro.sanitize.*"
am: 4d067e8bc7

Change-Id: I3e4c7ae4a785dc3654b8f161f6330d1236e82159
2019-10-14 15:00:49 -07:00
Tri Vo
71f12392e3 sepolicy: build error if non-platform classes present
Error out if we detect that there is a security_classes or
access_vectors file outside of system/sepolicy.

Of course, this test can't enforce any requirements, as it's not part of
CTS. But it can still serve as an early signal.

Fixes: 142153384
Test: add access_vectors to device policy, observe build error
Change-Id: Ib94b7f85e184340de8ec7943c8da88a0af3427e8
2019-10-14 21:49:52 +00:00
Evgenii Stepanov
4d067e8bc7 Merge "Property contexts for ro.sanitize.*" 2019-10-14 21:44:09 +00:00
Tri Vo
337dd27e01 Merge changes from topic "ashmem_sepolicy"
am: bb77532a38

Change-Id: I37a6225e1ab0949fc926cf80df9ed39024aa4677
2019-10-14 13:08:24 -07:00
Tri Vo
4d6e203124 sepolicy: rework ashmem_device permissions
am: d9dcea570c

Change-Id: I4dc8dc1eacdadebac31485a5786881dd41e80c88
2019-10-14 13:08:15 -07:00
Tri Vo
bb77532a38 Merge changes from topic "ashmem_sepolicy"
* changes:
  sepolicy: fix zygote JIT permissions w.r.t. ashmem
  sepolicy: rework ashmem_device permissions
2019-10-14 19:33:24 +00:00
Gavin Corkery
b2f34bfa5a Add label for persist.pm.mock-upgrade
This property is used for testing purposes when verifying the
behavior when an OTA occurs. It should be readable by the
system server, and be settable by the shell.

Test: Set property from shell, read with PackageManager
Bug: 140992644
Change-Id: I39ad9b7961208f02fa45011215c2ff5ac03b7380
2019-10-14 18:09:11 +01:00
atrost
17a18faf63 Add rule for platform_compat_native service.
Bug: 138275545
Test: Call the service from dumpsys.cpp (http://aosp/1142055)
Change-Id: I259ceb5092d2f1d3e2130ea678ee7fb59cf9e6be
2019-10-14 16:22:55 +01:00
Jeff Vander Stoep
a34a5bcc0c Merge "overlayfs: deflake presubmit tests"
am: e1aa506b0d

Change-Id: I816ebe2aaa0687b7dc77d19220e57591f294f265
2019-10-14 04:05:46 -07:00
Treehugger Robot
e1aa506b0d Merge "overlayfs: deflake presubmit tests" 2019-10-14 10:52:53 +00:00
Jeff Vander Stoep
ee036a9fc4 overlayfs: deflake presubmit tests
Bug: 142390309
Test: build
Change-Id: Ibf12d5acba39436cf79b7eb3a1fbadb2296b68c4
2019-10-14 11:20:50 +02:00
Chiachang Wang
e063585bbf Add permission for NetworkStack updatability
NetworkStack will need to use netlink_tcpdiag_socket to get tcp
info. In order to support updatability for NetworkStack as it's
a mainline module, get the information from kernel directly to
reduce the dependecy with framework.

Test: Build and test if NetworkStack can get the tcp_info without
SEPolicy exception
Bug: 136162280

Change-Id: I8f584f27d5ece5e97090fb5fafe8c70c5cbbe123
2019-10-12 21:21:10 +09:00
Evgenii Stepanov
bc9e5f710e Property contexts for ro.sanitize.*
Bug: 142430632
Test: adb shell getprop ro.sanitize.hwaddress in hwasan build

Change-Id: I8e0fa0e6c865d18b94ffbdb6a0dddb1817adb364
2019-10-11 17:00:26 -07:00
Tri Vo
6117855015 sepolicy: support /system_ext and /product mapping files
Install mapping files in SYSTEM_EXT_PRIVATE_POLICY and
PRODUCT_PRIVATE_POLICY into /system_ext and /product respectively.

Bug: 141084341
Test: boot taimen
Test: system mapping files are unchanged
Test: create mapping files in device/google/wahoo/sepolicy/ and check
that they are correctly expanded and installed.
Change-Id: I4d251c957b30a16df71eec47c871e24e5fc773a4
2019-10-11 12:32:12 -07:00
Hai Zhang
9a960fa6ef Add APEX module for permission.
We need an APEX module for permission to reliably roll back runtime
permission state, specifically, platform runtime-permissions.xml will
be moved into the data directory of this APEX and be rolled back when
PermissionController is rolled back.

Bug: 136503238
Test: build
Change-Id: Id3ade3f2f7d31f7badf456d438e01ce0eac964eb
2019-10-11 12:29:35 -07:00
Tao Bao
497cdfc183 Merge "Ignore the denial due to vendor_misc_writer reading DT fstab."
am: 41b4194982

Change-Id: I8057043199e00a279a4425bf98e3121e3ad8de46
2019-10-11 11:36:45 -07:00
Tao Bao
41b4194982 Merge "Ignore the denial due to vendor_misc_writer reading DT fstab." 2019-10-11 18:15:01 +00:00
Suren Baghdasaryan
19a44df5ef Merge "Allow vendor to configure new lmkd properties"
am: 2596545a86

Change-Id: I55a028cc5bb4083fe020688840c98c310e7de437
2019-10-11 07:47:09 -07:00
Suren Baghdasaryan
2596545a86 Merge "Allow vendor to configure new lmkd properties" 2019-10-11 14:30:46 +00:00
Tao Bao
68a88d4c5c Ignore the denial due to vendor_misc_writer reading DT fstab.
This CL addresses the following denial, when vendor_misc_writer tries to
read DT fstab (i.e. device tree fstab) for /misc entry.

avc: denied { search } for comm="misc_writer" name="android" dev="sysfs" ino=17456 scontext=u:r:vendor_misc_writer:s0 tcontext=u:object_r:sysfs_dt_firmware_android:s0 tclass=dir

DT fstab was used for devices shipped prior to Q, for early-mounting
partitions (e.g. /system, /vendor, /product), which has been disallowed
for Q launch devices. vendor_misc_writer is a new module added since Q,
so it doesn't need to worry about the legacy code path; in practice
there's no benefit of putting /misc entry into DT fstab either.

Bug: 134122603
Test: Build and flash taimen with the change that enables
      vendor_misc_writer. Check that it no longer gives the above denial
      during boot.
Change-Id: Id2fb206706f7cd19a4cde2701e4155bfc03f01b4
2019-10-10 22:17:53 -07:00
David Anderson
25e83f480c Merge "Add sepolicy for IBootControl 1.1 and the default HAL."
am: 0fb0781fb6

Change-Id: Id936fdf20f652fe5752fc29d3d1cd236678ce4ad
2019-10-10 12:31:47 -07:00
David Anderson
0fb0781fb6 Merge "Add sepolicy for IBootControl 1.1 and the default HAL." 2019-10-10 19:19:49 +00:00
Suren Baghdasaryan
dc727308ed Allow vendor to configure new lmkd properties
Newly added ro.lmk.psi_partial_stall_ms, ro.lmk.psi_complete_stall_ms,
ro.lmk.thrashing_limit and ro.lmk.thrashing_limit_decay should be
configurable by vendors.

Bug: 132642304
Change-Id: Ifd3513c78e75d77be8d7c3594bef48ea27cc80b3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-10-10 10:11:24 -07:00
Florian Mayer
5e52281372 Allow Java domains to be Perfetto producers.
This is needed to get Java heap graphs.

Test: flash aosp; profile system_server with setenforce 1

Bug: 136210868

Change-Id: I87dffdf28d09e6ce5f706782422510c615521ab3
2019-10-10 10:40:26 +01:00
Jooyung Han
484abd71b4 Merge "Fix file_contexts for flattened apexes"
am: 1ba6df36a9

Change-Id: I8c66b6c52270b518789dcdfdaf7239ee6000050a
2019-10-10 01:58:11 -07:00
Treehugger Robot
1ba6df36a9 Merge "Fix file_contexts for flattened apexes" 2019-10-10 08:41:52 +00:00
Jooyung Han
e2c256cadb Fix file_contexts for flattened apexes
APEX modules can be configured with apex_name and file_contexts
properties.
- apex_name overrides the activation point
  for example, if apex_name is 'foo', it will be flattened under
  /system/apex/foo even if its name is 'bar'.
- file_contexts overrides file_contexts filename
  for example, it file_contexts is 'foo',
  /system/sepolicy/apex/foo-file_contexts should be used even if its
  name is 'bar'.

Previously, file_contexts files for flattened apexes are assumed to have
names like "/system/sepolicy/apex/<apex_name>-file_contexts". But, as
described above, calculating <apex_name> from file entries might be
wrong

Now, it relies on Soong's makevar APEX_FILE_CONTEXTS_INFOS which is list of
<apex_name>:<file_contexts> pairs.

Bug: 123314817
Bug: 142300241
Test: add apex module(foo) with apex_name:bar and file_contexts:baz
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m file_contexts.bin
Test: check intermediate files for file_contexts
Change-Id: I3793c0f01469baaa0ddb1965093a56304a10e99c
2019-10-10 12:51:43 +09:00
Harpreet \"Eli\" Sangha
0d6b2c6c28 Merge "vibrator: Allow Server-to-Client Callbacks"
am: 4eca6c49c8

Change-Id: I67259f7db24a623917171b790a03dc3ed8c2dddf
2019-10-08 18:54:01 -07:00
Treehugger Robot
4eca6c49c8 Merge "vibrator: Allow Server-to-Client Callbacks" 2019-10-09 01:21:23 +00:00
Minchan Kim
3df8036007 Merge "Allow dumpstate to access PSI statistics"
am: ceebbfaba2

Change-Id: Ie0431f1fb523ac12e288c6bfd0d783037a3713b2
2019-10-08 14:55:10 -07:00
Treehugger Robot
ceebbfaba2 Merge "Allow dumpstate to access PSI statistics" 2019-10-08 21:39:11 +00:00
David Anderson
549e3c6d91 Add sepolicy for IBootControl 1.1 and the default HAL.
Bug: 138861550
Test: manual test
Change-Id: Ibc9a55266a2726cb8dc8550be0264db30b66109e
2019-10-08 14:24:38 -07:00
Pete Bentley
26449951ab Merge "Make ro.boringcrypto.hwrand public readable, vendor init settable."
am: 21c0347803

Change-Id: I46cea2b9701ecf12d365ed71d2e38c77bb90ce16
2019-10-08 11:59:28 -07:00
Pete Bentley
21c0347803 Merge "Make ro.boringcrypto.hwrand public readable, vendor init settable." 2019-10-08 18:42:21 +00:00
Tri Vo
7120b72a9b sepolicy: fix zygote JIT permissions w.r.t. ashmem
zygote now allocates JIT memory using libcutils API (aosp/1135101)
instead of going to /dev/ashmem directly, which requires execute
permissions to ashmem_libcutils_device.

Bug: 134434505
Test: boot crosshatch
Change-Id: I0a54d64bd4656fafd2f03701d7828cfa94c08f04
2019-10-08 11:31:46 -07:00
Pete Bentley
aa3aee5f03 Make ro.boringcrypto.hwrand public readable, vendor init settable.
https://boringssl-review.googlesource.com/c/boringssl/+/38024 will
introduce a feature allowing vendors finer grained control over
BoringSSL's random source by setting a system property.

The property needs to be settable from vendor init and readable by all
processes on the device.

As BoringSSL will be in a mainline module, we need to provide a
non-source code way of allowing vendor customisations.

Bug: 142129238
Test: Observe property is settable from /vendor/default.prop and
      readable by non-root, non-vendor processes.

Change-Id: I4c20349f1b2ab2f51ac11ec552b99b1e15b14dd8
2019-10-08 16:42:48 +01:00
Harpreet \"Eli\" Sangha
4b3e0dd957 vibrator: Allow Server-to-Client Callbacks
Test: Manually
Change-Id: I475efc5a7fe4c95408a9c5d1f99feb8d73afd20a
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2019-10-08 11:45:52 +09:00
Tri Vo
d9dcea570c sepolicy: rework ashmem_device permissions
Only allow apps targetting < Q and ephemeral apps to open /dev/ashmem.
Ephemeral apps are not distinguishable based on target API. So allow
ephemeral_app to open /dev/ashmem for compatibility reasons.

For sake of simplicity, allow all domains /dev/ashmem permissions other
than "open". Reason being that once we can remove "open" access
everywhere, we can remove the device altogether along with  other
permission.

Bug: 134434505
Test: boot crosshatch; browse internet, take picture;
no ashmem_device denials
Change-Id: Ib4dddc47fcafb2697795538cdf055f305fa77799
2019-10-07 14:13:35 -07:00