Skip to content
Snippets Groups Projects
  1. Jun 03, 2016
    • William Roberts's avatar
      ueventd: allow getattr on blk and chr types. · cd109d44
      William Roberts authored
      
      The commit: d41ad551
      fixes a race in coldboot. However, introduced a seperate
      bug where existing character files were being relabeled.
      
      The fix was to have ueventd ensure their was a delta between
      the old and new labels and only then call lsetfilecon(). To
      do this we call lgetfilecon() which calls lgetxattr(), this
      requires getattr permissions.
      
      This patch is void of any relabelfrom/to for ueventd on chr_file
      as those can be added as they occur.
      
      Bug: 29106809
      
      Change-Id: I84f60539252fc2b4a71cf01f78e3cadcfad443ef
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      cd109d44
  2. May 31, 2016
    • Daniel Micay's avatar
      expose control over unpriv perf access to shell · 38ac77e4
      Daniel Micay authored
      This allows the shell user to control whether unprivileged access to
      perf events is allowed.
      
      To enable unprivileged access to perf:
      
          adb shell setprop security.perf_harden 0
      
      To disable it again:
      
          adb shell setprop security.perf_harden 1
      
      This allows Android to disable this kernel attack surface by default,
      while still allowing profiling tools to work automatically. It can also
      be manually toggled, but most developers won't ever need to do that if
      tools end up incorporating this.
      
      Bug: 29054680
      
      Change-Id: Idcf6a2f6cbb35b405587deced7da1f6749b16a5f
      38ac77e4
  3. May 17, 2016
  4. May 16, 2016
  5. May 13, 2016
  6. May 12, 2016
    • Jeff Vander Stoep's avatar
      move gpsd domain to device specific policy · 3ba2d466
      Jeff Vander Stoep authored
      Only used by Flounder.
      
      Bug: 8435593
      Change-Id: I06655e897ab68a1724190950e128cd390617f2bd
      3ba2d466
    • Jeff Vander Stoep's avatar
      Remove domain_deprecated from isolated_app · 0b430aba
      Jeff Vander Stoep authored
      Address denials:
      avc: denied { read } for name="meminfo" dev="proc" ino=4026544360 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:proc_meminfo:s0 tclass=file permissive=0
      
      Bug: 28722489
      Change-Id: I3c55bd95bb82ec54e88e9e9bc42d6392a216a936
      0b430aba
    • Jeff Vander Stoep's avatar
      Re-introduce camera_device type · 68339ac3
      Jeff Vander Stoep authored
      (cherry-picked from commit cc8a09f5)
      
      camera_device was previously removed in AOSP commit: b7aace2d
      "camera_device: remove type and add typealias" because the
      same domains required access to both without exception, meaning
      there was no benefit to distinguishing between the two. However,
      with the split up of mediaserver this is no longer the case and
      distinguishing between the camera and video  provides a legitimate
      security benefit. For example, the mediacodec domain requires access
      to the video_device for access to hardware accelerated codecs but does
      not require access to the camera.
      
      Bug: 28359909
      Change-Id: I8a4592722d8e6391c0e91b440914284b7245e232
      68339ac3
  7. May 11, 2016
  8. May 10, 2016
    • Jeff Vander Stoep's avatar
      allow init to read symlinks in sys · 912f3c10
      Jeff Vander Stoep authored
      avc: denied { read } for name="device" dev="sysfs" ino=36099 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_rmtfs:s0 tclass=lnk_file
      
      init is already allowed to read directories, this is an obvious omission.
      
      Change-Id: I5131a84bb67e73aaed235c3cbab95c365eaaa2f0
      912f3c10
  9. May 06, 2016
    • William Roberts's avatar
      property_socket: add mlstrustedobject attribute · 9fca8a39
      William Roberts authored
      
      In order to allow set_prop() to function with platform_apps,
      the property_socket file requires mlstrustedobject since
      platform app uses category sets.
      
      This does not allow untrusted_app access, as the following
      neverallows still prevent type access:
      
      untrusted_app.te:118:neverallow untrusted_app property_socket:sock_file write;
      untrusted_app.te:120:neverallow untrusted_app property_type:property_service set;
      
      Lastly, the internal socket to property_service is labeled with init
      which is mlstrustedsubject, so no changes are required there.
      
      Change-Id: I47296a2dc24b16785fd296deea7a54ae9966226a
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      9fca8a39
  10. May 03, 2016
    • Sen Jiang's avatar
      Allow reading loop device in update_engine_unittests. · 2b267293
      Sen Jiang authored
      This fixes the following denies:
      type=1400 audit(0.0:4389): avc: denied { read } for path="/data/misc/update_engine/tmp/a_loop_file.W0j9ss" dev="mmcblk0p13" ino=24695 scontext=u:r:kernel:s0 tcontext=u:object_r:update_engine_data_file:s0 tclass=file permissive=0
      type=1400 audit(0.0:30): avc: denied { read } for path="/data/nativetest/update_engine_unittests/gen/disk_ext2_unittest.img" dev="mmcblk0p13" ino=71 scontext=u:r:kernel:s0 tcontext=u:object_r:nativetest_data_file:s0 tclass=file permissive=0
      
      Bug: 28319454
      Test: setenforce 1 && ./update_engine_unittests
      
      Change-Id: I8d54709d4bda06b364b5420d196d75a4ecc011d3
      2b267293
  11. Apr 28, 2016
  12. 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
  13. Apr 23, 2016
  14. 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
  15. Apr 21, 2016
  16. Apr 18, 2016
  17. Apr 16, 2016
  18. 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
  19. Apr 13, 2016
  20. Apr 07, 2016
  21. Apr 06, 2016
    • Nick Kralevich's avatar
      system_server: neverallow new file exec types · f84b7981
      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
      f84b7981
    • Alex Deymo's avatar
      Allow postinstall_file to be an entrypoint. · a9671c6b
      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
      a9671c6b
Loading