- 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
-
- Oct 23, 2014
-
-
Nick Kralevich authored
Currently, recovery is allowed write access to the following three file labels: * system_file (directories, files, and symbolic links) * exec_type (directories, files, and symbolic links) * unlabeled (directory and files) system_file is the default label on all files in /system. exec_type is the attribute used to mark executables on /system. The third file type, "unlabeled", refers to filesystem objects where the label hasn't been set, or a label is set but isn't defined by the currently loaded policy. The current policy only allows unlabeled files or directories to be modified. Symbolic links were accidentally excluded. This causes problems when trying to fix up labels/permissions on unlabeled symbolic links. Allow unlabeled symbolic link modifications. (cherrypicked from commit 683ac49d) Bug: 18079773 Change-Id: I8e5c33602cdc38ec9a95b4e83f9ccbb06fe9da7c
-
Nick Kralevich authored
Currently, recovery is allowed write access to the following three file labels: * system_file (directories, files, and symbolic links) * exec_type (directories, files, and symbolic links) * unlabeled (directory and files) system_file is the default label on all files in /system. exec_type is the attribute used to mark executables on /system. The third file type, "unlabeled", refers to filesystem objects where the label hasn't been set, or a label is set but isn't defined by the currently loaded policy. The current policy only allows unlabeled files or directories to be modified. Symbolic links were accidentally excluded. This causes problems when trying to fix up labels/permissions on unlabeled symbolic links. Allow unlabeled symbolic link modifications. Bug: 18079773 Change-Id: I8e5c33602cdc38ec9a95b4e83f9ccbb06fe9da7c
-
- Jul 15, 2014
- Jul 10, 2014
-
-
Doug Zongker authored
Support opening the ffs-based interface for adbd in recovery. (Copied from adbd.te.) Bug: 16183878 Change-Id: I714ccb34f60d1413d2b184dae9b561cd06bc6b45
-
Nick Kralevich authored
Prune down unconfined so it doesn't allow process access to all other domains. Use domain_trans() for transitions to seclabeled domains. Change-Id: I8e88a49e588b6b911e1f7172279455838a06091d
-
Doug Zongker authored
Support opening the ffs-based interface for adbd in recovery. (Copied from adbd.te.) Bug: 16183878 Change-Id: Ib80e5b910d9ad4252cb80e7ce2f85e478cd94816
-
- Jul 08, 2014
-
-
Stephen Smalley authored
Rename sdcard_internal/external types to fuse and vfat respectively to make it clear that they are assigned to any fuse or vfat filesystem by default (absent a context= mount option) and do not necessarily represent the SDcard. The sdcard_type attribute is still assigned to both types and can still be used in allow rules to permit access to either the internal or external SDcard. Define type aliases for the old names to preserve compatibility on policy reload and for device-specific policies that may not yet be updated. Change-Id: I8d91a8c4c1342b94e4f1bb62ca7ffd2ca4b06ba1 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
Nick Kralevich authored
adb sideload depends on the ability to access the fuse directory. Flipping recovery into enforcing started triggering the following denial: type=1400 audit(17964905.699:7): avc: denied { search } for pid=132 comm="recovery" name="/" dev="fuse" ino=1 scontext=u:r:recovery:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir Change-Id: I27ee0295fa2e2d0449bfab4f95bfbc076e92cf59
-
- Jul 07, 2014
-
-
Nick Kralevich authored
Start enforcing SELinux rules for recovery. I've been monitoring denials, and I haven't seen anything which would indicate a problem. We can always roll this back if something goes wrong. Change-Id: I7d3a147f8b9000bf8181d2aa32520f15f291a6f3
-
Nick Kralevich authored
The recovery script may ask to label a file with a label not known to the currently loaded policy. Allow it. Addresses the following denials: avc: denied { relabelto } for pid=143 comm="update_binary" name="vdc" dev="mmcblk0p25" ino=212 scontext=u:r:recovery:s0 tcontext=u:object_r:unlabeled:s0 tclass=file avc: denied { setattr } for pid=143 comm="update_binary" name="vdc" dev="mmcblk0p25" ino=212 scontext=u:r:recovery:s0 tcontext=u:object_r:unlabeled:s0 tclass=file Change-Id: Iafcc7b0b3aaea5a272adb1264233978365648f94
-
- Jul 02, 2014
-
-
Doug Zongker authored
The new sideloading mechanism in recovery needs to create a fuse filesystem and read files from it. Change-Id: I22e1f7175baf401d2b75c4be6673ae4b75a0ccbf
-
- Jun 23, 2014
-
-
Stephen Smalley authored
Introduce a net_radio_prop type for net. properties that can be set by radio or system. Introduce a system_radio_prop type for sys. properties that can be set by radio or system. Introduce a dhcp_prop type for properties that can be set by dhcp or system. Drop the rild_prop vs radio_prop distinction; this was an early experiment to see if we could separate properties settable by rild versus other radio UID processes but it did not pan out. Remove the ability to set properties from unconfineddomain. Allow init to set any property. Allow recovery to set ctl_default_prop to restart adbd. Change-Id: I5ccafcb31ec4004dfefcec8718907f6b6f3e0dfd Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Jun 19, 2014
-
-
Stephen Smalley authored
execute_no_trans controls whether a domain can execve a program without switching to another domain. Exclude this permission from unconfineddomain, add it back to init, init_shell, and recovery for files in / and /system, and to kernel for files in / (to permit execution of init prior to setcon). Prohibit it otherwise for the kernel domain via neverallow. This ensures that if a kernel task attempts to execute a kernel usermodehelper for which no domain transition is defined, the exec will fail. Change-Id: Ie7b2349923672dd4f5faf7c068a6e5994fd0e4e3 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
Stephen Smalley authored
[ 265.263738] type=1400 audit(17091747.819:4): avc: denied { write } for pid=132 comm="recovery" name="enable" dev="sysfs" ino=14405 scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs:s0 tclass=file [ 265.293154] type=1400 audit(17091747.849:5): avc: denied { execute } for pid=177 comm="recovery" name="recovery" dev="rootfs" ino=6376 scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file [ 265.299479] type=1400 audit(17091747.859:6): avc: denied { setgid } for pid=177 comm="recovery" capability=6 scontext=u:r:recovery:s0 tcontext=u:r:recovery:s0 tclass=capability [ 265.299511] type=1400 audit(17091747.859:7): avc: denied { read write } for pid=178 comm="recovery" name="android_adb" dev="tmpfs" ino=6739 scontext=u:r:recovery:s0 tcontext=u:object_r:adb_device:s0 tclass=chr_file [ 265.299531] type=1400 audit(17091747.859:8): avc: denied { open } for pid=178 comm="recovery" name="android_adb" dev="tmpfs" ino=6739 scontext=u:r:recovery:s0 tcontext=u:object_r:adb_device:s0 tclass=chr_file [ 265.299863] type=1400 audit(17091747.859:9): avc: denied { setuid } for pid=177 comm="recovery" capability=7 scontext=u:r:recovery:s0 tcontext=u:r:recovery:s0 tclass=capability Change-Id: I024d5a797b86b9766f10bbb2a6a6462cafc9c26a Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
- Jun 16, 2014
-
-
Stephen Smalley authored
Prior to this change, the init and recovery domains were allowed unrestricted use of context= mount options to force all files within a given filesystem to be treated as having a security context specified at mount time. The context= mount option can be used in device-specific fstab.<board> files to assign a context to filesystems that do not support labeling such as vfat where the default label of sdcard_external is not appropriate (e.g. /firmware on hammerhead). Restrict the use of context= mount options to types marked with the contextmount_type attribute, and then remove write access from such types from unconfineddomain and prohibit write access to such types via neverallow. This ensures that the no write to /system restriction cannot be bypassed via context= mount. Change-Id: I4e773fadc9e11328d13a0acec164124ad6e840c1 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-