Skip to content
Snippets Groups Projects
  1. Nov 01, 2013
  2. Oct 31, 2013
    • Nick Kralevich's avatar
      Revert -Wall -Werror · 2d8a4237
      Nick Kralevich authored
      Temporarily revert -Wall -Werror on checkseapp.
      This is causing a compiler error on darwin SDK builds.
      
      cc1: warnings being treated as errors
      external/sepolicy/tools/check_seapp.c: In function 'rule_map_free':
      external/sepolicy/tools/check_seapp.c:439: warning: unused parameter 's'
      make: *** [out/host/darwin-x86/obj/EXECUTABLES/checkseapp_intermediates/check_seapp.o] Error 1
      
      Change-Id: I9776777a751f16d5ca0d90e731482c31dac813f9
      2d8a4237
    • Nick Kralevich's avatar
      Merge "Add sepolicy-analyze tool." · 9056b19d
      Nick Kralevich authored
      9056b19d
    • Nick Kralevich's avatar
    • Stephen Smalley's avatar
      Add sepolicy-analyze tool. · 7b2bee99
      Stephen Smalley authored
      
      And also remove the unnecessary references to libselinux for
      sepolicy-check, as it has no dependencies on libselinux.
      Also enable -Wall -Werror on building all of these tools and
      fix up all such errors.
      
      Usage:
      $ sepolicy-analyze -e -P out/target/product/<device>/root/sepolicy
      or
      $ sepolicy-analyze -d -P out/target/product/<device>/root/sepolicy
      
      The first form will display all type pairs that are "equivalent", i.e.
      they are identical with respect to allow rules, including indirect allow
      rules via attributes and default-enabled conditional rules (i.e. default
      boolean values yield a true conditional expression).
      
      Equivalent types are candidates for being coalesced into a single type.
      However, there may be legitimate reasons for them to remain separate,
      for example:
      - the types may differ in a respect not included in the current
      analysis, such as default-disabled conditional rules, audit-related
      rules (auditallow or dontaudit), default type transitions, or
      constraints (e.g. mls), or
      - the current policy may be overly permissive with respect to one or the
      other of the types and thus the correct action may be to tighten access
      to one or the other rather than coalescing them together, or
      - the domains that would in fact have different accesses to the types
      may not yet be defined or may be unconfined in the policy you are
      analyzing (e.g. in AOSP policy).
      
      The second form will display type pairs that differ and the first
      difference found between the two types.  This output can be long.
      
      We have plans to explore further enhancements to this tool, including
      support for identifying isomorphic types.  That will be required to
      identify similar domains since all domains differ in at least their
      entrypoint type and in their tmpfs type and thus will never show up as
      equivalent even if they are in all other respects identical to each other.
      
      Change-Id: If0ee00188469d2a1e165fdd52f235c705d22cd4e
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      7b2bee99
    • Stephen Smalley's avatar
      Make the keystore domain enforcing. · 709d7183
      Stephen Smalley authored
      
      Change-Id: I8f4964fb31e91d9f384ef05df5acdcdd45dec08b
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      709d7183
    • Nick Kralevich's avatar
      95cd6e09
    • Nick Kralevich's avatar
    • Nick Kralevich's avatar
    • Stephen Smalley's avatar
      Change the type on /dev/uinput to match /dev/uhid. · b3c48b66
      Stephen Smalley authored
      
      /dev/uinput is accessed in the same way as /dev/uhid,
      and unlike /dev/input/*.  bluetooth requires access to
      the former and not to the latter, while shell requires access
      to the latter and not the former.  This is also consistent
      with their DAC group ownerships (net_bt_stack for /dev/uinput
      and /dev/uhid vs input for /dev/input/*).
      
      Change-Id: I0059d832a7fe036ed888c91e1fb96f3e6e0bd2d4
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      b3c48b66
    • Nick Kralevich's avatar
    • Stephen Smalley's avatar
      Make the servicemanager domain enforcing. · b2b62e5b
      Stephen Smalley authored
      
      Change-Id: I410ba7dc105322135463fa6f76cac75d6b65e38a
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      b2b62e5b
  3. Oct 30, 2013
    • Nick Kralevich's avatar
    • Nick Kralevich's avatar
      Move sysfs_devices_system_cpu to the central policy. · 967f39a6
      Nick Kralevich authored
      Every device has a CPU. This is not device specific.
      
      Allow every domain to read these files/directories.
      For unknown reasons, these files are accessed by A LOT
      of processes.
      
      Allow ueventd to write to these files. This addresses
      the following denials seen on mako:
      
      <5>[    4.935602] type=1400 audit(1383167737.512:4): avc:  denied  { read } for  pid=140 comm="ueventd" name="cpu0" dev="sysfs" ino=3163 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=dir
      <5>[    4.935785] type=1400 audit(1383167737.512:5): avc:  denied  { open } for  pid=140 comm="ueventd" name="cpu0" dev="sysfs" ino=3163 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=dir
      <5>[    4.935937] type=1400 audit(1383167737.512:6): avc:  denied  { search } for  pid=140 comm="ueventd" name="cpu0" dev="sysfs" ino=3163 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=dir
      <5>[    4.936120] type=1400 audit(1383167737.512:7): avc:  denied  { write } for  pid=140 comm="ueventd" name="uevent" dev="sysfs" ino=3164 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=file
      <5>[    4.936303] type=1400 audit(1383167737.512:8): avc:  denied  { open } for  pid=140 comm="ueventd" name="uevent" dev="sysfs" ino=3164 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_devices_system_cpu:s0 tclass=file
      
      Change-Id: I4766dc571762d8fae06aa8c26828c070b80f5936
      967f39a6
    • William Roberts's avatar
      readme: add info on generating pem files from apks · 9793a452
      William Roberts authored
      Often times OEMs and other integrators will need to create PEM
      files from presigned APKs they are integrating. This patch will
      update the README to include a technique for doing so.
      
      Change-Id: Ica52269542409d2038cfe30cbd5f28ead2fba4de
      9793a452
  4. Oct 29, 2013
  5. Oct 28, 2013
    • Nick Kralevich's avatar
    • Nick Kralevich's avatar
      Make DEFAULT_SYSTEM_DEV_CERTIFICATE available in keys.conf · c3c9052b
      Nick Kralevich authored
      In 9af6f1bd, the -d option
      was dropped from insertkeys.py. This was done to allow an
      Android distribution to replace the default version of
      keys.conf distributed in external/sepolicy/keys.conf. keys.conf
      was modified to reference the publicly known test keys in
      build/target/product/security.
      
      Unfortunately, this broke Google's build of Android. Instead
      of incorporating our keys directory, we were using the
      default AOSP keys. As a result, apps were getting assigned
      to the wrong SELinux domain. (see "Steps to reproduce" below)
      
      This change continues to allow others to replace keys.conf,
      but makes DEFAULT_SYSTEM_DEV_CERTIFICATE available as an
      environment variable in case the customized version wants to
      make reference to it. This change also modifies the stock
      version of keys.conf to use DEFAULT_SYSTEM_DEV_CERTIFICATE,
      which should be appropriate for most Android distributions.
      It doesn't make any sense to force each OEM to have a copy of
      this file.
      
      Steps to reproduce.
      
      1) Compile and boot Android.
      2) Run the following command: "adb shell ps -Z | grep process.media"
      
      Expected:
      
        $ adb shell ps -Z | grep process.media
        u:r:media_app:s0               u0_a5     1332  202   android.process.media
      
      Actual:
      
        $ adb shell ps -Z | grep process.media
        u:r:untrusted_app:s0           u0_a5     3617  187   android.process.media
      
      Bug: 11327304
      Change-Id: Ica24fb25c5f9c0e2f4d181718c757cf372467822
      c3c9052b
  6. Oct 25, 2013
    • Nick Kralevich's avatar
      fix typo · 73c5ea72
      Nick Kralevich authored
      Change-Id: Ieda312d5607dd17af0bb70045fbaba8ddec38c94
      73c5ea72
  7. Oct 23, 2013
    • Stephen Smalley's avatar
      Confine mediaserver, but leave it permissive for now. · af9238c9
      Stephen Smalley authored
      
      Confine the mediaserver domain, restoring our rules for it,
      but leave it permissive until sufficient testing has been
      performed.
      
      Change-Id: I3d10ee16f5125b11295bc40ff6f2e14080b4bd00
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      af9238c9
    • Nick Kralevich's avatar
      sysfs_devices_system_cpu should be a sysfs_type · c4a3b510
      Nick Kralevich authored
      Otherwise the following denials occur on mako:
      
      <5>[    2.494246] type=1400 audit(1382544550.200:4): avc:  denied  { associate } for  pid=1 comm="init" name="time_in_state" dev="sysfs" ino=17444 scontext=u:object_r:sy
      sfs_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem
      <5>[    2.494735] type=1400 audit(1382544550.200:5): avc:  denied  { associate } for  pid=1 comm="init" name="total_trans" dev="sysfs" ino=17443 scontext=u:object_r:sysf
      s_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem
      <5>[    2.495162] type=1400 audit(1382544550.200:6): avc:  denied  { associate } for  pid=1 comm="init" name="stats" dev="sysfs" ino=17442 scontext=u:object_r:sysfs_devi
      ces_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem
      <5>[    2.495620] type=1400 audit(1382544550.200:7): avc:  denied  { associate } for  pid=1 comm="init" name="scaling_governor" dev="sysfs" ino=17435 scontext=u:object_r
      :sysfs_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem
      <5>[    2.496047] type=1400 audit(1382544550.200:8): avc:  denied  { associate } for  pid=1 comm="init" name="cpuinfo_transition_latency" dev="sysfs" ino=17429 scontext=
      u:object_r:sysfs_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem
      <5>[    2.496505] type=1400 audit(1382544550.200:9): avc:  denied  { associate } for  pid=1 comm="init" name="scaling_available_frequencies" dev="sysfs" ino=17439 sconte
      xt=u:object_r:sysfs_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem
      <5>[    2.496963] type=1400 audit(1382544550.200:10): avc:  denied  { associate } for  pid=1 comm="init" name="scaling_driver" dev="sysfs" ino=17436 scontext=u:object_r:
      sysfs_devices_system_cpu:s0 tcontext=u:object_r:sysfs:s0 tclass=filesystem
      
      Change-Id: I584a1cf61cb871a38be4d3b308cef03e64cfda8e
      c4a3b510
    • Stephen Smalley's avatar
      Confine all app domains, but make them permissive for now. · 5637099a
      Stephen Smalley authored
      
      As has already been done for untrusted_app, isolated_app,
      and bluetooth, make all the other domains used for app
      processes confined while making them permissive until sufficient
      testing has been done.
      
      Change-Id: If55fe7af196636c49d10fc18be2f44669e2626c5
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      5637099a
  8. Oct 22, 2013
    • Stephen Smalley's avatar
      Confine bluetooth app. · d7fd22e6
      Stephen Smalley authored
      
      Remove unconfined_domain() from the bluetooth app domain,
      restore the rules from our policy, and move the neverallow
      rule for bluetooth capabilities to bluetooth.te.
      Make the bluetooth domain permissive again until it has
      received sufficient testing.
      
      Change-Id: I3b3072d76e053eefd3d0e883a4fdb7c333bbfc09
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      d7fd22e6
  9. Oct 21, 2013
Loading