Skip to content
Snippets Groups Projects
  1. Aug 06, 2018
  2. Aug 04, 2018
  3. Aug 03, 2018
    • Sudheer Shanka's avatar
      c5601de4
    • Nick Kralevich's avatar
      Change priv-apps /home/home labels to privapp_data_file · 4df57822
      Nick Kralevich authored
      Currently, both untrusted apps and priv-apps use the SELinux file label
      "app_data_file" for files in their /data/data directory. This is
      problematic, as we really want different rules for such files. For
      example, we may want to allow untrusted apps to load executable code
      from priv-app directories, but disallow untrusted apps from loading
      executable code from their own home directories.
      
      Commit 23c9d91b introduced a new type
      called privapp_data_file and added rules necessary to preserve
      compatibility. However, that change did not relabel any existing files,
      so effectively the change was a no-op.
      
      This change performs the switch, relabeling priv-app's /data/data files
      from app_data_file to privapp_data_file. Due to the compatibility rules
      added in 23c9d91b, there should be no
      noticeable effect from this change.
      
      Test: Factory reset and boot - no problems on fresh install.
      Test: Upgrade to new version and test. No compatibility problems on
            filesystem upgrade.
      
      Merged-In: I9a476726bf01f4bcc7952d11fd57dba803a9fd8d
      Change-Id: I23a26cd3906fc43cbd225c05c3a2abd3cab8bd06
      4df57822
    • Sudheer Shanka's avatar
      Allow vold to mount at /mnt/user/.* · a2bacea8
      Sudheer Shanka authored
      Bug: 111890351
      Test: Device boots and no selinux denials when vold mounts
            at /mnt/user/.*
      
      Change-Id: Id962a85af9f99c54421f0820a22880be36c2e478
      a2bacea8
    • Tom Cherry's avatar
      Allow init to execute services marked with seclabel u:r:su:s0 in userdebug/eng · 938ab05d
      Tom Cherry authored
      This is do aid developers pushing debug services to not need to modify
      the underlying SEPolicy
      
      avc: denied { transition } for comm="init" path="/system/bin/awk"
      dev="dm-0" ino=1934 scontext=u:r:init:s0 tcontext=u:r:su:s0
      tclass=process
      avc: denied { rlimitinh } for comm="awk" scontext=u:r:init:s0
      tcontext=u:r:su:s0 tclass=process
      avc: denied { siginh } for comm="awk" scontext=u:r:init:s0
      tcontext=u:r:su:s0 tclass=process
      avc: denied { noatsecure } for comm="awk" scontext=u:r:init:s0
      tcontext=u:r:su:s0 tclass=process
      
      Test: init can execute a system_file marked with seclabel u:r:su:s0
      Change-Id: I85d9528341fe08dbb2fb9a91e34a41f41aa093be
      938ab05d
    • Tom Cherry's avatar
      Move watchdogd out of init and into its own domain · d840374e
      Tom Cherry authored
      Bug: 73660730
      Test: watchdogd still runs
      Change-Id: I31697c7c6fa2f7009731ff48c659af051838e42f
      d840374e
  4. Aug 02, 2018
    • Nick Kralevich's avatar
      Start partitioning off privapp_data_file from app_data_file · 23c9d91b
      Nick Kralevich authored
      Currently, both untrusted apps and priv-apps use the SELinux file label
      "app_data_file" for files in their /data/data directory. This is
      problematic, as we really want different rules for such files. For
      example, we may want to allow untrusted apps to load executable code
      from priv-app directories, but disallow untrusted apps from loading
      executable code from their own home directories.
      
      This change adds a new file type "privapp_data_file". For compatibility,
      we adjust the policy to support access privapp_data_files almost
      everywhere we were previously granting access to app_data_files
      (adbd and run-as being exceptions). Additional future tightening is
      possible here by removing some of these newly added rules.
      
      This label will start getting used in a followup change to
      system/sepolicy/private/seapp_contexts, similar to:
      
        -user=_app isPrivApp=true domain=priv_app type=app_data_file levelFrom=user
        +user=_app isPrivApp=true domain=priv_app type=privapp_data_file levelFrom=user
      
      For now, this newly introduced label has no usage, so this change
      is essentially a no-op.
      
      Test: Factory reset and boot - no problems on fresh install.
      Test: Upgrade to new version and test. No compatibility problems on
            filesystem upgrade.
      
      Change-Id: I9618b7d91d1c2bcb5837cdabc949f0cf741a2837
      23c9d91b
    • Tom Cherry's avatar
      Merge "Allow ueventd to insert modules" · b5201698
      Tom Cherry authored
      b5201698
    • Alan Stokes's avatar
      Remove legacy execmod access. · 0f11ffcc
      Alan Stokes authored
      Remove the exemptions for untrusted apps and broaden the neverallow so
      they can't be reinstated. Modifying executable pages is unsafe. Text
      relocations are not supported.
      
      Bug: 111544476
      Test: Builds.
      Change-Id: Ibff4f34d916e000203e38574bb063513e4428bb7
      0f11ffcc
  5. Aug 01, 2018
  6. Jul 31, 2018
    • Tom Cherry's avatar
      allow init to run fsck for early mount partitions · 47157353
      Tom Cherry authored
      Bug: 111883560
      Test: fsck runs successfully during early mount
      Change-Id: I697d0ab8ba51824d5c5062b48370a73438311566
      47157353
    • Nick Kralevich's avatar
      Allow mmap for vendor_init · 99ceb07e
      Nick Kralevich authored
      vendor_init needs to touch a bunch of files. Forgotten within this set
      of permissions is the ability to mmap files.
      
      Addresses the following denial:
      
        avc:  denied  { map } for  pid=1167 comm="init" path="/system/etc/selinux/plat_file_contexts" dev="vda1" ino=1845 scontext=u:r:vendor_init:s0 tcontext=u:object_r:file_contexts_file:s0 tclass=file permissive=0
      
      While I'm here, add mmap() support to other areas where it's likely
      needed.
      
      Bug: 111742629
      Test: make -j80, ran emulator
      Change-Id: Icab00e45ae88f0d86be66d85a22e018af6ffcd75
      99ceb07e
  7. Jul 26, 2018
    • Nick Kralevich's avatar
      Protect apps from ptrace by other system components · 84a42ead
      Nick Kralevich authored
      The Android security model guarantees the confidentiality and integrity
      of application data and execution state. Ptrace bypasses those
      confidentiality guarantees. Disallow ptrace access from system components
      to apps. Crash_dump is excluded, as it needs ptrace access to
      produce stack traces.
      
      Bug: 111317528
      Test: code compiles
      Change-Id: I883df49d3e9bca62952c3b33d1c691786dd7df4d
      84a42ead
  8. Jul 25, 2018
    • Treehugger Robot's avatar
      Merge "OWNERS: add nnk and smoreland" · 719fa6db
      Treehugger Robot authored
      719fa6db
    • Jeff Vander Stoep's avatar
      OWNERS: add nnk and smoreland · 90441656
      Jeff Vander Stoep authored
      Test: none
      Change-Id: I5023f3f3f9362d456f30c81ec67580509101e81e
      90441656
    • Bowgo Tsai's avatar
      Allowing vold to search /mnt/vendor/* · 7b67a617
      Bowgo Tsai authored
      vold will trim rw mount points about daily, but it is denied by SELinux:
      
      root   603   603 W Binder:603_2: type=1400 audit(0.0:11): avc: denied {
      search } for name="vendor" dev="tmpfs" ino=23935 scontext=u:r:vold:s0
      tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0
      
      Allowing vold to search /mnt/vendor/* to fix the denials.
      
      Note that device-specific sepolicy needs to be extended to allow vold
      to send FITRIM ioctl. e.g., for /mnt/vendor/persist, it needs:
      
          allow vold persist_file:dir { ioctl open read };
      
      Bug: 111409607
      Test: boot a device, checks the above denial is gone
      Change-Id: Ia9f22d973e5a2e295678781de49a0f61fccd9dad
      7b67a617
  9. Jul 24, 2018
  10. Jul 23, 2018
  11. Jul 20, 2018
    • Tri Vo's avatar
      28 mapping workaround for devices upgrading to P. · 0cc68ea0
      Tri Vo authored
      Bug: 72458734
      Test: Compile current system sepolicy with P vendor sepolicy
      Test: Plug in a P device then do:
      m selinux_policy
      cp $OUT/system/etc/selinux/plat_sepolicy.cil  plat_sepolicy.cil
      cp $ANDROID_BUILD_TOP/system/sepolicy/private/compat/28.0/28.0.cil 28.0.cil
      adb pull /vendor/etc/selinux/plat_pub_versioned.cil
      adb pull /vendor/etc/selinux/vendor_sepolicy.cil
      secilc plat_sepolicy.cil -m -M true -G -N -c 30 28.0.cil \
      plat_pub_versioned.cil vendor_sepolicy.cil
      Change-Id: I399b3a204eb94bee0ba1b5024b1c3463219c678e
      0cc68ea0
    • Alan Stokes's avatar
      Temporarily add auditing of execmod by apps. · 708aa90d
      Alan Stokes authored
      This is so we can get data on which apps are actually doing this.
      
      Bug: 111544476
      Test: Device boots. No audits seen on test device.
      Change-Id: I5f72200ed8606775904d353c4d3d790373fe7dea
      708aa90d
    • Tri Vo's avatar
      Merge "Add mapping files for 28.0.[ignore.]cil" · 13e60ed1
      Tri Vo authored
      13e60ed1
  12. Jul 19, 2018
    • Jae Shin's avatar
      Add mapping files for 28.0.[ignore.]cil · 1fa96348
      Jae Shin authored
      Steps taken to produce the mapping files:
      
      1. Add prebuilts/api/28.0/[plat_pub_versioned.cil|vendor_sepolicy.cil]
      from the /vendor/etc/selinux/[plat_pub_versioned.cil|vendor_sepolicy.cil]
      files built on pi-dev with lunch target aosp_arm64-eng
      
      2. Add new file private/compat/28.0/28.0.cil by doing the following:
      - copy /system/etc/selinux/mapping/28.0.cil from pi-dev aosp_arm64-eng
      device to private/compat/28.0/28.0.cil
      - remove all attribute declaration statement (typeattribute ...) and
      sort lines alphabetically
      - some selinux types were added/renamed/deleted w.r.t 28 sepolicy.
      Find all such types using treble_sepolicy_tests_28.0 test.
      - for all these types figure out where to map them by looking at
      27.0.[ignore.]cil files and add approprite entries to 28.0.[ignore.]cil.
      
      This change also enables treble_sepolicy_tests_28.0 and install 28.0.cil
      mapping onto the device.
      
      Bug: 72458734
      Test: m selinux_policy
      Change-Id: I90e17c0b43af436da4b62c16179c198b5c74002c
      1fa96348
  13. Jul 18, 2018
  14. Jul 17, 2018
  15. Jul 14, 2018
    • Steven Thomas's avatar
      Selinux changes for vr flinger vsync service · 7bec9674
      Steven Thomas authored
      Add selinux policy for the new Binder-based vr flinger vsync service.
      
      Bug: 72890037
      
      Test: - Manually confirmed that I can't bind to the new vsync service
      from a normal Android application, and system processes (other than
      vr_hwc) are prevented from connecting by selinux.
      
      - Confirmed the CTS test
        android.security.cts.SELinuxHostTest#testAospServiceContexts, when
        built from the local source tree with this CL applied, passes.
      
      - Confirmed the CTS test
        android.cts.security.SELinuxNeverallowRulesTest#testNeverallowRules521,
        when built from the local source tree with this CL applied, passes.
      
      Change-Id: Ib7a6bfcb1c2ebe1051f3accc18b481be1b188b06
      7bec9674
  16. Jul 13, 2018
  17. Jul 12, 2018
  18. Jul 11, 2018
  19. Jul 03, 2018
Loading