Skip to content
Snippets Groups Projects
  1. Dec 07, 2016
    • dcashman's avatar
      Fix build. · 0c8ad1dc
      dcashman authored
      Make all platform tyeps public to start to prevent build breakage in any devices
      that may have device-specific policy using these types.  Future changes will
      need to be carefully made to ensure we properly limit types for use by
      non-platform policy.
      
      Test: Builds
      Change-Id: I7349940d5b5a57357bc7c16f66925dee1d030eb6
      0c8ad1dc
  2. Dec 06, 2016
  3. Dec 05, 2016
    • Jeff Sharkey's avatar
      Rules for new installd Binder interface. · e160d14e
      Jeff Sharkey authored
      Most of this CL mirrors what we've already done for the "netd" Binder
      interface, while sorting a few lists alphabetically.
      
      Migrating installd to Binder will allow us to get rid of one of
      the few lingering text-based command protocols, improving system
      maintainability and security.
      
      Test: builds, boots
      Bug: 13758960, 30944031
      Change-Id: I59b89f916fd12e22f9813ace6673be38314c97b7
      e160d14e
    • Nick Kralevich's avatar
      Prevent ptrace of logd on user builds · cb5f4a3d
      Nick Kralevich authored
      system/core commit 6a70ded7bfa8914aaa3dc25630ff2713ae893f80 (later
      amended by 107e29ac1b1c297a0d4ee35c4978e79f47013e2c indicated that logd
      doesn't want it's memory accessible by anyone else. Unfortunately,
      setting DUMPABLE isn't sufficient against a root level process such with
      ptrace. Only one such process exists, "debuggerd".
      
      Block debuggerd from accessing logd's memory on user builds. Userdebug
      and eng builds are unaffected.  Add a neverallow rule (compile time
      assertion + CTS test) to prevent regressions.
      
      Bug: 32450474
      Test: Policy compiles.
      Change-Id: Ie90850cd91846a43adaa0871d239f894a0c94d38
      cb5f4a3d
    • Nick Kralevich's avatar
      Merge "Revert "ueventd.te: auditallow device:chr_file"" · 7fb7102b
      Nick Kralevich authored
      am: 8ee06cc4
      
      Change-Id: I870f2084bd6f483c8e1537a73259e0d0a45f3a07
      7fb7102b
    • Nick Kralevich's avatar
    • Nick Kralevich's avatar
      Revert "ueventd.te: auditallow device:chr_file" · e78fa1bf
      Nick Kralevich authored
      Broke the dragon build:
      
      libsepol.report_failure: neverallow on line 304 of system/sepolicy/public/domain.te (or line 8638 of policy.conf) violated by allow kernel device:chr_file { create setattr };
      libsepol.check_assertions: 1 neverallow failures occurred
      Error while expanding policy
      
      This reverts commit ed0b4eb3.
      
      Change-Id: I5d55ab59ed72ce7c19a10ddbb374f9f3b3fae4fd
      e78fa1bf
    • Nick Kralevich's avatar
      Merge "ueventd.te: auditallow device:chr_file" · 887f026b
      Nick Kralevich authored
      am: 4868f377
      
      Change-Id: I3c57e833dd736ac87718d9e95e0a02e3048de979
      887f026b
    • Treehugger Robot's avatar
      4868f377
    • Robert Sesek's avatar
      Merge "Allow webview_zygote to stat /sys/kernel/debug/tracing/trace_marker." · 6774088b
      Robert Sesek authored
      am: 2c222c1e
      
      Change-Id: I89d6c56ce6d29dfb184f9eb95aaaa49909e25b44
      6774088b
    • Treehugger Robot's avatar
    • Nick Kralevich's avatar
      ueventd.te: auditallow device:chr_file · ed0b4eb3
      Nick Kralevich authored
      By default, files created in /dev are labeled with the "device" label
      unless a different label has been assigned. The direct use of this
      generic label is discouraged (and in many cases neverallowed) because
      rules involving this label tend to be overly broad and permissive.
      
      Today, generically labeled character devices can only be opened, read,
      or written to by init and ueventd.
      
        $ sesearch --allow -t device -c chr_file -p open,read,write out/target/product/marlin/root/sepolicy
        allow init device:chr_file { setattr read lock getattr write ioctl open append };
        allow ueventd device:chr_file { read lock getattr write ioctl open append };
      
      this is enforced by the following SELinux neverallow rule (compile time
      assertion + CTS test):
      
        neverallow { domain -init -ueventd } device:chr_file { open read write };
      
      Start auditallowing ueventd access to /dev character device files with the
      default SELinux label. This doesn't appear to be used, but let's prove it.
      While ueventd is expected to create files in /dev, it has no need to open
      most of the files it creates.
      
      Note, however, that because ueventd has mknod + setfscreate permissions,
      a malicious or compromised ueventd can always create a device node under
      an incorrect label, and gain access that way.
      
      The goal of this change is to prove that no process other than init are
      accessing generically labeled files in /dev.
      
      While I'm here, tighten up the compile time assertion for
      device:chr_file to include more permissions.
      
      Test: policy compiles + device boots with no granted messages.
      Change-Id: Ic98b0ddc631b49b09e58698d9f40738ccedd1fd0
      ed0b4eb3
    • Daniel Micay's avatar
      Merge "auditallow priv_app app_data_file execution" · 5fa3dd06
      Daniel Micay authored
      am: a24d7f53
      
      Change-Id: Ia27cb54e53bbd755adaf588fb4bb2f948ba3d255
      5fa3dd06
    • Treehugger Robot's avatar
    • Max's avatar
      /dev/port does not seem to be used, adding in rules to confirm. · 45c41f35
      Max authored
      am: c27c23fb
      
      Change-Id: I28f0ec1eac5fa78ca1268089954c190c0e38b188
      45c41f35
    • Max's avatar
      /dev/port does not seem to be used, adding in rules to confirm. · c27c23fb
      Max authored
      Only init and ueventd have any access to /dev/port, and neither should
      have any use for it. As it stands, leaving port in just represents
      additional attack surface with no useful functionality, so it should be
      removed if possible, not only from Pixel devices, but from all Android
      devices.
      
      Test: The phone boots successfully
      
      Bug:33301618
      Change-Id: Iedc51590f1ffda02444587d647889ead9bdece3f
      c27c23fb
    • Daniel Micay's avatar
      auditallow priv_app app_data_file execution · 758e6b36
      Daniel Micay authored
      In general, apps shouldn't be executing data from their writable data
      directories. Allowing this is a security risk and use cases for this are
      almost always anti-patterns where saner alternatives are available such
      as using one of the standard systems for shipping libraries (extracted
      by the package manager or aligned/uncompressed in the apk) or using the
      existing package system to handle plugins. It's reasonable for the
      untrusted_app domain to have this (not just for backwards compatibility)
      for priv_app should be held to a higher standard.
      
      Ideally, untrusted apps would be able to opt-in to disabling this and
      then the default could then be switched at a new API level. It could do
      more than just hardening apps not requiring it by having documentation
      explain the risks and offer alternatives to reduce 'legitimate' use. The
      base system could disable it for all of the bundled untrusted apps.
      
      Change-Id: I4efcfaf01c6b6c33c39e98c22a1934e8892e2147
      758e6b36
  4. Dec 04, 2016
  5. Dec 03, 2016
  6. Dec 02, 2016
    • Robert Sesek's avatar
      Allow webview_zygote to stat /sys/kernel/debug/tracing/trace_marker. · 5af7c660
      Robert Sesek authored
      Test: m
      Test: angler boots
      
      Bug: 21643067
      Change-Id: I7530120385766506405a318caac8ef143e71cce7
      5af7c660
    • Jeff Sharkey's avatar
      Allow system_server to measure emulated stats. · 17c675b3
      Jeff Sharkey authored
      Historically we pushed all system_server SD card interactions through
      DefaultContainerService to avoid holding open FDs, but it's safe to
      measure disk usage for internal emulated storage when looking
      directly at /data/media, since there is no risk of unsafe ejection.
      
      These rule changes give us just enough access to measure statistics.
      
      avc: denied { getattr } for path="/data/media/0/DCIM/.thumbnails" dev="sda35" ino=589892 scontext=u:r:system_server:s0 tcontext=u:object_r:media_rw_data_file:s0:c512,c768 tclass=dir permissive=1
      avc: denied { open } for path="/data/media/0/DCIM/.thumbnails" dev="sda35" ino=589892 scontext=u:r:system_server:s0 tcontext=u:object_r:media_rw_data_file:s0:c512,c768 tclass=dir permissive=1
      avc: denied { read } for name="0" dev="sda35" ino=589827 scontext=u:r:system_server:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=dir permissive=1
      
      Test: builds, boots, and access allowed
      Bug: 33298975
      Change-Id: I9748608a5c1169d542e763c5a8f79c4f26f7a382
      17c675b3
  7. Dec 01, 2016
  8. Nov 30, 2016
    • Nick Kralevich's avatar
      domain_deprecated.te: remove /proc/net access · dd649da8
      Nick Kralevich authored
      Remove /proc/net access to domain_deprecated. Add it to domains where it
      was missing before.
      
      Other than these domains, SELinux denial monitoring hasn't picked up any
      denials related to /proc/net
      
      Bug: 28760354
      Test: Device boots
      Test: No unexpected denials in denial collection logs.
      Change-Id: Ie5bfa4bc0070793c1e8bf3b00676fd31c08d426a
      dd649da8
    • Steven Moreland's avatar
      dumpstate: talk to vibrator hal · 7aa5caf8
      Steven Moreland authored
      am: 839c7ded
      
      Change-Id: Ibbbc3e8e51cbe6a5e2f1e5be7839a1cc3341b33c
      7aa5caf8
    • Max's avatar
      Added an auditallow rule to track vold remounting filesystems. · 314d8c58
      Max authored
      Vold shouldn't have this selinux permission, so this will be left in for
      a few weeks to keep track of if removing it would be an issue to any
      other processes. If not, then a follow-up CL will remove both the rule
      and the auditallow
      
      Test: This CL is a test in itself, auditallow rules shouldn't change
      behavior of SELinux policy by themselves
      Bug: 26901147
      Change-Id: Ib076448863bd54278df59a3b514c9e877eb22ee5
      314d8c58
  9. Nov 29, 2016
Loading