Skip to content
Snippets Groups Projects
  1. 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
  2. May 23, 2014
    • Nick Kralevich's avatar
      Introduce wakelock_use() · 8599e34b
      Nick Kralevich authored
      Introduce wakelock_use(). This macro declares that a domain uses
      wakelocks.
      
      Wakelocks require both read-write access to files in /sys/power, and
      CAP_BLOCK_SUSPEND. This macro helps ensure that both capabilities and
      file access are granted at the same time.
      
      Still TODO: fix device specific wakelock use.
      
      Change-Id: Ib98ff374a73f89e403acd9f5e024988f59f08115
      8599e34b
  3. Apr 02, 2014
    • Stephen Smalley's avatar
      Drop dontaudit sys_admin rule from rild. · 997d4a18
      Stephen Smalley authored
      
      Old Android kernels (e.g. kernel/goldfish android-2.6.29 commit 2bda29)
      fell back to a CAP_SYS_ADMIN check even before checking uids if the cgroup
      subsystem did not define its own can_attach handler.  This doesn't appear
      to have ever been the case of mainline, and is not true of the 3.4 Android
      kernels.  So we no longer need to dontaudit sys_admin to avoid log noise.
      
      Change-Id: I2faade6665a4adad91472c95f94bd922a449b240
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      997d4a18
  4. Mar 18, 2014
  5. Mar 13, 2014
    • Stephen Smalley's avatar
      Audit attempts by rild to create/write to system_data_file. · 64c0ff00
      Stephen Smalley authored
      
      Audit attempts by rild to create/write to system_data_file
      with avc:  granted messages so that we can identify any such
      instances and put such directories/files into radio_data_file or
      some other type and then remove these rules.
      
      Change-Id: Ice20fed1733a3f4208d541a4baaa8b6c6f44fbb0
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      64c0ff00
    • Nick Kralevich's avatar
      rild: move to enforcing · 599e71a9
      Nick Kralevich authored
      Move the rild domain into SELinux enforcing mode. This will
      start enforcing SELinux rules; security policy violations will
      return EPERM.
      
      Change-Id: Iadb51616ecf6f56148ce076d47f04511810de94c
      599e71a9
  6. Feb 25, 2014
    • Stephen Smalley's avatar
      Move qemud and /dev/qemu policy bits to emulator-specific sepolicy. · 0296b943
      Stephen Smalley authored
      
      Change-Id: I620d4aef84a5d4565abb1695db54ce1653612bce
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      0296b943
    • Stephen Smalley's avatar
      Clean up socket rules. · 16011320
      Stephen Smalley authored
      
      Replace * or any permission set containing create with
      create_socket_perms or create_stream_socket_perms.
      
      Add net_domain() to all domains using network sockets and
      delete rules already covered by domain.te or net.te.
      
      For netlink_route_socket, only nlmsg_write needs to be separately
      granted to specific domains that are permitted to modify the routing
      table.   Clarification:  read/write permissions are just ability to
      perform read/recv() or write/send() on the socket, whereas nlmsg_read/
      nlmsg_write permissions control ability to observe or modify the
      underlying kernel state accessed via the socket.
      See security/selinux/nlmsgtab.c in the kernel for the mapping of
      netlink message types to nlmsg_read or nlmsg_write.
      
      Delete legacy rule for b/12061011.
      
      This change does not touch any rules where only read/write were allowed
      to a socket created by another domain (inherited across exec or
      received across socket or binder IPC).  We may wish to rewrite some or all
      of those rules with the rw_socket_perms macro but that is a separate
      change.
      
      Change-Id: Ib0637ab86f6d388043eff928e5d96beb02e5450e
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      16011320
  7. Jan 11, 2014
    • Nick Kralevich's avatar
      Support forcing permissive domains to unconfined. · 623975fa
      Nick Kralevich authored
      Permissive domains are only intended for development.
      When a device launches, we want to ensure that all
      permissive domains are in, at a minimum, unconfined+enforcing.
      
      Add FORCE_PERMISSIVE_TO_UNCONFINED to Android.mk. During
      development, this flag is false, and permissive domains
      are allowed. When SELinux new feature development has been
      frozen immediately before release, this flag will be flipped
      to true. Any previously permissive domains will move into
      unconfined+enforcing.
      
      This will ensure that all SELinux domains have at least a
      minimal level of protection.
      
      Unconditionally enable this flag for all user builds.
      
      Change-Id: I1632f0da0022c80170d8eb57c82499ac13fd7858
      623975fa
  8. Dec 05, 2013
    • Robert Craig's avatar
      Fix new rild denials. · aa376831
      Robert Craig authored
      Denials seen on hammerhead but seem
      appropriate for general policy.
      
      <5>[ 8.339347] type=1400 audit(3731546.390:17): avc: denied { ioctl } for pid=314 comm="rild" path="socket:[7996]" dev="sockfs" ino=7996 scontext=u:r:rild:s0 tcontext=u:r:rild:s0 tclass=socket
      <5>[ 8.339065] type=1400 audit(3731546.390:16): avc: denied { create } for pid=314 comm="rild" scontext=u:r:rild:s0 tcontext=u:r:rild:s0 tclass=socket
      <5>[ 11.232121] type=1400 audit(3731549.289:22): avc: denied { read } for pid=620 comm="rild" scontext=u:r:rild:s0 tcontext=u:r:rild:s0 tclass=socket
      
      Change-Id: Ieaca5360afbb44d5da21c7c24bdd5e7c5758f0a2
      aa376831
  9. Nov 13, 2013
  10. Oct 21, 2013
    • Nick Kralevich's avatar
      Move unconfined domains out of permissive mode. · 353c72e3
      Nick Kralevich authored
      This change removes the permissive line from unconfined
      domains. Unconfined domains can do (mostly) anything, so moving
      these domains into enforcing should be a no-op.
      
      The following domains were deliberately NOT changed:
      1) kernel
      2) init
      
      In the future, this gives us the ability to tighten up the
      rules in unconfined, and have those tightened rules actually
      work.
      
      When we're ready to tighten up the rules for these domains,
      we can:
      
      1) Remove unconfined_domain and re-add the permissive line.
      2) Submit the domain in permissive but NOT unconfined.
      3) Remove the permissive line
      4) Wait a few days and submit the no-permissive change.
      
      For instance, if we were ready to do this for adb, we'd identify
      a list of possible rules which allow adbd to work, re-add
      the permissive line, and then upload those changes to AOSP.
      After sufficient testing, we'd then move adb to enforcing.
      We'd repeat this for each domain until everything is enforcing
      and out of unconfined.
      
      Change-Id: If674190de3262969322fb2e93d9a0e734f8b9245
      353c72e3
  11. Oct 03, 2013
  12. May 20, 2013
    • repo sync's avatar
      Make all domains unconfined. · 77d4731e
      repo sync authored
      This prevents denials from being generated by the base policy.
      Over time, these rules will be incrementally tightened to improve
      security.
      
      Change-Id: I4be1c987a5d69ac784a56d42fc2c9063c402de11
      77d4731e
  13. May 15, 2013
  14. May 03, 2013
  15. Apr 26, 2013
  16. Apr 05, 2013
  17. Apr 04, 2013
  18. Mar 27, 2013
    • Robert Craig's avatar
      Various policy updates. · 65d4f44c
      Robert Craig authored
      
      Assortment of policy changes include:
       * Bluetooth domain to talk to init and procfs.
       * New device node domains.
       * Allow zygote to talk to its executable.
       * Update system domain access to new device node domains.
       * Create a post-process sepolicy with dontaudits removed.
       * Allow rild to use the tty device.
      
      Change-Id: Ibb96b590d0035b8f6d1606cd5e4393c174d10ffb
      Signed-off-by: default avatarrpcraig <rpcraig@tycho.ncsc.mil>
      65d4f44c
  19. Mar 22, 2013
    • William Roberts's avatar
      Split internal and external sdcards · c195ec31
      William Roberts authored
      Two new types are introduced:
      sdcard_internal
      sdcard_external
      
      The existing type of sdcard, is dropped and a new attribute
      sdcard_type is introduced.
      
      The boolean app_sdcard_rw has also been changed to allow for
      controlling untrusted_app domain to use the internal and external
      sdcards.
      
      Change-Id: Ic7252a8e1703a43cb496413809d01cc6cacba8f5
      c195ec31
  20. Jul 12, 2012
  21. Jun 27, 2012
  22. Jun 07, 2012
  23. May 31, 2012
  24. Apr 04, 2012
    • Stephen Smalley's avatar
      Rework the radio vs rild property split. · 730957ae
      Stephen Smalley authored
      Only label properties with the ril. prefix with rild_prop.
      Allow rild and system (and radio) to set radio_prop.
      Only rild can set rild_prop presently.
      730957ae
    • 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
  25. Mar 19, 2012
  26. Jan 04, 2012
Loading