Skip to content
Snippets Groups Projects
  1. Apr 10, 2018
    • Jeff Vander Stoep's avatar
      Start the process of locking down proc/net · 08731895
      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
      08731895
  2. Mar 20, 2018
  3. Mar 19, 2018
  4. Feb 06, 2018
  5. Feb 05, 2018
  6. 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
  7. Jan 29, 2018
  8. 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
  9. Jan 19, 2018
  10. Jan 16, 2018
  11. 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
  12. Jan 10, 2018
  13. 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
  14. 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
  15. Sep 28, 2017
  16. Sep 26, 2017
  17. Sep 25, 2017
    • Jeff Vander Stoep's avatar
      Preserve hal_cas_server attribute · 6b8088ba
      Jeff Vander Stoep authored
      It's used in CTS neverallow tests.
      
      Addresses:
      Warning!  Type or attribute hal_cas_server used in neverallow
      undefined in policy being checked.
      
      Bug: 66910049
      Test: build
      Change-Id: Ia185f266fc1e3cb87c39939fdd45d02efa6c2c94
      Merged-In: I1092aff40da9dcf09bd044400bedd1f549eb7e38
      6b8088ba
  18. Sep 20, 2017
  19. Sep 15, 2017
    • Jeff Vander Stoep's avatar
      do not expand hal_cas attribute · aa5f37da
      Jeff Vander Stoep authored
      Addresses:
      junit.framework.AssertionFailedError: The following errors were
      encountered when validating the SELinuxneverallow rule:
      neverallow {   domain   -adbd   -dumpstate   -hal_drm -hal_cas -init
      -mediadrmserver   -recovery   -shell   -system_server }
      serialno_prop:file { getattr open read ioctl lock map };
      Warning!  Type or attribute hal_cas used in neverallow undefined in
      policy being checked.
      libsepol.report_failure: neverallow violated by allow mediaextractor
      serialno_prop:file { ioctl read getattr lock map open };
      libsepol.report_failure: neverallow violated by allow mediacodec
      serialno_prop:file { ioctl read getattr lock map open };
      libsepol.report_failure: neverallow violated by allow hal_cas_default
      serialno_prop:file { ioctl read getattr lock map open };
      libsepol.check_assertions: 3 neverallow failures occurred
      
      Bug: 65681219
      Test: build
      Change-Id: I2a6445d6372ee4e768cc2cea2140c6de97707a74
      Merged-In: I1092aff40da9dcf09bd044400bedd1f549eb7e38
      aa5f37da
    • Tomasz Wasilczyk's avatar
      Move Broadcast Radio HAL to a separate binary. · 26ff5eb6
      Tomasz Wasilczyk authored
      Bug: 63600413
      Test: VTS, instrumentation, audit2allow
      Test: after cherry-pick - it builds
      Change-Id: I57c0150a52c13f1ce21f9ae2147e3814aad0fb7e
      (cherry picked from commit 567b947d)
      26ff5eb6
  20. Sep 07, 2017
  21. Aug 28, 2017
  22. Aug 17, 2017
  23. Aug 16, 2017
  24. Jul 25, 2017
  25. 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
  26. Jul 19, 2017
    • Jeff Vander Stoep's avatar
      Do not expand hal_audio attribute · 89f215e6
      Jeff Vander Stoep authored
      Fixes:
      neverallow hal_audio domain:{ tcp_socket udp_socket rawip_socket } *;
      Warning!  Type or attribute hal_audio used in neverallow undefined in
      policy being checked.
      
      hal_audio_client is not used in neverallows and was mistakenly marked
      as expandattribute false instead of hal_audio. Fix this.
      
      Bug: 63809360
      Test: build policy
      Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
          android.cts.security.SELinuxNeverallowRulesTest
      
          No more:
          Warning!  Type or attribute hal_audio used in neverallow
          undefined in policy being checked.
      
      Change-Id: Iedf1b80f669f95537ed201cbdbb0626e7e32be81
      89f215e6
  27. 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
    • Jeff Vander Stoep's avatar
      Preserve attributes needed for CTS · bf8ed096
      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
      Change-Id: I989def70a16f66e7a18bef1191510793fbe9cb8c
      bf8ed096
  28. 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
  29. Jun 16, 2017
  30. Jun 08, 2017
  31. Jun 07, 2017
  32. May 25, 2017
    • Jeff Vander Stoep's avatar
      Force expand all hal_* attributes · fb889f23
      Jeff Vander Stoep authored
      Cutting down on the number of attributes associated with each type
      speeds up policy lookup times when there is an access vector cache
      miss.
      
      This change cuts down on the number of attributes associate with
      system_server from 19 to 8. The total number of attributes is
      reduced from 159 to 64.
      
      Bug: 36508258
      Test: build and boot Marlin
      Change-Id: I8cdb6fb783ded869e88c5a9868fd7c8f838190f9
      fb889f23
Loading