Skip to content
Snippets Groups Projects
  1. Jun 14, 2018
    • Mark Salyzyn's avatar
      access to /proc/slabinfo · d6eaed85
      Mark Salyzyn authored
      init, dumpstate and shell
      
      Test: check avc for init is now gone
      Bug: 7232205
      Bug: 109821005
      Change-Id: I299a0ba29bcc97a97047f12a5c48f6056f5e6de5
      d6eaed85
  2. May 30, 2018
    • Steven Moreland's avatar
      mediacodec->mediacodec+hal_omx{,_server,_client} · 7baf725e
      Steven Moreland authored
      (breaks vendor blobs, will have to be regenerated
      after this CL)
      
      This moves mediacodec to vendor so it is replaced with
      hal_omx_server. The main benefit of this is that someone
      can create their own implementation of mediacodec without
      having to alter the one in the tree. mediacodec is still
      seccomp enforced by CTS tests.
      
      Fixes: 36375899
      Test: (sanity) YouTube
      Test: (sanity) camera pics + video
      Test: check for denials
      Change-Id: I31f91b7ad6cd0a891a1681ff3b9af82ab400ce5e
      7baf725e
  3. May 04, 2018
  4. Apr 18, 2018
    • Jeff Vander Stoep's avatar
      Protect dropbox service data with selinux · 4d3ee1a5
      Jeff Vander Stoep authored
      Create a new label for /data/system/dropbox, and neverallow direct
      access to anything other than init and system_server.
      
      While all apps may write to the dropbox service, only apps with
      android.permission.READ_LOGS, a signature|privileged|development
      permission, may read them. Grant access to priv_app, system_app,
      and platform_app, and neverallow access to all untrusted_apps.
      
      Bug: 31681871
      Test: atest CtsStatsdHostTestCases
      Test: atest DropBoxTest
      Test: atest ErrorsTests
      Change-Id: Ice302b74b13c4d66e07b069c1cdac55954d9f5df
      4d3ee1a5
  5. Apr 13, 2018
    • Jeff Sharkey's avatar
      Add exFAT support; unify behind "sdcard_type". · 000cafc7
      Jeff Sharkey authored
      We're adding support for OEMs to ship exFAT, which behaves identical
      to vfat.  Some rules have been manually enumerating labels related
      to these "public" volumes, so unify them all behind "sdcard_type".
      
      Test: atest
      Bug: 67822822
      Change-Id: I09157fd1fc666ec5d98082c6e2cefce7c8d3ae56
      000cafc7
  6. Apr 03, 2018
    • Jeff Vander Stoep's avatar
      Add untrusted_app_27 · 3aa7ca56
      Jeff Vander Stoep authored
      This is a partial cherry pick of commit 6231b4d9
      'Enforce per-app data protections for targetSdk 28+'.
      
      Untrusted_app_27 remains unreachable, but it's existence
      prevents future merge conflicts.
      
      Bug: 63897054
      Test: build/boot aosp_walleye-userdebug
      Change-Id: I64b013874fe87b55f47e817a1279e76ecf86b7c0
      Merged-In: I64b013874fe87b55f47e817a1279e76ecf86b7c0
      (cherry picked from commit 6231b4d9)
      3aa7ca56
  7. Mar 28, 2018
    • Jeff Vander Stoep's avatar
      Improve neverallows on /proc and /sys · 886aa54b
      Jeff Vander Stoep authored
      Access to these files was removed in Oreo. Enforce that access is not
      granted by partners via neverallow rule.
      
      Also disallow most untrusted app access to net.dns.* properties.
      
      Bug: 77225170
      Test: system/sepolicy/tools/build_policies.sh
      Change-Id: I85b634af509203393dd2d9311ab5d30c65f157c1
      886aa54b
  8. Feb 05, 2018
  9. Jan 29, 2018
  10. Jan 24, 2018
  11. Jan 23, 2018
  12. Jan 16, 2018
    • Michael Butler's avatar
      Allow applications to use NN API HAL services · ea331aa7
      Michael Butler authored
      The NeuralNetworks runtime is a library that communicates with
      NeuralNetworks HIDL services and is linked by applications. To enable
      the NN runtime to use these services, applications must have explicit
      sepolicy permissions to find the NN services and communicate across
      binder.
      
      This CL relaxes neverallow rules for hal_neuralnetworks_*.
      
      Because it is affecting pre-existing neverallow rules, this CL requires
      a CTS rebuild.
      
      Bug: 70340780
      Test: mm
      Test: ran neuralnetworks vts and cts binaries
      Change-Id: I84f73ac77486681f91d1f8687268c0fa22a7ba0b
      (cherry picked from commit 598870bebc4bb34542df81799b46f3cdcfb6723b)
      ea331aa7
  13. Dec 12, 2017
    • Marissa Wall's avatar
      Restrict access to uid_concurrent_*_time · 80ee23f7
      Marissa Wall authored
      Do not let apps read uid_concurrent_active_time and
      uid_concurrent_policy_time.
      
      b/68399339
      
      Test: Check that they can't be read from the shell
          without root permissions and system_server was able
          to read them
      
      Change-Id: I6f09ef608607cb9f4084ba403a1e7254b8c49a06
      80ee23f7
  14. Oct 12, 2017
  15. Oct 06, 2017
    • Tri Vo's avatar
      Extend access to proc/asound/* · 464f59ae
      Tri Vo authored
      Renamed this type:
      proc_asound_cards -> proc_asound
      
      Labeled /proc/asound/devices as proc_asound.
      
      We now use proc_asound type to label files under /proc/asound which we
      want to expose to system components.
      
      Bug: 66988327
      Test: Pixel 2 boots, can play sound with or without headphones, and
      selinux denials to proc_asound are not seen.
      
      Change-Id: I453d9bfdd70eb80931ec9e80f17c8fd0629db3d0
      464f59ae
  16. Sep 28, 2017
  17. Sep 27, 2017
    • Dan Cashman's avatar
      Fix build. Split mediaprovider from priv_app. · 3e21c5f1
      Dan Cashman authored
      This CL was accidentally reverted a second time by commit:
      cb5129f9.  Submit it for the third,
      and final, time.
      
      (cherry-pick of 5637587d
      which was in AOSP and internal master but not stage-aosp-master)
      
      Bug: 62102757
      Test: Builds and boots.
      Change-Id: I0394907e808c737422e644aec452baa3e777cf6f
      3e21c5f1
  18. Sep 26, 2017
  19. Aug 17, 2017
  20. Aug 16, 2017
  21. Jul 17, 2017
  22. Jul 10, 2017
  23. Jul 05, 2017
    • Jeff Vander Stoep's avatar
      Preserve attributes needed for CTS · 5f5aa962
      Jeff Vander Stoep authored
      Change fb889f23 "Force expand all hal_* attributes" annotated all
      hal_* attributes to be expanded to their associated types. However
      some of these attributes are used in CTS for neverallow checking.
      Mark these attributes to be preserved.
      
      In addition, remove the hacky workaround introduced in oc-dev
      for b/62658302 where extraneous neverallow rules were introduced
      to prevent unused or negated attributes from being auto-expanded
      from policy.
      
      Bug: 62658302
      Bug: 63135903
      Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
          android.cts.security.SELinuxNeverallowRulesTest
      
          armeabi-v7a CtsSecurityHostTestCases completed in 4s.
          501 passed, 0 failed, 0 not executed
      Merged-In: I989def70a16f66e7a18bef1191510793fbe9cb8c
      Change-Id: I989def70a16f66e7a18bef1191510793fbe9cb8c
      5f5aa962
  24. 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
  25. Jun 16, 2017
  26. 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
  27. Jun 07, 2017
  28. 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
  29. May 25, 2017
  30. 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
  31. 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
  32. 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
  33. Apr 21, 2017
  34. 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
  35. 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
Loading