Skip to content
Snippets Groups Projects
  1. May 13, 2015
  2. May 06, 2015
  3. May 01, 2015
    • Stephen Smalley's avatar
      Ensure that domain and appdomain attributes are assigned. · 4a12d963
      Stephen Smalley authored
      
      Prevent defining any process types without the domain attribute
      so that all allow and neverallow rules written on domain are
      applied to all processes.
      
      Prevent defining any app process types without the appdomain
      attribute so that all allow and neverallow rules written on
      appdomain are applied to all app processes.
      
      Change-Id: I4cb565314fd40e1e82c4360efb671b175a1ee389
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      4a12d963
  4. Apr 28, 2015
  5. Apr 27, 2015
  6. Apr 24, 2015
  7. Apr 14, 2015
  8. Apr 09, 2015
    • dcashman's avatar
      Enforce more specific service access. · bd7f5803
      dcashman authored
      Move the remaining services from tmp_system_server_service to appropriate
      attributes and remove tmp_system_server and associated logging:
      
      registry
      restrictions
      rttmanager
      scheduling_policy
      search
      sensorservice
      serial
      servicediscovery
      statusbar
      task
      textservices
      telecom_service
      trust_service
      uimode
      updatelock
      usagestats
      usb
      user
      vibrator
      voiceinteraction
      wallpaper
      webviewupdate
      wifip2p
      wifi
      window
      
      Bug: 18106000
      Change-Id: Ia0a6d47099d82c53ba403af394537db6fbc71ca0
      bd7f5803
  9. Apr 02, 2015
    • Nick Kralevich's avatar
      domain: relax execmod restrictions · 998ce77f
      Nick Kralevich authored
      Some devices still have pre-built binaries with text relocations
      on them. As a result, it's premature to assert a neverallow rule
      for files in /system
      
      Bug: 20013628
      Change-Id: I3a1e43db5c610164749dee6882f645a0559c789b
      998ce77f
  10. Mar 27, 2015
    • Paul Lawrence's avatar
      Adding e4crypt support · 38af1da1
      Paul Lawrence authored
      Add selinux rules to allow file level encryption to work
      
      Change-Id: I1e4bba23e99cf5b2624a7df843688fba6f3c3209
      38af1da1
  11. Mar 24, 2015
    • Nick Kralevich's avatar
      add neverallow rules for execmod · 359101ac
      Nick Kralevich authored
      Android has long enforced that code can't compile with text
      relocations present. Add a compile time assertion to prevent
      regressions.
      
      Change-Id: Iab35267ce640c1fad9dc82b90d22e70e861321b7
      359101ac
  12. Mar 19, 2015
    • Nick Kralevich's avatar
      Add new "procrank" SELinux domain. · a1913988
      Nick Kralevich authored
      /system/xbin/procrank is a setuid program run by adb shell on
      userdebug / eng devices. Allow it to work without running adb root.
      
      Bug: 18342188
      Change-Id: I18d9f743e5588c26661eaa26e1b7e6980b15caf7
      a1913988
  13. Mar 14, 2015
    • Nick Kralevich's avatar
      neverallow su_exec:file execute · 8bd13687
      Nick Kralevich authored
      Executing /system/xbin/su is only supported on userdebug builds
      for a limited number of domains. On user builds, it should never
      occur.
      
      Add a compile time assertion (neverallow rule) that this is
      always true.
      
      Bug: 19647373
      Change-Id: I231a438948ea2d47c1951207e117e0fb2728c532
      8bd13687
  14. Mar 09, 2015
    • dcashman's avatar
      Only allow system_server to send commands to zygote. · 8f81dcad
      dcashman authored
      Add neverallow rules to ensure that zygote commands are only taken from
      system_server.
      
      Also remove the zygote policy class which was removed as an object manager in
      commit: ccb3424639821b5ef85264bc5836451590e8ade7
      
      Bug: 19624279
      
      Change-Id: I1c925d7facf19b3953b5deb85d992415344c4c9f
      8f81dcad
  15. Feb 26, 2015
    • Sami Tolvanen's avatar
      Allow init to execute /sbin/slideshow · 9d87c647
      Sami Tolvanen authored
      Add rules to allow /sbin/slideshow to access framebuffer and input
      devices at early stages of boot, and rules to allow init to execute
      the program (from init.rc using exec).
      
      Needed by changes from
        I58c79a7f3ac747eec0d73a10f018d3d8ade9df7d
      
      Change-Id: I1d5018feb7025853f0bf81651f497fef8c3a6ab0
      9d87c647
  16. Feb 25, 2015
    • Nick Kralevich's avatar
      Revert /proc/net related changes · 5cf3994d
      Nick Kralevich authored
      Revert the tightening of /proc/net access. These changes
      are causing a lot of denials, and I want additional time to
      figure out a better solution.
      
      Addresses the following denials (and many more):
      
        avc: denied { read } for comm="SyncAdapterThre" name="stats" dev="proc" ino=X scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file
        avc: denied { read } for comm="facebook.katana" name="iface_stat_fmt" dev="proc" ino=X scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file
        avc: denied { read } for comm="IntentService[C" name="if_inet6" dev="proc" ino=X scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file
        avc: denied { read } for comm="dumpstate" name="iface_stat_all" dev="proc" ino=X scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      This reverts commit 0f0324cc
      and commit 99940d1a
      
      Bug: 9496886
      Bug: 19034637
      Change-Id: I436a6e3638ac9ed49afbee214e752fe2b0112868
      5cf3994d
  17. Feb 24, 2015
  18. Feb 23, 2015
    • Nick Kralevich's avatar
      neverallow mounton lnk_file fifo_file sock_file · 74ddf301
      Nick Kralevich authored
      Add a compile time assertion that no SELinux rule exists which
      allows mounting on top of symbolic links, fifo files, or socket
      files. Remove the capability from unconfined domains.
      
      Change-Id: I6d7cc95cd17e2e5f165fa5948563800ed206bb71
      74ddf301
  19. Feb 11, 2015
    • Nick Kralevich's avatar
      domain.te: neverallow System V IPC classes · 14d5619a
      Nick Kralevich authored
      Android doesn't want to support System V IPC classes.
      Ensure that it isn't supported by adding a neverallow rule
      (compile time assertion).
      
      Change-Id: I278d45960ee557917584f9137323b4cabfe140a9
      14d5619a
  20. Feb 06, 2015
  21. Feb 05, 2015
  22. Jan 30, 2015
    • Nick Kralevich's avatar
      Add compile time checks for /data/dalvik-cache access · 3c77d4d1
      Nick Kralevich authored
      Add an SELinux neverallow rule (compile time assertion) that only
      authorized SELinux domains are writing to files in /data/dalvik-cache.
      
      Currently, SELinux policy only allows the following SELinux domains
      to perform writes to files in /data/dalvik-cache
      
        * init
        * zygote
        * installd
        * dex2oat
      
      For zygote, installd, and dex2oat, these accesses make sense.
      
      For init, we could further restrict init to just relabelfrom
      on /data/dalvik-cache files, and { create, write, setattr }
      on /data/dalvik-cache directories. Currently init has full
      write access, which can be reduced over time.
      
      This change was motivated by the discussion
      in https://android-review.googlesource.com/127582
      
      Remove /data/dalvik-cache access from the unconfined domain.
      This domain is only used by init, kernel, and fsck on user builds.
      The kernel and fsck domains have no need to access files in
      /data/dalvik-cache. Init has a need to relabel files, but
      that rule is already granted in init.te.
      
      The neverallow rule is intended to prevent regressions. Neverallow
      rules are CTS tested, so regressions won't appear on our devices
      or partner devices.
      
      Change-Id: I15e7d17b1121c556463114d1c6c49557a57911cd
      3c77d4d1
  23. Jan 22, 2015
    • Nick Kralevich's avatar
      domain.te: allow /proc/net/psched access · 0f0324cc
      Nick Kralevich authored
      external/sepolicy commit 99940d1a
      (https://android-review.googlesource.com/123331) removed /proc/net
      access from domain.te.
      
      Around the same time, system/core commit
      9a20e67fa62c1e0e0080910deec4be82ebecc922
      (https://android-review.googlesource.com/123531) was checked in.
      This change added libnl as a dependency of libsysutils.
      
      external/libnl/lib/utils.c has a function called get_psched_settings(),
      which is annotated with __attribute__((constructor)). This code
      gets executed when the library is loaded, regardless of whether or
      not other libnl code is executed.
      
      By adding the libnl dependency, even code which doesn't use the
      network (such as vold and logd) ends up accessing /proc/net/psched.
      
      For now, allow this behavior. However, in the future, it would be
      better to break this dependency so the additional code isn't loaded
      into processes which don't need it.
      
      Addresses the following denials:
      
        avc: denied { read } for  pid=148 comm="logd" name="psched" dev="proc" ino=4026536508 scontext=u:r:logd:s0 tcontext=u:object_r:proc_net:s0 tclass=file permissive=0
        avc: denied { read } for pid=152 comm="vold" name="psched" dev="proc" ino=4026536508 scontext=u:r:vold:s0 tcontext=u:object_r:proc_net:s0 tclass=file permissive=0
        avc: denied { read } for pid=930 comm="wpa_supplicant" name="psched" dev="proc" ino=4026536508 scontext=u:r:wpa:s0 tcontext=u:object_r:proc_net:s0 tclass=file permissive=0
      
      Bug: 19079006
      Change-Id: I1b6d2c144534d3f70f0028ef54b470a75bace1cf
      0f0324cc
  24. Jan 14, 2015
    • Nick Kralevich's avatar
      remove /proc/net read access from domain.te · 99940d1a
      Nick Kralevich authored
      SELinux domains wanting read access to /proc/net need to
      explicitly declare it.
      
      TODO: fixup the ListeningPortsTest cts test so that it's not
      broken.
      
      Bug: 9496886
      Change-Id: Ia9f1214348ac4051542daa661d35950eb271b2e4
      99940d1a
    • dcashman's avatar
      Make system_server_service an attribute. · 4a89cdfa
      dcashman authored
      Temporarily give every system_server_service its own
      domain in preparation for splitting it and identifying
      special services or classes of services.
      
      Change-Id: I81ffbdbf5eea05e0146fd7fd245f01639b1ae0ef
      4a89cdfa
  25. Dec 15, 2014
    • dcashman's avatar
      Restrict service_manager find and list access. · cd82557d
      dcashman authored
      All domains are currently granted list and find service_manager
      permissions, but this is not necessary.  Pare the permissions
      which did not trigger any of the auditallow reporting.
      
      Bug: 18106000
      Change-Id: Ie0ce8de2af8af2cbe4ce388a2dcf4534694c994a
      cd82557d
  26. Dec 10, 2014
  27. Dec 09, 2014
  28. Dec 05, 2014
  29. Nov 07, 2014
    • Nick Kralevich's avatar
      Allow recovery to create device nodes and modify rootfs · 1795b665
      Nick Kralevich authored
      tilapia's OTA code for updating the radio image needs to
      create files on rootfs and create a character device in /dev.
      Add an exception for recovery the the various neverallow rules
      blocking this behavior.
      
      (cherrypick, with modifications, from 0055ea90)
      
      Bug: 18281224
      Change-Id: I5c57afe0a10b4598fea17f9c5c833bd39551907e
      1795b665
    • Nick Kralevich's avatar
      Allow recovery to create device nodes and modify rootfs · 0055ea90
      Nick Kralevich authored
      tilapia's OTA code for updating the radio image needs to
      create files on rootfs and create a character device in /dev.
      Add an exception for recovery the the various neverallow rules
      blocking this behavior.
      
      Bug: 18281224
      Change-Id: I5c57afe0a10b4598fea17f9c5c833bd39551907e
      0055ea90
  30. Nov 05, 2014
    • Nick Kralevich's avatar
      recovery.te: add /data neverallow rules · a17a266e
      Nick Kralevich authored
      Recovery should never be accessing files from /data.
      In particular, /data may be encrypted, and the files within
      /data will be inaccessible to recovery, because recovery doesn't
      know the decryption key.
      
      Enforce write/execute restrictions on recovery. We can't tighten
      it up further because domain.te contains some /data read-only
      access rules, which shouldn't apply to recovery but do.
      
      Create neverallow_macros, used for storing permission macros
      useful for neverallow rules. Standardize recovery.te and
      property_data_file on the new macros.
      
      Change-Id: I02346ab924fe2fdb2edc7659cb68c4f8dffa1e88
      a17a266e
  31. Oct 31, 2014
  32. Oct 21, 2014
    • Stephen Smalley's avatar
      Remove -unconfineddomain from neverallow rules. · 0d08d472
      Stephen Smalley authored
      
      With the sepolicy-analyze neverallow checking, attribute
      expansion is performed against the device policy and therefore
      we do not want our neverallow rules to exempt domains from
      consideration based on an attribute (e.g. -unconfineddomain).
      Otherwise, device policy could pass the neverallow check just
      by adding more domains to unconfineddomain.  We could of course
      add a CTS test to check the list of unconfineddomains against
      a whitelist, but it seems desirable regardless to narrow these
      neverallow rules to only the specific domains required.
      
      There are three such neverallow rules in current policy: one
      on creating unlabeled files, one on accessing /dev/hw_random, and
      one on accessing a character device without a specific type.  The
      only domain in unconfineddomain that appears to have a legitimate
      need for any of these permissions is the init domain.  Replace
      -unconfineddomain with -init in these neverallow rules, exclude these
      permissions from unconfineddomain, and add these permissions to init if
      not already explicitly allowed.  auditallow accesses by init to files
      and character devices left in the generic device type so we can monitor
      what is being left there, although it is not necessarily a problem unless
      the file or device should be accessible to others.
      
      Change-Id: If6ee1b1a337c834971c6eb21dada5810608babcf
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      0d08d472
    • Stephen Smalley's avatar
      Remove block_device:blk_file access from fsck. · 3da1ffba
      Stephen Smalley authored
      
      Now that we have assigned specific types to userdata and cache
      block devices, we can remove the ability of fsck to run on other
      block devices.
      
      Change-Id: I8cfb3dc0e4ebe6b73346ff291ecb11397bb0c2d0
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      3da1ffba
  33. Oct 02, 2014
    • 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
Loading