Skip to content
Snippets Groups Projects
  1. Jan 21, 2019
    • Ryan Savitski's avatar
      Allow heap profiling of certain app domains on user builds · ca0690e8
      Ryan Savitski authored
      This patch extends the current debug-specific rules to cover user
      builds. As a reminder, on user, the target process fork-execs a private
      heapprofd process, which then performs stack unwinding & talking to the
      central tracing daemon while staying in the target's domain. The central
      heapprofd daemon is only responsible for identifying targets & sending
      the activation signal. On the other hand, on debug, the central
      heapprofd can handle all processes directly, so the necessary SELinux
      capabilities depend on the build type.
      
      These rules are necessary but not sufficient for profiling. For zygote
      children, the libc triggering logic will also check for the app to
      either be debuggable, or go/profileable.
      
      For more context, see go/heapprofd-security & go/heapprofd-design.
      
      Note that I've had to split this into two separate macros, as
      exec_no_trans - which is necessary on user, but nice-to-have on debug -
      conflicts with a lot of neverallows (e.g. HALs and system_server) for
      the wider whitelisting that we do on debug builds.
      
      Test: built & flashed on {blueline-userdebug, blueline-user}, activated profiling of whitelisted/not domains & checked for lack of denials in logcat.
      Bug: 120409382
      Change-Id: Id0defc3105b99f777bcee2046d9894a2b39c6a29
      ca0690e8
    • Martijn Coenen's avatar
      Initial sepolicy for app_zygote. · 1bbda7e6
      Martijn Coenen authored
      The application zygote is a new sort of zygote process that is a
      child of the regular zygote. Each application zygote is tied to the
      application for which it's launched. Once it's started, it will
      pre-load some of the code for that specific application, much like
      the regular zygote does for framework code.
      
      Once the application zygote is up and running, it can spawn
      isolated service processes that run in the isolated_app domain. These
      services can then benefit from already having the relevant
      application code and data pre-loaded.
      
      The policy is largely the same as the webview_zygote domain,
      however there are a few crucial points where the policy is different.
      
      1) The app_zygote runs under the UID of the application that spawned
         it.
      2) During app_zygote launch, it will call a callback that is
         controlled by the application, that allows the application to
         pre-load code and data that it thinks is relevant.
      
      Especially point 2 is imporant: it means that untrusted code can run
      in the app_zygote context. This context is severely limited, and the
      main concern is around the setgid/setuid capabilities. Those conerns
      are mitigated by installing a seccomp filter that only allows
      setgid/setuid to be called in a safe range.
      
      Bug: 111434506
      Test: app_zygote can start and fork children without denials.
      Change-Id: I1cc49ee0042d41e5ac6eb81d8f8a10ba448d4832
      1bbda7e6
  2. Jan 18, 2019
  3. Jan 17, 2019
  4. Jan 16, 2019
    • Martijn Coenen's avatar
      Allow the kernel to read staging_data_file. · b85acbb8
      Martijn Coenen authored
      These are APEX files in /data/staging, and will be accessed by the loop
      driver in the kernel.
      
      Bug: 118865310
      Test: no denials on emulator
      Change-Id: I5c849b6677566cb00d28011352b9dc6b787a0bc4
      b85acbb8
    • Nick Kralevich's avatar
      rs.te: Remove dontaudit statements · 80eec389
      Nick Kralevich authored
      These dontaudit rules were in place to suppress SELinux denials due to
      file descriptor leakage. The file descriptor leakage has been fixed, so
      these rules are no longer necessary. Delete.
      
      Fixes: 120983106
      Test: cts-tradefed run cts-dev -m CtsRenderscriptTestCases
      Change-Id: I5cad79c3526583bd2b65bd089fee9c490f6beb5e
      80eec389
    • Treehugger Robot's avatar
      2b805595
    • Narayan Kamath's avatar
      Add initial sepolicy for app data snapshots. · 2ad229c7
      Narayan Kamath authored
      Define a rollback_data_file label and apply it to the snapshots
      directory. This change contains just enough detail to allow
      vold_prepare_subdirs to prepare these directories correctly.
      
      A follow up change will flesh out the access policy on these
      directories in more detail.
      
      Test: make, manual
      Bug: 112431924
      
      Change-Id: I4fa7187d9558697016af4918df6e34aac1957176
      2ad229c7
    • lifr's avatar
      Allow netd to write to statsd · 980c08c9
      lifr authored
      config sepolicy to allow netd to write to statsd.
      
      Test: run runtests.sh, make sure no missing test and get all pass
            run /out/host/linux-x86/bin/statsd_testdrive 82
            Got following metric data dump:pass for local test
      Bug: 119862317
      
      Change-Id: Ieff5ca55de46715d54ef57c4a6d144fd7d03e4b7
      980c08c9
    • David Anderson's avatar
      sepolicy for gsid · 6d53efcf
      David Anderson authored
      
      Bug: 122556707
      Test: gsid starts
      Change-Id: Ib05ddb79051436f51cd236de04027a3b12ee87a9
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      6d53efcf
    • Jeff Vander Stoep's avatar
      app: remove redundant neverallow rule · d8bec4ac
      Jeff Vander Stoep authored
      Access to zygote_socket is already neverallowed to
      { domain -system_server }.
      
      Test: build
      Change-Id: I6353ef09f769c8d64c97b1bdef93f0ab4d5dae6a
      d8bec4ac
    • Wei Wang's avatar
      f0dd63db
    • Remi NGUYEN VAN's avatar
    • Tao Bao's avatar
      recovery: Address the ioctl denials during wiping. · 832f8af0
      Tao Bao authored
      avc:  denied  { ioctl } for  pid=599 comm="mke2fs" path="/dev/block/sda13" dev="tmpfs" ino=18975 ioctlcmd=127b scontext=u:r:recovery:s0 tcontext=u:object_r:userdata_block_device:s0 tclass=blk_file
      avc:  denied  { ioctl } for  pid=587 comm="mke2fs" path="/dev/block/sda20" dev="tmpfs" ino=17931 ioctlcmd=0x127b scontext=u:r:recovery:s0 tcontext=u:object_r:metadata_block_device:s0 tclass=blk_file
      
      0x127b (BLKPBSZGET) is called by mke2fs that queries physical sector
      size. Although the denial is currently non-fatal, as mke2fs falls back
      to use logical sector size, it might lead to undesired result in future.
      
      Test: Factory reset on taimen and blueline respectively.
      Change-Id: I14fc6593aeae309c79f5eadcffc8158b0a2ab2f6
      832f8af0
  5. Jan 15, 2019
Loading