Commit graph

4395 commits

Author SHA1 Message Date
Treehugger Robot
93b9db56aa Merge "app_zygote need access to oem partition" 2019-09-20 12:22:20 +00:00
Andrei Onea
87c885b135 Allow platform signed apps to access platform_compat service
This exception is needed for overriding gated changes in tests.
Bug: 140367850
Test: http://aosp/1113771
Change-Id: I2a76f92fe06c1c759a537dea7539a8899f02b15e
2019-09-13 12:38:37 +01:00
Pete Bentley
aada820069 Revert "SEPolicy: dontaudit attempts to create marker files."
This reverts commit a9b718a1ed.

Reason for revert: No longer be necessary after
http://r.android.com/1120246 lands as this causes BoringSSL to only write
flag files if a particular environment variable is set, and this variable
will only be set for the self test binaries which have permission to
write to /dev/boringssl.

Bug: 140918050
Test: Manually observed audit log after change
Change-Id: I851f4aea991d91c67b64535829eea5b9594a3e2c
2019-09-13 12:25:13 +01:00
Tobias Thierer
a9b718a1ed SEPolicy: dontaudit attempts to create marker files.
Binaries other than boringssl_self_test_exec are not allowed
to create marker files /dev/boringssl/selftest/[hash].

Right now, some processes still attempt to because:
 - Some binaries run so early during early-init that
   boringssl_self_test{32,64} hasn't had a chance to
   run yet, so the marker file doesn't exist yet, so
   the unprivileged process attempts to create it.
 - Some binaries statically link libcrypto so their
   [hash] is different from that used by
   boringssl_self_test{32,64}.

There's some ongoing work to stop those binaries even
attempting to create the marker files but it's not a
big deal if they do. Similarly, there is ongoing work
to minimize or eliminate static linking of this library.

For now, this CL turns off audit logs for this behavior
since it is harmless (a cosmetic issue) and in order to
not hold up the bulk of the logic being submitted.

Bug: 137267623
Test: Treehugger

Change-Id: I3de664c5959efd130f761764fe63515795ea9b98
2019-09-11 19:37:40 +01:00
Henrik Baard
8c94186ca5 app_zygote need access to oem partition
app_zygote used by for example Google Chrome needs access
to at least search /oem partition.

Google chrome version: 76.0.3809.132 is running in app_zygote
and the following access is blocked by selinux causing Chrome
to hang.

avc:  denied  { search } for  pid=813 comm="d.chrome_zygote"
name="/" dev="sda42" ino=2 scontext=u:r:app_zygote:s0:c214,c256,c512,c768
tcontext=u:object_r:oemfs:s0 tclass=dir permissive=0 ppid=798
pcomm="d.chrome_zygote" pgid=798 pgcomm="d.chrome_zygote"

Change-Id: Idcce1a5ad1a8be3d7bd057c12ec477baa9669235
2019-09-11 13:31:12 +02:00
David Anderson
ff8cd0bee9 Merge "Give dumpstate access to run lpdump." 2019-09-10 21:36:39 +00:00
Treehugger Robot
535d297a5f Merge "Root of /data belongs to init (re-landing)" 2019-09-10 04:14:17 +00:00
David Anderson
dc2a7873bd Give dumpstate access to run lpdump.
Bug: 140204341
Test: adb bugreport
Change-Id: I33e544dfced7589e995223cc88084f2849efe18b
2019-09-09 17:33:20 -07:00
Treehugger Robot
aa31e64e83 Merge "Access to HALs from untrusted apps is blacklist-based" 2019-09-10 00:22:07 +00:00
Paul Crowley
aed0f76ee9 Root of /data belongs to init (re-landing)
Give /data itself a different label to its contents, to ensure that
only init creates files and directories there.

This change originally landed as aosp/1106014 and was reverted in
aosp/1116238 to fix b/140402208. aosp/1116298 fixes the underlying
problem, and with that we can re-land this change.

Bug: 139190159
Bug: 140402208
Test: aosp boots, logs look good
Change-Id: I1a366c577a0fff307ca366a6844231bcf8afe3bf
2019-09-09 14:42:01 -07:00
Tobias Thierer
6b0bd4e1a1 Tweak boringssl_self_test.te
Include coredomain in initial definition of boringssl_self_test
rather than adding it later. This addresses an outstanding review
comment from http://r.android.com/1110523

Test: Treehugger
Bug: 137267623
Change-Id: I4e8d4e2e76b1c3a9b5a1f806e43e885b51cb7a60
2019-09-07 16:52:15 -07:00
Tobias Thierer
02924043e3 Merge "SEPolicy for boringssl_self_test." 2019-09-07 23:46:00 +00:00
Treehugger Robot
9aa263055b Merge "Revert "Root of /data belongs to init"" 2019-09-06 23:13:48 +00:00
Paul Crowley
d98e311952 Revert "Root of /data belongs to init"
This reverts commit 206b6535f1.

Reason for revert: Droidfood is blocked
Bug: 140402208
Change-Id: I1d1eb014747ba5c5bb656342e53b8c4e434878d1
2019-09-06 19:59:17 +00:00
Jiyong Park
e95c704b6f Access to HALs from untrusted apps is blacklist-based
Before this change, access to HALs from untrusted apps was prohibited
except for the whitelisted ones like the gralloc HAL, the renderscript
HAL, etc. As a result, any HAL that is added by partners can't be
accessed from apps. This sometimes is a big restriction for them when
they want to access their own HALs in the same-process HALs running in
apps. Although this is a vendor-to-vendor communication and thus is not
a Treble violation, that was not allowed because their HALs are not in
the whitelist in AOSP.

This change fixes the problem by doing the access control in the
opposite way; access to HALs are restricted only for the blacklisted
ones.

All the hwservice context that were not in the whitelist are now put
to blacklist.

This change also removes the neverallow rule for the binder access to
the halserverdomain types. This is not needed as the protected
hwservices living in the HAL processes are already not accessible; we
have a neverallow rule for preventing hwservice_manager from finding
those protected hwservices from untrusted apps.

Bug: 139645938
Test: m

Merged-In: I1e63c11143f56217eeec05e2288ae7c91e5fe585
(cherry picked from commit 580375c923)

Change-Id: I4e611091a315ca90e3c181f77dd6a5f61d3a6468
2019-09-06 14:10:38 +09:00
Martin Stjernholm
d7951d2647 Rename the context for the ART APEX.
Test: Boot (with default flattened APEXes)
Bug: 135753770
Change-Id: I551e88a250d3bd891f63a6bccee0682d0d0de7cf
2019-09-05 19:49:05 +01:00
Treehugger Robot
e0ecf49c38 Merge "system_app: neverallow /data/local/tmp access" 2019-09-05 18:38:00 +00:00
Xin Li
b40c2adaad Merge "DO NOT MERGE - Merge Android 10 into master" 2019-09-05 16:53:31 +00:00
Nick Kralevich
6e893ec1fe system_app: neverallow /data/local/tmp access
/data/local/tmp is an attacker controlled location which system_apps
should not be depending on. system_apps should only depend on files in
their home directory and files passed to them by file descriptor. To
support this best practice, neverallow access to /data/local/tmp. This
adds a compile time assertion and CTS test to assert that this rule is
never present.

This is conceptually a tightening of already defined neverallow rules in
domain.te. The existing neverallow assertions exclude appdomain, which
is too broad:

  neverallow {
    domain
    -adbd
    -appdomain
    -dumpstate
    -init
    -installd
    -simpleperf_app_runner
    -system_server # why?
    userdebug_or_eng(`-uncrypt')
  } shell_data_file:dir { open search };

  # Same as above for /data/local/tmp files. We allow shell files
  # to be passed around by file descriptor, but not directly opened.
  neverallow {
    domain
    -adbd
    -appdomain
    -dumpstate
    -installd
    userdebug_or_eng(`-uncrypt')
  } shell_data_file:file open;

Test: compiles
Change-Id: Ib7178e2b9d5a41c03837a535f7db5eaf10319aac
2019-09-05 09:24:41 -07:00
Hector Dearman
b56a49d979 Allow adb forward to traced consumer socket
Currently shell can connect to the traced_consumer_socket allowing it to
configure/start/stop and collect traces. This allows a host tool (e.g. Android Studio or
https://ui.perfetto.dev) to connect to the device via adb and collect traces. It would
be better if rather than executing shell commands the host tool could directly communicate
with the consumer socket. This is possible using adb forward:

adb forward tcp:9903 localfilesystem:/dev/socket/traced_consumer

However in this case adbd is connecting to the socket - not shell.

This CL allows adbd to connect to the socket which allows host tools to collect
traces without having to do everything though shell commands.

Denial:
08-30 11:28:05.809 10254 10254 W adbd    : type=1400 audit(0.0:1129): avc: denied { write } for name="traced_consumer" dev="tmpfs" ino=6719 scontext=u:r:adbd:s0 tcontext=u:object_r:traced_consumer_socket:s0 tclass=sock_file permissive=0

Test: Cherry pick CL to master, make, flash
adb logcat | grep denied
adb forward tcp:9903 localfilesystem:/dev/socket/traced_consumer

Bug: b/139536756
Change-Id: Ie08e687c0b06d0e1121009e8cd70319a8f907ae2
2019-09-05 10:12:47 +00:00
Tobias Thierer
353ad0fd47 SEPolicy for boringssl_self_test.
This CL adds hand-written SELinux rules to:
 - define the boringssl_self_test security domain
 - label the corresponding files at type boringssl_self_test_marker
   and boringssl_self_test_exec.
 - define an automatic transition from init to boringssl_self_test
   domains, plus appropriate access permissions.

Bug: 137267623
Test: When run together with the other changes from draft CL topic
      http://aosp/q/topic:bug137267623_bsslselftest, check that:
      - both /dev/boringssl/selftest/* marker files are
        present after the device boots.
      - Test: after the boringssl_self_test{32,64} binaries have
        run, no further SELinux denials occur for processes
        trying to write the marker file.

Change-Id: I77de0bccdd8c1e22c354d8ea146e363f4af7e36f
2019-09-05 02:40:57 +01:00
Martin Stjernholm
58e4384286 Split off ART rules for new ART APEX.
am: f6bd00af8b

Change-Id: If6e89c44c3e4429eed0f593e7a225f1a6f8e1d80
2019-09-02 03:46:11 -07:00
Martin Stjernholm
f6bd00af8b Split off ART rules for new ART APEX.
Test: Build & boot
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: Iab56f6b5bb7a59fbeaad214a64fbd959060574f4
Merged-In: Iab56f6b5bb7a59fbeaad214a64fbd959060574f4
2019-08-30 17:47:31 +01:00
Paul Crowley
e9465fceb6 Merge "Root of /data belongs to init"
am: b935b6c664

Change-Id: I39a36ec663c98ac55be886e886da4afbf34e9cf2
2019-08-29 23:10:42 -07:00
Paul Crowley
b935b6c664 Merge "Root of /data belongs to init" 2019-08-30 05:23:12 +00:00
Paul Crowley
206b6535f1 Root of /data belongs to init
Give /data itself a different label to its contents, to ensure that
only init creates files and directories there.

Bug: 139190159
Test: aosp boots, logs look good
Change-Id: I3ee654a928bdab3f5d435ab6ac24040d9bdd9abe
2019-08-29 15:08:21 -07:00
Victor Hsieh
0a0e46fa4a Merge "sepolicy: dontaudit cap_sys_admin on userdebug/eng"
am: 845e04ba73

Change-Id: I6a0e797dda80e90a1b0983bac49c012c50389d16
2019-08-29 12:01:26 -07:00
Treehugger Robot
845e04ba73 Merge "sepolicy: dontaudit cap_sys_admin on userdebug/eng" 2019-08-29 18:40:40 +00:00
Victor Hsieh
b7f2f0b878 sepolicy: dontaudit cap_sys_admin on userdebug/eng
When fsverity_init tries to access files in /system or /product
partition AFTER adb remount, SELinux denial is generated:

avc: denied { sys_admin } for capability=21
scontext=u:r:fsverity_init:s0 tcontext=u:r:fsverity_init:s0
tclass=capability permissive=0

This is due to some internal access to an xattr inside overlayfs, but it
should not report this.

Before the message can be surpressed, dontaudit it to keep the log clean.

Test: no more error log
Bug: 132323675
Change-Id: I323c9330ee6e6b897d1a4e1e74f6e7e0ef1eaa89
2019-08-29 09:39:31 -07:00
Steven Moreland
b27a746f50 Merge "Remove vintf_service."
am: cacefc6a78

Change-Id: Id30138a0955dc7883d83daa2b655a06efebcaaf7
2019-08-28 19:15:40 -07:00
Treehugger Robot
cacefc6a78 Merge "Remove vintf_service." 2019-08-29 01:58:04 +00:00
Paul Crowley
1fc44958bd Merge "Move layout_version to /data/misc/installd"
am: 7f9c607b4f

Change-Id: I05c2ba0b7f2f44c72bb6c6eba16a4ab385c15939
2019-08-28 13:35:17 -07:00
Paul Crowley
7f9c607b4f Merge "Move layout_version to /data/misc/installd" 2019-08-28 19:56:15 +00:00
Steven Moreland
4bb0a9802a Remove vintf_service.
The only distinction that matters for security is if a service is
served by vendor or not AND which process is allowed to talk to which.

coredomain is allowed to talk to vintf_service OR vendor_service, it's
just that for a non-@VintfStability service user-defined APIs (as
opposed to pingBinder/dump) are restricted.

Bug: 136027762
Test: N/A
Change-Id: If3b047d65ed65e9ee7f9dc69a21b7e23813a7789
2019-08-28 11:32:25 -07:00
Eric Holk
9672823f2a Merge "Give map permission to viewcompiler"
am: ac74f62cd5

Change-Id: I56450ae13fff2e6a4a12af2a30af2629a2278a78
2019-08-28 07:41:59 -07:00
Treehugger Robot
ac74f62cd5 Merge "Give map permission to viewcompiler" 2019-08-28 14:27:36 +00:00
Nick Kralevich
c057561d79 Merge "update sepolicy for fs notification hooks"
am: 7981b230b0

Change-Id: I8f4deb640eb058176342ae71918e2e5b4e8633c3
2019-08-28 03:59:45 -07:00
Nick Kralevich
dddbaaf1e8 update sepolicy for fs notification hooks
Update access_vectors and global_macros to account for the changes in
kernel commit
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ac5656d8a4cdd93cd2c74355ed12e5617817e0e7

This change is needed to allow Android to boot on linux-next

Test: compiles
Change-Id: I35c59fc50fa9c94ab94399ce74d637e49d38129d
2019-08-27 15:31:59 -07:00
Paul Crowley
d1ff87530c Move change from ag/7565384 aside
Commit I35d35016680379e3a9363408704ee890a78a9748 is not yet in AOSP
and is causing a merge conflict with my change aosp/1105757.
Move the lines causing the conflict elsewhere.

Bug: 1105489
Test: treehugger
Cherrypicked-From: 1da93c9f32
Merged-In: I35dca026e40c9e2f89b831395db3958e399bfbb7
Change-Id: I35dca026e40c9e2f89b831395db3958e399bfbb7
2019-08-27 17:55:07 +00:00
Eric Holk
04ee9fb1b2 Give map permission to viewcompiler
On cuttlefish devices, the resource loading code apparently maps the file rather
than just reading it.

Denial log:

viewcompiler: type=1400 audit(0.0:308): avc: denied { map } for
path="/data/app/android.startop.test-Z2JxVhtKPw2wx4o-nmo5NA==/base.apk"
dev="vdb" ino=139269 scontext=u:r:viewcompiler:s0
tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=0
app=android.startop.test

Bug: 139018973
Change-Id: I4bbbc44abc3c4315137f76a0be737236cf10f4ef
2019-08-27 10:43:55 -07:00
Treehugger Robot
c7b1be7d4c Merge "Remove mediacodec_service." 2019-08-26 21:32:47 +00:00
TreeHugger Robot
f836f1a700 Merge "DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master" into stage-aosp-master 2019-08-24 06:48:47 +00:00
Steven Moreland
2092764024 Merge "Remove mediacodec_service." into stage-aosp-master 2019-08-23 17:33:44 +00:00
Xin Li
65227a4be7 DO NOT MERGE - Merge build QP1A.190711.019 into stage-aosp-master
Bug: 139893257
Change-Id: I4a36357883efe369754e3ec08541e05f847b28ce
2019-08-23 06:45:27 +00:00
Steven Moreland
88fedc2159 Merge "Reland "Re-open /dev/binder access to all.""
am: aa6793febd

Change-Id: I34360631751c98aab0c34fff9bdcdbae02c52297
2019-08-22 16:15:59 -07:00
Steven Moreland
aa6793febd Merge "Reland "Re-open /dev/binder access to all."" 2019-08-22 22:55:04 +00:00
Tri Vo
b5a4640f65 selinux: remove sysfs_mac_address
am: f1e71dc75c

Change-Id: I0bed37692eed895d8bad9af9ea4e507a6dc4f50f
2019-08-22 03:14:30 -07:00
Mike Ma
62dc9488a7 Allow dumpstate to call incident CLI
Instead of relying on the regular iteration through the system
services inside dumpstate, dumpstate now uses a dedicated incident CLI
to capture incident report. This patch makes required SELinux changes
to make it happen.

Bug: 137493082
Test: Manually takes a bugreport from command line, power button, and
      BetterBug. Verifies /proto/incident_report.proto exists in the
      zip file, and no unintended avc denial.

Change-Id: I0d93b015b7a9d32db4f3bf10d1c25e5a3ca04e48
2019-08-21 16:10:39 -07:00
Tri Vo
f1e71dc75c selinux: remove sysfs_mac_address
Nothing is actually labeled as 'sysfs_mac_address'.

Bug: 137816564
Test: m selinux_policy
Change-Id: I2d7e71ecb3a2b4ed76c13eb05ecac3064c1bc469
2019-08-21 13:07:09 -07:00
Paul Crowley
04023ade9a Move layout_version to /data/misc/installd
Bug: 139543295
Test: Boot, ensure file is properly created
Change-Id: I577b25bcf61505970b153884d8ac3567957bb50a
2019-08-21 10:11:35 -07:00
Maciej enczykowski
8f5e8e5b82 Do not allow untrusted apps to read sysfs_net files
am: 804d99ac76

Change-Id: I9be056dbdc7146857737bb6847fe51b90702a874
2019-08-20 23:25:28 -07:00
Steven Moreland
d181bc2c16 Remove mediacodec_service.
Since this service no longer exists.

Fix: 80317992
Test: TH, codesearch.
Change-Id: I257c8cc3dba657d98f19eb61b36aae147afea393
2019-08-21 01:19:20 +00:00
Steven Moreland
8a7bed9e1e Remove mediacodec_service.
Since this service no longer exists.

Fix: 80317992
Test: TH, codesearch.
Merged-In: I257c8cc3dba657d98f19eb61b36aae147afea393
Change-Id: I257c8cc3dba657d98f19eb61b36aae147afea393
2019-08-21 01:14:15 +00:00
Maciej Żenczykowski
804d99ac76 Do not allow untrusted apps to read sysfs_net files
(this includes /sys/class/net/*/address device mac addresses)

Test: builds
Bug: 137816564
Change-Id: I84268b2e0207559ed00baafb8a3f231c676f8df1
Signed-off-by: Maciej Żenczykowski <maze@google.com>
2019-08-20 16:09:46 -07:00
Steven Moreland
b75b047f44 Reland "Re-open /dev/binder access to all."
This reverts commit 6b2eaade82.

Reason for revert: reland original CL

Separate runtime infrastructure now makes sure that only Stable AIDL
interfaces are used system<->vendor.

Bug: 136027762
Change-Id: Id5ba44c36a724e2721617de721f7cffbd3b1d7b6
Test: boot device, use /dev/binder from vendor
2019-08-20 16:03:37 -07:00
Steven Moreland
db28fe2381 Revert "Re-open /dev/binder access to all."
am: 6b2eaade82

Change-Id: Ic2d53641d0cebee31be81307d7a31809fa326f2d
2019-08-20 15:55:40 -07:00
Steven Moreland
6b2eaade82 Revert "Re-open /dev/binder access to all."
This reverts commit 94ff361501.

Fix: 139759536
Test: marlin build fixed

Change-Id: I3ea2e29896722a80b22f09c405be205ffb7de6b2
2019-08-20 22:39:43 +00:00
Steven Moreland
169bfcfe88 Merge changes Icdf207c5,I20aa48ef
am: 30a06d278f

Change-Id: Ia505b1539cfd64bb93c2f5fe0dbd0603df5e9f5f
2019-08-20 13:41:45 -07:00
Steven Moreland
30a06d278f Merge changes Icdf207c5,I20aa48ef
* changes:
  Re-open /dev/binder access to all.
  mediacodec: remove non-Treble allows
2019-08-20 19:50:24 +00:00
Steven Moreland
94ff361501 Re-open /dev/binder access to all.
Separate runtime infrastructure now makes sure that only Stable AIDL
interfaces are used system<->vendor.

Bug: 136027762
Test: boot device, use /dev/binder from vendor
Change-Id: Icdf207c5d5a4ef769c0ca6582dc58306f65be67e
2019-08-20 00:03:34 +00:00
Steven Moreland
dbfbddbf0e Merge "Add uce service to core policy." into stage-aosp-master 2019-08-19 21:38:00 +00:00
Roland Levillain
2d47c5da94 Allow dexoptanalyzer to mmap files with Linux 4.14+ that it can already access.
am: c72b7d1731

Change-Id: I39667ccca82601ef1afa3d38df0d184c73edc87b
2019-08-19 13:52:23 -07:00
Steven Moreland
20414effb6 Add uce service to core policy.
This service is requested by AOSP framework, but there is no context for
it defined.

Bug: 136023468
Test: N/A
Change-Id: Ibc5b048aaa1c9eda7b9180caca92cb876c3f6b28
Merged-In: Ibc5b048aaa1c9eda7b9180caca92cb876c3f6b28
(cherry picked from commit 67cb30fabf)
2019-08-19 12:42:56 -07:00
Steven Moreland
92f72cd22d Add uce service to core policy.
This service is requested by AOSP framework, but there is no context for
it defined.

Bug: 136023468
Test: N/A
Change-Id: Ibc5b048aaa1c9eda7b9180caca92cb876c3f6b28
Merged-In: Ibc5b048aaa1c9eda7b9180caca92cb876c3f6b28
(cherry picked from commit 67cb30fabf)
2019-08-19 12:29:39 -07:00
Roland Levillain
c72b7d1731 Allow dexoptanalyzer to mmap files with Linux 4.14+ that it can already access.
SELinux has a separate file mmap permission in 4.14+ kernels. Add this
to dexoptanalyzer(d) in cases where it could already access files (in
particular, secondary dex files).

Addresses denials of the form:

  avc: denied { map } for […] path="/data/data/[…]" […]
  scontext=u:r:dexoptanalyzer:s0 tcontext=u:object_r:app_data_file:s0

Test: Reproduce steps in bug 138683603 on a device with a 4.14+ kernel
      and check the absence of SELinux denials
Bug: 138683603

Change-Id: Ieba53eb431c0ba3914dcb5e5abdae667bd063555
2019-08-16 20:02:32 +01:00
Amy Zhang
3b62596f4f Merge "Tuner Hal 1.0 Enable ITuner service"
am: 3e7429359f

Change-Id: Ic4442460d60d51e97c84ea430830cd12c205e5f6
2019-08-15 13:23:33 -07:00
Amy Zhang
3e7429359f Merge "Tuner Hal 1.0 Enable ITuner service" 2019-08-15 18:04:05 +00:00
Remi NGUYEN VAN
b65731efb8 Merge "Add MAINLINE_SEPOLICY_DEV_CERTIFICATES to keys.conf"
am: 1fc3f318bf

Change-Id: I434639e3c40d5d0f5e3a8218891c7f173a44bd9b
2019-08-15 01:11:27 -07:00
Treehugger Robot
1fc3f318bf Merge "Add MAINLINE_SEPOLICY_DEV_CERTIFICATES to keys.conf" 2019-08-15 07:43:46 +00:00
Amy
89b4bbd4d8 Tuner Hal 1.0 Enable ITuner service
Test: cuttlefish
Bug: 135708935
Change-Id: Ica063458860df45f0e2ab640a2ab35cd4da3da8e
2019-08-14 11:22:09 -07:00
Kiyoung Kim
039549102c Merge changes from topic "use_generated_linkerconfig"
am: aff00188eb

Change-Id: I82225595e27aee8677c94d6a713d6ef5a195e2d7
2019-08-14 02:47:24 -07:00
Kiyoung Kim
98d2042b00 Add more permission for linkerconfig
am: 70e931caba

Change-Id: I734adf5a17214c895a3799cf04bdabb8dbf53039
2019-08-14 02:47:20 -07:00
Kiyoung Kim
aff00188eb Merge changes from topic "use_generated_linkerconfig"
* changes:
  Define sepolicy with property for linker
  Add more permission for linkerconfig
2019-08-14 09:28:23 +00:00
Kiyoung Kim
82c87ede24 Define sepolicy with property for linker
To support linker-specific property, sys.linker.* has been defined as
linker_prop. This will have get_prop access from domain so all binaries
can start with linker using proper property access level.

Bug: 138920271
Test: m -j && Confirmed from cuttlefish that get_prop errors are no longer found
Change-Id: Iaf584e0cbdd5bca3d5667e93cf9a6401e757a314
2019-08-14 12:35:15 +09:00
Carmen Jackson
5860205f67 Allow Traceur to record the suspend_resume trace event
am: 1e414b5355

Change-Id: I32de6f61520474f1cb9895e416ba409847082e6d
2019-08-13 01:13:23 -07:00
Carmen Jackson
1e414b5355 Allow Traceur to record the suspend_resume trace event
This should be available in user and userdebug builds.

Bug: 137289935
Test: Alongside atrace changes, recorded a trace using Traceur and
verified that the tracepoints were included in the recorded trace in
both user and userdebug builds.

Change-Id: I6131557bdd0a298be9e75b39759599b189b9b988
2019-08-09 10:56:15 -07:00
Kiyoung Kim
70e931caba Add more permission for linkerconfig
Additional permission is required for linkerconfig from domain to get
access to ld.config.txt file from linker. This change allows linker to
get /dev/linkerconfig/ld.config.txt

Bug: 138920271
Test: m -j && confirmed from cuttlefish
Change-Id: Id130a072add8ae82840b0b4d9e997e146f502124
2019-08-08 17:18:21 +09:00
Zim
cf289bc411 Allow MediaProvider to host FUSE devices.
am: b56cc6fb1f

Change-Id: Id6909432f50669e4450e6c9fa9de8cc1a8164b08
2019-08-07 19:28:53 -07:00
Zim
b56cc6fb1f Allow MediaProvider to host FUSE devices.
This change is part of enabling upcoming platform changes that are
described in the bug linked below.

Bug: 135341433
Test: m
Change-Id: I6ef499b0d5aa403f8eb6699649a201d8cc004bc5
2019-08-07 19:00:15 +01:00
Roland Levillain
3639c5dce7 Merge "Fix lock logspam for dexoptanalyzer."
am: d1936ac945

Change-Id: I6aae107f5234b1647c3822b581e1fd446c77bd99
2019-08-07 04:20:48 -07:00
Roland Levillain
d1936ac945 Merge "Fix lock logspam for dexoptanalyzer." 2019-08-07 10:35:39 +00:00
Remi NGUYEN VAN
bd3ab0278b Add MAINLINE_SEPOLICY_DEV_CERTIFICATES to keys.conf
DEFAULT_SYSTEM_DEV_CERTIFICATE is not appropriate as some OEMs may need
to change only the certificates used to generate
plat_mac_permissions.xml for mainline modules.

Test: m, checked output plat_mac_permissions.xml
Bug: 138097611
Bug: 134995443
Change-Id: Ie19130a243db043f432039c54c379f06e60ab6c6
2019-08-07 18:23:47 +09:00
Yifan Hong
92a0aa60b6 Merge "Allow update_engine to read virtual ab feature flag."
am: bfac74272a

Change-Id: I23968213768ee6fb5f2bab8e6238bee741011c11
2019-08-06 18:22:30 -07:00
Yifan Hong
bfac74272a Merge "Allow update_engine to read virtual ab feature flag." 2019-08-07 01:01:14 +00:00
Jon Spivack
74881bda63 Merge "Allow servicemanager to start processes"
am: 5fa2d8071b

Change-Id: I233ec0b00a442ca435944eac6a50bd22393722b4
2019-08-06 15:04:38 -07:00
Jon Spivack
5fa2d8071b Merge "Allow servicemanager to start processes" 2019-08-06 21:12:07 +00:00
Roland Levillain
47c7f84a20 Fix lock logspam for dexoptanalyzer.
Allow dexoptanalyzer(d) to lock `system_file` files, so that it can
lock `/system/framework/$ISA/*.art` files (which is harmless as these
files live in a read-only partition, but admittedly simplifies the
corresponding logic in ART).

Addresses denials of the form:

  avc: denied { lock } for path="/system/framework/arm/boot.art"
  dev="dm-0" ino=1330 scontext=u:r:dexoptanalyzer:s0
  tcontext=u:object_r:system_file:s0 tclass=file permissive=0 […]

Test: Reproduce steps in bug 138683603 and check the absence of SELinux denials
Bug: 138683603
Change-Id: I8a08822b4908b3b37bd0e450dd1356ed92332327
2019-08-06 14:51:01 +01:00
Yifan Hong
20010d199b Allow update_engine to read virtual ab feature flag.
Test: adb shell getprop -Z [the two flags]
Bug: 135752105

Change-Id: I3e0372e969ea0161787c32560a8c40fed2953619
2019-08-05 14:32:15 -07:00
Daniel Norman
ee5547dca8 Merge "Adds new policy for init_svc_debug_prop."
am: 95c9b61d3c

Change-Id: I866f58e08fd58226d209f15e8ea341cbd5c53261
2019-08-02 15:21:59 -07:00
Daniel Norman
95c9b61d3c Merge "Adds new policy for init_svc_debug_prop." 2019-08-02 21:51:17 +00:00
Tri Vo
a2da94ca2b Merge "system_suspend: remove /sys/power/wake_lock permissions"
am: 1e5524eb30

Change-Id: I243275e535d93887263ca4d93dd2e0e01d9c669c
2019-08-02 11:26:39 -07:00
Tri Vo
1e5524eb30 Merge "system_suspend: remove /sys/power/wake_lock permissions" 2019-08-02 17:44:04 +00:00
Daniel Norman
4eca819483 Adds new policy for init_svc_debug_prop.
Used to restrict properties init.svc_debug_pid.*

Bug: 138114550
Test: getprop | grep init.svc_debug_pid  only shows results on root
Change-Id: I0c10699deec4c548a2463a934e96b897ddee1678
2019-08-02 10:27:15 -07:00
Tri Vo
f517b7a5fd Merge "Label /product/lib(64)/* as system_lib_file"
am: 2765c29bef

Change-Id: I82ba26300d444ab3a31b4fd7f0ac5907d8da7060
2019-08-02 00:28:10 -07:00
Treehugger Robot
2765c29bef Merge "Label /product/lib(64)/* as system_lib_file" 2019-08-02 07:01:39 +00:00
Tomasz Wasilczyk
0540154021 SEPolicy rules for CAN bus HAL
am: 602b30302a

Change-Id: I5ae916b8f4c3d6038c48a522df1efc2ce8fc3d39
2019-08-01 19:34:47 -07:00
Jon Spivack
839e3db7c7 Allow servicemanager to start processes
Used to lazily start AIDL services.

Bug: 138756857
Test: Manual (using mediaextractor as a test service)
Change-Id: Ia1f2c10072e42d8917985c38500be0955f98b8eb
2019-08-02 00:23:16 +00:00
Tomasz Wasilczyk
602b30302a SEPolicy rules for CAN bus HAL
Bug: 135918744
Test: VTS (separate new change)
Change-Id: Idd3ca882e3bd36b95a5412bdfbf6fe9d6e911ba9
2019-08-01 10:24:00 -07:00
Tri Vo
3d58603623 Label /product/lib(64)/* as system_lib_file
Bug: 138545724
Test: n/a
Change-Id: Ic707229a04c2484503154110c45f4acb5ff61bd5
2019-07-29 12:39:10 -07:00
Tri Vo
5a5266e74c system_suspend: remove /sys/power/wake_lock permissions
Now that our tools are routed to system_suspend, there is no reason for
system_suspend to write to /sys/power/wake_[un]lock.

Bug: 128923994
Bug: 115946999
Test: boot blueline, no denials from system_suspend
Change-Id: I1097d30c050ce7d88677e07f4aaef07ce78dc958
2019-07-26 11:13:05 -07:00