Skip to content
Snippets Groups Projects
  1. Oct 29, 2013
  2. 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
  3. Oct 25, 2013
    • Nick Kralevich's avatar
      fix typo · 73c5ea72
      Nick Kralevich authored
      Change-Id: Ieda312d5607dd17af0bb70045fbaba8ddec38c94
      73c5ea72
  4. 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
  5. 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
  6. Oct 21, 2013
    • Nick Kralevich's avatar
    • Nick Kralevich's avatar
      Clarify the expectations for the unconfined template. · 84d88314
      Nick Kralevich authored
      In https://android-review.googlesource.com/66562 , there
      was a discussion about the role the unconfined template
      plays. Document the unconfined template so that those
      expectations are better understood.
      
      Change-Id: I20ac01ac2d4496b8425b6f63d4106e8021bc9b2f
      84d88314
    • 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
  7. Oct 16, 2013
  8. Oct 15, 2013
    • William Roberts's avatar
      tools: drop unused field in struct · d1f1070a
      William Roberts authored
      check_seapp at one point in time switch from a home implementation
      of a hash table to using GLIBC search.h routines. A struct in one
      of the fields was never removed during this transition.
      
      Change-Id: I65c028103ffe90fa52e0b3c9fce28124ed9c7ff9
      d1f1070a
  9. Oct 14, 2013
    • William Roberts's avatar
      tools: Strengthen BEGIN/END CERTIFICATE checks · 14138335
      William Roberts authored
      insertkeys.py used beginswith() when checking that the BEGIN
      and END CERTIFICATE clauses in PEM files were correct. It should
      have done an explicit check on equality.
      
      Change-Id: I5efb48d180bc674e6281a26a955acd248588b8bd
      14138335
  10. Oct 10, 2013
    • Mike Palmiotto's avatar
      tools: Don't error out of insertkeys script on whitespace · 070c01f8
      Mike Palmiotto authored
      Many keys end with whitespace or otherwise have whitespace separating the
      certificates.  If insertkeys is intended to support multiple certificates, we
      should also support blank line separators.
      
      Change-Id: I5fd17be5785ad1b89a6191e9ba33bbc7c5a4e8e9
      070c01f8
    • Nick Kralevich's avatar
      Allow apps to use the USB Accessory functionality · 0b8c20e7
      Nick Kralevich authored
      Apps may need to access the USB Accessory interface, which
      involves reads / writes / etc to /dev/usb_accessory
      and /dev/bus/usb/*
      
      See http://developer.android.com/guide/topics/connectivity/usb/accessory.html
      for more information.
      
      This addresses the following denials:
      
      [   80.075727] type=1400 audit(1379351306.384:9): avc:  denied  { read write } for  pid=496 comm="Binder_1" path="/dev/usb_accessory" dev=tmpfs ino=5320 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:usbaccessory_device:s0 tclass=chr_file
      [   86.204387] type=1400 audit(1379304688.579:10): avc:  denied  { getattr } for  pid=1750 comm="Thread-126" path="/dev/usb_accessory" dev=tmpfs ino=5320 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:usbaccessory_device:s0 tclass=chr_file
      [ 2773.581032] type=1400 audit(1379307375.959:22): avc:  denied  { read write } for  pid=761 comm="Binder_A" path="/dev/bus/usb/002/002" dev=tmpfs ino=12862 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:usb_device:s0 tclass=chr_file
      [ 2773.590843] type=1400 audit(1379307375.969:23): avc:  denied  { getattr } for  pid=5481 comm="android.app" path="/dev/bus/usb/002/002" dev=tmpfs ino=12862 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:usb_device:s0 tclass=chr_file
      [ 2773.591111] type=1400 audit(1379307375.969:24): avc:  denied  { ioctl } for  pid=5481 comm="android.app" path="/dev/bus/usb/002/002" dev=tmpfs ino=12862 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:usb_device:s0 tclass=chr_file
      
      Bug: 10780497
      Change-Id: I9663222f7a75dcbf3c42788a5b8eac45e69e00bb
      0b8c20e7
  11. Oct 09, 2013
  12. Oct 08, 2013
    • William Roberts's avatar
      tools: Correct insert keys behavior on pem files · 1ecb4e8a
      William Roberts authored
      Insert keys would erroneously process pem files
      with openssl headers in them. Also, the tool would
      be fooled into attempting to use pem files that
      had private keys and other things in the format.
      This patch strengthens the formatting requirements
      and increases the verboseness of error messages
      when processing pem files.
      
      Change-Id: I03353faaa641233a000d1a18943024ae47c63e0f
      1ecb4e8a
    • William Roberts's avatar
      Start confining ueventd · 85c5fc21
      William Roberts authored
      * Keep ueventd in permissive
      * Drop unconfined macro to collect logs
      * Restore allow rules to current NSA maintained policy
      
      Change-Id: Ic4ee8e24ccd8887fed151ae1e4f197512849f57b
      85c5fc21
  13. Oct 03, 2013
  14. Oct 01, 2013
    • Stephen Smalley's avatar
      Label adb keys file and allow access to it. · 55540755
      Stephen Smalley authored
      
      The /adb_keys entry will only take effect if a restorecon is
      applied by init.rc on a kernel that includes the rootfs labeling
      support, but does no harm otherwise.
      
      The /data/misc/adb labeling ensures correct labeling of the adb_keys
      file created if the device has ro.adb.secure=1 set.
      
      Allow adbd to read the file.
      
      Change-Id: I97b3d86a69681330bba549491a2fb39df6cf20ef
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      55540755
  15. Sep 30, 2013
    • Stephen Smalley's avatar
      Restore netdomain allow rules. · ca0759b1
      Stephen Smalley authored
      
      Change I4be1c987a5d69ac784a56d42fc2c9063c402de11 removed all
      netdomain allow rules at the same time domains were made unconfined.
      Prior to that change, any domain that used the net_domain() macro
      would be granted permissions required to use the network via these rules.
      The change made the netdomain attribute unused in any rules, thereby
      rendering the net_domain() calls pointless and requiring the allow
      rules to be duplicated for any domain requiring network access. There
      are two ways to resolve this inconsistency:
      1.  Restore the netdomain rules as in this change.  In that case,
      some rules in app.te can be removed as they are redundant with these rules.
      -or-
      2.  Completely remove the netdomain attribute, the net_domain() macro,
      and all calls to it.  In that case, each domain that requires network
      access will need to duplicate these rules or the necessary subset in order
      to function.
      
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      
      Change-Id: Ia54f0cd0bbda5c510423b1046626bd50f79ed7b6
      ca0759b1
    • Stephen Smalley's avatar
      Except the shell domain from the transition neverallow rule. · 57085446
      Stephen Smalley authored
      
      Shell domain can transition to other domains for runas, ping, etc.
      
      Change-Id: If9aabb4f51346dc00a89d03efea25499505f278d
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      57085446
  16. Sep 28, 2013
  17. Sep 27, 2013
  18. Sep 26, 2013
  19. Sep 23, 2013
  20. Sep 20, 2013
Loading