Skip to content
Snippets Groups Projects
  1. Sep 14, 2016
  2. Jul 26, 2016
  3. 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
      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
  4. Apr 24, 2016
    • Jeff Vander Stoep's avatar
      Re-introduce camera_device type · cc8a09f5
      Jeff Vander Stoep authored
      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
      cc8a09f5
  5. Jan 12, 2016
  6. Dec 24, 2015
    • Daichi Hirono's avatar
      Add new rules for appfuse. · a20802dd
      Daichi Hirono authored
      The new rules are used to allow to mount FUSE file system for priv-app.
      
      Change-Id: I5ce2d261be501e2b3fef09b7666f1e5d1cddbe52
      a20802dd
  7. Dec 08, 2015
  8. Dec 03, 2015
    • Tom Cherry's avatar
      Support fine grain read access control for properties · 949d7cbc
      Tom Cherry authored
      Properties are now broken up from a single /dev/__properties__ file into
      multiple files, one per property label.  This commit provides the
      mechanism to control read access to each of these files and therefore
      sets of properties.
      
      This allows full access for all domains to each of these new property
      files to match the current permissions of /dev/__properties__.  Future
      commits will restrict the access.
      
      Bug: 21852512
      
      Change-Id: Ie9e43968acc7ac3b88e354a0bdfac75b8a710094
      949d7cbc
  9. Nov 19, 2015
    • David Zeuthen's avatar
      DO NOT MERGE Move update_engine policy to AOSP. · 500a598e
      David Zeuthen authored
      The update_engine daemon from Brillo is expected to be used also in
      Android so move its selinux policy to AOSP.
      
      Put update_engine in the whitelist (currently only has the recovery
      there) allowing it to bypass the notallow for writing to partititions
      labeled as system_block_device.
      
      Also introduce the misc_block_device dev_type as update_engine in some
      configurations may need to read/write the misc partition. Start
      migrating uncrypt to use this instead of overly broad
      block_device:blk_file access.
      
      Bug: 23186405
      Test: Manually tested with Brillo build.
      
      Change-Id: Icf8cdb4133d4bbdf14bacc6c0fa7418810ac307a
      (cherry picked from commit a10f789d)
      500a598e
  10. Oct 27, 2015
  11. Oct 07, 2015
    • David Zeuthen's avatar
      Move update_engine policy to AOSP. · a10f789d
      David Zeuthen authored
      The update_engine daemon from Brillo is expected to be used also in
      Android so move its selinux policy to AOSP.
      
      Put update_engine in the whitelist (currently only has the recovery
      there) allowing it to bypass the notallow for writing to partititions
      labeled as system_block_device.
      
      Also introduce the misc_block_device dev_type as update_engine in some
      configurations may need to read/write the misc partition. Start
      migrating uncrypt to use this instead of overly broad
      block_device:blk_file access.
      
      Bug: 23186405
      Test: Manually tested with Brillo build.
      
      Change-Id: Icf8cdb4133d4bbdf14bacc6c0fa7418810ac307a
      a10f789d
  12. May 18, 2015
    • dcashman's avatar
      Label /dev/rtc0 as rtc_device. · 807d8d02
      dcashman authored
      Grant access to system_server, as it is used by AlarmManagerService.
      
      (cherry-pick of c7594898)
      
      Change-Id: I8b5795cb4739bb7fb6b2673d0b1b12be40db7a7f
      807d8d02
    • dcashman's avatar
      Label /dev/rtc0 as rtc_device. · c7594898
      dcashman authored
      Grant access to system_server, as it is used by AlarmManagerService.
      
      Change-Id: I4f099fe30ba206db07d636dd454d43d3df9d3015
      c7594898
  13. Feb 28, 2015
    • Nick Kralevich's avatar
      Create boot_block_device and allow install_recovery read access · a8e073cd
      Nick Kralevich authored
      The install_recovery script creates a new recovery image based
      off of the boot image plus a patch on /system. We need to allow
      read access to the boot image to allow the patching to succeed,
      otherwise OTAs are broken.
      
      Addresses the following denial:
      
        type=1400 audit(9109404.519:6): avc: denied { read } for pid=341 comm="applypatch" name="mmcblk0p37" dev="tmpfs" ino=9186 scontext=u:r:install_recovery:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
      
      TODO: Add device specific labels for the boot image.
      
      Bug: 19534538
      Change-Id: Ic811ec03e235df3b1bfca9b0a65e23307cd968aa
      a8e073cd
  14. Jan 14, 2015
    • Mark Salyzyn's avatar
      selinux: add pstore · 34d32ea1
      Mark Salyzyn authored
      Used to record the Android log messages, then on reboot
      provide a means to triage user-space actitivies leading
      up to a panic. A companion to the pstore console logs.
      
      Change-Id: I9b94ee3d5e94e0c4590ba8453b4ac1ebdfc7603f
      34d32ea1
  15. Oct 02, 2014
    • Stephen Smalley's avatar
      Label block devices created or accessed by vold with specific types. · 273d7ea4
      Stephen Smalley authored
      
      Assign a more specific type than block_device to all
      block devices created or accessed by vold.   Allow vold
      to set the context on the device nodes it creates.
      
      vold can create extra loop devices (/dev/block/loopN) and
      block devices for volumes it manages (/dev/block/vold/M:N).
      
      vold can read/write device mapper block devices (/dev/block/dm-N)
      created for encrypted volumes.
      
      vold can read/write metadata partitions used to store encryption metadata.
      The metadata_block_device type should be assigned in device-specific
      policy to the partition specified by the encryptable= mount option
      for the userata entry in the fstab.<board> file.
      
      This change does not remove the ability to create or read/write
      generic block_device devices by vold, so it should not break anything.
      It does add an auditallow statement on such accesses so that we can track
      remaining cases where we need to label such device nodes so that we can
      ultimately remove this access.
      
      Change-Id: Id3bea28f5958086716cd3db055bea309b3b5fa5a
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      273d7ea4
    • Stephen Smalley's avatar
      Define specific block device types for system and recovery partitions. · 206b1a6c
      Stephen Smalley authored
      
      Define a specific block device type for system so that we can
      prevent raw writes to the system partition by anything other than
      recovery.
      
      Define a specific block device type for recovery so that we
      can prevent raw writes to the recovery partition by anything
      other than install_recovery or recovery.
      
      These types must be assigned to specific block device nodes
      via device-specific policy.  This change merely defines the types,
      adds allow rules so that nothing will break when the types are assigned,
      and adds neverallow rules to prevent adding further allow rules
      on these types.
      
      This change does not remove access to the generic block_device type
      from any domain so nothing should break even on devices without these
      type assignments.
      
      Change-Id: Ie9c1f6d632f6e9e8cbba106f07f6b1979d2a3c4a
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      206b1a6c
  16. Sep 28, 2014
    • Stephen Smalley's avatar
      Do not allow init to execute anything without changing domains. · 8a0c25ef
      Stephen Smalley authored
      
      Remove the ability of init to execute programs from / or /system
      without changing domains.  This forces all helper programs and
      services invoked by init to be assigned their own domain.
      
      Introduce separate domains for running the helper programs
      executed from the fs_mgr library by init.  This requires a domain
      for e2fsck (named fsck for generality) and a domain for running
      mkswap (named toolbox since mkswap is just a symlink to the toolbox
      binary and the domain transition occurs on executing the binary, not
      based on the symlink in any way).
      
      e2fsck is invoked on any partitions marked with the check mount
      option in the fstab file, typically userdata and cache but never
      system.  We allow it to read/write the userdata_block_device and
      cache_block_device types but also allow it to read/write the default
      block_device type until we can get the more specific types assigned
      in all of the device-specific policies.
      
      mkswap is invoked on any swap partition defined in the fstab file.
      We introduce a new swap_block_device type for this purpose, to be
      assigned to any such block devices in the device-specific policies,
      and only allow it to read/write such block devices.  As there seem to be
      no devices in AOSP with swap partitions in their fstab files, this does
      not appear to risk any breakage for existing devices.
      
      With the introduction of these domains, we can de-privilege init to
      only having read access to block devices for mounting filesystems; it
      no longer needs direct write access to such devices AFAICT.
      
      To avoid breaking execution of toolbox by system services, apps, or the shell,
      we allow all domains other than kernel and init the ability to
      run toolbox in their own domain.  This is broader than strictly required;
      we could alternatively only add it to those domains that already had
      x_file_perms to system_file but this would require a coordinated change
      with device-specific policy.
      
      Change-Id: Ib05de2d2bc2781dad48b70ba385577cb855708e4
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      8a0c25ef
  17. Sep 20, 2014
    • Stephen Smalley's avatar
      Define types for userdata and cache block devices. · dd053a9b
      Stephen Smalley authored
      
      Introduce separate types for the userdata and cache block
      devices so that we can assign them and allow access to them
      in device-specific policy without allowing access to any other
      block device (e.g. system).  These types will only be used if
      assigned to device node paths in the device-specific file_contexts
      configuration.  Otherwise, this change will have no impact - the
      userdata and cache block devices will continue to default to block_device
      type.
      
      To avoid breakage when these new types are assigned to the userdata
      block device, allow access by vold and uncrypt, but auditallow
      these accesses to confirm that these are required.
      
      Change-Id: I99d24f06506f51ebf1d186d9c393b3cad60e98d7
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      dd053a9b
    • dcashman's avatar
      Add support for factory reset protection. · f37ce3f3
      dcashman authored
      Address the following denials:
      <12>[  417.732129] type=1400 audit(365340.189:47): avc: denied { read } for pid=1737 comm="Binder_2" name="mmcblk0p18" dev="tmpfs" ino=12406 scontext=u:r:system_server:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
      <12>[  417.882126] type=1400 audit(365340.339:48): avc: denied { read } for pid=1737 comm="Binder_2" name="mmcblk0p18" dev="tmpfs" ino=12406 scontext=u:r:system_server:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
      
      (cherrypick of commit 47bd7300)
      
      Bug: 16710840
      Change-Id: I8cb5b4b17dffe14f0bf05d63eb8f6ab8d5c09f53
      f37ce3f3
  18. Sep 15, 2014
  19. Sep 08, 2014
    • dcashman's avatar
      Add support for factory reset protection. · 47bd7300
      dcashman authored
      Address the following denials:
      <12>[  417.732129] type=1400 audit(365340.189:47): avc: denied { read } for pid=1737 comm="Binder_2" name="mmcblk0p18" dev="tmpfs" ino=12406 scontext=u:r:system_server:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
      <12>[  417.882126] type=1400 audit(365340.339:48): avc: denied { read } for pid=1737 comm="Binder_2" name="mmcblk0p18" dev="tmpfs" ino=12406 scontext=u:r:system_server:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
      
      Bug: 16710840
      Change-Id: I8cb5b4b17dffe14f0bf05d63eb8f6ab8d5c09f53
      47bd7300
  20. Jul 09, 2014
  21. Jun 04, 2014
  22. May 07, 2014
    • Greg Hackmann's avatar
      Add policies for Atomic Display Framework · 7004789d
      Greg Hackmann authored
      
      ADF is a modern replacement for fbdev.
      
      ADF's device nodes (/dev/adf[X]), interface nodes
      (/dev/adf-interface[X].[Y]), and overlay engine nodes
      (/dev/adf-overlay-engine[X].[Y]) are collectively used in similar
      contexts as fbdev nodes.  Vendor HW composers (via SurfaceFlinger) and
      healthd will need to send R/W ioctls to these nodes to prepare and
      update the display.
      
      Ordinary apps should not talk to ADF directly.
      
      Change-Id: Ic0a76b1e82c0cc1e8f240f219928af1783e79343
      Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>
      7004789d
  23. Mar 26, 2014
  24. Feb 25, 2014
  25. Feb 20, 2014
  26. Jan 16, 2014
    • Stephen Smalley's avatar
      Drop legacy device types. · d9b8ef43
      Stephen Smalley authored
      
      powervr_device is obsoleted by the more general gpu_device.
      akm_device and accelerometer_device are obsoleted by the more
      general sensors_device.
      
      We could also drop the file_contexts entries altogether and
      take them to device-specific policy (in this case, they all
      came from crespo, so that is obsolete for master).
      
      Change-Id: I63cef43b0d66bc99b80b64655416cc050f443e7d
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      d9b8ef43
  27. Dec 12, 2013
  28. Dec 05, 2013
    • Robert Craig's avatar
      Drop tegra specific label from policy. · b2547644
      Robert Craig authored
      This label was originally used for Motorola
      Xoom devices. nvmap is the tegra gpu memory
      manager and the various nvhost drivers are
      for tegra graphics related functionality,
      i.e. display serial interface, image signal
      processor, or media processing stuff.
      
      Only grouper and tilapia presently need this
      policy.
      
      Change-Id: I2a7000f69abf3185724d88d428e8237e0ca436ec
      b2547644
  29. Nov 11, 2013
    • Stephen Smalley's avatar
      Label /dev/fscklogs and allow system_server access to it. · af47ebb6
      Stephen Smalley authored
      
      Otherwise you get denials such as:
      type=1400 audit(1383590310.430:623): avc:  denied  { getattr } for  pid=1629 comm="Thread-78" path="/dev/fscklogs/log" dev="tmpfs" ino=1642 scontext=u:r:system_server:s0 tcontext=u:object_r:device:s0 tclass=file
      type=1400 audit(1383590310.430:624): avc:  denied  { open } for  pid=1629 comm="Thread-78" name="log" dev="tmpfs" ino=1642 scontext=u:r:system_server:s0 tcontext=u:object_r:device:s0 tclass=file
      type=1400 audit(1383590310.430:625): avc:  denied  { write } for  pid=1629 comm="Thread-78" name="fscklogs" dev="tmpfs" ino=1628 scontext=u:r:system_server:s0 tcontext=u:object_r:device:s0 tclass=dir
      type=1400 audit(1383590310.430:625): avc:  denied  { remove_name } for  pid=1629 comm="Thread-78" name="log" dev="tmpfs" ino=1642 scontext=u:r:system_server:s0 tcontext=u:object_r:device:s0 tclass=dir
      type=1400 audit(1383590310.430:625): avc:  denied  { unlink } for  pid=1629 comm="Thread-78" name="log" dev="tmpfs" ino=1642 scontext=u:r:system_server:s0 tcontext=u:object_r:device:s0 tclass=file
      
      Change-Id: Ia7ae06a6d4cc5d2a59b8b85a5fb93cc31074fd37
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      af47ebb6
  30. Oct 03, 2013
    • Alex Klyubin's avatar
      Restrict access to /dev/hw_random to system_server and init. · 8d688315
      Alex Klyubin authored
      /dev/hw_random is accessed only by init and by EntropyMixer (which
      runs inside system_server). Other domains are denied access because
      apps/services should be obtaining randomness from the Linux RNG.
      
      Change-Id: Ifde851004301ffd41b2189151a64a0c5989c630f
      8d688315
  31. May 09, 2013
  32. Apr 25, 2013
Loading