Skip to content
Snippets Groups Projects
  1. Mar 01, 2018
  2. Feb 28, 2018
    • Jeff Vander Stoep's avatar
      system_server: grant read access to vendor/framework · 9e33565c
      Jeff Vander Stoep authored
      avc: denied { getattr } for path="/vendor/framework"
      scontext=u:r:system_server:s0 tcontext=u:object_r:vendor_framework_file:s0
      tclass=dir
      
      Bug: 68826235
      Test: boot Taimen, verify denials no longer occur.
      Change-Id: Id4b311fd423342c8d6399c3b724417aff9d1cd88
      9e33565c
  3. Feb 23, 2018
    • Robert Sesek's avatar
      Remove rules for starting the webview_zygote as a child of init. · 869562e9
      Robert Sesek authored
      The webview_zygote is now launched as a child-zygote process from the
      main zygote process.
      
      Bug: 63749735
      Test: m
      Test: Launch "Third-party licenses" activity from Settings, and it
            renders correctly via the WebView.
      Merged-In: I9c948b58a969d35d5a5add4b6ab62b8f990645d1
      Change-Id: I153476642cf14883b0dfea0d9f5b3b5e30ac1c08
      869562e9
  4. 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
  5. Feb 06, 2018
    • Niklas Brunlid's avatar
      Allow system_server to create files on configfs · 8e0086a8
      Niklas Brunlid authored
      A change in the "open" syscall between kernel 4.4 and 4.9 means that
      the "create" action is now checked and makes system_server trigger
      an SELinux denial when PackageSettings is removing a user ID from
      Settings.java/writeKernelRemoveUserLPr() in PackageManager.
      
      Bug: 70150770
      Test: Manual
      - Add a new user on the device, no need to perform setup.
      - Wait 30s
      - Remove the added user
      - While running, check the result of:
          adb logcat -v time -b events | grep audit | grep system_server
      Change-Id: I1f490ea95d5bcb2adc76cba041bffbea131b447a
      8e0086a8
  6. Feb 05, 2018
  7. Jan 29, 2018
    • Primiano Tucci's avatar
      SELinux policies for Perfetto cmdline client (/system/bin/perfetto) · 1a9f4f7a
      Primiano Tucci authored
      Instead of having statsd linking the perfetto client library
      and talk directly to its socket, we let just statsd exec()
      the /system/bin/perfetto cmdline client.
      
      There are two reasons for this:
      1) Simplify the interaction between statsd and perfetto, reduce
        dependencies, binary size bloat and isolate faults.
      2) The cmdline client also takes care of handing the trace to
        Dropbox. This allows to expose the binder interaction surface
        to the short-lived cmdline client and avoid to grant binder
        access to the perfetto traced daemon.
      
      This cmdline client will be used by:
       - statsd
       - the shell user (for our UI and Studio)
      
      Bug: 70942310
      Change-Id: I8cdde181481ad0a1a5cae5937ac446cedac54a1f
      1a9f4f7a
  8. Jan 25, 2018
  9. Jan 24, 2018
    • 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
  10. Jan 23, 2018
  11. Jan 19, 2018
    • Badhri Jagan Sridharan's avatar
      hal_usb_gadget sepolicy · 7bee33e6
      Badhri Jagan Sridharan authored
      Bug: 63669128
      Test: Checked for avc denail messages.
      Change-Id: I057b3cf9ccc945cb943b9cf60fc9cd6c023eddda
      Merged-In: I057b3cf9ccc945cb943b9cf60fc9cd6c023eddda
      7bee33e6
  12. Jan 17, 2018
    • Tri Vo's avatar
      system_server: remove access sysfs_devices_system_cpu · 35c65c1e
      Tri Vo authored
      CpuFrequency.java seems to be the only thing that depends on
      /sys/devices/system/cpu in system_server. And according to
      b/68988722#comment15, that dependency is not exercised.
      
      Bug: 68988722
      Test: walleye boots without denials to sysfs_devices_system_cpu
      Change-Id: If777b716bf74188581327b7f5aa709f5d88aad2d
      35c65c1e
  13. Jan 16, 2018
  14. Jan 11, 2018
    • Jeff Vander Stoep's avatar
      relabel files in /proc/net/xt_qtaguid/ · 43303c8b
      Jeff Vander Stoep authored
      /proc/net/xt_qtaguid is used by apps to track their network data
      use. Limit access to just zygote spawned processes - apps and
      system_server, omitting access to isolated_app which is not allowed
      to create network sockets.
      As Android moves to eBPF for app's network data stats, access to
      /proc/net/xt_qtaguid will be removed entirely. Segmenting access off
      is the first step.
      Bug: 68774956
      
      This change also helps further segment and whitelist access to
      files in /proc/net and is a step in the lockdown of /proc/net.
      Bug: 9496886
      
      Test: boot Taimen. Walk through setup-wizard. Make phone call and
          video call. Browse web. Watch youtube. Navigate in maps.
      Test: cts-tradefed run cts -m CtsAppSecurityHostTestCases -t \
          android.appsecurity.cts.AppSecurityTests
      Test: cts-tradefed run cts -m CtsNativeNetTestCases
      Test: cts-tradefed run cts -m CtsIncidentHostTestCases -t \
          com.android.server.cts.NetstatsIncidentTest
      Test: cts-tradefed run cts -m CtsOsTestCases -t \
          android.os.cts.StrictModeTest
      Test: cts-tradefed run cts -m CtsNetTestCases -t \
          android.net.cts.TrafficStatsTest
      Test: cts-tradefed run cts -m CtsUsageStatsTestCases -t \
          android.app.usage.cts.NetworkUsageStatsTest
      Test: vts-tradefed run vts -m VtsQtaguidTest
      Change-Id: Idddd318c56b84564142d37b11dcc225a2f2800ea
      43303c8b
  15. Jan 10, 2018
    • Jaekyun Seok's avatar
      Whitelist exported platform properties · e4971454
      Jaekyun Seok authored
      This CL lists all the exported platform properties in
      private/exported_property_contexts.
      
      Additionally accessing core_property_type from vendor components is
      restricted.
      Instead public_readable_property_type is used to allow vendor components
      to read exported platform properties, and accessibility from
      vendor_init is also specified explicitly.
      
      Note that whitelisting would be applied only if
      PRODUCT_COMPATIBLE_PROPERTY is set on.
      
      Bug: 38146102
      Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY=true
      Change-Id: I304ba428cc4ca82668fec2ddeb17c971e7ec065e
      e4971454
  16. Jan 02, 2018
  17. Dec 21, 2017
    • Tri Vo's avatar
      system_server: search permission to all of sysfs. · ce8bc8b0
      Tri Vo authored
      This will allow system_server to perfom path resolution on paths like:
      /sys/devices/soc/800f000.qcom,spmi/spmi-0/spmi0-00/800f000.qcom,spmi:qcom,pm8998@0:qcom,pm8998_rtc/rtc
      
      Fixes this denial:
      avc: denied { search } for pid=947 comm=system_server
      name=800f000.qcom,spmi dev=sysfs ino=19891
      scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_msm_subsys:s0
      tclass=dir permissive=0 b/68003344
      
      Bug: 68003344
      Test: walleye boots without the denial above.
      Change-Id: Ib282395124c7f2f554681fcc713b9afe189f441c
      ce8bc8b0
  18. Dec 20, 2017
    • Tri Vo's avatar
      system_server: remove access to /sys/class/leds. · 89a7b215
      Tri Vo authored
      Removing legacy rules. system_server now depends on Lights HAL (which
      has its own domain) instead of /sys/class/leds.
      
      Bug: 70846424
      Test: sailfish boots; screen, flashlight work fine.
      
      Change-Id: I6f116a599cab26ae71e45f462b33328bc8d43db5
      89a7b215
  19. Dec 19, 2017
  20. Dec 16, 2017
  21. Dec 12, 2017
    • Marissa Wall's avatar
      Restrict access to uid_concurrent_*_time · 80ee23f7
      Marissa Wall authored
      Do not let apps read uid_concurrent_active_time and
      uid_concurrent_policy_time.
      
      b/68399339
      
      Test: Check that they can't be read from the shell
          without root permissions and system_server was able
          to read them
      
      Change-Id: I6f09ef608607cb9f4084ba403a1e7254b8c49a06
      80ee23f7
  22. Nov 30, 2017
  23. Nov 29, 2017
  24. Nov 28, 2017
    • Calin Juravle's avatar
      Allow system server to open profiles · 15da30b6
      Calin Juravle authored
      Allow system_server to open profile snapshots for read.
      System server never reads the actual content. It passes the descriptor to
      to privileged apps which acquire the permissions to inspect the profiles.
      
      Test: installd_dexopt_test
      Bug: 30934496
      Change-Id: I1d1f07a05261af25f6640040af1500c9a4d5b8d5
      15da30b6
  25. Nov 22, 2017
    • Nick Kralevich's avatar
      Continuation of 9b2e0cbe · df642bef
      Nick Kralevich authored
      9b2e0cbe changed all uses of capability
      to global_capability_class_set but accidentally omitted one entry.
      Fix the one entry.
      
      Test: policy compiles.
      Change-Id: I1bb8c494a2660d9f02783c93b07d4238a2575106
      df642bef
  26. Nov 21, 2017
    • Benjamin Gordon's avatar
      sepolicy: Add rules for non-init namespaces · 9b2e0cbe
      Benjamin Gordon authored
      In kernel 4.7, the capability and capability2 classes were split apart
      from cap_userns and cap2_userns (see kernel commit
      8e4ff6f228e4722cac74db716e308d1da33d744f). Since then, Android cannot be
      run in a container with SELinux in enforcing mode.
      
      This change applies the existing capability rules to user namespaces as
      well as the root namespace so that Android running in a container
      behaves the same on pre- and post-4.7 kernels.
      
      This is essentially:
        1. New global_capability_class_set and global_capability2_class_set
           that match capability+cap_userns and capability2+cap2_userns,
           respectively.
        2. s/self:capability/self:global_capability_class_set/g
        3. s/self:capability2/self:global_capability2_class_set/g
        4. Add cap_userns and cap2_userns to the existing capability_class_set
           so that it covers all capabilities.  This set was used by several
           neverallow and dontaudit rules, and I confirmed that the new
           classes are still appropriate.
      
      Test: diff new policy against old and confirm that all new rules add
            only cap_userns or cap2_userns;
            Boot ARC++ on a device with the 4.12 kernel.
      Bug: crbug.com/754831
      
      Change-Id: I4007eb3a2ecd01b062c4c78d9afee71c530df95f
      9b2e0cbe
  27. Nov 20, 2017
  28. Nov 17, 2017
    • Vishnu Nair's avatar
      Add window trace files SELinux policy rules · 2d6942d3
      Vishnu Nair authored
      - Allow system_server to create and write to /data/misc/wmtrace/*
      - Allow surfaceflinger to create and write files from /data/misc/wmtrace/*
      - Allow dumpstate to read files from /data/misc/wmtrace/*
      permissions are restricted to userdebug or eng builds
      
      Bug: 64831661
      
      Test: adb shell cmd window tracing start && adb shell cmd window tracing stop
      Test: adb shell su root service call SurfaceFlinger 1025 i32 1 >/dev/null && adb shell su root service call SurfaceFlinger 1025 i32 0 >/dev/null
      Test: adb bugreport ~/tmp.zip && adb shell su root dmesg | grep 'avc: '
      
      Change-Id: I0b15166560739d73d7749201f3ad197dbcf5791c
      2d6942d3
  29. Nov 16, 2017
    • Tri Vo's avatar
      system_server: access to /proc/sys/fs/pipe-max-size · e7f4934d
      Tri Vo authored
      Label /proc/sys/fs/pipe-max-size with new type proc_pipe_conf and give
      system_server access to it.
      
      Addresses this denial:
      avc: denied { read } for name="pipe-max-size" dev="proc" ino=93817
      scontext=u:r:system_server:s0 tcontext=u:object_r:proc:s0 tclass=file
      permissive=0
      
      Bug: 69175449
      Bug: 69324398
      Test: sailfish boots
      Test: adb bugreport
      Test: craft an unresponsive app, trigger ANR, make sure traces are dumped
      into /data/anr
      Above denial from system_server not observed, no denials to proc_pipe_conf
      observed.
      Change-Id: I7c71f05820a4945ba982e29f76e9d9f4458b2b59
      e7f4934d
    • Calin Juravle's avatar
      Revert "Revert "Put pm.* property in new pm_prop context"" · 5316548f
      Calin Juravle authored
      This reverts commit 248b6dc6.
      
      Reason for revert: The dashboard complains that devices don't boot after this revert.
      
      Change-Id: I6a4648b64b096cbaa97c67aae6bc38b76d54cb48
      5316548f
  30. Nov 15, 2017
  31. Nov 08, 2017
  32. Oct 23, 2017
    • Max Bires's avatar
      Adding statscompanion_service and a dontaudit for find/add · 0187b231
      Max Bires authored
      Instead of removing the denial generating code, a dontaudit and a
      service label will be provided so that the team working on this new
      feature doesn't have to get slowed up with local revision patches.
      
      The dontaudit should be removed upon resolution of the linked bug.
      
      Bug: 67468181
      Test: statscompanion denials aren't audited
      Change-Id: Ib4554a7b6c714e7409ea504f5d0b82d5e1283cf7
      0187b231
    • Jin Qian's avatar
      storaged: move storaged file from DE to CE · 81d8b0ee
      Jin Qian authored
      Allow vold/system_server to call storaged service
      
      Test: adb shell storaged -u
      Bug: 63740245
      Change-Id: I88219e32520006db20299468b7a8c7ce0bfa58e0
      Merged-In: I88219e32520006db20299468b7a8c7ce0bfa58e0
      (cherry picked from commit fa6c3d7c)
      81d8b0ee
  33. Oct 20, 2017
    • Nick Kralevich's avatar
      Fixup neverallow rule · 2ec15e5b
      Nick Kralevich authored
      When we removed /data/dalvik-cache execute permission for system_server
      (b/37214733, b/31780877), I forgot to fixup this neverallow rule.
      Fix rule.
      
      Test: policy compiles.
      Change-Id: I38b821a662e0d8304b8390a69a6d9e923211c31e
      2ec15e5b
  34. Oct 17, 2017
    • Max Bires's avatar
      Allowing system_server to search sysfs_power dir · aed69d67
      Max Bires authored
      rw access to sysfs_power file is not enough; in some cases search access
      is also needed
      
      Bug: 67895406
      Test: system_server can access memory power statistics
      Change-Id: I471e8e60626e6eed35e74e25a0f4be470885a459
      aed69d67
  35. Oct 16, 2017
Loading