Skip to content
Snippets Groups Projects
  1. Dec 09, 2013
    • Stephen Smalley's avatar
      Restrict ptrace access by debuggerd and unconfineddomain. · 95e0842e
      Stephen Smalley authored
      
      Remove init, ueventd, watchdogd, healthd and adbd from the set of
      domains traceable by debuggerd.  bionic/linker/debugger.cpp sets up
      handlers for all dynamically linked programs in Android but this
      should not apply for statically linked programs.
      
      Exclude ptrace access from unconfineddomain.
      
      Prohibit ptrace access to init via neverallow.
      
      Change-Id: I70d742233fbe40cb4d1772a4e6cd9f8f767f2c3a
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      95e0842e
  2. Dec 06, 2013
    • Nick Kralevich's avatar
      Allow app-app communication via pipes · 82fc3b52
      Nick Kralevich authored
      Allow apps to communicate with each other via pipes.
      In particular, this fixes a bug where printing from Chrome wasn't
      working.
      
        STEPS TO REPRODUCE:
        1. Launch Chrome
        2. From menu tap print and observe
              OR
        1. Launch Drive, Select any file (*.txt, *.doc. *.pdf.........)
        2. Select print
      
      Addresses the following denials:
      
      <5>[  122.352797] type=1400 audit(1386363998.374:18): avc:  denied  { write } for  pid=3786 comm=4173796E635461736B202332 path="pipe:[19164]" dev="pipefs" ino=19164 scontext=u:r:untrusted_app:s0 tcontext=u:r:release_app:s0 tclass=fifo_file
      <5>[  123.248363] type=1400 audit(1386363999.264:19): avc:  denied  { getattr } for  pid=2677 comm=".android.chrome" path="pipe:[19164]" dev="pipefs" ino=19164 scontext=u:r:untrusted_app:s0 tcontext=u:r:release_app:s0 tclass=fifo_file
      <5>[  123.248620] type=1400 audit(1386363999.264:20): avc:  denied  { write } for  pid=3308 comm="ChildProcessMai" path="pipe:[19164]" dev="pipefs" ino=19164 scontext=u:r:isolated_app:s0 tcontext=u:r:release_app:s0 tclass=fifo_file
      
      Bug: 12032455
      Change-Id: Ic1cb5c1d42596f5a8fc3fe82fcbfe47aa43a7d6c
      82fc3b52
    • Nick Kralevich's avatar
      Merge "Make debuggerd enforcing." · 49db2680
      Nick Kralevich authored
      49db2680
    • Stephen Smalley's avatar
      am fea6e66f: Allow kernel domain, not init domain, to set SELinux enforcing mode. · 2c55c539
      Stephen Smalley authored
      * commit 'fea6e66f':
        Allow kernel domain, not init domain, to set SELinux enforcing mode.
      2c55c539
    • Stephen Smalley's avatar
      Allow kernel domain, not init domain, to set SELinux enforcing mode. · fea6e66f
      Stephen Smalley authored
      As per the discussion in:
      https://android-review.googlesource.com/#/c/71184/
      
      
      
      init sets the enforcing mode in its code prior to switching to
      the init domain via a setcon command in the init.rc file.  Hence,
      the setenforce permission is checked while still running in the
      kernel domain.  Further, as init has no reason to ever set the
      enforcing mode again, we do not need to allow setenforce to the
      init domain and this prevents reverting to permissive
      mode via an errant write by init later.  We could technically
      dontaudit the kernel setenforce access instead since the first
      call to setenforce happens while still permissive (and thus we
      never need to allow it in policy) but we allow it to more accurately
      represent what is possible.
      
      Change-Id: I70b5e6d8c99e0566145b9c8df863cc8a34019284
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      fea6e66f
    • Nick Kralevich's avatar
      am 9e8b8d9f: Revert "Allow kernel domain, not init domain, to set SELinux enforcing mode." · a6c9cdff
      Nick Kralevich authored
      * commit '9e8b8d9f':
        Revert "Allow kernel domain, not init domain, to set SELinux enforcing mode."
      a6c9cdff
    • Nick Kralevich's avatar
      Revert "Allow kernel domain, not init domain, to set SELinux enforcing mode." · 9e8b8d9f
      Nick Kralevich authored
      The build is broken. Reverting temporarily to fix breakage.
      
      libsepol.check_assertion_helper: neverallow on line 4758 violated by allow init kernel:security { setenforce };
      Error while expanding policy
      make: *** [out/target/product/mako/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
      make: *** Waiting for unfinished jobs....
      
      
      This reverts commit bf12e225.
      
      Change-Id: I78a05756d8ce3c7d06e1d9d27e6135f4b352bb85
      9e8b8d9f
    • Stephen Smalley's avatar
      am bf12e225: Allow kernel domain, not init domain, to set SELinux enforcing mode. · 6c8cbac3
      Stephen Smalley authored
      * commit 'bf12e225':
        Allow kernel domain, not init domain, to set SELinux enforcing mode.
      6c8cbac3
    • Stephen Smalley's avatar
      Allow kernel domain, not init domain, to set SELinux enforcing mode. · bf12e225
      Stephen Smalley authored
      As per the discussion in:
      https://android-review.googlesource.com/#/c/71184/
      
      
      
      init sets the enforcing mode in its code prior to switching to
      the init domain via a setcon command in the init.rc file.  Hence,
      the setenforce permission is checked while still running in the
      kernel domain.  Further, as init has no reason to ever set the
      enforcing mode again, we do not need to allow setenforce to the
      init domain and this prevents reverting to permissive
      mode via an errant write by init later.  We could technically
      dontaudit the kernel setenforce access instead since the first
      call to setenforce happens while still permissive (and thus we
      never need to allow it in policy) but we allow it to more accurately
      represent what is possible.
      
      Change-Id: I617876c479666a03167b8fce270c82a8d45c7cc6
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      bf12e225
    • Nick Kralevich's avatar
      am 2b392fcc: Move lmkd into it\'s own domain. · 156b5db9
      Nick Kralevich authored
      * commit '2b392fcc':
        Move lmkd into it's own domain.
      156b5db9
    • Stephen Smalley's avatar
      am 7adb999e: Restrict the ability to set usermodehelpers and proc security settings. · d5f77d7a
      Stephen Smalley authored
      * commit '7adb999e':
        Restrict the ability to set usermodehelpers and proc security settings.
      d5f77d7a
    • Nick Kralevich's avatar
      Move lmkd into it's own domain. · 2b392fcc
      Nick Kralevich authored
      lmkd low memory killer daemon
      
      The kernel low memory killer logic has been moved to a new daemon
      called lmkd.  ActivityManager communicates with this daemon over a
      named socket.
      
      This is just a placeholder policy, starting off in unconfined_domain.
      
      Change-Id: Ia3f9a18432c2ae37d4f5526850e11432fd633e10
      2b392fcc
    • Stephen Smalley's avatar
      Make debuggerd enforcing. · a1618401
      Stephen Smalley authored
      
      Change-Id: If5b7206192cf93d9989b734304db0374429c04d5
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      a1618401
    • Stephen Smalley's avatar
      Restrict the ability to set usermodehelpers and proc security settings. · 7adb999e
      Stephen Smalley authored
      
      Limit the ability to write to the files that configure kernel
      usermodehelpers and security-sensitive proc settings to the init domain.
      Permissive domains can also continue to set these values.
      
      The current list is not exhaustive, just an initial set.
      Not all of these files will exist on all kernels/devices.
      Controlling access to certain kernel usermodehelpers, e.g. cgroup
      release_agent, will require kernel changes to support and cannot be
      addressed here.
      
      Expected output on e.g. flo after the change:
      ls -Z /sys/kernel/uevent_helper /proc/sys/fs/suid_dumpable /proc/sys/kernel/core_pattern /proc/sys/kernel/dmesg_restrict /proc/sys/kernel/hotplug /proc/sys/kernel/kptr_restrict /proc/sys/kernel/poweroff_cmd /proc/sys/kernel/randomize_va_space /proc/sys/kernel/usermodehelper
      -rw-r--r-- root     root              u:object_r:usermodehelper:s0 uevent_helper
      -rw-r--r-- root     root              u:object_r:proc_security:s0 suid_dumpable
      -rw-r--r-- root     root              u:object_r:usermodehelper:s0 core_pattern
      -rw-r--r-- root     root              u:object_r:proc_security:s0 dmesg_restrict
      -rw-r--r-- root     root              u:object_r:usermodehelper:s0 hotplug
      -rw-r--r-- root     root              u:object_r:proc_security:s0 kptr_restrict
      -rw-r--r-- root     root              u:object_r:usermodehelper:s0 poweroff_cmd
      -rw-r--r-- root     root              u:object_r:proc_security:s0 randomize_va_space
      -rw------- root     root              u:object_r:usermodehelper:s0 bset
      -rw------- root     root              u:object_r:usermodehelper:s0 inheritable
      
      Change-Id: I3f24b4bb90f0916ead863be6afd66d15ac5e8de0
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      7adb999e
    • The Android Open Source Project's avatar
      b96f677c
  3. 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
    • Robert Craig's avatar
      Drop tegra specific label from policy. · b2547644
      Robert Craig authored
      This label was originally used for Motorola
      Xoom devices. nvmap is the tegra gpu memory
      manager and the various nvhost drivers are
      for tegra graphics related functionality,
      i.e. display serial interface, image signal
      processor, or media processing stuff.
      
      Only grouper and tilapia presently need this
      policy.
      
      Change-Id: I2a7000f69abf3185724d88d428e8237e0ca436ec
      b2547644
    • Nick Kralevich's avatar
      8824c552
  4. Dec 02, 2013
  5. Nov 27, 2013
    • Nick Kralevich's avatar
      Allow write access to ashmem allocated regions · 47685535
      Nick Kralevich authored
      Allow tmpfs_domains the ability to write to ashmem allocated
      regions. At least one Google internal app does this, and switching
      untrusted_app into enforcing causes the following denial:
      
      <5>[  291.791423] type=1400 audit(1385587240.320:79): avc:  denied  { write } for  pid=3774 comm="XXXXXXXXXXXX" path=2F6465762F6173686D656D202864656C6574656429 dev="tmpfs" ino=16937 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:untrusted_app_tmpfs:s0 tclass=file
      
      path=/dev/ashmem (deleted)
      
      Bug: 11891764
      Change-Id: I64d414c055cd02481ebf69994fad65d777d8381d
      47685535
  6. Nov 23, 2013
  7. Nov 22, 2013
  8. Nov 21, 2013
  9. Nov 19, 2013
  10. Nov 18, 2013
  11. Nov 15, 2013
  12. Nov 14, 2013
Loading