Skip to content
Snippets Groups Projects
  1. Jun 22, 2018
    • Jeff Vander Stoep's avatar
      Update socket ioctl restrictions · 0597ade1
      Jeff Vander Stoep authored
      Grant access to icmp_socket to netdomain. This was previously
      labeled as rawip_socket which apps are allowed to use. Neverallow
      all other new socket types for apps.
      
      Kernels versions > 4.9 redefine ICMP sockets from rawip_socket
      to icmp_socket. To pass neverallow tests, we need to define
      which IOCTLs are allowed (and disallowed).
      
      Note that this does not change behavior on devices with
      kernel versions <=4.9. However, it is necessary (although not
      sufficient) to pass CTS on kernel version 4.14.
      
      Bug: 110520616
      Test: Grant icmp_socket in net.te and build.
      Change-Id: I5c7cb6867d1a4cd1554a8da0d55daa8e06daf803
      0597ade1
  2. Jun 21, 2018
  3. Jun 19, 2018
  4. Jun 15, 2018
  5. Jun 14, 2018
  6. Jun 13, 2018
    • Treehugger Robot's avatar
      Merge changes from topic "sharedlib_in_recovery" · b6639b0f
      Treehugger Robot authored
      * changes:
        init is a dynamic executable
        adbd is allowed to execute shell in recovery mode
      b6639b0f
    • Jiyong Park's avatar
      init is a dynamic executable · 90b21ee4
      Jiyong Park authored
      init is now a dynamic executable. So it has to be able to execute the
      dynamic linker (/system/bin/linker) and shared libraries (e.g.,
      /system/lib/libc.so). Furthermore, when in recovery mode, the files are
      all labeled as rootfs - because the recovery ramdisk does not support
      xattr, so files of type rootfs is allowed to be executed.
      
      Do the same for kernel and ueventd because they are executing the init
      executable.
      
      Bug: 63673171
      Test: `adb reboot recovery; adb devices` shows the device ID
      Change-Id: Ic6225bb8e129a00771e1455e259ff28241b70396
      90b21ee4
    • padarshr's avatar
      Add ueventd to mnt_vendor_file neverallow exemption list · 44ae7c2c
      padarshr authored
      Legacy hardware and code still depends on the ueventd helpers to
      locate the firmware supported files which are on new mount path
      labeled with mnt_vendot_file. For ueventd helper to work we need dir search
      and read permission on this new label so moving ueventd to exempted list.
      
      Already ueventd has the vendor_file_type read access.
      
      Bug:110083808
      
      Change-Id: Ia15cc39ecef9e29b4f1f684efdddbeb78b427988
      44ae7c2c
  7. Jun 12, 2018
  8. Jun 11, 2018
    • Steven Moreland's avatar
      Make hal_allocator use hal_attribute_hwservice. · 90996388
      Steven Moreland authored
      If you can get or serve the hal allocator interface,
      you should be a hal_allocator_client or
      hal_allocator_server.
      
      Bug: 80319537
      Test: boot aosp_walleye and (sanity) take photos
      Change-Id: Iea14c67c4aa56df7a74ebdb17e99b78b1d3aa105
      90996388
    • Neil Fuller's avatar
      Allow telephony to call system service · 60d79e48
      Neil Fuller authored
      The timedetector_service will be called from the
      telephony process
      
      Bug: 78217059
      Test: build / local testing with a client
      Change-Id: I25dfa4daabaa80e6b5e697ad1b1e2f7f72377702
      60d79e48
    • Mark Salyzyn's avatar
      persist.sys.boot.reason is cleared once read by bootstat · a1bce779
      Mark Salyzyn authored
      To ensure a surprise reboot does not take the last boot reason on
      face value especially if coming from more than one boot sessions ago.
      We shift and clear the value from persist.sys.boot.reason to
      sys.boot.reason.last and establish a correct last reboot reason in
      the canonical sys.boot.reason property.  As a result, the power
      manager should read the canonical sys.boot.reason for a definitive
      result rather than relying on the possibly incorrect values in the
      persistent storage.  sys.boot.reason should be a core property as
      it represents the canonical boot reason API.
      
      Test: compile
      Bug: 86671991
      Bug: 63736262
      Change-Id: If3742c487d6c0ab69c464f056bf48c786b66a945
      a1bce779
  9. Jun 08, 2018
    • Jiyong Park's avatar
      adbd is allowed to execute shell in recovery mode · bacf3648
      Jiyong Park authored
      The shell is now available directly in the recovery ramdisk. We no
      longer need to mount system.img to /system as the recovery ramdisk is
      self-contained. However, there is a problem that every file in the
      ramdisk is labeled as rootfs because the ramdisk does not support xattr.
      
      This CL adds several recovery-only rules that are required to make the
      recovery ramdisk self-contained. Most importantly, adbd is allowed to
      domain_trans to shell. Also shell is allowe to execute files of type
      rootfs. Finally, the recovery is allowed to mount on tmpfs since it now
      mounts system.img to /mnt/system.
      
      Bug: 63673171
      Test: `adb reboot recovery; adb devices` shows the device ID
      Test: `adb root && adb shell` and then
      $ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
      the /lib directory.
      
      Change-Id: If21b069aee63541344a5ca8939fb9a46ffef4d3e
      bacf3648
  10. Jun 07, 2018
  11. Jun 06, 2018
    • Tri Vo's avatar
      Mechanism to exclude neverallows from *TS. · 77c44fc4
      Tri Vo authored
      build_test_only is used to denote rules that should not verified
      as part of compliance testing.
      
      Use this macro to exclude neverallow rules which we want to check as
      part of build, but not CTS.
      
      Bug: 80499271
      Test: SELinuxNeverallowRulesTest on walleye has no more failure of type
      "Type or attribute * used in neverallow undefined in policy being checked."
      Number of failing test cases is reduced by 142.
      Test: policy.conf used to check neverallows at build-time still retains
      all neverallow rules.
      Change-Id: I5f1b383d9096bb5a7b8c0f1bc008b5dd07419580
      77c44fc4
    • Steven Moreland's avatar
      Make hal_configstore consistent. · ac88cb61
      Steven Moreland authored
      Previously, supposedly, each individual client of configstore
      was supposed to add the add_hwservice attribute itself to get
      ahold of the specific sub-interface of configstore relevant to
      it. However, there is only one configstore interface,
      ISurfaceFlingerConfigs.
      
      From this point onward, the configstore hal is to be thought of
      as specifically relating to surface flinger. Other properties
      may be added as other attributes/packages.
      
      For instance, if we want a configstore entry for 'IFooConfig',
      then we would add the configuration to one of the following
      packages:
      - android.hardware.foo@X.Y (to the interface itself)
      - android.hardware.foo.config@X.Y (to a configuration of the interface)
      - android.hardware.configstore.foo@X.Y (as a sub-interface of configstore)
      
      and then it could be associated with the sepolicy attributes
      (respectively):
      - hal_foo
      - hal_foo_config (or just hal_foo if they are 1-1)
      - hal_configstore_foo
      
      The specific pattern to be followed irrelevant to this CL
      and subject to future discussion, the point being that we're going
      to have a separate sepolicy attribute (and package, although this
      isn't strictly necessary) for each separate domain's configuration.
      
      Fixes: 109806245
      Test: boot walleye, check for denials
      Change-Id: If661e3fca012017a6c854fe3f02df4b779d514df
      ac88cb61
    • Treehugger Robot's avatar
      Merge changes from topic "b80319537" · 0578a394
      Treehugger Robot authored
      * changes:
        hal_attribute_hwservice_client drop '_client'
        hal_attribute_hwservice_client += add_hwservice
      0578a394
    • Treehugger Robot's avatar
      Merge "Deprivilege haiku" · 59f8e75a
      Treehugger Robot authored
      59f8e75a
    • Steven Moreland's avatar
      hal_attribute_hwservice_client drop '_client' · 9234e00d
      Steven Moreland authored
      Since this attribute just associates a hal_attribute
      with a given hwservice in the standard way.
      
      Bug: 80319537
      Test: boot + sanity + test for denials
      Change-Id: I545de165515387317e6920ce8f5e8c491f9ab24e
      9234e00d
    • Steven Moreland's avatar
      hal_attribute_hwservice_client += add_hwservice · 343e24a1
      Steven Moreland authored
      For sanity, this makes 'hal_attribute_hwservice_client'
      be associated with a specific hwservice thus making things
      consistent.
      
      After this change, only configstore, hal_allocator, and the
      fwk_* services are inconsistent with all other HALs.
      
      Bug: 80319537
      Test: boot device, sanity tests, check for denials
      Change-Id: Ibffc65c9567a429e07a3dc4dd41117738459dc2a
      343e24a1
    • Neil Fuller's avatar
      Remove references to common_time / commontime · c9fa040d
      Neil Fuller authored
      This change removes references to the common time management
      service.
      
      Bug: 80462439
      Test: build / boot
      Merged-In: I2c8fca44fe05e3a35f5580d23e23a4c033075613
      Change-Id: I2c8fca44fe05e3a35f5580d23e23a4c033075613
      c9fa040d
    • Treehugger Robot's avatar
  12. Jun 05, 2018
  13. Jun 04, 2018
    • Treehugger Robot's avatar
    • Steven Moreland's avatar
      Add context for ro.boot.product.hardware.sku. · d47b09f1
      Steven Moreland authored
      This was defined, but it had no users in the Android tree.
      Because of this, ODM manifests required extra sepolicy to be applied
      in vendor. Before this, there was no policy split, so that was okay,
      but now it is impossible.
      
      Bug: 91735839
      Test: add an odm manifest for SE conditional on
          a system property (ro.boot.product.hardware.sku)
          and make sure it is read into the manifest (using
          the vintf tool) and also that a client can get the
      $ lshal | grep secure
      Y android.hardware.secure_element@1.0::ISecureElement/SIM1                                  0/2        881    2262 567
      
      Change-Id: I94a2928943be6a17416b8bbd78106809c0c21198
      Merged-In: I94a2928943be6a17416b8bbd78106809c0c21198
      d47b09f1
    • Neil Fuller's avatar
      selinux changes to add time detector service · e1dd6d07
      Neil Fuller authored
      This commit contains the changes needed to add the new
      time detector system server service.
      
      Bug: 78217059
      Test: make / booted device
      Change-Id: I7cfaac6cac876e4aa73e8af1aa5f837117bb9ad7
      e1dd6d07
    • Jeff Vander Stoep's avatar
      Deprivilege haiku · f45db06c
      Jeff Vander Stoep authored
      Clatd and zygote
      are all overprivileged
      as is storaged
      
      Test: Verify no "granted" messages from dogfooders. Build flash
      aosp_taimen-userdebug. Verify no denials.
      Change-Id: I735adcffed553962ad12072716a7200883930dcf
      f45db06c
  14. Jun 01, 2018
    • Jeff Vander Stoep's avatar
      Suppress denials for apps accessing storage too early · 9c7396d5
      Jeff Vander Stoep authored
      The recommended solution is to not access encrypted storage until
      after the ACTION_USER_UNLOCKED intent is delivered.
      
      Test: build
      Fixes: 72811052
      Fixes: 72550646
      Change-Id: I80eb743e26047b7864de983c5a46c28b6f753a59
      9c7396d5
    • 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
Loading