Skip to content
Snippets Groups Projects
  1. Apr 02, 2018
  2. Mar 20, 2018
  3. Mar 19, 2018
  4. Nov 21, 2017
    • Benjamin Gordon's avatar
      sepolicy: Add rules for non-init namespaces · 9b2e0cbe
      Benjamin Gordon authored
      In kernel 4.7, the capability and capability2 classes were split apart
      from cap_userns and cap2_userns (see kernel commit
      8e4ff6f228e4722cac74db716e308d1da33d744f). Since then, Android cannot be
      run in a container with SELinux in enforcing mode.
      
      This change applies the existing capability rules to user namespaces as
      well as the root namespace so that Android running in a container
      behaves the same on pre- and post-4.7 kernels.
      
      This is essentially:
        1. New global_capability_class_set and global_capability2_class_set
           that match capability+cap_userns and capability2+cap2_userns,
           respectively.
        2. s/self:capability/self:global_capability_class_set/g
        3. s/self:capability2/self:global_capability2_class_set/g
        4. Add cap_userns and cap2_userns to the existing capability_class_set
           so that it covers all capabilities.  This set was used by several
           neverallow and dontaudit rules, and I confirmed that the new
           classes are still appropriate.
      
      Test: diff new policy against old and confirm that all new rules add
            only cap_userns or cap2_userns;
            Boot ARC++ on a device with the 4.12 kernel.
      Bug: crbug.com/754831
      
      Change-Id: I4007eb3a2ecd01b062c4c78d9afee71c530df95f
      9b2e0cbe
  5. Oct 24, 2017
    • Tri Vo's avatar
      /proc, /sys access from uncrypt, update_engine, postinstall_dexopt · 04fb82f2
      Tri Vo authored
      New types:
      1. proc_random
      2. sysfs_dt_firmware_android
      
      Labeled:
      1. /proc/sys/kernel/random as proc_random.
      2. /sys/firmware/devicetree/base/firmware/android/{compatible, fstab,
      vbmeta} as sysfs_dt_firmware_android.
      
      Changed access:
      1. uncrypt, update_engine, postinstall_dexopt have access to generic proc
      and sysfs labels removed.
      2. appropriate permissions were added to uncrypt, update_engine,
      update_engine_common, postinstall_dexopt.
      
      Bug: 67416435
      Bug: 67416336
      Test: fake ota go/manual-ab-ota runs without denials
      Test: adb sideload runs without denials to new types
      Change-Id: Id31310ceb151a18652fcbb58037a0b90c1f6505a
      04fb82f2
  6. Apr 29, 2017
  7. Apr 12, 2017
  8. Mar 17, 2017
  9. Oct 06, 2016
    • dcashman's avatar
      Split general policy into public and private components. · cc39f637
      dcashman authored
      Divide policy into public and private components.  This is the first
      step in splitting the policy creation for platform and non-platform
      policies.  The policy in the public directory will be exported for use
      in non-platform policy creation.  Backwards compatibility with it will
      be achieved by converting the exported policy into attribute-based
      policy when included as part of the non-platform policy and a mapping
      file will be maintained to be included with the platform policy that
      maps exported attributes of previous versions to the current platform
      version.
      
      Eventually we would like to create a clear interface between the
      platform and non-platform device components so that the exported policy,
      and the need for attributes is minimal.  For now, almost all types and
      avrules are left in public.
      
      Test: Tested by building policy and running on device.
      
      Change-Id: Idef796c9ec169259787c3f9d8f423edf4ce27f8c
      cc39f637
  10. Sep 13, 2016
  11. Sep 12, 2016
    • Andreas Gampe's avatar
      Sepolicy: Adapt for new A/B OTA flow · 03daf853
      Andreas Gampe authored
      (cherry picked from commit d47c1e93)
      
      To include target slot names in the naming of A/B OTA artifacts,
      and new path has been implemented. Instead of passing through
      the system server and forking off of installd, otapreopt_chroot
      is now driven directly from the otapreopt script.
      
      Change the selinux policy accordingly: allow a transition from
      postinstall to otapreopt_chroot, and let otapreopt_chroot inherit
      the file descriptors that update_engine had opened (it will close
      them immediately, do not give rights to the downstream executables
      otapreopt and dex2oat).
      
      Bug: 25612095
      Bug: 28069686
      Change-Id: I6b476183572c85e75eda4d52f60e4eb5d8f48dbb
      03daf853
  12. Sep 10, 2016
  13. Sep 09, 2016
  14. Aug 29, 2016
  15. Jul 11, 2016
    • Andreas Gampe's avatar
      Sepolicy: Adapt for new A/B OTA flow · d47c1e93
      Andreas Gampe authored
      To include target slot names in the naming of A/B OTA artifacts,
      and new path has been implemented. Instead of passing through
      the system server and forking off of installd, otapreopt_chroot
      is now driven directly from the otapreopt script.
      
      Change the selinux policy accordingly: allow a transition from
      postinstall to otapreopt_chroot, and let otapreopt_chroot inherit
      the file descriptors that update_engine had opened (it will close
      them immediately, do not give rights to the downstream executables
      otapreopt and dex2oat).
      
      Bug: 25612095
      Bug: 28069686
      Change-Id: I6b476183572c85e75eda4d52f60e4eb5d8f48dbb
      d47c1e93
  16. Jun 06, 2016
  17. Apr 22, 2016
    • Andreas Gampe's avatar
      Selinux: Policies for otapreopt_chroot and postinstall_dexopt · e5d8a947
      Andreas Gampe authored
      Give mount & chroot permissions to otapreopt_chroot related to
      postinstall.
      
      Add postinstall_dexopt for otapreopt in the B partition. Allow
      the things installd can do for dexopt. Give a few more rights
      to dex2oat for postinstall files.
      
      Allow postinstall files to call the system server.
      
      Bug: 25612095
      Change-Id: If7407473d50c9414668ff6ef869c2aadd14264e7
      e5d8a947
Loading