Skip to content
Snippets Groups Projects
  1. Feb 22, 2018
    • Sandeep Patil's avatar
      Add label for kernel test files and executables · 34e35e9e
      Sandeep Patil authored
      
      This required for kernel to do loopback mounts on filesystem
      images created by the kernel system call tests in LTP.
      
      Add a corresponding neverallow to stop all domains from accessing
      the location at /data/local/tmp/ltp.
      
      Bug: 73220071
      Test: Boot sailfish successfully
      Test: run vts-kernel -m VtsKernelLtp -t syscalls.fchown04
      
      Change-Id: I73f5f14017e22971fc246a05751ba67be4653bca
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      34e35e9e
  2. Feb 21, 2018
    • Primiano Tucci's avatar
      perfetto: Make producer socket MLS-aware · 5ef6669b
      Primiano Tucci authored
      The previous selinux rules obtained via audit2allow didn't really
      work with the case of apps connecting to the producer socket,
      despite all the allow rules being correctly in place.
      This was failing our CTS tests.
      
      The reason for the failure (see denials pasted below) is due to
      Multi Level Security (for multi-user), which was still preventing
      apps form a different level to connect to the traced producer
      socket and write to the shmem buffers they get passed back.
      This CL tags the objects being accessed as mlstrusted.
      CTS tests pass with this CL.
      
      Denials:
      avc: denied { write } for pid=8545 comm="traced_probes" name="traced_producer" dev="tmpfs" ino=23629 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:traced_producer_socket:s0 tclass=sock_file permissive=1
      avc: denied { write } for pid=8545 comm="traced_probes" name="traced_producer" dev="tmpfs" ino=23629 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:traced_producer_socket:s0 tclass=sock_file permissive=1
      avc: denied { connectto } for pid=8545 comm="traced_probes" path="/dev/socket/traced_producer" scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:r:traced:s0 tclass=unix_stream_socket permissive=1
      avc: denied { connectto } for pid=8545 comm="traced_probes" path="/dev/socket/traced_producer" scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:r:traced:s0 tclass=unix_stream_socket permissive=1
      avc: denied { write } for pid=8545 comm="traced_probes" path=2F6D656D66643A706572666574746F5F73686D656D202864656C6574656429 dev="tmpfs" ino=104483 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:traced_tmpfs:s0 tclass=file permissive=1
      
      Change-Id: I1598bc0b07bf39b8d0420b66caf06a4ca884f383
      Bug: 73340039
      Test: CtsPerfettoTestCases
      5ef6669b
  3. Feb 15, 2018
    • Robert Sesek's avatar
      SELinux changes to accomodate starting the webview_zygote as a child of the zygote. · febdfa4e
      Robert Sesek authored
      In this architecture, the system_server instructs the zygote to fork a
      child-zygote to be the webview_zygote. The system_server tells this new
      zygote to listen for fork requests on a random abstract unix socket of
      its choosing.
      
      A follow-up CL will remove the rules for starting webview_zygote via
      init.
      
      Bug: 63749735
      Test: m
      Test: Launch "Third-party licenses" activity from Settings, and it
            renders correctly via the WebView.
      Merged-In: I864743943c11c18de386010ecd4b616721cb9954
      Change-Id: I1c352e47b66eca3a3fa641daa6ecc3e7a889b54e
      febdfa4e
  4. Feb 13, 2018
  5. Feb 09, 2018
  6. Feb 08, 2018
    • Jeff Vander Stoep's avatar
      label /data/vendor{_ce,_de} · d25ccabd
      Jeff Vander Stoep authored
      Restrictions introduced in vendor init mean that new devices
      may not no longer exempt vendor init from writing to system_data_file.
      This means we must introduce a new label for /data/vendor which
      vendor_init may write to.
      
      Bug: 73087047
      Test: build and boot Taimen and Marlin. Complete SUW, enroll fingerprint
          No new denials.
      
      Change-Id: I65f904bb28952d4776aab947515947e14befbe34
      d25ccabd
  7. Feb 07, 2018
    • Tri Vo's avatar
      shell: remove from system_executes_vendor_violators. · bfe51254
      Tri Vo authored
      And grant explicit exemption from system_executes_vendor_violators
      neverallow rules.
      
      This does not change the policy, but is needed to test the violator
      attribute for emptiness.
      
      Bug: 72662597
      Test: build sepolicy
      Change-Id: Iba79bb42e1381b221fe0dc53470f62f8267a4791
      bfe51254
  8. Feb 06, 2018
  9. Feb 05, 2018
    • Mark Salyzyn's avatar
      lmkd: add live-lock killer daemon · d583e596
      Mark Salyzyn authored
      llkd needs the ability to forcibly crash the kernel if
      cause is unlikely to result in an orderly shutdown. It
      also needs to scan /proc/<pid> for additional process
      information.
      
      Test: lmkd_unit_test --gtest_filter=llkd.*
      Bug: 33808187
      Change-Id: I7f158a13814e79d5ec71fe90dbc7461abb521945
      d583e596
    • Jaekyun Seok's avatar
      Add tests for compatible property (1/2) · 64ade65d
      Jaekyun Seok authored
      The feature of compatible property has its own neverallow rules and it
      is enforced on devices launchig with Android P.
      
      This CL changes hal_nfc to hal_nfc_server in neverallow rules because
      sepolicy-analyze doesn't recognize it. Additionally one more neverallow
      rule is added to restrict reading nfc_prop.
      
      Bug: 72013705
      Bug: 72678352
      Test: 'run cts -m CtsSecurityHostTestCases' on walleye with
      ro.product.first_api_level=28
      
      Change-Id: I753cc81f7ca0e4ad6a2434b2a047052678f57671
      64ade65d
    • Carmen Jackson's avatar
      Use a whitelisting strategy for tracefs. · 2c8ca45d
      Carmen Jackson authored
      This changes tracefs files to be default-enabled in debug mode, but
      default-disabled with specific files enabled in user mode.
      
      Bug: 64762598
      Test: Successfully took traces in user mode.
      
      Change-Id: I572ea22253e0c1e42065fbd1d2fd7845de06fceb
      2c8ca45d
    • Andrew Scull's avatar
      authsecret HAL policies. · 64f35fa0
      Andrew Scull authored
      Bug: 71527305
      Test: compile and boot
      Change-Id: I91097bd62d99b8dd9eb6f53060badbaf0f4b8b4a
      (cherry picked from commit 1aedf4b5)
      64f35fa0
  10. Feb 02, 2018
    • Jeff Vander Stoep's avatar
      Enable Traceur on user builds. · de04528c
      Jeff Vander Stoep authored
      Test: Standard Traceur workflow works successfully with no
      selinux denials on a user build.
      Bug: 64762598
      Change-Id: I0dfe506d463b63d70c5bda03f8706041ea7ab448
      de04528c
    • Jeff Vander Stoep's avatar
      te_macros: remove print macro · d28c0569
      Jeff Vander Stoep authored
      aosp/605217 adds the following lines:
      genfscon tracefs /options/print-tgid u:object_r:debugfs_tracing:s0
      genfscon debugfs /tracing/options/print-tgid u:object_r:debugfs_tracing:s0
      
      However, the m4 pre-processing step of selinux policy compilation outputs:
      genfscon tracefs /options/-tgid u:object_r:debugfs_tracing:s0
      genfscon debugfs /tracing/options/-tgid u:object_r:debugfs_tracing:s0
      
      And as a result of the "print" it prints:
      m4: system/sepolicy/private/genfs_contexts: 177:
      m4: system/sepolicy/private/genfs_contexts: 203:
      
      Due to the following macro:
      https://android.googlesource.com/platform/system/sepolicy/+/oreo-mr1-dev/public/te_macros#580
      
      This change removes the now-deprecated print macro to unblock
      aosp/605217.
      
      Bug: 72862003
      Test: verify that the m4 output for aosp/605217 is correct.
      Change-Id: Ia4ec96e16b98e8df241cceb64e3f3b7bea9a7f3d
      d28c0569
  11. Feb 01, 2018
  12. Jan 31, 2018
  13. Jan 30, 2018
    • Chenbo Feng's avatar
      Remove app access to qtaguid ctrl/stats file · fad0b04d
      Chenbo Feng authored
      Remove the untrusted apps and priviledged apps from the group that can
      directly access xt_qtaguid module related file. All apps that need to
      access app network usage data need to use the public API provided in
      framework.
      
      Test: Flashed with master branch on marlin, verified phone boot, can
            browse web, watch youtube video, make phone call and use google
            map for navigation with either wifi is on or off.
            run cts -m CtsNetTestCases -t android.net.cts.TrafficStatsTest
            run cts -m CtsNativeNetTestCases
      Bug: 68774956 30950746
      
      Change-Id: I9b3db819d6622611d5b512ef821abb4c28d6c9eb
      fad0b04d
    • 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
  14. Jan 29, 2018
    • Ruchi Kandoi's avatar
      SE Policy for Secure Element app and Secure Element HAL · 8a2b4a78
      Ruchi Kandoi authored
      Test: App startup on boot
      Change-Id: I7740aafc088aadf676328e3f1bb8db5175d97102
      8a2b4a78
    • Tom Cherry's avatar
      Remove vendor_init from coredomain · 9c778045
      Tom Cherry authored
      vendor_init exists on the system partition, but it is meant to be an
      extention of init that runs with vendor permissions for executing
      vendor scripts, therefore it is not meant to be in coredomain.
      
      Bug: 62875318
      Test: boot walleye
      Merged-In: I01af5c9f8b198674b15b90620d02725a6e7c1da6
      Change-Id: I01af5c9f8b198674b15b90620d02725a6e7c1da6
      9c778045
  15. Jan 25, 2018
    • Tom Cherry's avatar
      Neverallow vendor_init from writing system_data_file · d1dd6fcd
      Tom Cherry authored
      This neverallow exception is not needed.
      
      Bug: 62875318
      Test: build walleye, bullhead
      Change-Id: Ide37ef9fe7a0e1cc4a1809589f78052007698cf5
      d1dd6fcd
    • Tom Cherry's avatar
      Fix compatible property neverallows · eed2e84a
      Tom Cherry authored
      The current neverallow rules for compatible properties restrict
      domains from write file permissions to the various property files.
      This however is the wrong restriction, since only init actually writes
      to these property files.  The correct restriction is to restrict 'set'
      for 'property_service' as this change does.
      
      Note there is already a restriction preventing {domain -init} from
      writing to these files in domain.te.
      
      Test: build
      Change-Id: I19e13b0d084a240185d0f3f5195e54065dc20e09
      eed2e84a
    • Joel Galenson's avatar
      Suppress denials from idmap reading installd's files. · b050dccd
      Joel Galenson authored
      We are occasionally seeing the following SELinux denial:
      
      avc: denied { read } for comm="idmap" path="/proc/947/mounts" scontext=u:r:idmap:s0 tcontext=u:r:installd:s0 tclass=file
      
      This commit suppresses that exact denial.
      
      We believe this is occurring when idmap is forked from installd, which is reading its mounts file in another thread.
      
      Bug: 72444813
      Test: Boot Walleye and test wifi and camera.
      Change-Id: I3440e4b00c7e5a708b562a93b304aa726b6a3ab9
      b050dccd
  16. 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
    • Marissa Wall's avatar
      sepolicy: restrict access to uid_cpupower files · dfe063c3
      Marissa Wall authored
      Do not let apps read /proc/uid_cpupower/time_in_state,
      /proc/uid_cpupower/concurrent_active_time,
      /proc/uid_cpupower/concurrent_policy_time.
      
      b/71718257
      
      Test: Check that they can't be read from the shell
          without root permissions and system_server was able
          to read them
      
      Change-Id: I812694adfbb4630f7b56aa7096dc2e6dfb148b15
      dfe063c3
    • Tom Cherry's avatar
      Disallow vendor_init from accessing core_data_file_type · 564d5e39
      Tom Cherry authored
      Now that the vendor_init mechanism is in place, this SELinux
      restriction will disallow vendor init scripts from touching core data
      files as intended with Treble.
      
      Bug: 62875318
      Test: None
      Change-Id: Ifa50486c48551ba095d2ed8cc6570fc5040c172d
      564d5e39
    • Joel Galenson's avatar
      Fix init error trying to access file. · cf391269
      Joel Galenson authored
      Init tries to write /proc/sys/vm/min_free_order_shift but fails due to
      a SELinux denial.  This gives the file a new label and gives init the
      ability to write it.
      
      Test: Build and booted Sailfish (a couple of days ago).
      Change-Id: Ic93862b85c468afccff2019d84b927af9ed2a84d
      cf391269
  17. Jan 23, 2018
  18. Jan 22, 2018
    • Max Bires's avatar
      Adding write permissions to traceur · 35c36389
      Max Bires authored
      Fixing denials that stopped traceur from being able to write to
      debugfs_tracing. Also cleaning up general find denials for services that
      traceur doesn't have permission to access.
      
      Additionally, labeling /data/local/trace as a trace_data_file in order
      to give traceur a UX friendly area to write its traces to now that it
      will no longer be a shell user. It will be write/readable by traceur,
      and deletable/readable by shell.
      
      Test: Traceur functionality is not being blocked by selinux policy
      Bug: 68126425
      Change-Id: I201c82975a31094102e90bc81454d3c2a48fae36
      35c36389
    • Tom Cherry's avatar
      Allow vendor_init without compatible_property to write most properties · 6473ae83
      Tom Cherry authored
      These property sets will be long term restricted with
      compatible_property but allowing them now eases the transition.
      
      Bug: 62875318
      Test: boot marlin without audits for setprop in vendor_init
      Change-Id: I25ab565bbf137e382c1dfc3b905b38403645f1d2
      6473ae83
  19. Jan 20, 2018
    • Badhri Jagan Sridharan's avatar
      usbd sepolicy · 4f6eb37f
      Badhri Jagan Sridharan authored
      Sepolicy for the usb daemon. (ag/3373886/)
      
      Bug: 63669128
      Test: Checked for avc denial messages.
      Change-Id: I6e2a4ccf597750c47e1ea90c4d43581de4afa4af
      4f6eb37f
Loading