Skip to content
Snippets Groups Projects
  1. Oct 07, 2017
    • Nick Kralevich's avatar
      Revert "Ensure /sys restrictions for isolated_apps" · ae48ecbd
      Nick Kralevich authored
      Bullhead and dragon are broken. Revert until I can fix
      those builds.
      
      Dragon:
      
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26264 of policy.conf) violated by allow isolated_app sysfs_socinfo:file { ioctl read lock open }; 
      
      Bullhead:
      
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26283 of policy.conf) violated by allow isolated_app sysfs_power_management:file { ioctl read lock open }; 
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26283 of policy.conf) violated by allow isolated_app sysfs_socinfo:file { ioctl read lock open }; 
      libsepol.report_failure: neverallow on line 113 of system/sepolicy/private/isolated_app.te (or line 26283 of policy.conf) violated by allow isolated_app sysfs_thermal:file { ioctl read lock open }; 
      libsepol.check_assertions: 3 neverallow failures occurred 
      
      
      This reverts commit 579366a0.
      
      Change-Id: I1ea4824e226c06628769898299f2e322060d0d06
      Test: policy compiles.
      ae48ecbd
  2. Oct 05, 2017
    • Nick Kralevich's avatar
      Ensure /sys restrictions for isolated_apps · 579366a0
      Nick Kralevich authored
      isolated_apps are intended to be strictly limited in the /sys files
      which can be read. Add a neverallow assertion to guarantee this on all
      Android compatible devices.
      
      Test: policy compiles.
      Change-Id: I47aceefa3f43a7ea9e526f6f0ef377d0b4efbe3a
      579366a0
  3. Oct 04, 2017
    • Nick Kralevich's avatar
      Drop isolated_app auditallow rule. · 69ec0f8f
      Nick Kralevich authored
      This functionality is being used, apparently.
      
      Addresses the following auditallow spam:
      
        type=1400 audit(0.0:1039): avc: granted { write } for
        comm="Chrome_ProcessL"
        path="/storage/emulated/0/Android/data/com.bleacherreport.android.teamstream/cache/.com.google.Chrome.sk5n91"
        dev="sdcardfs" ino=1877565 scontext=u:r:isolated_app:s0:c512,c768
        tcontext=u:object_r:sdcardfs:s0 tclass=file
      
      Test: policy compiles.
      Bug: 32896414
      Change-Id: I627e20c38115f1d579e78ca12abfa717d32a155a
      69ec0f8f
  4. Sep 26, 2017
  5. Jul 12, 2017
    • Jeff Vander Stoep's avatar
      suppress logspam · fc283871
      Jeff Vander Stoep authored
      avc: denied { search } for name="tmp" dev="sda13" ino=1867778
      scontext=u:r:isolated_app:s0:c512,c768
      tcontext=u:object_r:shell_data_file:s0 tclass=dir
      
      avc: denied { getattr } for path="/mnt/expand" dev="tmpfs" ino=9850
      scontext=u:r:webview_zygote:s0 tcontext=u:object_r:mnt_expand_file:s0
      tclass=dir
      
      Bug: 63631799
      Test: build. Denial no longer appears in the logs
      Change-Id: Ie8a297c73b0f0e9008a7bf24438ef5354bf893df
      fc283871
  6. Apr 22, 2017
    • Alex Klyubin's avatar
      Tighten isolated_app -> *Binder policy · fa57d415
      Alex Klyubin authored
      * isolated_app is no longer permitted to access /dev/hwbinder -- this
        was granted by mistake.
      * There are now neverallows which enforce that isolated_app can't
        access HwBinder and VendorBinder.
      * There are now neverallows which enforce that isolated_app can't add
        Binder and VendorBinder services to servicemanager and
        vndservicemanager.
      
      Test: mmm system/sepolicy
      Bug: 34454312
      Change-Id: I8ba90a0dcb6a9fccd8f50c78cbd2409381376f7a
      fa57d415
  7. Mar 24, 2017
    • Alex Klyubin's avatar
      Vendor domains must not use Binder · f5446eb1
      Alex Klyubin authored
      On PRODUCT_FULL_TREBLE devices, non-vendor domains (except vendor
      apps) are not permitted to use Binder. This commit thus:
      * groups non-vendor domains using the new "coredomain" attribute,
      * adds neverallow rules restricting Binder use to coredomain and
        appdomain only, and
      * temporarily exempts the domains which are currently violating this
        rule from this restriction. These domains are grouped using the new
        "binder_in_vendor_violators" attribute. The attribute is needed
        because the types corresponding to violators are not exposed to the
        public policy where the neverallow rules are.
      
      Test: mmm system/sepolicy
      Test: Device boots, no new denials
      Test: In Chrome, navigate to ip6.me, play a YouTube video
      Test: YouTube: play a video
      Test: Netflix: play a movie
      Test: Google Camera: take a photo, take an HDR+ photo, record video with
            sound, record slow motion video with sound. Confirm videos play
            back fine and with sound.
      Bug: 35870313
      Change-Id: I0cd1a80b60bcbde358ce0f7a47b90f4435a45c95
      f5446eb1
  8. Feb 06, 2017
    • Chad Brubaker's avatar
      Move neverallows from untrusted_app.te to app_neverallows.te · 46e5a060
      Chad Brubaker authored
      The neverallows in untrusted_app will all apply equally to ephemeral app
      and any other untrusted app domains we may add, so this moves them to a
      dedicated separate file.
      
      This also removes the duplicate rules from isolated_app.te and ensures
      that all the untrusted_app neverallows also apply to isolated_app.
      
      Test: builds
      Change-Id: Ib38e136216ccbe5c94daab732b7ee6acfad25d0b
      46e5a060
  9. Jan 06, 2017
    • Alex Klyubin's avatar
      Move isolated_app policy to private · a3903974
      Alex Klyubin authored
      This leaves only the existence of isolated_app domain as public API.
      All other rules are implementation details of this domain's policy and
      are thus now private.
      
      Test: No change to policy according to sesearch, except for
            disappearance of all allow rules from isolated_app_current
            attribute (as expected).
      Bug: 31364497
      
      Change-Id: I499a648e515628932b7bcd188ecbfbe4a247f2f3
      a3903974
  10. Dec 08, 2016
    • dcashman's avatar
      Restore app_domain macro and move to private use. · 3e8dbf01
      dcashman authored
      app_domain was split up in commit: 2e00e637 to
      enable compilation by hiding type_transition rules from public policy.  These
      rules need to be hidden from public policy because they describe how objects are
      labeled, of which non-platform should be unaware.  Instead of cutting apart the
      app_domain macro, which non-platform policy may rely on for implementing new app
      types, move all app_domain calls to private policy.
      
      (cherry-pick of commit: 76035ea0)
      
      Bug: 33428593
      Test: bullhead and sailfish both boot. sediff shows no policy change.
      Change-Id: I4beead8ccc9b6e13c6348da98bb575756f539665
      3e8dbf01
    • dcashman's avatar
      Restore app_domain macro and move to private use. · 76035ea0
      dcashman authored
      app_domain was split up in commit: 2e00e637 to
      enable compilation by hiding type_transition rules from public policy.  These
      rules need to be hidden from public policy because they describe how objects are
      labeled, of which non-platform should be unaware.  Instead of cutting apart the
      app_domain macro, which non-platform policy may rely on for implementing new app
      types, move all app_domain calls to private policy.
      
      Bug: 33428593
      Test: bullhead and sailfish both boot. sediff shows no policy change.
      Change-Id: I4beead8ccc9b6e13c6348da98bb575756f539665
      76035ea0
  11. Dec 06, 2016
    • dcashman's avatar
      sepolicy: add version_policy tool and version non-platform policy. · 2e00e637
      dcashman authored
      In order to support platform changes without simultaneous updates from
      non-platform components, the platform and non-platform policies must be
      split.  In order to provide a guarantee that policy written for
      non-platform objects continues to provide the same access, all types
      exposed to non-platform policy are versioned by converting them and the
      policy using them into attributes.
      
      This change performs that split, the subsequent versioning and also
      generates a mapping file to glue the different policy components
      together.
      
      Test: Device boots and runs.
      Bug: 31369363
      Change-Id: Ibfd3eb077bd9b8e2ff3b2e6a0ca87e44d78b1317
      2e00e637
Loading