- Apr 28, 2016
-
-
William Roberts authored
Enable shell to have access to /dev for running the world accessable mode test on /dev. This approach adds shell to the list of excluded domains on neverallows around chr_files, but locks down the access for shell to only getattr. It was done this lightly more complicated way to prevent loosening the allow rules so that any domain would have getattr permissions. Change-Id: Idab466fa226ddbf004fcb1bbcaf98c8326605253
-
- Apr 27, 2016
-
-
Mihai Serban authored
There is a race in ueventd's coldboot procedure that permits creation of device block nodes before platform devices are registered. In this case the device node links used to compute the SELinux context are not known and the node is created under the generic context: u:object_r:block_device:s0. Ueventd has been patched to relabel the nodes on subsequent add events but it needs permissions to be allowed to do it. BUG=28388946 Change-Id: Ic836309527a2b81accc50df38bd753d54fa5e318 Signed-off-by:
Mihai Serban <mihai.serban@intel.com>
-
- Apr 23, 2016
-
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Nick Kralevich authored
These neverallow rules are exact duplicates of neverallow rules which occur earlier in the file. Change-Id: I75e3d84109f26374257741425f8de638a15f2741
-
Nick Kralevich authored
When using domain_trans(init, foo_exec, foo), don't add the following rule: allow foo init:process sigchld; This is already allowed for all domains in domain.te: # Allow reaping by init. allow domain init:process sigchld; So adding it over and over again is redundant and bloats the policy. More specifically, when I run: sepolicy-analyze out/target/product/bullhead/root/sepolicy dups this change reduces the number of duplicate policy statements from 461 to 389. Change-Id: I8632e5649a54f63eb1f79ea6405c4b3f515f544c
-
Nick Kralevich authored
This rule is a duplicate of a rule already in domain.te. Change-Id: I729e6d9ca9c99466f8c0fd1ab2f8449f889c71fa
-
Nick Kralevich authored
This directory is no longer used. Change-Id: Ic32a7dd160b23ef8d1d4ffe3f7b1af56c973d73c
-
- Apr 22, 2016
-
-
Alex Deymo authored
The boot_control HAL is library loaded by our daemons (like update_engine and update_verifier) that interacts with the bootloader. The actual implementation of this library is provided by the vendor and its runtime permissions are tied to this implementation which varies a lot based on how the bootloader and the partitions it uses are structured. This patch moves these permissions to an attribute so the attribute can be expanded on each device without the need to repeat that on each one of our daemons using the boot_control HAL. Bug: 27107517 Change-Id: Idfe6a208720b49802b03f70fee4a3e73030dae2e
-
Nick Kralevich authored
It doesn't ever make sense to attempt to load executable code from these files. Add a neverallow rule (compile time assertion and CTS test). Bug: 27882507 Change-Id: Iaa83e3ac543b2221e1178c563e18298305de6da2
-
- Apr 21, 2016
-
-
Nick Kralevich authored
(cherrypicked from commit 45737b9f) There are now individual property files to control access to properties. Don't allow processes other than init to write to these property files. Change-Id: I184b9df4555ae5051f9a2ba946613c6c5d9d4403
-
- Apr 18, 2016
-
-
Nick Kralevich authored
It's only used by the emulators, never by core policy. Move the definition to the emulators. Bug: 28221393 Change-Id: I7ca56e04d611cfccde507313ba9c2a0a71d54d06
-
- Apr 16, 2016
-
-
Nick Kralevich authored
SafetyNet is in the priv_app domain. Suppressing this isn't necessary anymore. Change-Id: Icbcb75d3b2ebde657bd16b336b252aaec4d0d252
-
- Apr 15, 2016
-
-
Nick Kralevich authored
The misc_block_device partition is intended for the exclusive use of the OTA system, and components related to the OTA system. Disallow it's use by anyone else on user builds. On userdebug/eng builds, allow any domain to use this, since this appears to be used for testing purposes. Bug: 26470876 Change-Id: I05d4ee025bb8a5e6a1a9237fefaa2b1c646e332c
-
- Apr 13, 2016
-
- Apr 07, 2016
-
-
Nick Kralevich authored
This does not appear needed anymore. Change-Id: I3128ab610c742b18008f4cfc2a7116b210f770e7
-
Nick Kralevich authored
Make sure adbd can't transition to other non-shell domains, and in particular, can't transition to the su user on user builds. Bug: 27270128 Change-Id: I67dc974da460d63879f5ff3e1258af8eb790a815
-
Jeffrey Vander Stoep authored
-
Jeff Vander Stoep authored
Do not allow module loading except from the system, vendor, and boot partitions. Bug: 27824855 Change-Id: Ifc012e47c5677190c7cc564f9d48af8c7d0982e1
-
Jeffrey Vander Stoep authored
-
Nick Kralevich authored
-
Jeff Vander Stoep authored
Enforce restrictions on kernel module origin when kernel has commit: 61d612ea selinux: restrict kernel module loading Bug: 27824855 Change-Id: Icf2fefec4231f3df8f0f3d914123c22084d87b0b
-
- Apr 06, 2016
-
-
Nick Kralevich authored
Add a neverallow rule (CTS test + compile time assertion) blocking system_server from executing files outside of a few select file types. In general, it's dangerous to fork()/exec() from within a multi-threaded program. See https://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them This change helps discourage the introduction of new execs. Bug: 28035297 Change-Id: Idac824308183fa2cef75f17159dae14447290e5b
-
Alex Deymo authored
postinstall_file was an exec_type so it could be an entrypoint for the domain_auto_trans from update_engine domain to postinstall domain. This patch removes the exec_type from postinstall_file and exempts it from the neverallow rule to become an entrypoint. Bug: 28008031 TEST=postinstall_example still runs as the "postinstall" domain on edison-eng. Change-Id: Icbf5b262c6f971ce054f1b4896c611b32a6d66b5
-
William Roberts authored
Change-Id: Idc9552d2130750d82318d57e7c55fd280d687063 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
William Roberts authored
Prevent direct opens into the system_app sandbox. Change-Id: I04c22076939a9a09a6c861ae73da839c879c4ba7 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
Nick Kralevich authored
-
- Apr 05, 2016
-
-
Alex Deymo authored
-
Alex Deymo authored
We decided a different approach for these policies in the meeting today. This reverts commit 5507fa66. Bug: 28008031 Change-Id: Id86520660bdbc3fc36ac4acf51082547d6a559eb
-
William Roberts authored
Do not allow other domains to create or unlink files under the system app sandbox. Change-Id: I7c3037210c6849c3b0fc205fa71fa5ed4dcac1c2 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
William Roberts authored
Change-Id: Idaf59ab51f7873d4d75969c5f4e62b5fbf608ef5 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
Alex Deymo authored
update_engine had an automatic transition to the "postinstall" domain when executing a "postinstall_file" which required it to be an entrypoint. This patch removes this automatic transition and the associated rules in update_engine.te, removing as well the need to add exec_type to postinstall_file. Instead, update_engine now makes this transition explicit by calling setexeccon(3). Bug: 28008031 TEST=make dist; Deployed an update to edison-eng: postinstall runs as "postinstall" domain. Change-Id: I2b799ac4808c90b010a9e776aaa7015020a94b49
-
- Apr 04, 2016
-
-
Nick Kralevich authored
-
- Apr 01, 2016
-
-
Mark Salyzyn authored
Bug: 27965066 Change-Id: Ia0690c544876e209e4c080b0e959f763b731c48a
-
- Mar 30, 2016
-
-
William Roberts authored
Some of the init allow rules were well passed 100 characters and were difficult to read. Format them to use the one-per-line set subtraction format as seen in other locations within sepolicy. Change-Id: Ifeeb3a8a81c4c19bfb1e56e7f2493f817e896eaf Signed-off-by:
William Roberts <william.c.roberts@intel.com>
-
Alex Deymo authored
Postinstall testing requires to mount a filesystem and relabel its files to postinstall_file. While this task will normally be performed by the update_engine daemon running in a domain of the same name, we also test this workflow with sample images from /data/nativetest in eng builds. This hides the log messages from the 'su' context when mounting and relabeling a filesystem onto the postinstall mountpoint. Bug: 27272144 Bug: 26955860 TEST=m; update_engine_unittests pass Postinstall tests. Change-Id: Id39aa1afdc11a6f59434873e68a53cbcb6ae363f
-
- Mar 29, 2016
-
-
Nick Kralevich authored
The auditallow for install_recovery accessing cache_recovery_files hasn't triggered, so drop the rules as they don't appear to be used. Change-Id: I74bb152b6c829612594c647674907e16783fa477
-
- Mar 28, 2016
-
-
Nick Kralevich authored
Followup to 121f5bfd. Move misc_logd_file neverallow rule from domain.te to logd.te, since the goal of the neverallow rule is to protect logd / logpersist files from other processes. Switch the misc_logd_file neverallow rule from using "rw_file_perms" to "no_rw_file_perms". The latter covers more cases of file modifications. Add more neverallow rules covering misc_logd_file directories. Instead of using not_userdebug_nor_eng(), modify the rules to be consistent with other highly constrained file types such as keystore_data_file or vold_data_file. See, for example, https://android-review.googlesource.com/144768 To see the net effect of this change, you can use the following command line: sesearch --allow -t misc_logd_file -c file,dir,lnk_file \ out/target/product/bullhead/root/sepolicy Before this change: # userdebug builds allow init misc_logd_file:dir { search setattr read create getattr write relabelfrom ioctl rmdir remove_name relabelto open add_name }; allow init misc_logd_file:file { setattr read create write relabelfrom getattr relabelto unlink open }; allow init misc_logd_file:lnk_file { setattr relabelfrom create getattr relabelto unlink }; allow logd misc_logd_file:dir { search read lock getattr write ioctl remove_name open add_name }; allow logd misc_logd_file:file { rename setattr read lock create getattr write ioctl unlink open append }; allow shell misc_logd_file:dir { search read lock getattr ioctl open }; allow shell misc_logd_file:file { read lock ioctl open getattr }; # user builds allow init misc_logd_file:dir { search setattr read create getattr write relabelfrom ioctl rmdir remove_name relabelto open add_name }; allow init misc_logd_file:file relabelto; allow init misc_logd_file:lnk_file { setattr relabelfrom create getattr relabelto unlink }; After this change: # userdebug builds allow init misc_logd_file:dir { search setattr read create getattr ioctl relabelto open }; allow init misc_logd_file:file { relabelto getattr }; allow init misc_logd_file:lnk_file relabelto; allow logd misc_logd_file:dir { search read lock getattr write ioctl remove_name open add_name }; allow logd misc_logd_file:file { rename setattr read lock create getattr write ioctl unlink open append }; allow shell misc_logd_file:dir { search read lock getattr ioctl open }; allow shell misc_logd_file:file { read lock ioctl open getattr }; # user builds allow init misc_logd_file:dir { search setattr read create getattr ioctl relabelto open }; allow init misc_logd_file:file { relabelto getattr }; allow init misc_logd_file:lnk_file relabelto; Change-Id: I0b00215049ad83182f458b4b9e258289c5144479
-
Daichi Hirono authored
To write bytes to appfuse file from priv_app, we need to specify mlstrustedobject. The CL fixes the following denial. type=1400 audit(0.0:77): avc: denied { write } for name="10" dev="fuse" ino=10 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:app_fuse_file:s0 tclass=file permissive=0 BUG=23093747 Change-Id: I9901033bb3349d5def0bd7128db45a1169856dc1
-
- Mar 25, 2016
-
-
Mark Salyzyn authored
-