Commit graph

17712 commits

Author SHA1 Message Date
Jeff Vander Stoep
6742ab4e4e iorapd: add tmpfs type
Fixes build breakage:
system/sepolicy/private/traced.te:36:ERROR 'unknown type iorapd_tmpfs' at token ';' on line 43166:

Bug: 123445058
Test: build marlin-userdebug
Change-Id: Iefeba03ed2efee92fb0d61214514338c6d999bd1
(cherry picked from commit 426ff11951)
2019-01-26 12:55:13 -08:00
Jeffrey Vander Stoep
33f3e04705 Merge "runtime_event_log_tags_file: dontaudit map permission"
am: 0e48c3bcdd

Change-Id: I9738e6e1feb10063e4485074b105780dedabfd24
2019-01-26 09:35:43 -08:00
Jeff Vander Stoep
41a2abfc0d Properly Treble-ize tmpfs access
This is being done in preparation for the migration from ashmem to
memfd. In order for tmpfs objects to be usable across the Treble
boundary, they need to be declared in public policy whereas, they're
currently all declared in private policy as part of the
tmpfs_domain() macro. Remove the type declaration from the
macro, and remove tmpfs_domain() from the init_daemon_domain() macro
to avoid having to declare the *_tmpfs types for all init launched
domains. tmpfs is mostly used by apps and the media frameworks.

Bug: 122854450
Test: Boot Taimen and blueline. Watch videos, make phone calls, browse
internet, send text, install angry birds...play angry birds, keep
playing angry birds...

Change-Id: I20a47d2bb22e61b16187015c7bc7ca10accf6358
Merged-In: I20a47d2bb22e61b16187015c7bc7ca10accf6358
(cherry picked from commit e16fb9109c)
2019-01-26 17:30:41 +00:00
Jeffrey Vander Stoep
0e48c3bcdd Merge "runtime_event_log_tags_file: dontaudit map permission" 2019-01-26 17:28:51 +00:00
Jeff Vander Stoep
929cf94b31 Merge "Require equivalence for mls restrictions on symlinks"
am: 1934af2cf2

Change-Id: I0e4f7f42daf7d625e1168385af9f6e17940b97ea
2019-01-25 22:35:22 -08:00
Primiano Tucci
a1150133af Merge "Allow iorapd to access perfetto"
am: 3698256b63

Change-Id: I6f91ac68da4ef21f9be0a3efaa5a747b0ff6296e
2019-01-25 22:31:22 -08:00
Treehugger Robot
1934af2cf2 Merge "Require equivalence for mls restrictions on symlinks" 2019-01-26 06:30:46 +00:00
Treehugger Robot
3698256b63 Merge "Allow iorapd to access perfetto" 2019-01-26 06:18:32 +00:00
Victor Hsieh
3b3843f048 Merge "Allow system_server to search su:key in debuggable build"
am: 565cbe2140

Change-Id: Iad7e8e7a291a9391a7581295b762ea80f13b9a76
2019-01-25 21:51:08 -08:00
Treehugger Robot
565cbe2140 Merge "Allow system_server to search su:key in debuggable build" 2019-01-26 05:36:28 +00:00
Jiyong Park
92e81ee4ca Merge "Don't audit access for postinstall_mnt_dir"
am: 527d215ca0

Change-Id: Icb90f19154e1fc1ad58164d25f9958f4183c48db
2019-01-25 14:51:11 -08:00
Treehugger Robot
527d215ca0 Merge "Don't audit access for postinstall_mnt_dir" 2019-01-25 22:41:50 +00:00
Tri Vo
9ae82c2b10 Merge "sepolicy: refactor Android.mk"
am: 7d8146bc8a

Change-Id: I9eada04b1df3fa7ea238e983bb0961d957623b88
2019-01-25 14:19:15 -08:00
Tri Vo
7d8146bc8a Merge "sepolicy: refactor Android.mk" 2019-01-25 22:12:00 +00:00
Victor Hsieh
a8b2bc47ec Allow system_server to search su:key in debuggable build
Test: successful fs-verity setup with key loaded from shell
Bug: 112037636
Change-Id: Ide01d11f309008fffeafdedb517508db94472873
2019-01-25 12:59:29 -08:00
Jeff Vander Stoep
bed2e162ea Require equivalence for mls restrictions on symlinks
An app should never follow a symlink provided by another app.

Test: build, boot Taimen, install some apps, watch youtube, browse
chrome.
Bug: 123350324
Change-Id: Iedd42fe1c27d406f7f58293c20d05e1b7646d8a2
2019-01-25 12:30:47 -08:00
Roland Levillain
7fb3fa878e Merge "Clean up APEX-related otapreopt_chroot policies."
am: f6243dac0b

Change-Id: I9366b60185a88c246f4f386695c8b58cbad24628
2019-01-25 10:47:13 -08:00
Leland Miller
2f45d2eaf0 Merge "Add policy for ircs service"
am: 9dd538eded

Change-Id: I6f40f30c6e357f4f82ca0e30070a081455717f2b
2019-01-25 10:40:42 -08:00
Andreas Gampe
bfc81b5e2a Merge "Sepolicy: Initial Apexd pre-/postinstall rules"
am: bfefce386f

Change-Id: Iec6ec0710acd03a5411e6732c71eba5aea8177e8
2019-01-25 10:39:36 -08:00
Roland Levillain
f6243dac0b Merge "Clean up APEX-related otapreopt_chroot policies." 2019-01-25 18:34:43 +00:00
Leland Miller
9dd538eded Merge "Add policy for ircs service" 2019-01-25 18:28:57 +00:00
Andreas Gampe
bfefce386f Merge "Sepolicy: Initial Apexd pre-/postinstall rules" 2019-01-25 18:23:35 +00:00
Leland Miller
fa5dfd4d23 Add policy for ircs service
Test: Manually verified that service is accessible
Change-Id: If3748f4719b6194eccd16a097a0f1fc050f4160f
2019-01-25 10:12:04 -08:00
Tri Vo
6825b77d79 Merge "Move selinux_denial_metadata to /vendor."
am: f6014e8e62

Change-Id: I35c1228c8247358cb2ffd0ded4aab6fe3b864d86
2019-01-25 10:03:02 -08:00
Nick Kralevich
4182eda9e7 Merge "disallow priv-apps from following untrusted app symlinks."
am: a310da9aec

Change-Id: I07a0f6a25c6f40a2fc3fde25bd7c90c8db614683
2019-01-25 10:02:38 -08:00
Tri Vo
8b3016b5db sepolicy: refactor Android.mk
system/sepolicy/Android.mk has become too large (~2k lines) and hard to
navigate. This patch reorganizes build rules for convenience. No
functional changes are made.

Test: m selinux_policy
Change-Id: I9a022b223b2387a4475da6d8209d561bfea228fb
2019-01-25 18:01:17 +00:00
Tri Vo
f6014e8e62 Merge "Move selinux_denial_metadata to /vendor." 2019-01-25 17:51:48 +00:00
Nick Kralevich
a310da9aec Merge "disallow priv-apps from following untrusted app symlinks." 2019-01-25 17:51:38 +00:00
Michael Wright
24f1d94dfa Add new external vibrator service to system_server
am: e9f1668c17

Change-Id: I20f1293d77262b45ac986d08b0795e4ff85f3095
2019-01-25 08:41:18 -08:00
Roland Levillain
66fcb98464 Clean up APEX-related otapreopt_chroot policies.
Test: A/B OTA update test (asit/dexoptota/self_full).
Bug: 113373927
Bug: 120796514
Change-Id: Icbbe1babe0dceebff2546264ddabe779babba761
2019-01-25 14:36:37 +00:00
Michael Wright
e9f1668c17 Add new external vibrator service to system_server
Bug: 111457573
Test: N/A
Change-Id: I457fd9d13cc481f2687ab39d22240c6ea7231183
2019-01-25 14:26:07 +00:00
Roland Levillain
17e021cb88 Merge changes from topics "runtime-apex-otapreopt_chroot-tear-down", "runtime-apex-installd-support", "runtime-apex-otapreopt_chroot-support"
am: c5ec14ba9a

Change-Id: I174e447b0914a1a8422ad3f1bd7f197088f8a780
2019-01-25 04:09:15 -08:00
Roland Levillain
35247c53c4 Allow oatpreopt to run dex2oat from the Runtime APEX.
am: ab9c053078

Change-Id: I7f56c81bbfc43d877a24c16605aaa556792c973e
2019-01-25 04:08:52 -08:00
Roland Levillain
64515d6131 Allow otapreopt_chroot to mount APEX packages using apexd logic.
am: 0a6c2d013a

Change-Id: I9f2712e43d0483fc41c8df6affb4d0bc55905c9d
2019-01-25 04:08:27 -08:00
Roland Levillain
c5ec14ba9a Merge changes from topics "runtime-apex-otapreopt_chroot-tear-down", "runtime-apex-installd-support", "runtime-apex-otapreopt_chroot-support"
* changes:
  Allow `oatpreopt_chroot` to deactivate APEX packages in `/postinstall/apex`.
  Allow `oatpreopt` to run `dex2oat` from the Runtime APEX.
  Allow `otapreopt_chroot` to mount APEX packages using `apexd` logic.
2019-01-25 11:56:30 +00:00
Jiyong Park
4372bfb5cd Don't audit access for postinstall_mnt_dir
The dynamic linker always calls access(2) on the path. Don't generate SElinux
denials since the linker does not actually access the path in case the path
does not exist or isn't accessible for the process.

Bug: 120996057
Test: copy ping to /data/local/tmp, run it, no selinux denials
Test: bionic unit tests

Change-Id: Idf33ba7bc6c0d657b6ab0abde6bd078e4bb024e5
2019-01-25 20:48:58 +09:00
Carmen Jackson
4a90f2d012 Ensure that memory and binder_driver tracepoints are available in user builds
Bug: 123367055
Test: used Traceur to take a trace on a user build and verified the
tracepoints are in the resultant trace

Change-Id: I39e963762bf2b9f0e427ee217a3b2a246f970902
2019-01-24 23:43:46 -08:00
Martijn Coenen
8dc3148a0f Merge "Add more neverallows to app_zygote policy."
am: c7fb2809bf

Change-Id: Ia9545a1f8e702b76807f1871db4951dee2615ec7
2019-01-24 21:42:02 -08:00
Treehugger Robot
c7fb2809bf Merge "Add more neverallows to app_zygote policy." 2019-01-25 05:24:02 +00:00
Tri Vo
4eb68150aa Move selinux_denial_metadata to /vendor.
selinux_denial_metadate is an concatenation of different bug maps on the
device, including vendor one. This file is only used for debugging, so
we simply move it to /vendor instead of splitting it up.

/vendor/etc/selinux/selinux_denial_metadata has vendor_configs_file
selinux type, which is logd readable.

Bug: 5159394
Test: bug information is still preserved in avc logs, e.g.
audit(0.0:248): avc: denied { read } for
name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=18012
scontext=u:r:platform_app:s0:c512,c768
tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0
b/79617173 app=com.android.systemui
Change-Id: Id5eb9abd3bdeed92feb2aca40880903533468d50
2019-01-25 00:13:59 +00:00
Tri Vo
07b658ccd4 Merge "Split system and product sepolicy hashes."
am: 6c9d368ab1

Change-Id: If3fec2aef521fa39450f981820d9bea081b58283
2019-01-24 16:13:43 -08:00
Tri Vo
6c9d368ab1 Merge "Split system and product sepolicy hashes." 2019-01-25 00:04:34 +00:00
Andreas Gampe
261ea86192 Sepolicy: Initial Apexd pre-/postinstall rules
Give apexd permission to execute sh.

Add userdebug_or_eng domains and rules for the test
APEX for pre- and post-install.

Bug: 119260955
Bug: 119261380
Test: atest apexservice_test
Change-Id: I0c4a5e35e096101a53c9d1f212d2db2e63728267
2019-01-24 15:06:17 -08:00
Ng Zhi An
d5315561bc Merge "Update sepolicy with new native boot flag for activity_manager"
am: 055286fc94

Change-Id: I0b127a0fffab93170b79786372c4776b611c014a
2019-01-24 14:10:56 -08:00
Andreas Gampe
f27a6f881d Merge "Sepolicy: Allow apexd to log to kmsg"
am: a1198e58c3

Change-Id: Ia357eb27c82df072cdb90ae7794a97951e6dd21d
2019-01-24 14:09:54 -08:00
Treehugger Robot
055286fc94 Merge "Update sepolicy with new native boot flag for activity_manager" 2019-01-24 22:00:53 +00:00
Andreas Gampe
a1198e58c3 Merge "Sepolicy: Allow apexd to log to kmsg" 2019-01-24 21:45:20 +00:00
Nick Kralevich
87e91237a4 disallow priv-apps from following untrusted app symlinks.
Untrustworthy symlinks dereferenced by priv-apps could cause those apps
to access files they weren't intending to access. Trusted components
such as priv-apps should never trust untrustworthy symlinks from
untrusted apps.

Modify the rules and add a neverallow assertion to prevent regressions.

Bug: 123350324
Test: device boots and no obvious problems.
Change-Id: I8c4a5c9c8571fd29b2844b20b4fd1126db4128c0
2019-01-24 13:08:10 -08:00
Martijn Coenen
e0bbb9f85a Add more neverallows to app_zygote policy.
The app_zygote should never use any unix sockets, except the
logd socket and some sockets only available on userdebug/eng.

Prevent it from using ptrace.

Bug: 111434506
Test: builds
Change-Id: Ic47cfca51fba0b150a136194ba0e4a8a488c9996
2019-01-24 20:27:54 +00:00
Ng Zhi An
c5bf4a3994 Update sepolicy with new native boot flag for activity_manager
Whitelist the persistent system properties that will be used as
flags in activity manager experiments.

Bug: 120794810
Test: m, flash, test getting flag value in ActivityManagerService.java
Change-Id: I90a10bc87d6db3a64347b62fd02e6f0b12ac9fa8
2019-01-24 11:07:17 -08:00