Skip to content
Snippets Groups Projects
  1. Apr 28, 2016
    • William Roberts's avatar
      shell: enable hostside test: testAllCharacterDevicesAreSecure · 72c16e32
      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
      72c16e32
  2. Apr 27, 2016
    • Mihai Serban's avatar
      Allow ueventd to relabel block devices · d41ad551
      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: default avatarMihai Serban <mihai.serban@intel.com>
      d41ad551
  3. Apr 23, 2016
  4. Apr 22, 2016
    • Alex Deymo's avatar
      Move boot_control HAL permissions to an attribute. · 0f8d9261
      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
      0f8d9261
    • Nick Kralevich's avatar
      Add no_x_file_perm to property related files. · 50ba6318
      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
      50ba6318
  5. Apr 21, 2016
  6. Apr 18, 2016
  7. Apr 16, 2016
  8. Apr 15, 2016
    • Nick Kralevich's avatar
      Disallow /misc access except for a few domains. · 2c7a5f26
      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
      2c7a5f26
  9. Apr 13, 2016
  10. Apr 07, 2016
  11. Apr 06, 2016
  12. Apr 05, 2016
  13. Apr 04, 2016
  14. Apr 01, 2016
  15. Mar 30, 2016
    • William Roberts's avatar
      init: avoid lengthy allow rules · cf0d7f66
      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: default avatarWilliam Roberts <william.c.roberts@intel.com>
      cf0d7f66
    • Alex Deymo's avatar
      Allow manual /postinstall loopback mounting on debug builds. · fc9e8e25
      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
      fc9e8e25
  16. Mar 29, 2016
  17. Mar 28, 2016
    • Nick Kralevich's avatar
      refine /data/misc/logd rules · 6937aa93
      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
      6937aa93
    • Daichi Hirono's avatar
      Add mlstrustedobject to appfuse object type. · 4d19f98c
      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
      4d19f98c
  18. Mar 25, 2016
Loading