- 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>
-
- Aug 24, 2015
-
-
Nick Kralevich authored
Revert the neverallow change portion of 356df327, in case others need to do dynamic policy updates. (cherrypicked from commit e827a8ab) Bug: 22885422 Bug: 8949824 Change-Id: If0745e7f83523377fd19082cfc6b33ef47ca0647
-
Nick Kralevich authored
Remove the ability to dynamically update SELinux policy on the device. 1) This functionality has never been used, so we have no idea if it works or not. 2) If system_server is compromised, this functionality allows a complete bypass of the SELinux policy on the device. In particular, an attacker can force a regression of the following patch * https://android-review.googlesource.com/138510 see also https://code.google.com/p/android/issues/detail?id=181826 3) Dynamic policy update can be used to bypass neverallow protections enforced in CTS, by pushing a policy to the device after certification. Such an updated policy could bring the device out of compliance or deliberately introduce security weaknesses. (cherrypicked from commit e827a8ab) Bug: 22885422 Bug: 8949824 Change-Id: I802cb61fd18a452a2bb71c02fe57cfce5b7e9dc8
-
Nick Kralevich authored
-
Nick Kralevich authored
On user and userdebug builds, system_server only loads executable content from /data/dalvik_cache and /system. JITing for system_server is only supported on eng builds. Remove the rules for user and userdebug builds. Going forward, the plan of record is that system_server will never use JIT functionality, instead using dex2oat or interpreted mode. Inspired by https://android-review.googlesource.com/98944 Change-Id: I54515acaae4792085869b89f0d21b87c66137510
-
- Aug 22, 2015
-
-
Nick Kralevich authored
Add a neverallow rule (compile time assertion) for /data/local/tmp access. /data/local/tmp is intended entirely for the shell user, and it's dangerous for other SELinux domains to access it. See, for example, this commit from 2012: https://android.googlesource.com/platform/system/core/+/f3ef1271f225d9f00bb4ebb0573eb3e03829f9a8 Change-Id: I5a7928ae2b51a574fad4e572b09e60e05b121cfe
-
Nick Kralevich authored
-
- Aug 15, 2015
-
-
Nick Kralevich authored
https://android-review.googlesource.com/166419 changed the handling of non-interactive adb shells to use a socket instead of a PTY. When the stdin/stdout/stderr socket is received by /system/bin/sh, the code runs isatty() (ioctl TCGETS) to determine how to handle the file descriptor. This is denied by SELinux. Allow it for all domains. Addresses the following denial: avc: denied { ioctl } for pid=4394 comm="sh" path="socket:[87326]" dev="sockfs" ino=87326 ioctlcmd=5401 scontext=u:r:shell:s0 tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=0 TODO: When kernels are publicly available which support SELinux ioctl filtering, limit this just to ioctl 5401 (TCGETS) instead of all ioctls. Bug: 21215503 Change-Id: I5c9394f27b8f198d96df14eac4b0c46ecb9b0898
-
- Aug 14, 2015
-
-
Nick Kralevich authored
In Android 5.1, mediaserver couldn't execute any file on /system. This slightly regressed due to 8a0c25ef, which granted mediaserver access to execute /system/bin/toolbox and /system/bin/toybox Revoke that unneeded access and add a neverallow rule to prevent regressions. TODO: Remove toolbox_exec:file execute permissions from domain.te and add it back to the specific domains that need it. Change-Id: Ia7bc6028a9ffb723d4623d91cbe15c8c1bbb2eb9
-
- Aug 13, 2015
-
-
William Roberts authored
Change-Id: Ic70a1208b67fe3961871cdeb39369c2ed3e0ce28 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
William Roberts authored
Some of the ALL_*_FILES variables remained that were used in a way that could not be cleared. Move them to lower case variants and use a build recipe PRIVATE_*_FILES variable. This avoids polluting the global namespace. Change-Id: I83748dab48141af7d3f10ad27fc9319eaf90b970 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
Nick Kralevich authored
Init is now responsible for creating /data/anr, so it's unnecessary to grant system_server and dumpstate permissions to relabel this directory. Remove the excess permissions. Leave system_data_file relabelfrom, since it's possible we're still using it somewhere. See commits: https://android-review.googlesource.com/161650 https://android-review.googlesource.com/161477 https://android-review.googlesource.com/161638 Bug: 22385254 Change-Id: I1fd226491f54d76ff51b03d4b91e7adc8d509df9
-
- Aug 12, 2015
-
-
Stephen Smalley authored
Extend checkfc to support comparing two file_contexts or file_contexts.bin files. This is for use by the CTS SELinuxHostTest to compare the AOSP general_file_contexts with the device file_contexts.bin file. Depends on I0fe63e0c7f11ae067b5aac2f468f7842e5d76986. Change-Id: I2fff2f8cf87690a76219ddf4cf38939650f34782 Signed-off-by:
Stephen Smalley <sds@tycho.nsa.gov>
-
Richard Haines authored
This change supports external/libselinux changes to implement PCRE formatted binary file_contexts and general_file_contexts.bin files. The $(intermediates) directory will contain the original text file (that is no longer used on the device) with a .tmp extension as well as the .bin file to aid analysis. A CleanSpec.mk file is added to remove the old file_contexts file. Change-Id: I75a781100082c23536f70ce3603f7de42408b5ba Signed-off-by:
Richard Haines <richard_c_haines@btinternet.com>
-
- Aug 11, 2015
-
-
Dan Willemsen authored
There are no guarantees on the order of the results from a call to the wildcard function. In fact, the order usually changes between make 3.81 and make 4.0 (and kati). Instead, sort the results of wildcard in each sepolicy directory, so that directory order is preserved, but content ordering is reliable. Change-Id: I1620f89bbdd2b2902f2e0c40526e893ccf5f7775
-
- Jul 30, 2015
-
-
Yasuhiro Matsuda authored
This CL adds the SELinux settings required to support tracing during boot. https://android-review.googlesource.com/#/c/157163/ BUG: 21739901 Change-Id: Ib3a7107776141ac8cf4f1ca06674f47a0d4b6ae0
-
- Jul 29, 2015
-
-
Daniel Micay authored
The device-independent code only needs read access to sysfs, and this appears to be enough for at least some devices (Nexus 5). Bug: 22827371 Change-Id: I3b7b068e98f11f9133f0bdea8ece363e4bd89ae8
-
Daniel Rosenberg authored
-
Jeffrey Vander Stoep authored
-
Jeff Vander Stoep authored
Bug: 18068520 Bug: 21852542 Change-Id: I876b37ac31dd44201ea1c1400a7c2c16c6a10049
-
- Jul 28, 2015
-
-
Jeffrey Vander Stoep authored
-
Jeffrey Vander Stoep authored
This reverts commit 2dabf174. Change-Id: I7e35a6ea1b8d5958c65eb04a7c9a04ba807b1181
-
Jeffrey Vander Stoep authored
-
Jeff Vander Stoep authored
Bug: 18068520 Bug: 21852542 Change-Id: I080547c61cbaacb18e003a9b2366e2392a6521ff
-
Daniel Rosenberg authored
Change-Id: I9496af008aa3ad1bf33fb5911c8dd711af219440
-
- Jul 27, 2015
-
-
Daniel Rosenberg authored
Change-Id: I08aaf89e2ef23f9528d107a1c9d66c1c9979b3ac
-
- Jul 24, 2015
-
-
William Roberts authored
Allow device builders to pass arbitrary m4 definitions during the build via make variable BOARD_SEPOLICY_M4DEFS. This enables OEMs to define their own static policy build conditionals. Change-Id: Ibea1dbb7b8615576c5668e47f16ed0eedfa0b73c Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
- Jul 17, 2015
-
-
Colin Cross authored
Improve incremental ninja builds by keeping the command line the same across builds. Change-Id: Iedbaa40c9f816f91afc8f073a9ed7f9ffd5d9a53
-
- Jul 16, 2015
-
-
Nick Kralevich authored
-
William Roberts authored
Change-Id: Iae3edba40a94f78e78c0cc89a03e3f5a098d3909 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
- Jul 15, 2015
-
-
dcashman authored
Change-Id: I34db8855a55426f6a590a89cc6c157e1ccd50ff9
-
- Jul 14, 2015
-
-
Evgenii Stepanov authored
This is in addition to /data/lib. Only affects SANITIZE_TARGET=address builds. Bug: 21785137 Change-Id: Id1983cabb9479ae2d38fb23691de3eba236fe9cb
-
Nick Kralevich authored
Init never uses / add service manager services. It doesn't make sense to allow these rules to init. Adding a rule of this type is typically caused by a process inappropriately running in init's SELinux domain, and the warning message: Warning! Service %s needs a SELinux domain defined; please fix! is ignored. In addition, add neverallow rules to domain.te which prevent nonsense SELinux service_manager rules from being added. Change-Id: Id04a50d1826fe451a9ed216aa7ab249d0393cc57
-
- Jul 13, 2015
-
-
dcashman authored
-
dcashman authored
Domains have the ability to read normal tmpfs files but not symlinks. Grant this ability. In particular, allow domains to read /mnt/sdcard. Addresses the following denial: type=1400 audit(0.0:19):avc: denied { read } for comm=4173796E635461736B202333 name="sdcard" dev="tmpfs" ino=7475 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:tmpfs:s0 tclass=lnk_file permissive=0 Bug: 20755029 Change-Id: I0268eb00e0eb43feb2d5bca1723b87b7a44f31a9
-
dcashman authored
/proc/iomem is currently given the proc label but contains system information which should not be available to all processes. Bug: 22008387 Change-Id: I4f1821f40113a743ad986d13d8d130ed8b8abf2f
-
- Jul 10, 2015
-
-
William Roberts authored
Lowercase local variables and clear them to be consistent with other recipes and prevent polluting Make's global name space with set variables. Change-Id: If455cd4f33d5babbea985867a711e8a10c21a00f Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
Jeff Vander Stoep authored
-
Jeff Vander Stoep authored
avc: denied { write } for pid=14742 comm="procrank" path="/data/data/com.android.shell/files/bugreports/bugreport-2015-07-02-22-17-43.txt.tmp" dev="dm-2" ino=44479 scontext=u:r:procrank:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0 Bug: 22400298 Change-Id: Ibf5dcf9f7edf416e977577afc32bbbef62e50974
-
- Jul 08, 2015
-
-
William Roberts authored
To help reduce code injection paths, a neverallow is placed to prevent domain, sans untrusted_app and shell, execute on data_file_type. A few data_file_type's are also exempt from this rule as they label files that should be executable. Additional constraints, on top of the above, are placed on domains system_server and zygote. They can only execute data_file_type's of type dalvikcache_data_file. Change-Id: I15dafbce80ba2c85a03c23128eae4725703d5f02 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-