Skip to content
Snippets Groups Projects
  1. Jun 21, 2017
    • Dan Cashman's avatar
      Revert "Remove neverallow preventing hwservice access for apps." · ceed7204
      Dan Cashman authored
      This reverts commit 3e307a4d.
      
      Test: Builds - neverallow change only.
      Bug: 62806062
      Change-Id: Id3aa1b425cf48fc8586890c9850a74594584922d
      ceed7204
    • Dan Cashman's avatar
      Remove neverallow preventing hwservice access for apps. · 3e307a4d
      Dan Cashman authored
      Same-process HALs are forbidden except for very specific HALs that have
      been provided and whitelisted by AOSP.  As a result, a vendor extension
      HAL may have a need to be accessed by untrusted_app.  This is still
      discouraged, and the existing AOSP hwservices are still forbidden, but
      remove the blanket prohibition.  Also indicate that this is temporary,
      and that partners should expect to get exceptions to the rule into AOSP
      in the future.
      
      Bug: 62806062
      Test: neverallow-only change builds.  Verify new attribute is in policy.
      Change-Id: I6d3e659147d509a3503c2c9e0b6bb9016cc75832
      3e307a4d
  2. Jun 08, 2017
    • Jerry Zhang's avatar
      Revert "Split mediaprovider from priv_app." · cb5129f9
      Jerry Zhang authored
      This reverts commit c147b592.
      
      The new domain changed neverallows, breaking CTS compatability.
      Revert the domain now, with the intention to re-add for the next
      release.
      
      Bug: 62102757
      Test: domain is set to priv_app
      Change-Id: I907ff7c513cd642a306e3eaed3937352ced90005
      cb5129f9
  3. Jun 07, 2017
  4. Jun 02, 2017
    • Jerry Zhang's avatar
      Revert "Split mediaprovider from priv_app." · c00c07c1
      Jerry Zhang authored
      This reverts commit c147b592.
      
      The new domain changed neverallows, breaking CTS compatability.
      Revert the domain now, with the intention to re-add for the next
      release.
      
      Bug: 62102757
      Test: domain is set to priv_app
      Change-Id: I907ff7c513cd642a306e3eaed3937352ced90005
      c00c07c1
  5. May 25, 2017
  6. Apr 26, 2017
    • Nick Kralevich's avatar
      Add untrusted_v2_app to all_untrusted_apps · db5962ce
      Nick Kralevich authored
      This was accidentally omitted from all_untrusted_app
      
      While I'm here, split across mutiple lines and alphabetize.
      
      Test: policy compiles.
      Change-Id: I7fe1d1d0a4ef2ed3ab010931ee2ba15637c2be51
      db5962ce
    • Nick Kralevich's avatar
      relax fuse_device neverallow rules · 45766d41
      Nick Kralevich authored
      The fuse_device neverallow rules are too aggressive and are inhibiting
      certain vendor customizations. Relax the /dev/fuse neverallow rules so
      that they better reflect the security invariants we want to uphold.
      
      Bug: 37496487
      Test: policy compiles.
      Change-Id: Ie73b0ba7c76446afc2a7a23ebed1275c977d932d
      45766d41
  7. Apr 25, 2017
    • Alex Klyubin's avatar
      Assert ban on framework <-> vendor comms over VndBinder · 00657834
      Alex Klyubin authored
      This adds neverallow rules which enforce the prohibition on
      communication between framework and vendor components over VendorBinder.
      This prohibition is similar in spirit to the one for Binder
      communications.
      
      Most changes consist of adding neverallow rules, which do not affect
      runtime behavior. The only change which does affect runtime behavior
      is the change which takes away the right of servicemanager domain to
      transfer Binder tokens to hwservicemanager and vndservicemanager. This
      grant was there by accident (because it was overly broad) and is not
      expected to be needed: servicemanager, hwservicemanager, and
      vndservicemanager are not supposed to be communicating with each
      other.
      
      P. S. The new neverallow rules in app_neverallows.te are covered by
      the new rules in domain.te. The rules were nevertheless added to
      app_neverallows.te for consistency with other *Binder rules there.
      
      Test: mmm system/sepolicy
      Bug: 37663632
      Change-Id: I7c2ae23924bf0f2fed3f1e3a8d4d603129286329
      00657834
  8. Apr 24, 2017
    • Alex Klyubin's avatar
      Assert untrusted apps can't add or list hwservicemanager · 5c5b6263
      Alex Klyubin authored
      This adds a neverallow rules which checks that SELinux app domains
      which host arbitrary code are not allowed to access hwservicemanager
      operations other than "find" operation for which there already are
      strict neverallow rules in the policy.
      
      Test: mmm system/sepolicy -- neverallow-only change
      Bug: 34454312
      Change-Id: I3b80c6ae2c254495704e0409e0c5c88f6ce3a6a7
      5c5b6263
    • Alex Klyubin's avatar
      Assert apps can access only approved HwBinder services · 2a7f4fb0
      Alex Klyubin authored
      App domains which host arbitrary code must not have access to
      arbitrary HwBinder services. Such access unnecessarily increases the
      attack surface. The reason is twofold:
      1. HwBinder servers do not perform client authentication because HIDL
         currently does not expose caller UID information and, even if it
         did, many HwBinder services either operate at a layer below that of
         apps (e.g., HALs) or must not rely on app identity for
         authorization. Thus, to be safe, the default assumption is that
         a HwBinder service treats all its clients as equally authorized to
         perform operations offered by the service.
      2. HAL servers (a subset of HwBinder services) contain code with
         higher incidence rate of security issues than system/core
         components and have access to lower layes of the stack (all the way
         down to hardware) thus increasing opportunities for bypassing the
         Android security model.
      
      HwBinder services offered by core components (as opposed to vendor
      components) are considered safer because of point #2 above.
      
      Always same-process aka always-passthrough HwBinder services are
      considered safe for access by these apps. This is because these HALs
      by definition do not offer any additional access beyond what its
      client already as, because these services run in the process of the
      client.
      
      This commit thus introduces these two categories of HwBinder services
      in neverallow rules.
      
      Test: mmm system/sepolicy -- this does not change on-device policy
      Bug: 34454312
      Change-Id: I4f5f4dd10b3fc3bb9d262dda532d4a23dcdf061d
      2a7f4fb0
  9. Apr 21, 2017
  10. Apr 17, 2017
    • Jerry Zhang's avatar
      Split mediaprovider from priv_app. · c147b592
      Jerry Zhang authored
      MediaProvider requires permissions that diverge from those
      of a typical priv_app. This create a new domain and removes
      Mtp related permissions from priv_app.
      
      Bug: 33574909
      Test: Connect with MTP, download apps and files, select ringtones
      Test: DownloadProvider instrument tests, CtsProviderTestCases
      
      Change-Id: I950dc11f21048c34af639cb3ab81873d2a6730a9
      c147b592
    • Jerry Zhang's avatar
      Split mediaprovider as a separate domain from priv_app · 9f152d98
      Jerry Zhang authored
      MediaProvider requires permissions that diverge from those
      of a typical priv_app. This create a new domain and removes
      Mtp related permissions from priv_app.
      
      Bug: 33574909
      Test: Connect with MTP, download apps and files, select ringtones
      Test: DownloadProvider instrument tests, CtsProviderTestCases
      
      Change-Id: I950dc11f21048c34af639cb3ab81873d2a6730a9
      9f152d98
  11. Mar 22, 2017
    • Nick Kralevich's avatar
      app.te: prevent locks of files on /system · 92c44a57
      Nick Kralevich authored
      Prevent app domains (processes spawned by zygote) from acquiring
      locks on files in /system. In particular, /system/etc/xtables.lock
      must never be lockable by applications, as it will block future
      iptables commands from running.
      
      Test: device boots and no obvious problems.
      Change-Id: Ifd8dc7b117cf4a622b30fd4fffbcab1b76c4421b
      92c44a57
  12. Mar 15, 2017
    • Fyodor Kupolov's avatar
      Split preloads into media_file and data_file · b238fe66
      Fyodor Kupolov authored
      Untrusted apps should only access /data/preloads/media and demo directory.
      
      Bug: 36197686
      Test: Verified retail mode.
            Checked non-privileged APK cannot access /data/preloads
      Change-Id: I8e9c21ff6aba799aa31bf06893cdf60dafc04446
      b238fe66
  13. Mar 07, 2017
    • Calin Juravle's avatar
      SElinux: Clean up code related to foreign dex use · 2b291121
      Calin Juravle authored
      We simplified the way we track whether or not a dex file is used by
      other apps. DexManager in the framework keeps track of the data and we
      no longer need file markers on disk.
      
      Test: device boots, foreign dex markers are not created anymore
      
      Bug: 32871170
      Change-Id: I464ed6b09439cf0342020ee07596f9aa8ae53b62
      2b291121
  14. Feb 21, 2017
    • Chad Brubaker's avatar
      Add new untrusted_v2_app domain · a782a816
      Chad Brubaker authored
      untrusted_v2_app is basically a refinement of untrusted_app with legacy
      capabilities removed and potentially backwards incompatible changes.
      
      This is not currently hooked up to anything.
      
      Bug: 33350220
      Test: builds
      Change-Id: Ic9fad57476bc2b6022b1eaca8667bf6d844753c2
      a782a816
  15. Feb 14, 2017
    • Jeff Vander Stoep's avatar
      untrusted_app: policy versioning based on targetSdkVersion · bacb6d79
      Jeff Vander Stoep authored
      Motivation:
      Provide the ability to phase in new security policies by
      applying them to apps with a minimum targetSdkVersion.
      
      Place untrusted apps with targetSdkVersion<=25 into the
      untrustd_app_25 domain. Apps with targetSdkVersion>=26 are placed
      into the untrusted_app domain. Common rules are included in the
      untrusted_app_all attribute. Apps with a more recent targetSdkVersion
      are granted fewer permissions.
      
      Test: Marlin builds and boots. Apps targeting targetSdkVersion<=25
      run in untrusted_app_25 domain. Apps targeting the current development
      build >=26 run in the untrusted_app domain with fewer permissions. No
      new denials observed during testing.
      Bug: 34115651
      Bug: 35323421
      Change-Id: Ie6a015566fac07c44ea06c963c40793fcdc9a083
      bacb6d79
  16. Feb 06, 2017
    • Stephen Smalley's avatar
      Remove obsolete netlink_firewall_socket and netlink_ip6fw_socket classes. · 4921085d
      Stephen Smalley authored
      
      The implementation for NETLINK_FIREWALL and NETLINK_IP6_FW protocols
      was removed from the kernel in commit
      d16cf20e2f2f13411eece7f7fb72c17d141c4a84 ("netfilter: remove ip_queue
      support") circa Linux 3.5.  Unless we need to retain compatibility
      for kernels < 3.5, we can drop these classes from the policy altogether.
      
      Possibly the neverallow rule in app.te should be augmented to include
      the newer netlink security classes, similar to webview_zygote, but
      that can be a separate change.
      
      Test: policy builds
      
      Change-Id: Iab9389eb59c96772e5fa87c71d0afc86fe99bb6b
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      4921085d
    • 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
Loading