- Aug 06, 2018
-
-
Nick Kralevich authored
Executing files from an application home directory violates W^X (https://en.wikipedia.org/wiki/W%5EX) constraints (loading executable code from a writable file) and is an unsafe application behavior. Test to see if we can get rid of it and establish some baseline metrics. Test: device boots and no obvious problems. Change-Id: I756c281fcbf750821307327642cc0d06605951b0
-
Nick Kralevich authored
As of https://android-review.googlesource.com/c/platform/system/sepolicy/+/536356 , the untrusted_v2_app domain is no longer used. Bug: 112233317 Test: policy compiles, device boots, and no problems Change-Id: I5a47c8305bef374b7fea06cd789e06cd48b847e6
-
Joel Galenson authored
(cherrypicked from commit f2afca7c) Bug: 109653662 Test: Build policy. Change-Id: I6c71a8bc24d7a144b801d16f1bcad31fb8f2aba5 Merged-In: I6c71a8bc24d7a144b801d16f1bcad31fb8f2aba5
-
- Aug 04, 2018
-
-
Treehugger Robot authored
-
- Aug 03, 2018
-
-
Sudheer Shanka authored
-
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. Commit 23c9d91b introduced a new type called privapp_data_file and added rules necessary to preserve compatibility. However, that change did not relabel any existing files, so effectively the change was a no-op. This change performs the switch, relabeling priv-app's /data/data files from app_data_file to privapp_data_file. Due to the compatibility rules added in 23c9d91b, there should be no noticeable effect from this change. Test: Factory reset and boot - no problems on fresh install. Test: Upgrade to new version and test. No compatibility problems on filesystem upgrade. Merged-In: I9a476726bf01f4bcc7952d11fd57dba803a9fd8d Change-Id: I23a26cd3906fc43cbd225c05c3a2abd3cab8bd06
-
Sudheer Shanka authored
Bug: 111890351 Test: Device boots and no selinux denials when vold mounts at /mnt/user/.* Change-Id: Id962a85af9f99c54421f0820a22880be36c2e478
-
Tom Cherry authored
This is do aid developers pushing debug services to not need to modify the underlying SEPolicy avc: denied { transition } for comm="init" path="/system/bin/awk" dev="dm-0" ino=1934 scontext=u:r:init:s0 tcontext=u:r:su:s0 tclass=process avc: denied { rlimitinh } for comm="awk" scontext=u:r:init:s0 tcontext=u:r:su:s0 tclass=process avc: denied { siginh } for comm="awk" scontext=u:r:init:s0 tcontext=u:r:su:s0 tclass=process avc: denied { noatsecure } for comm="awk" scontext=u:r:init:s0 tcontext=u:r:su:s0 tclass=process Test: init can execute a system_file marked with seclabel u:r:su:s0 Change-Id: I85d9528341fe08dbb2fb9a91e34a41f41aa093be
-
Tom Cherry authored
Bug: 73660730 Test: watchdogd still runs Change-Id: I31697c7c6fa2f7009731ff48c659af051838e42f
-
- 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
-
Tom Cherry authored
-
Alan Stokes authored
Remove the exemptions for untrusted apps and broaden the neverallow so they can't be reinstated. Modifying executable pages is unsafe. Text relocations are not supported. Bug: 111544476 Test: Builds. Change-Id: Ibff4f34d916e000203e38574bb063513e4428bb7
-
- Aug 01, 2018
-
-
Tom Cherry authored
-
Tom Cherry authored
avc: denied { sys_module } for comm="ueventd" capability=16 scontext=u:r:ueventd:s0 tcontext=u:r:ueventd:s0 tclass=capability avc: denied { module_load } for pid=581 comm="ueventd" path="/vendor/lib/modules/module.ko" dev="dm-2" ino=1381 scontext=u:r:ueventd:s0 tcontext=u:object_r:vendor_file:s0 tclass=system avc: denied { search } for pid=556 comm="ueventd" scontext=u:r:ueventd:s0 tcontext=u:r:kernel:s0 tclass=key Bug: 111916071 Test: ueventd can insert modules Change-Id: I2906495796c3655b5add19af8cf64458f753b891
-
Treehugger Robot authored
-
- Jul 31, 2018
-
-
Tom Cherry authored
Bug: 111883560 Test: fsck runs successfully during early mount Change-Id: I697d0ab8ba51824d5c5062b48370a73438311566
-
Nick Kralevich authored
vendor_init needs to touch a bunch of files. Forgotten within this set of permissions is the ability to mmap files. Addresses the following denial: avc: denied { map } for pid=1167 comm="init" path="/system/etc/selinux/plat_file_contexts" dev="vda1" ino=1845 scontext=u:r:vendor_init:s0 tcontext=u:object_r:file_contexts_file:s0 tclass=file permissive=0 While I'm here, add mmap() support to other areas where it's likely needed. Bug: 111742629 Test: make -j80, ran emulator Change-Id: Icab00e45ae88f0d86be66d85a22e018af6ffcd75
-
- Jul 26, 2018
-
-
Nick Kralevich authored
The Android security model guarantees the confidentiality and integrity of application data and execution state. Ptrace bypasses those confidentiality guarantees. Disallow ptrace access from system components to apps. Crash_dump is excluded, as it needs ptrace access to produce stack traces. Bug: 111317528 Test: code compiles Change-Id: I883df49d3e9bca62952c3b33d1c691786dd7df4d
-
- Jul 25, 2018
-
-
Treehugger Robot authored
-
Jeff Vander Stoep authored
Test: none Change-Id: I5023f3f3f9362d456f30c81ec67580509101e81e
-
Bowgo Tsai authored
vold will trim rw mount points about daily, but it is denied by SELinux: root 603 603 W Binder:603_2: type=1400 audit(0.0:11): avc: denied { search } for name="vendor" dev="tmpfs" ino=23935 scontext=u:r:vold:s0 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 Allowing vold to search /mnt/vendor/* to fix the denials. Note that device-specific sepolicy needs to be extended to allow vold to send FITRIM ioctl. e.g., for /mnt/vendor/persist, it needs: allow vold persist_file:dir { ioctl open read }; Bug: 111409607 Test: boot a device, checks the above denial is gone Change-Id: Ia9f22d973e5a2e295678781de49a0f61fccd9dad
-
- Jul 24, 2018
-
-
Yi Kong authored
Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: Ib3f0a25a5129c34d94ebebff818feb5e6fd349dd
-
- Jul 23, 2018
-
-
Wale Ogunwale authored
Bug: 80414790 Test: boots Change-Id: I15233721fa138e0fdf1a30f66d52b64cbab18b81
-
- Jul 20, 2018
-
-
Tri Vo authored
Bug: 72458734 Test: Compile current system sepolicy with P vendor sepolicy Test: Plug in a P device then do: m selinux_policy cp $OUT/system/etc/selinux/plat_sepolicy.cil plat_sepolicy.cil cp $ANDROID_BUILD_TOP/system/sepolicy/private/compat/28.0/28.0.cil 28.0.cil adb pull /vendor/etc/selinux/plat_pub_versioned.cil adb pull /vendor/etc/selinux/vendor_sepolicy.cil secilc plat_sepolicy.cil -m -M true -G -N -c 30 28.0.cil \ plat_pub_versioned.cil vendor_sepolicy.cil Change-Id: I399b3a204eb94bee0ba1b5024b1c3463219c678e
-
Alan Stokes authored
This is so we can get data on which apps are actually doing this. Bug: 111544476 Test: Device boots. No audits seen on test device. Change-Id: I5f72200ed8606775904d353c4d3d790373fe7dea
-
Tri Vo authored
-
- Jul 19, 2018
-
-
Jae Shin authored
Steps taken to produce the mapping files: 1. Add prebuilts/api/28.0/[plat_pub_versioned.cil|vendor_sepolicy.cil] from the /vendor/etc/selinux/[plat_pub_versioned.cil|vendor_sepolicy.cil] files built on pi-dev with lunch target aosp_arm64-eng 2. Add new file private/compat/28.0/28.0.cil by doing the following: - copy /system/etc/selinux/mapping/28.0.cil from pi-dev aosp_arm64-eng device to private/compat/28.0/28.0.cil - remove all attribute declaration statement (typeattribute ...) and sort lines alphabetically - some selinux types were added/renamed/deleted w.r.t 28 sepolicy. Find all such types using treble_sepolicy_tests_28.0 test. - for all these types figure out where to map them by looking at 27.0.[ignore.]cil files and add approprite entries to 28.0.[ignore.]cil. This change also enables treble_sepolicy_tests_28.0 and install 28.0.cil mapping onto the device. Bug: 72458734 Test: m selinux_policy Change-Id: I90e17c0b43af436da4b62c16179c198b5c74002c
-
- Jul 18, 2018
-
-
Jeff Vander Stoep authored
Cut down on logspam during kernel_net_tests Test: /data/nativetest64/kernel_net_tests/kernel_net_tests Change-Id: Id19f50caebc09711f80b7d5f9d87be103898dd9a
-
Tri Vo authored
-
- Jul 17, 2018
-
-
Treehugger Robot authored
-
Tri Vo authored
Bug: n/a Test: n/a Change-Id: I11e6baaa45bcb01603fc06e8a16002727f4e5a00
-
Josh Gao authored
Test: debuggerd -j `pidof system_server` Change-Id: I6cca98b20ab5a135305b91cbb7c0fe7b57872bd3
-
- Jul 14, 2018
-
-
Steven Thomas authored
Add selinux policy for the new Binder-based vr flinger vsync service. Bug: 72890037 Test: - Manually confirmed that I can't bind to the new vsync service from a normal Android application, and system processes (other than vr_hwc) are prevented from connecting by selinux. - Confirmed the CTS test android.security.cts.SELinuxHostTest#testAospServiceContexts, when built from the local source tree with this CL applied, passes. - Confirmed the CTS test android.cts.security.SELinuxNeverallowRulesTest#testNeverallowRules521, when built from the local source tree with this CL applied, passes. Change-Id: Ib7a6bfcb1c2ebe1051f3accc18b481be1b188b06
-
- Jul 13, 2018
-
-
Treehugger Robot authored
* changes: vold: not allowed to read sysfs_batteryinfo full_treble: coredomain must not have access to sysfs_batteryinfo
-
- Jul 12, 2018
-
-
Yifan Hong authored
It doesn't need to read batteryinfo to function properly. Bug: 110891415 Test: builds and boots Change-Id: I7f388180a25101bfd0c088291ef03a9bf8ba2b2c
-
Yifan Hong authored
... but should do it via health HAL and healthd. Bug: 110891415 Test: builds Change-Id: Ib124f82d31f1dfbe99a56475dba04a37f81bdca3
-
- Jul 11, 2018
-
-
Treehugger Robot authored
-
Treehugger Robot authored
-
- Jul 03, 2018
-
-
Aalique Grahame authored
Add new sepolicy rules to support audio system properties Bug: 110564278 Change-Id: If774a40b50e56f9e83bcb4ab8a84581dc03058ad
-
Anton Hansson authored
-