Skip to content
Snippets Groups Projects
  1. Feb 04, 2016
  2. Jan 19, 2016
    • Rubin Xu's avatar
      SELinux rule for ro.device_owner and persist.logd.security · 0c8286fe
      Rubin Xu authored
      They are introduced for the device owner process logging feature.
      That is, for enterprise-owned devices with device owner app provisioned,
      the device owner may choose to turn on additional device-wide logging for
      auditing and intrusion detection purposes. Logging includes histories of
      app process startup, commands issued over ADB and lockscreen unlocking
      attempts. These logs will available to the device owner for analysis,
      potentially shipped to a remote server if it chooses to.
      
      ro.device_owner will be a master switch to turn off logging, if the device
      has no device owner provisioned. persist.logd.security is a switch that
      device owner can toggle (via DevicePoliyManager) to enable/disable logging.
      Writing to both properties should be only allowed by the system server.
      
      Bug: 22860162
      Change-Id: Iabfe2347b094914813b9d6e0c808877c25ccd038
      0c8286fe
  3. Dec 09, 2015
  4. Dec 08, 2015
    • Nick Kralevich's avatar
      Remove property read access for non-core properties · 5a570a4b
      Nick Kralevich authored
      Instead of allowing global read access to all properties,
      only allow read access to the properties which are part of
      core SELinux policy. Device-specific policies are no longer
      readable by default and need to be granted in device-specific
      policy.
      
      Grant read-access to any property where the person has write
      access. In most cases, anyone who wants to write a property
      needs read access to that property.
      
      Change-Id: I2bd24583067b79f31b3bb0940b4c07fc33d09918
      5a570a4b
  5. Dec 04, 2015
    • Felipe Leme's avatar
      Increase communication surface between dumpstate and Shell: · 83fd8a54
      Felipe Leme authored
      - Add a new 'dumpstate' context for system properties. This context
        will be used to share state between dumpstate and Shell. For example,
        as dumpstate progresses, it will update a system property, which Shell
        will use to display the progress in the UI as a system
        notification. The user could also rename the bugreport file, in which
        case Shell would use another system property to communicate such
        change to dumpstate.
      - Allow Shell to call 'ctl.bugreport stop' so the same system
        notification can be used to stop dumpstate.
      
      BUG: 25794470
      
      Change-Id: I74b80bda07292a91358f2eea9eb8444caabc5895
      83fd8a54
  6. 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
  7. Jul 30, 2015
  8. Jun 09, 2015
    • Jeff Sharkey's avatar
      New "selinux.restorecon" control property. · 7617cd48
      Jeff Sharkey authored
      This new property is used as a control verb for running a recursive
      restorecon at the path contained in the property value.
      
      Defines a new label and grants access to vold, which invokes it when
      mounting private adopted volumes.
      
      Bug: 21121357
      Change-Id: I8ff12a146e54a505aa5b43a542578891563d647a
      7617cd48
  9. Apr 24, 2015
  10. Feb 27, 2015
  11. Feb 18, 2015
    • Sami Tolvanen's avatar
      Allow ueventd to set verity.* properties · 47cd53a5
      Sami Tolvanen authored
      On dm-verity errors, we catch uevents in ueventd and set the value
      for a matching verity.* property. Allow ueventd to actually change
      property values.
      
      Needed by changes from
        Ibb82953594d234f81ad21c40f524190b88e4ac8f
      
      Change-Id: I79bc90733edf8a45b27e64795f4adfbb3bc028dc
      47cd53a5
  12. Nov 19, 2014
  13. Nov 18, 2014
  14. Sep 28, 2014
    • Stephen Smalley's avatar
      Dependencies for new goldfish service domains. · 54e9bc45
      Stephen Smalley authored
      
      In order to support the new goldfish service domains in
      a change with the same Change-Id for the build project, we need
      the following changes in external/sepolicy:
      - /system/bin/logcat needs its own type so that it can be used as an
      entrypoint for the goldfish-logcat service.  A neverallow rule prevents
      us from allowing entrypoint to any type not in exec_type.
      - The config. and dalvik. property namespaces need to be labeled
      with something other than default_prop so that the qemu-props
      service can set them.  A neverallow rule prevents us from allowing
      qemu-props to set default_prop.
      
      We allow rx_file_perms to logcat_exec for any domain that
      was previously allowed read_logd() as many programs will read
      the logs by running logcat.  We do not do this for all domains
      as it would violate a neverallow rule on the kernel domain executing
      any file without transitioning to another domain, and as we ultimately
      want to apply the same restriction to the init domain (and possibly others).
      
      Change-Id: Idce1fb5ed9680af84788ae69a5ace684c6663974
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      54e9bc45
  15. Sep 26, 2014
  16. Sep 25, 2014
  17. Jun 23, 2014
    • Stephen Smalley's avatar
      Align SELinux property policy with init property_perms. · fee49159
      Stephen Smalley authored
      
      Introduce a net_radio_prop type for net. properties that can be
      set by radio or system.
      Introduce a system_radio_prop type for sys. properties that can be
      set by radio or system.
      Introduce a dhcp_prop type for properties that can be set by dhcp or system.
      Drop the rild_prop vs radio_prop distinction; this was an early
      experiment to see if we could separate properties settable by rild
      versus other radio UID processes but it did not pan out.
      
      Remove the ability to set properties from unconfineddomain.
      Allow init to set any property.  Allow recovery to set ctl_default_prop
      to restart adbd.
      
      Change-Id: I5ccafcb31ec4004dfefcec8718907f6b6f3e0dfd
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      fee49159
  18. Jun 19, 2014
  19. Jun 12, 2014
  20. Mar 25, 2014
  21. Mar 18, 2014
    • Nick Kralevich's avatar
      debuggerd: Allow "debug.db.uid" usage · 77aa370c
      Nick Kralevich authored
      Allow the use of debug.db.uid on userdebug / eng builds.
      Setting this property allows debuggerd to suspend a process
      if it detects a crash.
      
      Make debug.db.uid only accessible to the su domain. This should
      not be used on a user build.
      
      Only support reading user input on userdebug / eng builds.
      
      Steps to reproduce with the "crasher" program:
      
        adb root
        adb shell setprop debug.db.uid 20000
        mmm system/core/debuggerd
        adb sync
        adb shell crasher
      
      Addresses the following denials:
      
      <5>[  580.637442] type=1400 audit(1392412124.612:149): avc:  denied  { read } for  pid=182 comm="debuggerd" name="input" dev="tmpfs" ino=5665 scontext=u:r:debuggerd:s0 tcontext=u:object_r:input_device:s0 tclass=dir
      <5>[  580.637589] type=1400 audit(1392412124.612:150): avc:  denied  { open } for  pid=182 comm="debuggerd" name="input" dev="tmpfs" ino=5665 scontext=u:r:debuggerd:s0 tcontext=u:object_r:input_device:s0 tclass=dir
      <5>[  580.637706] type=1400 audit(1392412124.612:151): avc:  denied  { read write } for  pid=182 comm="debuggerd" name="event5" dev="tmpfs" ino=6723 scontext=u:r:debuggerd:s0 tcontext=u:object_r:input_device:s0 tclass=chr_file
      <5>[  580.637823] type=1400 audit(1392412124.612:152): avc:  denied  { open } for  pid=182 comm="debuggerd" name="event5" dev="tmpfs" ino=6723 scontext=u:r:debuggerd:s0 tcontext=u:object_r:input_device:s0 tclass=chr_file
      <5>[  580.637958] type=1400 audit(1392412124.612:153): avc:  denied  { ioctl } for  pid=182 comm="debuggerd" path="/dev/input/event5" dev="tmpfs" ino=6723 scontext=u:r:debuggerd:s0 tcontext=u:object_r:input_device:s0 tclass=chr_file
      
      Bug: 12532622
      Change-Id: I63486edb73efb1ca12e9eb1994ac9e389251a3f1
      
      Conflicts:
      	debuggerd.te
      77aa370c
  22. Mar 11, 2014
    • Stephen Smalley's avatar
      Allow system_app to start bugreport and to create /data/anr/traces.txt. · 1c0c0102
      Stephen Smalley authored
      
      Resolves denials such as:
      
      avc:  denied  { set } for property =ctl.bugreport scontext=u:r:system_app:s0 tcontext=u:object_r:ctl_default_prop:s0 tclass=property_service
      
      avc:  denied  { write } for  pid=4415 comm=5369676E616C2043617463686572 name="anr" dev="dm-0" ino=358337 scontext=u:r:system_app:s0 tcontext=u:object_r:anr_data_file:s0 tclass=dir
      
      avc:  denied  { add_name } for  pid=4415 comm=5369676E616C2043617463686572 name="traces.txt" scontext=u:r:system_app:s0 tcontext=u:object_r:anr_data_file:s0 tclass=dir
      
      avc:  denied  { create } for  pid=4415 comm=5369676E616C2043617463686572 name="traces.txt" scontext=u:r:system_app:s0 tcontext=u:object_r:anr_data_file:s0 tclass=file
      
      Change-Id: I71d0ede049136d72f28bdc85d52fcefa2f7d128f
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      1c0c0102
  23. Feb 18, 2014
    • Nick Kralevich's avatar
      debuggerd: Allow "debug.db.uid" usage · 116a20fd
      Nick Kralevich authored
      Allow the use of debug.db.uid on userdebug / eng builds.
      Setting this property allows debuggerd to suspend a process
      if it detects a crash.
      
      Make debug.db.uid only accessible to the su domain. This should
      not be used on a user build.
      
      Only support reading user input on userdebug / eng builds.
      
      Steps to reproduce with the "crasher" program:
      
        adb root
        adb shell setprop debug.db.uid 20000
        mmm system/core/debuggerd
        adb sync
        adb shell crasher
      
      Addresses the following denials:
      
      <5>[  580.637442] type=1400 audit(1392412124.612:149): avc:  denied  { read } for  pid=182 comm="debuggerd" name="input" dev="tmpfs" ino=5665 scontext=u:r:debuggerd:s0 tcontext=u:object_r:input_device:s0 tclass=dir
      <5>[  580.637589] type=1400 audit(1392412124.612:150): avc:  denied  { open } for  pid=182 comm="debuggerd" name="input" dev="tmpfs" ino=5665 scontext=u:r:debuggerd:s0 tcontext=u:object_r:input_device:s0 tclass=dir
      <5>[  580.637706] type=1400 audit(1392412124.612:151): avc:  denied  { read write } for  pid=182 comm="debuggerd" name="event5" dev="tmpfs" ino=6723 scontext=u:r:debuggerd:s0 tcontext=u:object_r:input_device:s0 tclass=chr_file
      <5>[  580.637823] type=1400 audit(1392412124.612:152): avc:  denied  { open } for  pid=182 comm="debuggerd" name="event5" dev="tmpfs" ino=6723 scontext=u:r:debuggerd:s0 tcontext=u:object_r:input_device:s0 tclass=chr_file
      <5>[  580.637958] type=1400 audit(1392412124.612:153): avc:  denied  { ioctl } for  pid=182 comm="debuggerd" path="/dev/input/event5" dev="tmpfs" ino=6723 scontext=u:r:debuggerd:s0 tcontext=u:object_r:input_device:s0 tclass=chr_file
      
      Bug: 12532622
      Change-Id: I63486edb73efb1ca12e9eb1994ac9e389251a3f1
      116a20fd
  24. Nov 01, 2013
    • Nick Kralevich's avatar
      Give system_server / system_app ability to write some properties · dd1ec6d5
      Nick Kralevich authored
      Allow writing to persist.sys and debug.
      
      This addresses the following denials (which are actually being enforced):
      
      <4>[  131.700473] avc:  denied  { set } for property=debug.force_rtl scontext=u:r:system_server:s0 tcontext=u:object_r:shell_prop:s0 tclass=property_service
      <3>[  131.700625] init: sys_prop: permission denied uid:1000  name:debug.force_rtl
      <4>[  132.630062] avc:  denied  { set } for property=persist.sys.dalvik.vm.lib scontext=u:r:system_app:s0 tcontext=u:object_r:system_prop:s0 tclass=property_service
      <3>[  132.630184] init: sys_prop: permission denied uid:1000  name:persist.sys.dalvik.vm.lib
      
      Change-Id: I5d114c0d963bf393f49f1bf13d1ed84137fbcca6
      dd1ec6d5
  25. Jun 29, 2013
    • Nick Kralevich's avatar
      Enable SELinux on vold · 7914a47f
      Nick Kralevich authored
      This change enables SELinux security enforcement on vold.
      
      For the vold.te file ONLY, this change is conceptually a revert of
      77d4731e and
      50e37b93, with the following
      additional changes:
      
      1) Removal of "allow vold proc:file write;" and
      "allow vold self:capability { sys_boot };". As of system/vold
      change adfba3626e76c1931649634275d241b226cd1b9a, vold no longer
      performs it's own reboots, so these capabilities are no longer
      needed.
      
      2) Addition of the powerctl property, which vold contacts to
      tell init to reboot.
      
      3) Removal of "allow vold kernel:system module_request;". As of
      CTS commit f2cfdf5c057140d9442fcfeb4e4a648e8258b659, Android
      devices no longer ship with loadable modules, hence we don't
      require this rule.
      
      4) Removal of "fsetid" from "self:capability". Any setuid / setgid
      bits SHOULD be cleared if vold is able to change the permissions
      of files. IMHO, it was a mistake to ever include this capability in
      the first place.
      
      Testing: As much as possible, I've tested filesystem related
      functionality, including factory reset and device encryption.
      I wasn't able to test fstrim functionality, which is a fairly
      new feature.  I didn't see any policy denials in dmesg. It's quite
      possible I've missed something. If we experience problems, I
      happy to roll back this change.
      
      Bug: 9629920
      Change-Id: I683afa0dffe9f28952287bfdb7ee4e0423c2e97a
      7914a47f
  26. May 06, 2013
  27. Mar 22, 2013
    • William Roberts's avatar
      Move policy files · 9e70c8bf
      William Roberts authored
      Update the file_contexts for the new location of
      the policy files, as well as update the policy
      for the management of these types.
      
      Change-Id: Idc475901ed437efb325807897e620904f4ff03e9
      9e70c8bf
  28. Nov 28, 2012
  29. Apr 04, 2012
    • Stephen Smalley's avatar
      Add policy for property service. · 124720a6
      Stephen Smalley authored
      New property_contexts file for property selabel backend.
      New property.te file with property type declarations.
      New property_service security class and set permission.
      Allow rules for setting properties.
      124720a6
Loading