Skip to content
Snippets Groups Projects
  1. Jan 11, 2019
    • Siarhei Vishniakou's avatar
      Permissions for InputClassifier HAL · 41a871ba
      Siarhei Vishniakou authored
      Add the required permissions for the InputClassifier HAL.
      
      Bug: 62940136
      Test: no selinux denials in logcat when HAL is used inside input flinger.
      Change-Id: Ibc9b115a83719421d56ecb4bca2fd196ec71fd76
      41a871ba
  2. Jan 08, 2019
    • Chenbo Feng's avatar
      Use bpfloader to create bpf maps instead of netd · 7b571040
      Chenbo Feng authored
      Recent change in netd and bpfloader switched the creater of bpf maps
      from netd to bpfloader. Change the rules related to it to make sure it
      doesn't fail.
      
      Test: dumpsys netd trafficcontroller
      Bug: 112334572
      Change-Id: I016ff68b58ef7b12bdfdebc2fd178be1d0206a62
      7b571040
    • Narayan Kamath's avatar
      Allow system_server to read apex_data_file. · 9f343b32
      Narayan Kamath authored
      For consistency with APKs, signature verification is performed
      in the system_server. This includes checking that the signature of
      an updated install matches the signature of the active package that
      it updates. For this, it requires search access to /data/apex and
      read access to the files under that directory.
      
      Test: m
      Change-Id: Ia073adb8892886e4767fa5529e95c110b9cbff1b
      9f343b32
  3. Jan 07, 2019
    • Dario Freni's avatar
      SEPolicy for Staged Installs. · 274c1ded
      Dario Freni authored
      Test: basic workflow between apexd and PackageManager tested with
      changes being developed.
      Bug: 118865310
      Change-Id: I1ae866f33e9b22493585e108c4fd45400493c7ac
      274c1ded
  4. Dec 28, 2018
  5. Dec 11, 2018
  6. Dec 06, 2018
    • Tri Vo's avatar
      Remove sepolicy for /dev/alarm. · 02c4c3fa
      Tri Vo authored
      After b/28357356 /dev/alarm is no longer used by android platform.
      Also, Pixel devices don't have /dev/alarm.
      
      Bug: 110962171
      Test: boot aosp_walleye
      Change-Id: Id9723996104a2548ddf366489890c098d1ea87be
      02c4c3fa
  7. Nov 29, 2018
  8. Nov 28, 2018
  9. Nov 27, 2018
    • Hongyi Zhang's avatar
      grant system_server read permission of server_configurable_flags_data · b61ac077
      Hongyi Zhang authored
      server_configurable_flags_data_file is used for storing server
      configurable flags which have been reset during current booting.
      system_server needs to read the data to perform related disaster
      recovery actions.
      For how the data is read, see SettingsToPropertiesMapper.java.
      
      Test: build succeeds & manual on device
      Change-Id: Ifa22aecc13af2c574579299d28433622abbe6b85
      b61ac077
  10. Nov 22, 2018
    • Neda Topoljanac's avatar
      SELinux policy for new managed system update APIs · bffe163b
      Neda Topoljanac authored
      We introduced a new API to allow Device Owner to install an OTA file on disk.
      This in turn requires system_server to be able to copy the OTA file to a known
      OTA file location, call into update_engine to start the installation and let
      update_engine to call back to the system_server to deliver any error conditions
      asynchronously. This CL modifies the SELinux policy to allow these interaction.
      
      Test: manual in TestDPC, CTS tests for negative cases: atest com.android.cts.devicepolicy.DeviceOwnerTest#testInstallUpdate
      Change-Id: Id1fbea9111f753c5c80f270c269ecb9ef141cd79
      Bug: 111173669
      bffe163b
  11. Nov 21, 2018
  12. Nov 19, 2018
    • Dario Freni's avatar
      Allow PackageManager to communicate to apexd. · 7ad743b7
      Dario Freni authored
      This is used for querying the installed packages, as well as
      coordinating the installations of packages.
      
      Test: ran an app that queries PM, that queries apexd.
      Bug: 117589375
      Change-Id: I38203ffe6d0d312d6cc38e131a29c14ace0ba10c
      7ad743b7
    • Hongyi Zhang's avatar
      allow system_server to read device_config_reset_performed_prop · d600c0c3
      Hongyi Zhang authored
      system server reads this property to keep track of whether server
      configurable flags have been reset during current boot.
      system server needs this information to decide whether to perform
      following disaster recovery actions on framework level.
      
      the get_prop added in this cl in system_server.te is not grouped
      in the same place as the set_prop in system_server.te in another
      cl (https://android-review.googlesource.com/c/platform/system/sepolicy/+/828284).
      This is because these 2 properties are serving for different purposes:
      device_config_flags_health_check_prop is used to control features(so will be
      all the future set_prop added by other feature teams under "# server configurable flags properties"),
      while device_config_reset_performed_prop is used by our API's internal implementation.
      So I feel like it might be clearer if I put this get_prop in a different place rather than
      appending to "# server configurable flags properties".
      
      Test: build suceeded.
      
      Change-Id: I64379aa8f0bbe093969b98d62093696a32aabe59
      d600c0c3
  13. Nov 17, 2018
    • Hongyi Zhang's avatar
      sepolicies for sys prop enabling flag health check · da492f4f
      Hongyi Zhang authored
      device_config_flags_health_check_prop is used for enabling/disabling
      program flags_health_check which is executed during device booting.
      "1" means enabling health check actions in flags_health_check, other
      values mean flags_health_check will not perform any action.
      
      Test: build succeeded & manual test
      Change-Id: I93739dc5d155e057d72d08fd13097eb63c1193b5
      da492f4f
  14. Nov 16, 2018
    • Nick Kralevich's avatar
      remove system_server debugfs:file r_file_perms · fe4061da
      Nick Kralevich authored
      Auditallow added in commit 72edbb3e ("Audit generic debugfs access for
      removal", May 01 2018) has not triggered. Remove allow rule and tighten
      up neverallow rule.
      
      Test: policy compiles
      Test: no collected SELinux denials.
      Change-Id: I9a90463575f9eab4711b72d6f444fa9d526b80e1
      fe4061da
  15. Nov 15, 2018
    • Mårten Kongstad's avatar
      Add idmap2 and idmap2d · f62362da
      Mårten Kongstad authored
      Bug: 78815803
      Test: builds, boots
      Test: manual: adb shell idmap2 create ...
      Test: manual: adb shell ps | grep -e idmap2d
      Change-Id: I60852e15d99329896ff9de6559d1e7cd1c67e33d
      f62362da
  16. Nov 14, 2018
  17. Nov 13, 2018
    • Risan's avatar
      SELinux changes for AppFuse · 0c1848b1
      Risan authored
      We are moving AppFuse mount from system_server's mount namespace to
      vold. Hence, we could reduce the SELinux permissions given to
      system_server, in the expense of adding allow rules to vold and
      letting appdomain have access to vold's fd.
      
      Bug: 110379912
      Test: testOpenProxyFileDescriptor passes (after vold and
      system_server code changes)
      
      Change-Id: I827a108bd118090542354360a8c90b295e6a0fef
      0c1848b1
  18. Nov 08, 2018
    • Peiyong Lin's avatar
      [SEPolicy] Configure policy for gpu service. · 7924dc60
      Peiyong Lin authored
      Historically GPU service lives in SurfaceFlinger as a convenient hack.
      Howerver, SurfaceFlinger doesn't need to know about anything specific about GPU
      capability, and shouldn't know about anything about GPU. This patch moves GPU
      service out of SurfaceFlinger.
      
      GPU service is a service that accesses to GPU driver, queries GPU capabilities
      and reports back. Currently we use this information in CTS and some benchmarks.
      
      BUG: 118347356
      Test: Build, flash and boot, use `adb shell cmd gpu vkjson` to verify
      Change-Id: I007989e0f3f73b5caf80277979986820dd127c32
      7924dc60
  19. Nov 01, 2018
    • Nick Kralevich's avatar
      tun_device: enforce ioctl restrictions · 619c1ef2
      Nick Kralevich authored
      Require all SELinux domains which have permission to perform ioctls on
      /dev/tun explicitly specify what ioctls they perform. Only allow the
      safe defaults FIOCLEX and FIONCLEX, which are alternate, uncommon ways
      to set and unset the O_CLOEXEC flag.
      
      Remove app's ability to issue *any* ioctls on /dev/tun, period. Add
      neverallow assertions (compile time assertion + CTS test) to prevent
      regressions.
      
      Limit system_server's ability to perform ioctls on /dev/tun to FIOCLEX,
      FIONCLEX, TUNGETIFF, and TUNSETIFF. Testing and source code examination
      shows that only TUNGETIFF and TUNSETIFF are used by system_server.
      
      The goal of this change is to put SELinux ioctl controls in place for
      /dev/tun, so we don't have to maintain the custom kernel patch at
      https://android.googlesource.com/kernel/common/+/11cee2be0c2062ba88f04eb51196506f870a3b5d%5E%21
      
      Delete the neverallow assertion in isolated_app.te. This is already
      covered by the assertion present in app_neverallows.te.
      
      Test: cts-tradefed run cts -m CtsHostsideNetworkTests -t com.android.cts.net.HostsideVpnTests
      Test: cts-tradefed run cts -m CtsHostsideNetworkTests
      Test: cts-tradefed run cts -m CtsNetTestCases
      Bug: 111560739
      Bug: 111560570
      Change-Id: Ibe1c3a9e880db0bee438535554abdbc6d84eec45
      619c1ef2
  20. Oct 31, 2018
    • Nick Kralevich's avatar
      Transient SELinux domain for system_server JIT · caf42d61
      Nick Kralevich authored
      Create a transient SELinux domain where system_server can perform
      certain JIT setup. The idea is that system_server will start in the
      system_server_startup domain, setup certain JIT pages, then perform a
      one-way transition into the system_server domain. From that point,
      further JITing operations are disallowed.
      
      Bug: 62356545
      Test: device boots, no permission errors
      Change-Id: Ic55b2cc5aba420ebcf62736622e08881a4779004
      caf42d61
  21. Oct 30, 2018
  22. Oct 26, 2018
    • Risan's avatar
      SELinux changes for AppFuse · 67ed4328
      Risan authored
      We are moving AppFuse mount from system_server's mount namespace to
      vold. Hence, we could reduce the SELinux permissions given to
      system_server, in the expense of adding allow rules to vold and
      letting appdomain have access to vold's fd.
      
      Bug: 110379912
      Test: testOpenProxyFileDescriptor passes (after vold and
      system_server code changes)
      
      Change-Id: I4731a8ec846c5cb84ec4b680d51938494e8ddd75
      67ed4328
    • Tri Vo's avatar
      same_process_hal_file: access to individual coredomains · 90cf5a7f
      Tri Vo authored
      Remove blanket coredomain access to same_process_hal_file in favor of
      granular access. This change takes into account audits from go/sedenials
      (our internal dogfood program)
      
      Bug: 37211678
      Test: m selinux_policy
      Change-Id: I5634fb65c72d13007e40c131a600585a05b8c4b5
      90cf5a7f
  23. Oct 12, 2018
    • Siarhei Vishniakou's avatar
      Allow system_server to read vendor_file · 3639f579
      Siarhei Vishniakou authored
      Input device configuration files .idc, .kl that are placed in /vendor
      are currently not accessible.
      Allow the read access here.
      
      Bug: 112880217
      Test: move .idc and .kl files from /system to /vendor, then observe
      logcat. With this patch, avc denials disappear.
      
      Change-Id: I72ad62b9adf415f787565adced73fd8aaff38832
      3639f579
  24. Oct 08, 2018
    • Howard Ro's avatar
      Allow zygote to write to statsd and refactor · 98de322a
      Howard Ro authored
      We plan on migrating MetricsLogger to write to statsd socket. So we need to
      allow zygote, which writes to logd using MetricsLogger, to also be able
      to statsd. We also re-locate some sepolicies to write to statsd socket
      in their respective policy definitions.
      
      Bug: 110537511
      Test: no failure/violations observed
      Change-Id: I21fd352a25ed946516f9a45ac3b5e9bf97b059bc
      98de322a
  25. Sep 24, 2018
    • Tej Singh's avatar
      Sepolicy for migrating storaged to statsd · 44d47c03
      Tej Singh authored
      This adds /proc/uid_io/stats to the files that system server is able to
      read.
      
      Test: Manual test on master produces no selinux violations.
      Change-Id: I2c7afec149f893b000094739d91531dec559de6f
      44d47c03
  26. Sep 14, 2018
  27. Sep 13, 2018
  28. Sep 12, 2018
  29. Aug 14, 2018
  30. Aug 10, 2018
    • David Ng's avatar
      Explicitly allow system_server to (m)map data files · 383471c2
      David Ng authored
      Linux kernel 4.14+ SELinux starts explicit map
      permission check for file mmap operations.  Add this
      permission to system_server for data file access,
      which is used in scenario such as "adb install" of
      APK's.
      
      test: no longer see SELinux map denial on "adb install"
      Change-Id: Id6016dd0b3f15dfdb0f02509ea812dee61ac78ed
      383471c2
  31. Aug 09, 2018
  32. Aug 02, 2018
    • Nick Kralevich's avatar
      Start partitioning off privapp_data_file from app_data_file · 23c9d91b
      Nick Kralevich authored
      Currently, both untrusted apps and priv-apps use the SELinux file label
      "app_data_file" for files in their /data/data directory. This is
      problematic, as we really want different rules for such files. For
      example, we may want to allow untrusted apps to load executable code
      from priv-app directories, but disallow untrusted apps from loading
      executable code from their own home directories.
      
      This change adds a new file type "privapp_data_file". For compatibility,
      we adjust the policy to support access privapp_data_files almost
      everywhere we were previously granting access to app_data_files
      (adbd and run-as being exceptions). Additional future tightening is
      possible here by removing some of these newly added rules.
      
      This label will start getting used in a followup change to
      system/sepolicy/private/seapp_contexts, similar to:
      
        -user=_app isPrivApp=true domain=priv_app type=app_data_file levelFrom=user
        +user=_app isPrivApp=true domain=priv_app type=privapp_data_file levelFrom=user
      
      For now, this newly introduced label has no usage, so this change
      is essentially a no-op.
      
      Test: Factory reset and boot - no problems on fresh install.
      Test: Upgrade to new version and test. No compatibility problems on
            filesystem upgrade.
      
      Change-Id: I9618b7d91d1c2bcb5837cdabc949f0cf741a2837
      23c9d91b
  33. Jul 17, 2018
Loading