- Sep 19, 2017
-
-
Tri Vo authored
Bug: 65643247 Test: device boots without denials from bootanim to sysfs and cgroup. Change-Id: Icf8c45906cb83e1b0a60737d67ae584b9d1b34aa
-
- Sep 18, 2017
- Sep 16, 2017
-
-
Tri Vo authored
Bug: 65643247 Test: device boots without denials from bootanim to proc. Change-Id: I0454a2bd4489d7816d82a299f5bc199d6a299ec0
-
- Sep 15, 2017
-
-
Tomasz Wasilczyk authored
Bug: 63600413 Test: VTS, instrumentation, audit2allow Test: after cherry-pick - it builds Change-Id: I57c0150a52c13f1ce21f9ae2147e3814aad0fb7e (cherry picked from commit 567b947d)
-
Mark Salyzyn authored
Add series of neverallow rules to restrict components from reading or writing bootloader_boot_reason_prop, system_boot_reason_prop and last_boot_reason_prop to trusted set of domains. The policy is that bootloader_boot_reason_prop (ro.boot.bootreason) has a compliance issue due to the sheer momentum of near unparseable content as filed by the wide variety (8000 different devices at last count) bootloaders and is only to be accessible to a series of responsible system components. It can be inaccurate as it provides no means to evaluate a shutdown, likely reporting "cold" (from initial power up) or the more generic "reboot". The last_boot_reason_prop (persist.sys.boot.reason) contains inaccurate information as it is only valid after a controlled reboot or shutdown. The value can linger around after less controlled scenarios. Since the information could be false, we do not want to support it as an open API, so we again block access to only responsible components. The system_boot_reason_prop (sys.boot.reason) is a canonical boot reason that takes into account parsing bootloader_boot_reason_prop, boot_loader_boot_reason_prop and other system and HAL generated hints to determine a parseable and most accurate reason for the last time the system was rebooted. For now the policy for system_boot_reason_prop is to audit users of the API, and on a need to know basis via device additions to the selinux rules. If vendors need their components to access the boot reason, they need to comply first with CTS tests and spirit with regards to controlled reboot messaging and in turn read the system_boot_reason_prop for the canonical information. It will contain validated content derived from bootloader_boot_reason_prop in the scenarios that count. The controlled reboot APIs include: - android_reboot(ANDROID_RB_<TYPE>, int flag, const char* reason) - PowerManagerService.lowLevelShutdown(String reason); - PowerManagerService.lowLevelReboot(String reason); - ShutdownThread.shutdown(context, String reason, boolean confirm); - ShutdownThread.reboot(context, String reason, boolean confirm); - PowerManager.shutdown(boolean confirm, String reason, boolean wait); - PowerManager.reboot(String reason); Any others (including the direct linux reboot syscall) create problems for generating an accurate canonical boot reason. Test: compile Bug: 63736262 Bug: 65686279 Change-Id: I2e5e55bbea1c383c06472eb2989237cfeb852030
-
- Sep 14, 2017
-
-
Tri Vo authored
labeled /proc/kmsg as proc_kmsg, changed logd's access from proc to proc_kmsg, and added a compat mapping. Bug: 65643247 Test: device boots without selinux denials to the newly introduced proc_kmsg Test: logd-unit-tests passes Merged-In: I92c9f5694289eb6a94c4d90f14e2de4d46b5228e Change-Id: I92c9f5694289eb6a94c4d90f14e2de4d46b5228e (partial CP of commit 528da6fe)
-
- Sep 11, 2017
-
- Sep 06, 2017
-
-
Tao Bao authored
avc: denied { relabelto } for pid=1 comm="init" name="misc" dev="tmpfs" ino=3855 scontext=u:r:init:s0 tcontext=u:object_r:misc_block_device:s0 tclass=lnk_file If misc partition is used during early mount, it will carry a label of tmpfs (instead of block_device), which will fail restorecon with the above denial. Bug: 65378733 Test: Build and flash a target that uses misc in early mount. No longer observe the above denial. Change-Id: I44cd43dbd2a8a4f9f423ebc8ac0dd046b167ef72
-
- Sep 05, 2017
-
-
Steven Moreland authored
This reverts commit 9216a6ad. Bug: 65206688 Merged-In: I8e61b77a1abe9543e4fba77defb8062407676fcf Change-Id: I8e61b77a1abe9543e4fba77defb8062407676fcf
-
Peter Enderborg authored
Raw sockets usually imply advanced parsers that might have flaws. If vold need such odd thing, force it to have that in a other domain like filesystem checks. Debug features like ptrace does not belong to vold. Bug: 64791922 Test: Manual Change-Id: I75c62d13f998621f80b2049bce0505442862bf0b
-
Peter Enderborg authored
Hardening vold. Vold has much rights to system sensitive parts and are started by init. Enforce this security. Bug: 64791922 Test: Manual Change-Id: I077d251d1eb7b7292e1a4a785093cb7bf5524a83
-
- Aug 31, 2017
-
-
Lazar Trsic authored
Change-Id: I721a48a441c4a416c1119b17086462f7cb8e5097
-
- Aug 30, 2017
-
-
Robert Benea authored
Currently lmkd is not able to read memcg info. The mem/swap usage info are used by lmkd to ugrade medium pressure events to critical level. Test: tested on gobo Bug: 65180281 Change-Id: I19d0eb53d5e754c176ffeda1b5d07049e6af8570
-
- Aug 29, 2017
-
-
Ed Coyne authored
Iot would like to allow bootanim to load libraries from /oem but in order for device-specfic sepolicies to grant exec this global restriction needs to be relaxed. Bug: 37992717 Test: Tested with Iot sepolicies in effect and bootanim can exec. Change-Id: I6462bf510562eb3fb06304e50b68fba05d37b285
-
- Aug 28, 2017
-
-
Jeff Vander Stoep authored
This is needed to retain app's previous access to /sys/devices/system/cpu. When these files were previously labeled in file_contexts, symlinks were labeled as sysfs_devices_system_cpu. When labeling was moved to genfs_contexts symlinks all have the default sysfs label. avc: denied { getattr } for comm="main" path="/sys/devices/system/cpu/cpu0/cpufreq" dev="sysfs" ino=41897 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:sysfs:s0 tclass=lnk_file permissive=0 Change-Id: Idaa565390bca13d3819e147fcea4214956c0f589 Bug: 64270911 Test: build aosp_marlin
-
Bowgo Tsai authored
Bug: 63910933 Test: boot sailfish in normal mode, checks adbd is started Test: boot sailfish in recovery mode, checks adbd is started Test: boot bullhead in normal mode, checks adbd is started Test: boot bullhead in recovery mode, checks adbd is started Change-Id: I35ed78a15a34626fbd3c21d030e2bf51033f7b79 Merged-In: I35ed78a15a34626fbd3c21d030e2bf51033f7b79 (cherry picked from commit e2423d14)
-
- Aug 24, 2017
-
-
Mark Salyzyn authored
Add access to [persist.]sys.boot.reason, pstore, dmesg and logcat Test: system/core/bootstat/boot_reason_test.sh Bug: 63736262 Change-Id: Id521609308e0e967b24d7558982b30a1fc4c0a32
-
Mark Salyzyn authored
Switch from /data/misc/reboot/last_reboot_reason to persistent Android property persist.sys.boot.reason for indicating why the device is rebooted or shutdown. Introduce protection for all boot reason properties Protect the following properties with these labels ro.boot.bootreason u:object_r:bootloader_boot_reason_prop:s0 sys.boot.reason u:object_r:sys_boot_reason_prop:s0 persist.sys.boot.reason u:object_r:last_boot_reason_prop:s0 Setup the current as-need access rules for each. ToDo: Remove u:object_r:reboot_data_file after internal fixes. Test: system/core/bootstat/boot_reason_test.sh Bug: 64687998 Change-Id: I3771c73933e8ae2d94aee936c7a38b6282611b80
-
- Aug 23, 2017
-
-
Alex Light authored
If cppreopts.sh failed to copy files for some reason it would leave the temporary files sitting around in the data directory. This changes the selinux rules so that cppreopts is able to get rid of these temporary files. Test: phone boots. Bug: 63995897 Change-Id: I2a7e654c3a3cee7c9f0be8ba64e40c365eee4cfe
-
John Stultz authored
This patch tries to provide similar functionality as the previous change made here: https://android-review.googlesource.com/#/c/platform/system/sepolicy/+/432339/ Only, making sure we add the same map permissions for the vendor directory. Change-Id: Ia965df2881cdee8bb5d81278a1eb740def582871 Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
- Aug 16, 2017
-
-
Tianjie Xu authored
Denial message: avc: denied { write } for pid=640 comm="update_verifier" name="kmsg" dev="tmpfs" ino=13951 scontext=u:r:update_verifier:s0 tcontext=u:object_r:kmsg_device:s0 tclass=chr_file permissive=0 Bug: 64713327 Test: update_verifier logs successfully during boot time. Change-Id: I421b1e6660239e5ffc624e504f5945d400510407
-
- Aug 14, 2017
-
-
Steven Moreland authored
Only seeing this denial in permissive: allow shell screencap_exec:file getattr; Bug: 37565047 Test: adb shell screencap w/o root Test: cts-tradefed run cts-dev --module CtsAadbHostTestCases Merged-In: I9f31d2067e002e7042646ee38dbfc06687481ac7 Change-Id: I9f31d2067e002e7042646ee38dbfc06687481ac7
-
Steven Moreland authored
Only seeing this denial in permissive: allow shell screencap_exec:file getattr; Bug: 37565047 Test: adb shell screencap w/o root Test: cts-tradefed run cts-dev --module CtsAadbHostTestCases Merged-In: I9f31d2067e002e7042646ee38dbfc06687481ac7 Change-Id: I9f31d2067e002e7042646ee38dbfc06687481ac7
-
- Aug 11, 2017
-
-
Josh Gao authored
Add /dev/kmsg_debug on userdebug devices, to allow crash_dump to log crashes to dmesg when logd isn't up yet (or is the one crashing). Bug: http://b/36574794 Test: stop tombstoned; crasher; dmesg Change-Id: I6ffe11bc613e88198893e82712719522b74fe1be
-
Nick Kralevich authored
Android uses hidepid=2 to restrict visibility to other /proc entries on the system. This helps preserve user, application, and system confidentiality by preventing unauthorized access to application metadata, and addresses attacks such as http://www.cs.ucr.edu/~zhiyunq/pub/sec14_android_activity_inference.pdf Ensure the SELinux (weaker) equivalent is being enforced by adding neverallow compile time assertions. TODO: The "shell" user runs as both an Android application, as well as spawned via adb shell. This was a mistake. We should separate out the "shell" Android app into it's own SELinux domain. For now, exclude the shell from this assertion. (The shell Android app is covered by hidepid=2, so there's no leaking of data, but still, it's over privileged today and should be cleaned up. Bug: 23310674 Test: policy compiles. Compile time assertion only. Change-Id: I0e1a6506b2719aabf7eb8127f046c4ada947ba90
-
- Jul 27, 2017
-
-
Tim Kryger authored
avc: denied { read } for pid=1704 comm="top" name="stat" dev="proc" ino=4026532297 scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0 avc: denied { read } for pid=1636 comm="dumpstate" name="lcd-backlight" dev="sysfs" ino=16592 scontext=u:r:dumpstate:s0 tcontext=u:object_r:sysfs_leds:s0 tclass=lnk_file permissive=0 avc: denied { call } for pid=2230 comm="dumpsys" scontext=u:r:dumpstate:s0 tcontext=u:r:installd:s0 tclass=binder permissive=0 avc: denied { create } for pid=1700 comm="ip" scontext=u:r:dumpstate:s0 tcontext=u:r:dumpstate:s0 tclass=netlink_xfrm_socket permissive=0 Bug: 62410287 Bug: 35350306 Change-Id: I65be3678c64214ebeb544e0e155bce88b21adf02 Signed-off-by:
Tim Kryger <tkryger@google.com>
-
Jeff Vander Stoep authored
Clean up the remaining granted permissions in domain_deprecated. avc: granted { read open } for comm="uncrypt" path="/sys/firmware/devicetree/base/firmware/android/fstab/compatible" dev="sysfs" ino=17591 scontext=u:r:uncrypt:s0 tcontext=u:object_r:sysfs:s0 tclass=file avc: granted { getattr } for comm="uncrypt" path="/sys/firmware/devicetree/base/firmware/android/compatible" dev="sysfs" ino=17583 scontext=u:r:uncrypt:s0 tcontext=u:object_r:sysfs:s0 tclass=file vc: granted { read open } for comm="update_engine" path="/sys/firmware/devicetree/base/firmware/android/fstab" dev="sysfs" ino=17258 scontext=u:r:update_engine:s0 tcontext=u:object_r:sysfs:s0 tclass=dir avc: granted { getattr } for comm="update_engine" path="/sys/firmware/devicetree/base/firmware/android/fstab/compatible" dev="sysfs" ino=17259 scontext=u:r:update_engine:s0 tcontext=u:object_r:sysfs:s0 tclass=file Bug: 28760354 Test: build Change-Id: Id318ce84894c1001361923f5205de093a15c1e6a
-
Jeff Vander Stoep authored
Relax neverallow rule restricting binder access to/from netd so that netd can export hwbinder services to vendor components. Continue to disallow app access to netd via binder. Bug: 36682246 Test: build Merged-In: I8e558ea1add6c36b966ec1da204062ea82df3f3f Change-Id: I063df6dded94d8b0f5214b2c94c4f46bdafb03d7
-
Jeff Vander Stoep authored
Relax neverallow rule restricting binder access to/from netd so that netd can export hwbinder services to vendor components. Continue to disallow app access to netd via binder. Bug: 36682246 Test: build Change-Id: I8e558ea1add6c36b966ec1da204062ea82df3f3f
-
Joel Galenson authored
This should improve performance, as file_contexts is slower than genfs_contexts. Bug: 62413700 Test: Built, flashed, and booted Sailfish. Verified that the files have the correct context and that wifi, web, and atrace work. Merged-In: Ia28707ec565a0792bc882fbffe9e8ab9968535f5 Change-Id: I9546f3af3c95e3443684ae4764881b69987611ef
-
- Jul 26, 2017
-
-
Jeff Vander Stoep authored
Allows groups to be mounted at /dev/memcg Addresses: avc: denied { associate } for comm="init" name="memcg" scontext=u:object_r:cgroup:s0 tcontext=u:object_r:tmpfs:s0 tclass=filesystem permissive=0 Bug: 64067152 Test: build Change-Id: Ic8f641e841fe09c8f7fd487ed67cf0ab4860a1cc
-
Jeff Vander Stoep authored
Remove "granted" logspam. Grante the observed permissions to the individual processes that need them and remove the permission from domain_deprecated. avc: granted { read open } for comm="ndroid.settings" path="/proc/version" dev="proc" ino=4026532081 scontext=u:r:system_app:s0 tcontext=u:object_r:proc:s0 tclass=file avc: granted { getattr } for comm=4173796E635461736B202332 path="/proc/pagetypeinfo" dev="proc" ino=4026532129 scontext=u:r:system_app:s0 tcontext=u:object_r:proc:s0 tclass=file avc: granted { read open } for comm="uncrypt" path="/proc/cmdline" dev="proc" ino=4026532072 scontext=u:r:uncrypt:s0 tcontext=u:object_r:proc:s0 tclass=file avc: granted { read open } for comm="update_engine" path="/proc/sys/kernel/random/boot_id" dev="proc" ino=15852829 scontext=u:r:update_engine:s0 tcontext=u:object_r:proc:s0 tclass=file avc: granted { read open } for comm="tiveportallogin" path="/proc/vmstat" dev="proc" ino=4026532130 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file This change is specifically not granting the following since it should not be allowed: avc: granted { read open } for comm="crash_dump64" path="/proc/filesystems" dev="proc" ino=4026532416 scontext=u:r:dex2oat:s0 tcontext=u:object_r:proc:s0 tclass=file avc: granted { read } for comm="crash_dump64" name="filesystems" dev="proc" ino=4026532416 scontext=u:r:dex2oat:s0 tcontext=u:object_r:proc:s0 tclass=file avc: granted { getattr } for comm="crash_dump64" path="/proc/filesystems" dev="proc" ino=4026532416 scontext=u:r:dex2oat:s0 tcontext=u:object_r:proc:s0 tclass=file Bug: 64032843 Bug: 28760354 Test: build Change-Id: Ib309e97b6229bdf013468dca34f606c0e8da96d0
-
- Jul 24, 2017
-
-
Torne (Richard Coles) authored
The comment in the policy implied this was already the case, but it wasn't actually being used and appears to have been removed. This will now be required by a framework change, so actually add the rule to allow it. Bug: 19061358 Test: verify that WebViewLoader process doesn't die from selinux denial Change-Id: Ib1ed9138a83660ae343e0b665cdfadccdd0c6c97
-
Jeff Vander Stoep authored
This attribute is being actively removed from policy. Since attributes are not being versioned, partners must not be able to access and use this attribute. Move it from private and verify in the logs that rild and tee are not using these permissions. Bug: 38316109 Test: build and boot Marlin Test: Verify that rild and tee are not being granted any of these permissions. Merged-In: I31beeb5bdf3885195310b086c1af3432dc6a349b Change-Id: I31beeb5bdf3885195310b086c1af3432dc6a349b (cherry picked from commit 76aab82c)
-
Sandeep Patil authored
The types need to be exported so userdebug system.img can still build the policy with a user vendor.img at boot time. All permissions and attributes for these types are still kept under conditional userdebug_or_eng macro Bug: 37433251 Test: Boot sailfish-user build with generic_arm64_ab system.img on sailfish and make sure sepolicy compilation succeeds Change-Id: I98e8428c414546dfc74641700d4846edcf9355b1 Signed-off-by:
Sandeep Patil <sspatil@google.com> (cherry picked from commit 35e308cf)
-
- Jul 23, 2017
-
-
Jeff Vander Stoep authored
scontext=installd avc: granted { getattr } for comm="Binder:1153_7" path="/data/user/0" dev="sda13" ino=1097730 scontext=u:r:installd:s0 tcontext=u:object_r:system_data_file:s0 tclass=lnk_file scontext=runas avc: granted { getattr } for comm="run-as" path="/data/user/0" dev="sda35" ino=942082 scontext=u:r:runas:s0 tcontext=u:object_r:system_data_file:s0 tclass=lnk_file scontext=vold avc: granted { getattr } for comm="vold" path="/data/data" dev="sda45" ino=12 scontext=u:r:vold:s0 tcontext=u:object_r:system_data_file:s0 tclass=lnk_file avc: granted { read } for comm="secdiscard" name="3982c444973581d4.spblob" dev="sda45" ino=4620302 scontext=u:r:vold:s0 tcontext=u:object_r:system_data_file:s0 tclass=file Bug: 28760354 Test: Build Change-Id: Id16c43090675572af35f1ad9defd4c368abc906b
-
- Jul 20, 2017
-
-
Josh Gao authored
Allow mediacodec/mediaextractor to write to system_server pipes during ANR dumps. Addresses the following denials: avc: denied { write } for comm="mediaextractor" path="pipe:[1177610]" dev="pipefs" ino=1177610 scontext=u:r:mediaextractor:s0 tcontext=u:r:system_server:s0 tclass=fifo_file permissive=0 avc: denied { write } for comm="omx@1.0-service" path="pipe:[1175808]" dev="pipefs" ino=1175808 scontext=u:r:mediacodec:s0 tcontext=u:r:system_server:s0 tclass=fifo_file permissive=0 Bug: http://b/63801592 Test: treehugger Change-Id: I944b1fa76c70402607ccd903be17dbddeaa73201
-
- Jul 19, 2017
-
-
Jeff Vander Stoep authored
To be replaced by commit 1e149967 seapp_context: explicitly label all seapp context files Test: build policy Change-Id: I8d30bd1d50b9e4a55f878c25d134907d4458cf59 Merged-In: I0f0e937e56721d458e250d48ce62f80e3694900f
-
- Jul 16, 2017
-
-
Tianjie Xu authored
The denial message: update_engine: type=1400 audit(0.0:15213): avc: denied { getattr } for path="/postinstall" dev="dm-0" ino=38 scontext=u:r:update_engine:s0 tcontext=u:object_r:postinstall_mnt_dir:s0 tclass=dir permissive=0 update_engine: type=1400 audit(0.0:15214): avc: denied { sys_rawio } for capability=17 scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0 tclass=capability permissive=0 auditd : type=1400 audit(0.0:15213): avc: denied { getattr } for comm="update_engine" path="/postinstall" dev="dm-0" ino=38 scontext=u:r:update_engine:s0 tcontext=u:object_r:postinstall_mnt_dir:s0 tclass=dir permissive=0 update_engine: [0428/070905:ERROR:utils.cc(716)] Error stat'ing /postinstall: Permission denied Bug: 37760573 Test: apply an update and UE reads postinstall_mnt_dir without denial. Change-Id: I55506f5e8544233f60ccf7c1df846c9c93946a25
-