- Jul 05, 2017
-
- Jun 19, 2017
-
-
Jin Qian authored
recovery exec /system/bin/{mke2fs,e2fsdroid} to format userdata Bug: 35219933 Change-Id: I77e75c2dc55d4bea7984707f27bc215de186c4d1
-
- Jun 14, 2017
-
-
Jeff Vander Stoep authored
avc: granted { search } scontext=u:r:recovery:s0 tcontext=u:object_r:cache_file:s0 tclass=dir avc: granted { getattr } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file avc: granted { read } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file avc: granted { read open } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file avc: granted { read } scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs:s0 tclass=file avc: granted { read open } scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs:s0 tclass=file avc: granted { search } scontext=u:r:recovery:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir Fixes: 62619253 Test: policy builds, no more "granted" messages in dmesg for recovery. Change-Id: I3f6d8ceee80307a01a8fd40cb4f8362a9825b1a3
-
- Jun 08, 2017
-
-
Jeff Vander Stoep authored
This will be enforced by build-time and CTS tests. Test: build policy Change-Id: Ie852fa59670969a2352a97be357d37e420fb180e
-
- May 25, 2017
-
-
Yifan Hong authored
Test: pass Bug: 62073522 Change-Id: I3d53d0d5ec701c87fb3d45080799f424f7ba3792
-
- May 15, 2017
-
-
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. Change-Id: I31beeb5bdf3885195310b086c1af3432dc6a349b
-
- May 10, 2017
-
-
Tao Bao authored
This is needed for devices using configfs, where init listens for sys.usb.ffs.ready=1 to config usb_gadget. When recovery starts sideloading, minadbd (forked from recovery) sets the property to trigger that action. avc: denied { set } for property=sys.usb.ffs.ready pid=541 uid=0 gid=0 scontext=u:r:recovery:s0 tcontext=u:object_r:ffs_prop:s0 tclass=property_service Bug: 35803743 Test: Device shows up in sideload mode. Change-Id: Ie7f1224d3a8650160ac29811f73b8286fbced4f4
-
- Apr 19, 2017
-
-
Sandeep Patil authored
Bug: 37485771 Test: sideloaded OTA through recovery on sailfish Change-Id: I98bb4e0e919db585131391f57545f1a9a0096701 Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
- Apr 14, 2017
-
-
Tianjie Xu authored
Encountered more denials on sailfish: avc: denied { read } for pid=439 comm="recovery" name="thermal" dev="sysfs" ino=28516 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 avc: denied { read } for pid=441 comm="recovery" name="thermal_zone9" dev="sysfs" ino=40364 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=lnk_file permissive=0 Bug: 36920500 Test: sideload a package in sailfish (cherry picked from commit b4e4565d) Change-Id: I46b14babd47168e87c0d30ec06281aaa237563bf
-
Tianjie Xu authored
Encountered more denials on sailfish: avc: denied { read } for pid=439 comm="recovery" name="thermal" dev="sysfs" ino=28516 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 avc: denied { read } for pid=441 comm="recovery" name="thermal_zone9" dev="sysfs" ino=40364 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=lnk_file permissive=0 Bug: 36920500 Test: sideload a package in sailfish Change-Id: Ib4e89ba48cdc383318e5f3b7b15f542434e43564
-
- Apr 07, 2017
-
-
Tianjie Xu authored
We want to track temperature metrics during an OTA update. denial message: denied { search } for pid=349 comm="recovery" name="thermal" dev="sysfs" ino=18029 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 denied { read } for pid=326 comm="recovery" name="temp" dev="sysfs" ino=18479 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=file permissive=0 Bug: 36920500 Bug: 32518487 Test: temperature logs on angler Change-Id: Ib70c1c7b4e05f91a6360ff134a11c80537d6015e (cherry picked from commit 3da2f21f)
-
- Apr 06, 2017
-
-
Tianjie Xu authored
We want to track temperature metrics during an OTA update. denial message: denied { search } for pid=349 comm="recovery" name="thermal" dev="sysfs" ino=18029 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=dir permissive=0 denied { read } for pid=326 comm="recovery" name="temp" dev="sysfs" ino=18479 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=file permissive=0 Bug: 36920500 Bug: 32518487 Test: temperature logs on angler Change-Id: Ib70c1c7b4e05f91a6360ff134a11c80537d6015e
-
- Mar 29, 2017
-
-
Sandeep Patil authored
file_context files need to be explicitly labeled as they are now split across system and vendor and won't have the generic world readable 'system_file' label. Bug: 36002414 Test: no new 'file_context' denials at boot complete on sailfish Test: successfully booted into recovery without denials and sideloaded OTA update. Test: ./cts-tradefed run singleCommand cts --skip-device-info \ --skip-preconditions --skip-connectivity-check --abi \ arm64-v8a --module CtsSecurityHostTestCases -t \ android.security.cts.SELinuxHostTest#testAospFileContexts Change-Id: I603157e9fa7d1de3679d41e343de397631666273 Signed-off-by:
Sandeep Patil <sspatil@google.com>
-
- Mar 20, 2017
-
-
Alex Klyubin authored
This adjusts the grants for recovery to make it explicit that recovery can use the Boot Control HAL only in passthrough mode. Test: Device boots up, no new denials Test: Reboot into recovery, sideload OTA update succeeds Test: Apply OTA update via update_engine: 1. make dist 2. Ensure device has network connectivity 3. ota_call.py -s <serial here> out/dist/sailfish-ota-*.zip Bug: 34170079 Change-Id: I0888816eca4d77939a55a7816e6cae9176713ee5
-
- Mar 18, 2017
-
-
Alex Klyubin authored
This switches Boot Control HAL policy to the design which enables us to conditionally remove unnecessary rules from domains which are clients of Boot Control HAL. Domains which are clients of Boot Control HAL, such as update_server, are granted rules targeting hal_bootctl only when the Boot Control HAL runs in passthrough mode (i.e., inside the client's process). When the HAL runs in binderized mode (i.e., in another process/domain, with clients talking to the HAL over HwBinder IPC), rules targeting hal_bootctl are not granted to client domains. Domains which offer a binderized implementation of Boot Control HAL, such as hal_bootctl_default domain, are always granted rules targeting hal_bootctl. P. S. This commit removes direct access to Boot Control HAL from system_server because system_server is not a client of this HAL. This commit also removes bootctrl_block_device type which is no longer used. Finally, boot_control_hal attribute is removed because it is now covered by the hal_bootctl attribute. Test: Device boots up, no new denials Test: Reboot into recovery, sideload OTA update succeeds Test: Apply OTA update via update_engine: 1. make dist 2. Ensure device has network connectivity 3. ota_call.py -s <serial here> out/dist/sailfish-ota-*.zip Bug: 34170079 Change-Id: I9c410c092069e431a3852b66c04c4d2a9f1a25cf
-
- Jan 31, 2017
-
-
Calin Juravle authored
Since it was introduced it caused quite a few issues and it spams the SElinux logs unnecessary. The end goal of the audit was to whitelist the access to the interpreter. However that's unfeasible for now given the complexity. Test: devices boots and everything works as expected no more auditallow logs Bug: 29795519 Bug: 32871170 Change-Id: I9a7a65835e1e1d3f81be635bed2a3acf75a264f6
-
- Jan 30, 2017
-
-
Tao Bao authored
Bug: 34077703 Test: recovery image can set the backlight brightness. Change-Id: I34d72e1a0e959c2d9f48b3b9c55c4eb2d1cc41bf
-
- Jan 11, 2017
-
-
Josh Gao authored
Bug: http://b/34228376 Test: m Change-Id: I1321ada1521bb3e3fd08105f1a41d519ee486683
-
- Dec 27, 2016
-
-
Alex Klyubin authored
SELinux policy compiler complained about a quote inside the recovery_only section of recovery.te. This section's contents are inside quotes and thus can't contain quotes. Test: mmm system/sepolicy produces no warnings Bug: 33700679 Change-Id: I5bf943166f4f514d04472f7e59b025a9723eb1b8
-
- Dec 22, 2016
-
-
Alex Klyubin authored
This restricts access to ro.serialno and ro.boot.serialno, the two system properties which contain the device's serial number, to a select few SELinux domains which need the access. In particular, this removes access to these properties from Android apps. Apps can access the serial number via the public android.os.Build API. System properties are not public API for apps. The reason for the restriction is that serial number is a globally unique identifier which cannot be reset by the user. Thus, it can be used as a super-cookie by apps. Apps need to wean themselves off of identifiers not resettable by the user. Test: Set up fresh GMS device, install some apps via Play, update some apps, use Chrome Test: Access the device via ADB (ADBD exposes serial number) Test: Enable MTP over USB, use mtp-detect to confirm that serial number is reported in MTP DeviceInfo Bug: 31402365 Bug: 33700679 Change-Id: I4713133b8d78dbc63d8272503e80cd2ffd63a2a7
-
- Nov 22, 2016
-
-
Tao Bao authored
recovery (update_binary) may need to set up cpufreq during an update. avc: denied { write } for pid=335 comm="update_binary" name="scaling_max_freq" dev="sysfs" ino=7410 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=file permissive=0 Bug: 32463933 Test: Build a recovery image and apply an OTA package that writes to /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq. Change-Id: Ia90af9dd15e162dd94bcd4722b66aa296e3058c5
-
- Oct 14, 2016
-
-
Daniel Micay authored
Change-Id: Ic0dd1162e268ce54e11de08b18dd7df47ab12147
-
- Oct 06, 2016
-
-
dcashman authored
Divide policy into public and private components. This is the first step in splitting the policy creation for platform and non-platform policies. The policy in the public directory will be exported for use in non-platform policy creation. Backwards compatibility with it will be achieved by converting the exported policy into attribute-based policy when included as part of the non-platform policy and a mapping file will be maintained to be included with the platform policy that maps exported attributes of previous versions to the current platform version. Eventually we would like to create a clear interface between the platform and non-platform device components so that the exported policy, and the need for attributes is minimal. For now, almost all types and avrules are left in public. Test: Tested by building policy and running on device. Change-Id: Idef796c9ec169259787c3f9d8f423edf4ce27f8c
-
- Sep 27, 2016
-
-
Jeff Vander Stoep authored
Grant access to all processes and audit access. The end goal is to whitelist all access to the interpreter. Several processes including dex2oat, apps, and zygote were observed using libart, so omit them from auditing and explicitly grant them access. Test: Angler builds and boots Bug: 29795519 Change-Id: I9b93c7dbef5c49b95a18fd26307955d05a1c8e88
-
- Aug 10, 2016
-
-
Alex Deymo authored
The recovery flow for A/B devices allows to sideload an OTA downloaded to a desktop and apply from recovery. This patch allows the "recovery" context to perform all the operations required to apply an update as update_engine would do in the background. These rules are now extracted into a new attributte called update_engine_common shared between recovery and update_engine. Bug: 27178350 (cherry picked from commit d63084d3) Change-Id: I1f3e1e83a21e37e09b69cd9c497f87b42b9cbeb1
-
- Aug 09, 2016
-
-
Alex Deymo authored
The recovery flow for A/B devices allows to sideload an OTA downloaded to a desktop and apply from recovery. This patch allows the "recovery" context to perform all the operations required to apply an update as update_engine would do in the background. These rules are now extracted into a new attributte called update_engine_common shared between recovery and update_engine. Bug: 27178350 Change-Id: I97b301cb2c039fb002e8ebfb23c3599463ced03a
-
- Feb 23, 2016
-
- Feb 19, 2016
-
-
Yabin Cui authored
Bug: 26879394 Change-Id: I09ac9027ca343e00488dedab8df1687fd32bb255
-
- Jan 26, 2016
-
-
SimHyunYong authored
This macro does not give us anything to it. Change-Id: Ie0b56716cc0144f0a59849647cad31e06a25acf1
-
- Jan 04, 2016
-
-
Felipe Leme authored
This permission was created mostly for dumpstate (so it can include recovery files on bugreports when an OTA fails), but it was applied to uncrypt and recovery as well (since it had a wider access before). Grant access to cache_recovery_file where we previously granted access to cache_file. Add auditallow rules to determine if this is really needed. BUG: 25351711 Change-Id: I07745181dbb4f0bde75694ea31b3ab79a4682f18
-
- Nov 03, 2015
-
-
Jeff Vander Stoep authored
Motivation: Domain is overly permissive. Start removing permissions from domain and assign them to the domain_deprecated attribute. Domain_deprecated and domain can initially be assigned to all domains. The goal is to not assign domain_deprecated to new domains and to start removing domain_deprecated where it is not required or reassigning the appropriate permissions to the inheriting domain when necessary. Bug: 25433265 Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
-
- Aug 25, 2015
-
-
Stephen Smalley authored
When the toolbox domain was introduced, we allowed all domains to exec it to avoid breakage. However, only domains that were previously allowed the ability to exec /system files would have been able to do this prior to the introduction of the toolbox domain. Remove the rule from domain.te and add rules to all domains that are already allowed execute_no_trans to system_file. Requires coordination with device-specific policy changes with the same Change-Id. Change-Id: Ie46209f0412f9914857dc3d7c6b0917b7031aae5 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Jun 10, 2015
-
-
Tao Bao authored
The recovery and update_binary need to access the /oem partition for devices like sprout. Bug: 19764039 Change-Id: Ie6cbcae899ad664c6a1809c0d5478031091b6eda
- May 15, 2015
-
-
Jeff Sharkey authored
Define an explicit label for /proc/sys/vm/drop_caches and grant to the various people who need it, including vold which uses it when performing storage benchmarks. Also let vold create new directories under it's private storage area where the benchmarks will be carried out. Mirror the definition of the private storage area on expanded media. avc: denied { write } for name="drop_caches" dev="proc" ino=20524 scontext=u:r:vold:s0 tcontext=u:object_r:proc:s0 tclass=file permissive=0 Bug: 21172095 Change-Id: I300b1cdbd235ff60e64064d3ba6e5ea783baf23f
-
- May 07, 2015
-
-
William Roberts authored
A common source of mistakes when authoring sepolicy is properly setting up property sets. This is a 3 part step of: 1. Allowing the unix domain connection to the init/property service 2. Allowing write on the property_socket file 3. Allowing the set on class property_service The macro unix_socket_connect() handled 1 and 2, but could be confusing for first time policy authors. 3 had to be explicitly added. To correct this, we introduce a new macros: set_prop(sourcedomain, targetprop) This macro handles steps 1, 2 and 3. No difference in sediff is expected. (cherrypicked from commit 625a3526) Change-Id: I630ba0178439c935d08062892990d43a3cc1239e Signed-off-by:
William Roberts <william.c.roberts@linux.intel.com>
-
William Roberts authored
A common source of mistakes when authoring sepolicy is properly setting up property sets. This is a 3 part step of: 1. Allowing the unix domain connection to the init/property service 2. Allowing write on the property_socket file 3. Allowing the set on class property_service The macro unix_socket_connect() handled 1 and 2, but could be confusing for first time policy authors. 3 had to be explicitly added. To correct this, we introduce a new macros: set_prop(sourcedomain, targetprop) This macro handles steps 1, 2 and 3. No difference in sediff is expected. Change-Id: I630ba0178439c935d08062892990d43a3cc1239e Signed-off-by:
William Roberts <william.c.roberts@linux.intel.com>
-
- Mar 05, 2015
-
-
Nick Kralevich authored
With the move to block based OTAs, we're never going to fix this bug. Remove the auditallow statement to avoid SELinux log spam. Bug: 15575013 Change-Id: I7864e87202b1b70020a8bdf3ef327a2cf4b6bfbd
-
- Dec 09, 2014
-
-
Patrick Tjin authored
Bug: 18642766 Change-Id: I97d6ab0b76b69d99dcc1928232c8961437e1e68c Signed-off-by:
Patrick Tjin <pattjin@google.com>
-
- Nov 05, 2014
-
-
Nick Kralevich authored
Recovery should never be accessing files from /data. In particular, /data may be encrypted, and the files within /data will be inaccessible to recovery, because recovery doesn't know the decryption key. Enforce write/execute restrictions on recovery. We can't tighten it up further because domain.te contains some /data read-only access rules, which shouldn't apply to recovery but do. Create neverallow_macros, used for storing permission macros useful for neverallow rules. Standardize recovery.te and property_data_file on the new macros. Change-Id: I02346ab924fe2fdb2edc7659cb68c4f8dffa1e88
-