- Sep 13, 2019
-
-
Roland Levillain authored
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 (cherry picked from commit c72b7d17310499f6bd6545e0e509fd603045d329) 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
-
- May 15, 2019
-
-
Ian Pedowitz authored
This is a hacked version of ag/7282335 as qt-release is behind qt-dev Bug: 129943426 Test: Build Change-Id: I5863d433668b90a641d07fdbcd30ed82b28c9c1a (cherry picked from commit 8d411adea3eba1e943e45e104113f4efbc3d5d65)
-
- Mar 20, 2019
-
-
David Brazdil authored
Dexoptanalyzer is getting a new mode to instruct installd on which dex files it needs to open for itself and dex2oat from class loader context. The file list is communicated by a pipe from a forked dexoptanalyzer process to the installd parent. Give dexoptanalyzer permission to write to installd's pipes. Bug; 126674985 Test: atest installd_dexopt_test Change-Id: Ic415e2dc543099d26681103c9d368c941d21b49a
-
- Jan 26, 2019
-
-
Jeff Vander Stoep authored
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 e16fb910)
-
- Jan 25, 2019
-
-
Jeff Vander Stoep authored
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
-
- Sep 27, 2018
-
-
Nick Kralevich authored
system_file_type is a new attribute used to identify files which exist on the /system partition. It's useful for allow rules in init, which are based off of a blacklist of writable files. Additionally, it's useful for constructing neverallow rules to prevent regressions. Additionally, add commented out tests which enforce that all files on the /system partition have the system_file_type attribute. These tests will be uncommented in a future change after all the device-specific policies are cleaned up. Test: Device boots and no obvious problems. Change-Id: Id9bae6625f042594c8eba74ca712abb09702c1e5
-
- Aug 02, 2018
-
-
Nick Kralevich authored
Currently, both untrusted apps and priv-apps use the SELinux file label "app_data_file" for files in their /data/data directory. This is problematic, as we really want different rules for such files. For example, we may want to allow untrusted apps to load executable code from priv-app directories, but disallow untrusted apps from loading executable code from their own home directories. This change adds a new file type "privapp_data_file". For compatibility, we adjust the policy to support access privapp_data_files almost everywhere we were previously granting access to app_data_files (adbd and run-as being exceptions). Additional future tightening is possible here by removing some of these newly added rules. This label will start getting used in a followup change to system/sepolicy/private/seapp_contexts, similar to: -user=_app isPrivApp=true domain=priv_app type=app_data_file levelFrom=user +user=_app isPrivApp=true domain=priv_app type=privapp_data_file levelFrom=user For now, this newly introduced label has no usage, so this change is essentially a no-op. Test: Factory reset and boot - no problems on fresh install. Test: Upgrade to new version and test. No compatibility problems on filesystem upgrade. Change-Id: I9618b7d91d1c2bcb5837cdabc949f0cf741a2837
-
- Nov 02, 2017
-
-
Shubham Ajmera authored
Test: manual(installd flow without sepolicy denials) Bug: 67111829 Change-Id: I7ac1a86e731ec5900eec83608b4765a6818f2fd0
-
- Jun 30, 2017
-
-
Jeff Vander Stoep authored
A legitimate call to access(2) is generating a denial. Use the audit_access permission to suppress the denial on just the access() call. avc: denied { write } for name="verified_jars" scontext=u:r:dexoptanalyzer:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir Bug: 62597207 Test: build policy Test: The following cmd succeeds but no longer generates a denial adb shell cmd package compile -r bg-dexopt --secondary-dex \ com.google.android.googlequicksearchbox Change-Id: I7d03df2754c24c039bce11426bf8f317232f5e5f (cherry picked from commit 575e6270)
-
- Jun 26, 2017
-
-
Jeff Vander Stoep authored
A legitimate call to access(2) is generating a denial. Use the audit_access permission to suppress the denial on just the access() call. avc: denied { write } for name="verified_jars" scontext=u:r:dexoptanalyzer:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir Bug: 62597207 Test: build policy Test: The following cmd succeeds but no longer generates a denial adb shell cmd package compile -r bg-dexopt --secondary-dex \ com.google.android.googlequicksearchbox Change-Id: I7d03df2754c24c039bce11426bf8f317232f5e5f
-
- Mar 24, 2017
-
-
Alex Klyubin authored
On PRODUCT_FULL_TREBLE devices, non-vendor domains (except vendor apps) are not permitted to use Binder. This commit thus: * groups non-vendor domains using the new "coredomain" attribute, * adds neverallow rules restricting Binder use to coredomain and appdomain only, and * temporarily exempts the domains which are currently violating this rule from this restriction. These domains are grouped using the new "binder_in_vendor_violators" attribute. The attribute is needed because the types corresponding to violators are not exposed to the public policy where the neverallow rules are. Test: mmm system/sepolicy Test: Device boots, no new denials Test: In Chrome, navigate to ip6.me, play a YouTube video Test: YouTube: play a video Test: Netflix: play a movie Test: Google Camera: take a photo, take an HDR+ photo, record video with sound, record slow motion video with sound. Confirm videos play back fine and with sound. Bug: 35870313 Change-Id: I0cd1a80b60bcbde358ce0f7a47b90f4435a45c95
-
- Jan 24, 2017
-
-
Calin Juravle authored
This CLs adds SElinux policies necessary to compile secondary dex files. When an app loads secondary dex files via the base class loader the files will get reported to PM. During maintance mode PM will compile the secondary dex files which were used via the standard installd model (fork, exec, change uid and lower capabilities). What is needed: dexoptanalyzer - needs to read the dex file and the boot image in order to decide if we need to actually comppile. dex2oat - needs to be able to create *.oat files next to the secondary dex files. Test: devices boots compilation of secondary dex files works without selinux denials cmd package compile --secondary-dex -f -m speed com.google.android.gms Bug: 32871170 Change-Id: I038955b5bc9a72d49f6c24c1cb76276e0f53dc45
-