Skip to content
Snippets Groups Projects
  1. Sep 27, 2018
    • Wei Wang's avatar
      Add atrace HAL 1.0 sepolicy · bc71a610
      Wei Wang authored
      Bug: 111098596
      Test: atrace/systrace
      
      (cherry picked from commit 9ed5cf6e)
      
      Change-Id: I97772ff21754d03a0aea0d53b39e8da5312a17c0
      bc71a610
    • Nick Kralevich's avatar
      Introduce system_file_type · 5e37271d
      Nick Kralevich authored
      system_file_type is a new attribute used to identify files which exist
      on the /system partition. It's useful for allow rules in init, which are
      based off of a blacklist of writable files. Additionally, it's useful
      for constructing neverallow rules to prevent regressions.
      
      Additionally, add commented out tests which enforce that all files on
      the /system partition have the system_file_type attribute. These tests
      will be uncommented in a future change after all the device-specific
      policies are cleaned up.
      
      Test: Device boots and no obvious problems.
      Change-Id: Id9bae6625f042594c8eba74ca712abb09702c1e5
      5e37271d
  2. Sep 20, 2018
    • Yifan Hong's avatar
      health.filesystem HAL renamed to health.storage · 1cef6a94
      Yifan Hong authored
      ...to reflect that the HAL operates on storage devices,
      not filesystem.
      
      Bug: 111655771
      Test: compiles
      Change-Id: Ibb0572cb1878359e5944aa6711331f0c7993ba6e
      Merged-In: Ibb0572cb1878359e5944aa6711331f0c7993ba6e
      1cef6a94
  3. Sep 18, 2018
    • Tri Vo's avatar
      system_writes_mnt_vendor_violators for device launched before P. · ca4217e2
      Tri Vo authored
      In cases when a device upgrades to system-as-root from O to P, it needs a mount
      point for an already existing partition that is accessed by both system and
      vendor.
      
      Devices launching with P must not have /mnt/vendor accessible to system.
      
      Bug: 78598545
      Test: m selinx_policy
      Change-Id: Ia7bcde44e2b8657a7ad9e0d9bae7a7259f40936f
      ca4217e2
  4. Aug 21, 2018
    • Tri Vo's avatar
      Rename untrusted_app_visible_*' to include 'violators'. · 7f8b6cc6
      Tri Vo authored
      Bug: 110887137
      Test: Flash new system policy onto a device with vendor policy that uses
      untrusted_app_visible_* attributes, and check that old and new attributes
      are applied to exactly same types.
      Change-Id: Ibee0ec645878fcc8c93cd0fbd169a8d45129d79e
      Merged-In: Ibee0ec645878fcc8c93cd0fbd169a8d45129d79e
      (cherry picked from commit 7abca51d)
      7f8b6cc6
  5. Aug 14, 2018
  6. Aug 10, 2018
  7. Jun 01, 2018
    • Jiyong Park's avatar
      add extended_core_property_type · d8ae0071
      Jiyong Park authored
      The attribute is used to capture system properties added from outside of
      AOSP (e.g. by OEM), but are not device-specific and thus are used only
      inside the system partition.
      
      Access to the the system properties from outside of the system partition
      is prevented by the neverallow rule.
      
      Bug: 80382020
      Bug: 78598545
      Test: m -j selinux_policy
      Merged-In: I22c083dc195dab84c9c21a79fbe3ad823a3bbb46
      Change-Id: I22c083dc195dab84c9c21a79fbe3ad823a3bbb46
      (cherry picked from commit c0f8f2f8)
      d8ae0071
    • Tom Cherry's avatar
      neverallow coredomain from writing vendor properties · 5897e23e
      Tom Cherry authored
      System properties can be abused to get around Treble requirements of
      having a clean system/vendor split.  This CL seeks to prevent that by
      neverallowing coredomain from writing vendor properties.
      
      Bug: 78598545
      Test: build 2017 Pixels
      Test: build aosp_arm64
      Change-Id: I5e06894150ba121624d753228e550ba9b81f7677
      (cherry picked from commit cdb1624c)
      5897e23e
  8. May 31, 2018
  9. 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
    • Jiyong Park's avatar
      add extended_core_property_type · c0f8f2f8
      Jiyong Park authored
      The attribute is used to capture system properties added from outside of
      AOSP (e.g. by OEM), but are not device-specific and thus are used only
      inside the system partition.
      
      Access to the the system properties from outside of the system partition
      is prevented by the neverallow rule.
      
      Bug: 80382020
      Bug: 78598545
      Test: m -j selinux_policy
      Change-Id: I22c083dc195dab84c9c21a79fbe3ad823a3bbb46
      c0f8f2f8
  10. May 18, 2018
    • Tom Cherry's avatar
      neverallow coredomain from writing vendor properties · cdb1624c
      Tom Cherry authored
      System properties can be abused to get around Treble requirements of
      having a clean system/vendor split.  This CL seeks to prevent that by
      neverallowing coredomain from writing vendor properties.
      
      Bug: 78598545
      Test: build 2017/2018 Pixels
      Test: build aosp_arm64
      Change-Id: I5e06894150ba121624d753228e550ba9b81f7677
      cdb1624c
  11. May 15, 2018
    • Pavel Maltsev's avatar
      Allow to use sockets from hal server for auto · 8d7f5033
      Pavel Maltsev authored
      Add an exemption to neverallow rule to use sockets from HAL servers only
      for automotive build
      
      Bug: 78901167
      Test: assign this attribute to hal_vehicle_default and try to open
      socket from HAL implementation
      Test: verify that new CTS test will fail for non-automotive build with
      this attribute buing used
      Test: make cts && cts-tradefed run singleCommand cts --skip-device-info
       --skip-preconditions --abi arm64-v8a --module CtsSecurityHostTestCases
       -t android.security.cts.SELinuxHostTest
      
      Merged-In: I27976443dad4fc5b7425c089512cac65bb54d6d9
      
      (cherry picked from commit 4cafae77)
      
      Change-Id: I58e25a0f86579073aa568379b10b6599212134c6
      8d7f5033
  12. May 14, 2018
    • Pavel Maltsev's avatar
      Allow to use sockets from hal server for auto · 4cafae77
      Pavel Maltsev authored
      Add an exemption to neverallow rule to use sockets from HAL servers only
      for automotive build
      
      Bug: 78901167
      Test: assign this attribute to hal_vehicle_default and try to open
      socket from HAL implementation
      Test: verify that new CTS test will fail for non-automotive build with
      this attribute buing used
      Test: make cts && cts-tradefed run singleCommand cts --skip-device-info
       --skip-preconditions --abi arm64-v8a --module CtsSecurityHostTestCases
       -t android.security.cts.SELinuxHostTest
      
      Change-Id: I27976443dad4fc5b7425c089512cac65bb54d6d9
      4cafae77
  13. May 04, 2018
    • Pavel Maltsev's avatar
      Move automotive HALs sepolicy to system/ · 43e172af
      Pavel Maltsev authored
      Bug: 70637118
      Test: build, flash and boot automotive builds
      
      Change-Id: I6db23258de30174d6db09d241e91b08aa5afedef
      Merged-In: I6db23258de30174d6db09d241e91b08aa5afedef
      (cherry picked from commit 394dbe34)
      43e172af
    • Jeff Vander Stoep's avatar
      Start the process of locking down proc/net · 7a4af30b
      Jeff Vander Stoep authored
      Files in /proc/net leak information. This change is the first step in
      determining which files apps may use, whitelisting benign access, and
      otherwise removing access while providing safe alternative APIs.
      
      To that end, this change:
      * Introduces the proc_net_type attribute which will assigned to any
      new SELinux types in /proc/net to avoid removing access to privileged
      processes. These processes may be evaluated later, but are lower
      priority than apps.
      * Labels /proc/net/{tcp,tcp6,udp,udp6} as proc_net_vpn due to existing
      use by VPN apps. This may be replaced by an alternative API.
      * Audits all other proc/net access for apps.
      * Audits proc/net access for other processes which are currently
      granted broad read access to /proc/net but should not be including
      storaged, zygote, clatd, logd, preopt2cachename and vold.
      
      Bug: 9496886
      Bug: 68016944
      Test: Boot Taimen-userdebug. On both wifi and cellular: stream youtube
          navigate maps, send text message, make voice call, make video call.
          Verify no avc "granted" messages in the logs.
      Test: A few VPN apps including "VPN Monster", "Turbo VPN", and
      "Freighter". Verify no logspam with the current setup.
      Test: atest CtsNativeNetTestCases
      Test: atest netd_integration_test
      Test: atest QtaguidPermissionTest
      Test: atest FileSystemPermissionTest
      
      Change-Id: I7e49f796a25cf68bc698c6c9206e24af3ae11457
      Merged-In: I7e49f796a25cf68bc698c6c9206e24af3ae11457
      (cherry picked from commit 08731895)
      7a4af30b
    • Roshan Pius's avatar
      sepolicy(hostapd): Add a HIDL interface for hostapd · d7b34a48
      Roshan Pius authored
      * Note on cherry-pick: Some of the dependent changes are not in AOSP.
      In order to keep hostapd running correctly in AOSP, I've modified this
      change to only include policy additions.
      
      Change sepolicy permissions to now classify hostapd as a HAL exposing
      HIDL interface.
      
      Sepolicy denial for accessing /data/vendor/misc/wifi/hostapd:
      12-27 23:40:55.913  4952  4952 W hostapd : type=1400 audit(0.0:19): avc:
      denied { write } for name="hostapd" dev="sda13" ino=4587601
      scontext=u:r:hal_wifi_hostapd_default:s0
      tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0
      
      01-02 19:07:16.938  5791  5791 W hostapd : type=1400 audit(0.0:31): avc:
      denied { search } for name="net" dev="sysfs" ino=30521
      scontext=u:r:hal_wifi_hostapd_default:s0
      tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0
      
      Bug: 36646171
      Test: Device boots up and able to turn on SoftAp.
      Change-Id: Ibacfcc938deab40096b54b8d0e608d53ca91b947
      Merged-In: Ibacfcc938deab40096b54b8d0e608d53ca91b947
      (cherry picked from commit 5bca3e86)
      d7b34a48
    • Jeff Vander Stoep's avatar
      Never expand proc_type attribute · a6295412
      Jeff Vander Stoep authored
      It's used in build-time tests and in CTS.
      
      Bug: 78898770
      Test: build user-build
      Change-Id: I254bf4d7ed0c0cb029b55110ceec982b84e4a91b
      Merged-In: I254bf4d7ed0c0cb029b55110ceec982b84e4a91b
      a6295412
  14. May 02, 2018
    • Jeff Vander Stoep's avatar
      Never expand proc_type attribute · db621841
      Jeff Vander Stoep authored
      It's used in build-time tests and in CTS.
      
      Bug: 78898770
      Test: build user-build
      Change-Id: I254bf4d7ed0c0cb029b55110ceec982b84e4a91b
      (cherry picked from commit beeb122405070a5b4cee326a0cdae92a1a791fbc)
      db621841
  15. Apr 23, 2018
  16. Mar 20, 2018
  17. Mar 19, 2018
  18. Feb 06, 2018
  19. Feb 05, 2018
  20. Jan 30, 2018
    • Jeff Vander Stoep's avatar
      Test that /data is properly labeled · ccf965e9
      Jeff Vander Stoep authored
      Data outside of /data/vendor should have the core_data_file_type.
      Exempt data_between_core_and_vendor for some types.
      
      Ensure core_data_file_type and coredomain_socket do not get expanded
      to their underlying types.
      
      Test: build sepolicy for all targets in master (this is a build time
          test)
      Bug: 34980020
      Change-Id: I59387a87875f4603a001fb03f22fa31cae84bf5a
      (cherry picked from commit bdd45479)
      ccf965e9
  21. Jan 29, 2018
  22. Jan 24, 2018
    • Janis Danisevskis's avatar
      Added default policy for Confirmation UI HAL · 97c56bdd
      Janis Danisevskis authored
      Bug: 63928580
      Test: Manually tested.
      
      Change-Id: If6bb10cb7c009883d853e46dcdeb92cd33877d53
      97c56bdd
    • Jeff Vander Stoep's avatar
      Test that /data is properly labeled · bdd45479
      Jeff Vander Stoep authored
      Data outside of /data/vendor should have the core_data_file_type.
      Exempt data_between_core_and_vendor for some types.
      
      Ensure core_data_file_type and coredomain_socket do not get expanded
      to their underlying types.
      
      Test: build sepolicy for all targets in master (this is a build time
          test)
      Bug: 34980020
      Change-Id: I59387a87875f4603a001fb03f22fa31cae84bf5a
      bdd45479
  23. Jan 19, 2018
  24. Jan 16, 2018
  25. Jan 12, 2018
    • Roshan Pius's avatar
      sepolicy(hostapd): Add a HIDL interface for hostapd · 5bca3e86
      Roshan Pius authored
      Change sepolicy permissions to now classify hostapd as a HAL exposing
      HIDL interface.
      
      Sepolicy denial for accessing /data/vendor/misc/wifi/hostapd:
      12-27 23:40:55.913  4952  4952 W hostapd : type=1400 audit(0.0:19): avc:
      denied { write } for name="hostapd" dev="sda13" ino=4587601
      scontext=u:r:hal_wifi_hostapd_default:s0
      tcontext=u:object_r:system_data_file:s0 tclass=dir permissive=0
      
      01-02 19:07:16.938  5791  5791 W hostapd : type=1400 audit(0.0:31): avc:
      denied { search } for name="net" dev="sysfs" ino=30521
      scontext=u:r:hal_wifi_hostapd_default:s0
      tcontext=u:object_r:sysfs_net:s0 tclass=dir permissive=0
      
      Bug: 36646171
      Test: Device boots up and able to turn on SoftAp.
      Change-Id: Ibacfcc938deab40096b54b8d0e608d53ca91b947
      5bca3e86
    • Tri Vo's avatar
      Revert "Coredomain can't execute vendor code." · d2315bdf
      Tri Vo authored
      This reverts commit 07dd2c9e.
      
      Reason for revert: albacore build broken
      
      Change-Id: I551b1d8c008f01fb815e42b59d397feb9672b8e6
      d2315bdf
  26. Jan 10, 2018
  27. Oct 17, 2017
    • Jeff Vander Stoep's avatar
      Start tracking platform/vendor data access violations · 2ae575b0
      Jeff Vander Stoep authored
      As part of Treble, enforce that the communication between platform
      and vendor components use the official hw binder APIs. Prevent sharing
      of data by file path. Platform and vendor components may share
      files, but only via FD passed over hw binder.
      
      This change adds the violators attribute that will be used to mark
      violating domains that need to be fixed.
      
      Bug: 34980020
      Test: build
      Change-Id: Id9acfbbc86bfd6fd0633b8164a37ce94d25ffa2c
      2ae575b0
  28. Oct 02, 2017
    • Jeff Vander Stoep's avatar
      Retain hal_drm_server attribute for neverallow tests · 6f7e8609
      Jeff Vander Stoep authored
      Addresses:
      Warning!  Type or attribute hal_drm_server used in neverallow
      undefined in policy being checked.
      
      Bug: 67296580
      Test: Build
      Merged-In: I1092aff40da9dcf09bd044400bedd1f549eb7e38
      Change-Id: I07f9825536637a21a91c77e87366861503f6ebac
      6f7e8609
  29. Sep 28, 2017
  30. Sep 26, 2017
Loading