Skip to content
Snippets Groups Projects
  1. Apr 02, 2018
  2. Mar 20, 2018
  3. Mar 19, 2018
  4. Jul 24, 2017
    • Jeff Vander Stoep's avatar
      Move domain_deprecated into private policy · 7c34e83f
      Jeff Vander Stoep authored
      This attribute is being actively removed from policy. Since
      attributes are not being versioned, partners must not be able to
      access and use this attribute. Move it from private and verify in
      the logs that rild and tee are not using these permissions.
      
      Bug: 38316109
      Test: build and boot Marlin
      Test: Verify that rild and tee are not being granted any of these
            permissions.
      Merged-In: I31beeb5bdf3885195310b086c1af3432dc6a349b
      Change-Id: I31beeb5bdf3885195310b086c1af3432dc6a349b
      (cherry picked from commit 76aab82c)
      7c34e83f
  5. May 15, 2017
    • Jeff Vander Stoep's avatar
      Move domain_deprecated into private policy · 76aab82c
      Jeff Vander Stoep authored
      This attribute is being actively removed from policy. Since
      attributes are not being versioned, partners must not be able to
      access and use this attribute. Move it from private and verify in
      the logs that rild and tee are not using these permissions.
      
      Bug: 38316109
      Test: build and boot Marlin
      Test: Verify that rild and tee are not being granted any of these
            permissions.
      Change-Id: I31beeb5bdf3885195310b086c1af3432dc6a349b
      76aab82c
  6. Apr 29, 2017
  7. Apr 19, 2017
    • Jeff Hao's avatar
      Add dex2oat permissions to open and read the tmp apk. · 37f5c2d9
      Jeff Hao authored
      The PackageManager now passes previous code paths to dex2oat as shared
      libraries. dex2oat needs extra permissions in order to access and open
      the oat files of these libraries (if they were compiled).
      
      Part of a multi-project change.
      
      Bug: 34169257
      Test: cts-tradefed run singleCommand cts -d --module
      CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests
      
      (cherry-picked from commit 1103f963)
      
      Change-Id: I3cf810ef5f4f4462f6082dc30d3a7b144dcce0d9
      37f5c2d9
    • Jeff Hao's avatar
      Add dex2oat permissions to open and read the tmp apk. · 66191064
      Jeff Hao authored
      The PackageManager now passes previous code paths to dex2oat as shared
      libraries. dex2oat needs extra permissions in order to access and open
      the oat files of these libraries (if they were compiled).
      
      Part of a multi-project change.
      
      Bug: 34169257
      Test: cts-tradefed run singleCommand cts -d --module
      CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests
      
      Merged-In: I7b9cfd7f3c3509f3e41f0590ab650bd85faab340
      (cherry-picked from commit 1103f963)
      
      Change-Id: I6d69d463af7a0a93391dd4b7edd5b700012ba58c
      66191064
  8. Apr 10, 2017
    • Jeff Hao's avatar
      Add dex2oat permissions to open and read the tmp apk. · 1103f963
      Jeff Hao authored
      The PackageManager now passes previous code paths to dex2oat as shared
      libraries. dex2oat needs extra permissions in order to access and open
      the oat files of these libraries (if they were compiled).
      
      Part of a multi-project change.
      
      Bug: 34169257
      Test: cts-tradefed run singleCommand cts -d --module
      CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests
      
      Change-Id: I7b9cfd7f3c3509f3e41f0590ab650bd85faab340
      1103f963
  9. Apr 06, 2017
    • Sandeep Patil's avatar
      sepolicy: restrict access for /vendor/framework. · df679fdb
      Sandeep Patil authored
      
      /vendor/framework is now designated location for vendor's platform
      libraries. The directory is thus only made available for 'dex2oat'
      coredomain.
      
      Bug: 36680116
      Test: Boot sailfish & angler and launch gApps, dialer w/ no denials for
            'vendor_framework_file'
      
      Change-Id: I24c2ec30f836330005a972ae20d839bef9dcb8aa
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      df679fdb
    • Sandeep Patil's avatar
      sepolicy: restrict /vendor/app from most coredomains · 1b5f81a2
      Sandeep Patil authored
      
      The change makes 'vendor_app_file' accessible only to few platform
      domains like dex2oat, idmap, installd, system_server and appdomain.
      
      Bug: 36681210
      Test: Boot sailfish (treble device) from wiped flashall
      Test: Connect to wifi and launch chrome to load few websites.
      Test: Launch camera and record + playback video
      
      Change-Id: Ib8757fedbf2e19c8381c8cd0f8f2693b2345534b
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      1b5f81a2
  10. Apr 05, 2017
    • Nick Kralevich's avatar
      Fix lock logspam and remove domain_deprecated rule · 4a580cca
      Nick Kralevich authored
      Remove system_file:file { lock ioctl } from domain_deprecated. The only
      domains triggering this were dex2oat and netd, which are fixed in this
      change.
      
      Addresses the following logspam similar to:
      
        avc: granted { lock } for comm="iptables"
        path="/system/etc/xtables.lock" dev="sda22" ino=3745
        scontext=u:r:netd:s0 tcontext=u:object_r:system_file:s0 tclass=file
      
        avc: granted { lock } for comm="dex2oat"
        path="/system/framework/arm/boot-okhttp.art" dev="dm-0" ino=1295
        scontext=u:r:dex2oat:s0 tcontext=u:object_r:system_file:s0 tclass=file
      
      Test: device boots and no obvious problems.
      Bug: 28760354
      Bug: 36879751
      Change-Id: Iac851c0e49a52ce4000fdfe16e68c17ff819693f
      4a580cca
  11. Mar 17, 2017
  12. Mar 16, 2017
    • Calin Juravle's avatar
      Allow profman to analyze profiles for the secondary dex files · ebcec9b8
      Calin Juravle authored
      The secondary dex files are application dex files which gets reported
      back to the framework when using BaseDexClassLoader.
      
      Also, give dex2oat lock permissions as it needs to lock the profile
      during compilation.
      
      Example of SElinux denial:
      03-15 12:38:46.967  7529  7529 I profman : type=1400 audit(0.0:225):
      avc: denied { read } for
      path="/data/data/com.google.android.googlequicksearchbox/files/velour/verified_jars/JDM5LaUbYP1JPOLzJ81GLzg_1.jar.prof"
      dev="sda35" ino=877915 scontext=u:r:profman:s0
      tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file permissive=1
      
      Test: adb shell cmd package bg-dexopt-job works for sercondary dex files
      Bug: 26719109
      Change-Id: Ie1890d8e36c062450bd6c54f4399fc0730767dbf
      ebcec9b8
  13. Feb 06, 2017
  14. Jan 31, 2017
    • Calin Juravle's avatar
      Remove SElinux audit to libart_file · 01ee59a7
      Calin Juravle authored
      Since it was introduced it caused quite a few issues and it spams the
      SElinux logs unnecessary.
      
      The end goal of the audit was to whitelist the access to the
      interpreter. However that's unfeasible for now given the complexity.
      
      Test: devices boots and everything works as expected
            no more auditallow logs
      
      Bug: 29795519
      Bug: 32871170
      Change-Id: I9a7a65835e1e1d3f81be635bed2a3acf75a264f6
      01ee59a7
  15. Jan 24, 2017
    • Calin Juravle's avatar
      SElinux policies for compiling secondary dex files · e5a1f64a
      Calin Juravle authored
      This CLs adds SElinux policies necessary to compile secondary dex files.
      
      When an app loads secondary dex files via the base class loader the
      files will get reported to PM. During maintance mode PM will compile the
      secondary dex files which were used via the standard installd model
      (fork, exec, change uid and lower capabilities).
      
      What is needed:
      dexoptanalyzer - needs to read the dex file and the boot image in order
      to decide if we need to actually comppile.
      dex2oat - needs to be able to create *.oat files next to the secondary
      dex files.
      
      Test: devices boots
            compilation of secondary dex files works without selinux denials
            cmd package compile --secondary-dex -f -m speed
      com.google.android.gms
      
      Bug: 32871170
      Change-Id: I038955b5bc9a72d49f6c24c1cb76276e0f53dc45
      e5a1f64a
  16. Nov 12, 2016
  17. 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
  18. Sep 27, 2016
    • Jeff Vander Stoep's avatar
      Audit access to libart · 88cef4df
      Jeff Vander Stoep authored
      Grant access to all processes and audit access. The end goal is to
      whitelist all access to the interpreter. Several processes including
      dex2oat, apps, and zygote were observed using libart, so omit them
      from auditing and explicitly grant them access.
      
      Test: Angler builds and boots
      
      Bug: 29795519
      Change-Id: I9b93c7dbef5c49b95a18fd26307955d05a1c8e88
      88cef4df
  19. Sep 13, 2016
  20. Sep 10, 2016
  21. Sep 09, 2016
  22. Aug 29, 2016
  23. Jun 06, 2016
  24. 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
  25. Mar 28, 2016
    • Calin Juravle's avatar
      Give dex2oat getattr rights on profiles · f51c0548
      Calin Juravle authored
      Similar to profman, dex2oat does more checks on profiles now.
      It needs to be able to do stat to test for existance and non-emptiness.
      
      03-28 10:41:06.667  8611  8611 W dex2oat : type=1400 audit(0.0:129):
      avc: denied { getattr } for
      path="/data/misc/profiles/ref/com.google.android.apps.magazines/primary.prof"
      dev="dm-0" ino=636928 scontext=u:r:dex2oat:s0
      tcontext=u:object_r:user_profile_data_file:s0 tclass=file permissive=0
      
      Bug: 27860201
      Change-Id: I3a7cb396596ae28a375ea98224ada29f093f475e
      f51c0548
  26. Feb 19, 2016
  27. Feb 17, 2016
    • Andreas Gampe's avatar
      dex2oat/patchoat: Add rights for A/B OTA · 5c5d6cd8
      Andreas Gampe authored
      Give dex2oat/patchoat link rights in /data/ota to produce a patched
      image.
      
      Give zygote rights to relabel links. Also give the zygote rights to
      unlink, which is required when relabeling fails (to clean up the
      dalvik-cache).
      
      Bug: 25612095
      Change-Id: I28bfb9cbeabe93b1f68ada9bcaf29f4f60028c2f
      5c5d6cd8
  28. Feb 05, 2016
  29. Jan 15, 2016
  30. Nov 03, 2015
    • Jeff Vander Stoep's avatar
      Create attribute for moving perms out of domain · d22987b4
      Jeff Vander Stoep authored
      Motivation: Domain is overly permissive. Start removing permissions
      from domain and assign them to the domain_deprecated attribute.
      Domain_deprecated and domain can initially be assigned to all
      domains. The goal is to not assign domain_deprecated to new domains
      and to start removing domain_deprecated where it is not required or
      reassigning the appropriate permissions to the inheriting domain
      when necessary.
      
      Bug: 25433265
      Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
      d22987b4
  31. Apr 02, 2015
  32. Nov 26, 2014
    • Nick Kralevich's avatar
      Allow dex2oat to work on /oem APKs · adbabeeb
      Nick Kralevich authored
      Dex2oat needs the ability to read from already open file descriptors
      in /oem so that apps from that location can be installed. Allow it.
      
      Addresses the following denials:
      
        avc: denied { read } for comm="dex2oat" path="/oem/app/TabletInfo.apk" dev="mmcblk0p12" ino=20 scontext=u:r:dex2oat:s0 tcontext=u:object_r:oemfs:s0 tclass=file permissive=0
        avc: denied { read } for comm="dex2oat" path="/oem/app/AskMe_android_one.apk" dev="mmcblk0p12" ino=14 scontext=u:r:dex2oat:s0 tcontext=u:object_r:oemfs:s0 tclass=file permissive=0
        avc: denied { read } for comm="dex2oat" path="/oem/app/PartnerRegulatoryInfo.apk" dev="mmcblk0p12" ino=19 scontext=u:r:dex2oat:s0 tcontext=u:object_r:oemfs:s0 tclass=file permissive=0
        avc: denied { read } for comm="dex2oat" path="/oem/app/PartnerLauncherProvider.apk" dev="mmcblk0p12" ino=18 scontext=u:r:dex2oat:s0 tcontext=u:object_r:oemfs:s0 tclass=file permissive=0
        avc: denied { read } for comm="dex2oat" path="/oem/app/Amazon_Mobile_com.apk" dev="mmcblk0p12" ino=13 scontext=u:r:dex2oat:s0 tcontext=u:object_r:oemfs:s0 tclass=file permissive=0
        avc: denied { read } for comm="dex2oat" path="/oem/app/PartnerBookmarksProvider.apk" dev="mmcblk0p12" ino=17 scontext=u:r:dex2oat:s0 tcontext=u:object_r:oemfs:s0 tclass=file permissive=0
        avc: denied { read } for comm="dex2oat" path="/oem/app/Hike.apk" dev="mmcblk0p12" ino=15 scontext=u:r:dex2oat:s0 tcontext=u:object_r:oemfs:s0 tclass=file permissive=0
        avc: denied { read } for comm="dex2oat" path="/oem/app/MiLive_embedded_IndiaGames_version4.0_android1.apk" dev="mmcblk0p12" ino=16 scontext=u:r:dex2oat:s0 tcontext=u:object_r:oemfs:s0 tclass=file permissive=0
      
      Bug: 18539205
      Change-Id: I92bd91c66befc5a1060dd189324b2c046bba0258
      adbabeeb
  33. Nov 10, 2014
    • Igor Murashkin's avatar
      zygote/dex2oat: Grant additional symlink permissions · 3df12275
      Igor Murashkin authored
      * zygote needs to be able to symlink from dalvik cache to system
        to avoid having to copy boot.oat
        (when the boot.oat file was built with --compile-pic)
      * dex2oat needs to be able to read the symlink in the dalvik cache
        (the one that zygote creates)
      
      (cherry-picked from AOSP master
      83c5612e)
      
      Bug: 18035729
      
      (cherry picked from commit f7ccfd00)
      
      Change-Id: I5dca27241f46f481515b96e968fb2bef7866c89b
      3df12275
  34. Oct 31, 2014
    • Igor Murashkin's avatar
      zygote/dex2oat: Grant additional symlink permissions · f7ccfd00
      Igor Murashkin authored
      * zygote needs to be able to symlink from dalvik cache to system
        to avoid having to copy boot.oat
        (when the boot.oat file was built with --compile-pic)
      * dex2oat needs to be able to read the symlink in the dalvik cache
        (the one that zygote creates)
      
      (cherry-picked from AOSP master
      83c5612e)
      
      Bug: 18035729
      Change-Id: Ie1acad81a0fd8b2f24e1f3f07a06e6fdb548be62
      f7ccfd00
  35. Oct 28, 2014
    • Igor Murashkin's avatar
      zygote/dex2oat: Grant additional symlink permissions · 83c5612e
      Igor Murashkin authored
      * zygote needs to be able to symlink from dalvik cache to system
        to avoid having to copy boot.oat
        (when the boot.oat file was built with --compile-pic)
      * dex2oat needs to be able to read the symlink in the dalvik cache
        (the one that zygote creates)
      
      Bug: 18035729
      Change-Id: Ie1acad81a0fd8b2f24e1f3f07a06e6fdb548be62
      83c5612e
  36. Jul 16, 2014
    • Nick Kralevich's avatar
      dex2oat: fix forward-locked upgrades with unlabeled asecs · e4aa75db
      Nick Kralevich authored
      dex2oat fails when upgrading unlabeled asec containers.
      
      Steps to reproduce:
      
      1) Install a forward locked app on Android 4.1
        adb install -l foo.apk
      2) Upgrade to tip-of-tree
      
      Addresses the following denial:
      
        <4>[  379.886665] type=1400 audit(1405549869.210:4): avc: denied { read } for pid=2389 comm="dex2oat" path="/mnt/asec/jackpal.androidterm-1/pkg.apk" dev=dm-0 ino=12 scontext=u:r:dex2oat:s0 tcontext=u:object_r:unlabeled:s0 tclass=file
      
      (cherry picked from commit 270be6e8)
      
      Change-Id: I58dc6ebe61a5b5840434077a55f1afbeed602137
      e4aa75db
    • Nick Kralevich's avatar
      dex2oat: fix forward locked apps · 94b2ba94
      Nick Kralevich authored
      dex2oat can't access file descriptors associated with asec_apk_files.
      This breaks installing forward locked apps, and generates the following
      denial:
      
        type=1400 audit(0.0:18): avc: denied { read } for path="/mnt/asec/com.example.android.simplejni-1/pkg.apk" dev="dm-0" ino=12 scontext=u:r:dex2oat:s0 tcontext=u:object_r:asec_apk_file:s0 tclass=file
      
      Steps to reproduce:
      
        $ adb install -r -l SimpleJNI.apk
      
      Expected:
      
        app installs
      
      Actual:
      
        app fails to install.
      
      Bug: 16328233
      
      (cherry picked from commit 5259c5e6)
      
      Change-Id: I1969b9ae8d2187f4860587f7ff42d16139657b5b
      94b2ba94
Loading