Skip to content
Snippets Groups Projects
  1. Dec 30, 2018
    • Justin Yun's avatar
      sepolicy for vendor overlay · df9d7832
      Justin Yun authored
      Make /(product|system/product)/vendor_overlay/<ver> have the vendor
      file context.
      
      If vendor_overlay requires to mount on the vendor directories other
      than 'vendor_file', the contexts must be defined in the device
      specific sepolicy files.
      
      Bug: 119076200
      Test: build and check if the files are overided and have the required
      sepolicy contexts.
      
      Change-Id: I69ed38d4ea8e7d89f56865b1ca1e26f290e9892d
      df9d7832
  2. Dec 19, 2018
  3. Dec 15, 2018
    • Rafal Slawik's avatar
      SELinux policy for rss_hwm_reset · 4e1c5764
      Rafal Slawik authored
      rss_hwm_reset is binary that reset RSS high-water mark counters for all
      currently running processes. It runs in a separate process because it
      needs dac_override capability.
      
      Bug: 119603799
      Test: no errors in logcat
      Change-Id: I6221a5eca3427bf532830575d8fba98eb3e65c29
      4e1c5764
  4. Dec 12, 2018
    • Nick Kralevich's avatar
      bless app created renderscript files · 0eb0a16f
      Nick Kralevich authored
      When an app uses renderscript to compile a Script instance,
      renderscript compiles and links the script using /system/bin/bcc and
      /system/bin/ld.mc, then places the resulting shared library into the
      application's code_cache directory. The application then dlopen()s the
      resulting shared library.
      
      Currently, this executable code is writable to the application. This
      violates the W^X property (https://en.wikipedia.org/wiki/W%5EX), which
      requires any executable code be immutable.
      
      This change introduces a new label "rs_data_file". Files created by
      /system/bin/bcc and /system/bin/ld.mc in the application's home
      directory assume this label. This allows us to differentiate in
      security policy between app created files, and files created by
      renderscript on behalf of the application.
      
      Apps are allowed to delete these files, but cannot create or write these
      files. This is enforced through a neverallow compile time assertion.
      
      Several exceptions are added to Treble neverallow assertions to support
      this functionality. However, because renderscript was previously invoked
      from an application context, this is not a Treble separation regression.
      
      This change is needed to support blocking dlopen() for non-renderscript
      /data/data files, which will be submitted in a followup change.
      
      Bug: 112357170
      Test: cts-tradefed run cts -m CtsRenderscriptTestCases
      Change-Id: Ie38bbd94d26db8a418c2a049c24500a5463698a3
      0eb0a16f
  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 30, 2018
  8. Nov 19, 2018
    • Nick Kralevich's avatar
      Revert "Add placeholder iris and face policy for vold data directory" · 83f25e26
      Nick Kralevich authored
      This reverts commit 92bde4b9.
      
      Reason for revert: Rebooting after OTA fails due to the
      filesystem still seeing the old label on the device.
      
      Bug: 116528212
      Bug: 119747564
      Change-Id: Ib5f920f85c7e305e89c377369dca038d2c6c738c
      Test: rollback change
      83f25e26
    • Haibo Huang's avatar
      Add new cpu variant related rules to SELinux · 544a0d54
      Haibo Huang authored
      I added ro.bionic.(2nd_)?_(arch|cpu_variant) to vendor system
      properties. And have init to write them to files under dev/.
      
      This change set SELinux rules for these properties and files.
      
      For the system properties: vendor/default.prop will set them. init will
      read them.
      For the files /dev/cpu_variant:.*: init will write them. bionic libc
      will read them. (Basically world readable).
      
      This is to allow libc select the right optimized routine at runtime.
      Like memcpy / strcmp etc.
      
      Test: getprop to make sure the properties are set.
      Test: ls -laZ to make sure /dev/cpu_variant:.* are correctly labeled.
      
      Change-Id: I41662493dce30eae6d41bf0985709045c44247d3
      544a0d54
  9. Nov 17, 2018
    • Tri Vo's avatar
      Remove redundant cgroup type/labelings. · d918c8df
      Tri Vo authored
      cgroup is labeled from genfs_contexts. Also, cgroup filesystems can't be
      context mounted, i.e. it's not possible to mount them with a label other
      than "cgroup".
      
      Bug: 110962171
      Test: m selinux_policy
      Test: boot aosp_walleye
      Change-Id: I8319b10136c42a42d1edaee47b77ad1698e87f2c
      d918c8df
  10. Nov 16, 2018
    • Tri Vo's avatar
      Don't label /dev/cam from system sepolicy · ddda7e80
      Tri Vo authored
      With Treble, cameraserver no longer depends on camera devices directly.
      Moreover, pixel 3 doesn't have /dev/cam node.
      
      We still keep "camera_device" type around since vendor policy uses it to
      label its /dev nodes.
      
      Bug: 110962171
      Test: boot aosp_walleye
      Test: camera app still works
      Change-Id: If12d640c2a0006b9fc3c9f6704285eb8eb66c626
      ddda7e80
    • Kevin Chyn's avatar
      Add placeholder iris and face policy for vold data directory · 92bde4b9
      Kevin Chyn authored
      Test: vold is able to create directories, ag/5534962
      
      Bug: 116528212
      
      Change-Id: I61dd8802c13b1c42d334a80b678ca6a877848fc2
      92bde4b9
  11. Nov 15, 2018
  12. Nov 14, 2018
    • Tomasz Wasilczyk's avatar
      Allow iw to be run at init phase. · 2e23af5e
      Tomasz Wasilczyk authored
      This enables native wireless interface configuration at boot.
      
      Bug: 36120314
      Test: adb shell ifconfig -a | grep wlan
      Change-Id: I797c0c8a8645d690d311f42cec3998b2f4cee77b
      2e23af5e
  13. Nov 12, 2018
    • Tri Vo's avatar
      Remove mtd_device type. · ced1751e
      Tri Vo authored
      mtd_device does not label any /dev node present on walleye, and the only
      permission to that type is:
      allow hal_telephony_server mtd_device:dir search;
      I suspect there is no need to keep mtd_device around.
      
      Bug: 110962171
      Test: boot aosp_walleye
      Change-Id: If74b1258b21edeca38c8b7dc07a3a10b751a7e85
      ced1751e
  14. Nov 09, 2018
    • Tri Vo's avatar
      Remove dead *_device types from system sepolicy. · b805adaa
      Tri Vo authored
      No coredomain domain has access to these types and corresponding /dev
      nodes don't exist on the device:
      
      audio_seq_device
      audio_timer_device
      full_device
      i2c_device
      vcs_device
      
      Bug: 110962171
      Test: m selinux_policy
      Test: boot walleye
      Change-Id: I89ad4755e6760aa166cb22e2655567e5905dc672
      b805adaa
    • Hongyi Zhang's avatar
      Sepolicies for server configural flags reset · b965e3c5
      Hongyi Zhang authored
      Test: m -j succeeded and manual tested on device
      
      Change-Id: I3415c58335361a9da4ef2368e61bc4e0250a91bb
      b965e3c5
    • Mårten Kongstad's avatar
      Add rules for /product{,_services}/overlay · f40942ff
      Mårten Kongstad authored
      These rules mirror those for /vendor/overlay and /odm/overlay, including
      the possilibity of a symlink like /system/vendor -> /vendor.
      
      Test: builds, boots
      Change-Id: I323e48fcc13c4ac7779902506539c2600708cc88
      f40942ff
  15. 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
  16. Nov 06, 2018
  17. Nov 01, 2018
  18. Oct 26, 2018
    • Tri Vo's avatar
      Don't label /dev/tegra.* from core policy · 2ea956c0
      Tri Vo authored
      /dev/tegra.* is not used in android platform and is device-specific
      
      Bug: 110962171
      Test: boot walleye
      Change-Id: I4cc790d28457b429a3ed9829de223dae357eb498
      2ea956c0
  19. Oct 25, 2018
  20. Oct 24, 2018
  21. Oct 23, 2018
    • Anton Hansson's avatar
      Add sepolicy for preloads_copy script · edd13bc3
      Anton Hansson authored
      Copied from device/google/crosshatch-sepolicy.
      
      Test: diff files in system/etc/selinux before and after for aosp_marlin
      Change-Id: I518c43af9c217483bdab02424e4aef0270aad366
      edd13bc3
  22. Oct 16, 2018
    • Bowgo Tsai's avatar
      Allow input config to be under /vendor/odm · 59129311
      Bowgo Tsai authored
      Input config should be under /odm when it's "device-specific",
      instead of /vendor (for "SoC-specific").
      
      However, not all device have /odm partition so having the fallback
      symlink: /odm -> /vendor/odm is important
      
      Bug: 112880217
      Test: build
      Change-Id: I294e2b172d06d58a42c51c128e448c7644f854dc
      59129311
  23. Oct 15, 2018
    • Florian Mayer's avatar
      Add heapprofd selinux config. · 4fde9ec7
      Florian Mayer authored
      This does not actually grant any permissions but just adds the
      necessary boilerplate for a new service.
      
      Bug: 117762471
      Bug: 117761873
      
      Change-Id: I7cdd2ae368616cfd54fc685c15f775604bfc80d4
      4fde9ec7
  24. Oct 12, 2018
    • Tri Vo's avatar
      Add type for /system/bin/tcpdump. · e8b33c31
      Tri Vo authored
      We add this type with the intent to expose /system/bin/tcpdump to
      vendor on userdebug devices only.
      
      Bug: 111243627
      Test: device boots /system/bin/tcpdump correctly labeled as
      tcpdump_exec, can browse internet, turn wifi on/off
      Change-Id: Icb35e84c87120d198fbb2b44edfa5edf6021d0f0
      e8b33c31
    • 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
  25. Oct 11, 2018
    • Chong Zhang's avatar
      add mediaswcodec service · bdbfff1b
      Chong Zhang authored
      Set up a new service for sw media codec services.
      
      Bug: 111407413
      
      Test: cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice
      Change-Id: Ia1c6a9ef3f0c1d84b2be8756eb1853ffa0597f8e
      bdbfff1b
  26. Oct 08, 2018
    • Igor Murashkin's avatar
      iorapd: Add new binder service iorapd. · 72a88b19
      Igor Murashkin authored
      This daemon is very locked down. Only system_server can access it.
      
      Bug: 72170747
      Change-Id: I7b72b9191cb192be96001d84d067c28292c9688f
      72a88b19
    • Mark Salyzyn's avatar
      fs_mgr: add /mnt/scratch to possible overlayfs support directories · 1369dfca
      Mark Salyzyn authored
      A default set of options are available, but can override in a fstab
      overlay entry with upperdir=, lowerdir= to the same mount point,
      workdir=.  The default is a valid /mnt/scratch/overlay/
      or /cache/overlay/ directory, with .../<mount_point>/upper and
      .../<mount_point>/work, associated with each system partition
      <mount_point>.
      
      Test: manual
      Bug: 109821005
      Change-Id: I5662c01fad17d105665be065f6dcd7c3fdc40d95
      1369dfca
  27. Oct 04, 2018
    • Martijn Coenen's avatar
      Add policy for apexd. · ac097ac4
      Martijn Coenen authored
      apexd is a new daemon for managing APEX packages installed
      on the device. It hosts a single binder service, "apexservice".
      
      Bug: 112455435
      Test: builds, binder service can be registered,
            apexes can be accessed, verified and mounted
      Change-Id: I634ad100f10b2edcd9a9c0df0d33896fa5d4ed97
      ac097ac4
  28. Sep 27, 2018
    • Nick Kralevich's avatar
      Label /system/usr/share/zoneinfo differently · ff1c765f
      Nick Kralevich authored
      /system/usr/share/zoneinfo is currently labeled zoneinfo_data_file,
      a label shared with /data/misc/zoneinfo. However, each of these
      directory locations has different security characteristics. In
      particular, the files in /system/usr/share/zoneinfo must never be
      writable, whereas /data/misc/zoneinfo may be written to by system_server.
      Reusing the same label hides these different security characteristics.
      
      Create a separate label for /system/usr/share/zoneinfo.
      
      Test: Device boots and no obvious problems.
      Change-Id: I8cf16ff038b06b38f77388e546d9b7a6865f7879
      ff1c765f
  29. Sep 24, 2018
    • Tri Vo's avatar
      Label /system/bin/linker* symlinks as system_file. · 6cd9bd07
      Tri Vo authored
      Fixes:
      avc: denied { read } for comm="init" name="linker_asan64" dev="sda22" ino=1833
      scontext=u:r:init:s0 tcontext=u:object_r:system_linker_exec:s0 tclass=lnk_file
      permissive=0
      
      Bug: 116486312
      Test: adb unroot && adb shell ls -l /system/bin/linker_asan
      Change-Id: I754daaf3576e83d516cc9189b8be04dcc41bbc5c
      6cd9bd07
    • Oleksiy Avramchenko's avatar
      Add label for /system/bin/fsck.exfat · 65a0b507
      Oleksiy Avramchenko authored
      Allow vold to run exFAT filesystem check.
      
      Test: build, mount exFAT volume
      Bug: 80202067
      Change-Id: I68f3438de89246e806cebe483f37e31c68aaa3d7
      65a0b507
  30. Sep 20, 2018
    • Tri Vo's avatar
      More granular vendor access to /system files. · 5c1fe61e
      Tri Vo authored
      This change limits global access to /system files down to:
      /system/bin/linker*
      /system/lib[64]/*
      /system/etc/ld.config*
      /system/etc/seccomp_policy/*
      /system/etc/security/cacerts/*
      /system/usr/share/zoneinfo/*
      
      Bug: 111243627
      Test: boot device, browse internet without denials to system_* types.
      Test: VtsHalDrmV1_{1, 0}TargetTest without denials
      Change-Id: I69894b29733979c2bc944ac80229e84de5d519f4
      5c1fe61e
  31. Aug 20, 2018
    • Dario Freni's avatar
      s/product-services/product_services/g · e217ab1b
      Dario Freni authored
      Attempting to reduce the number of different spellings we have for
      "product services" partition in the codebase.
      
      Bug: 112431447
      Test: m
      Change-Id: I1499c60e3d6c6c9fbe2e3f30f097f83b1e837c1c
      Merged-In: I1499c60e3d6c6c9fbe2e3f30f097f83b1e837c1c
      e217ab1b
Loading