Skip to content
Snippets Groups Projects
  1. Aug 28, 2016
    • Jeff Vander Stoep's avatar
      resurrect camera_device · 0474e7c5
      Jeff Vander Stoep authored
      (cherry picked from commit e8a53dff)
      
      With the breakup of mediaserver, distinguishing between
      camera_device and video_device is meaningful. Only grant
      cameraserver access to camera_device.
      
      Bug: 28359909
      Change-Id: I0ae12f87bac8a5c912f0a693d1d56a8d5af7f3f3
      0474e7c5
  2. Aug 26, 2016
    • Christopher Wiley's avatar
      SEPolicy to start hostapd via init · d29c1a0a
      Christopher Wiley authored
      While here, remove a lot of extra permissions that we apparently
      had because hostapd was inheriting fds from netd.
      
      Bug: 30041118
      Test: netd can request init to start/stop hostapd without denials.
      
      Change-Id: Ia777497443a4226a201030eccb9dfc5a40f015dd
      (cherry picked from commit 8a6c5f85)
      d29c1a0a
    • Christopher Wiley's avatar
      Define explicit label for wlan sysfs fwpath · 97db27d8
      Christopher Wiley authored
      avc: denied { write } for name="fwpath" dev="sysfs" ino=6863
      scontext=u:r:wificond:s0 tcontext=u:object_r:sysfs_wlan_fwpath:s0
      tclass=file permissive=0
      
      Test: wificond and netd can write to this path, wifi works
      Test: `runtest frameworks-wifi` passes
      
      Bug: 29579539
      
      Change-Id: Ia21c654b00b09b9fe3e50d564b82966c9c8e6994
      (cherry picked from commit 7d13dd80)
      97db27d8
    • Ningyuan Wang's avatar
      Sepolicy files for wificond · 3cbf14a1
      Ningyuan Wang authored
      This sepolicy change allows wificond to run as a deamon.
      
      BUG=28865186
      TEST=compile
      TEST=compile with ag/1059605
        Add wificond to '/target/product/base.mk'
        Adb shell ps -A | grep 'wificond'
      
      Change-Id: If1e4a8542ac03e8ae42371d75aa46b90c3d8545d
      (cherry picked from commit 4ef44a61)
      3cbf14a1
    • Andreas Gampe's avatar
      Sepolicy: allow dex2oatd and patchoatd · 47b373af
      Andreas Gampe authored
      Give debug versions the same rights as non-debug versions for
      ART.
      
      Change-Id: I9906d100c3857c3a87344ff37aabc53107562c61
      47b373af
  3. Jul 26, 2016
  4. Jun 01, 2016
  5. May 24, 2016
    • Fyodor Kupolov's avatar
      SELinux policies for /data/preloads directory · 49ac2a3d
      Fyodor Kupolov authored
      A new directory is created in user data partition that contains preloaded
      content such as a retail mode demo video and pre-loaded APKs.
      
      The new directory is writable/deletable by system server. It can only be
      readable (including directory list) by privileged or platform apps
      
      Bug: 28855287
      Change-Id: I3816cd3a1ed5b9a030965698a66265057214f037
      49ac2a3d
  6. May 13, 2016
  7. May 12, 2016
  8. Apr 22, 2016
    • Andreas Gampe's avatar
      Selinux: Policies for otapreopt_chroot and postinstall_dexopt · e5d8a947
      Andreas Gampe authored
      Give mount & chroot permissions to otapreopt_chroot related to
      postinstall.
      
      Add postinstall_dexopt for otapreopt in the B partition. Allow
      the things installd can do for dexopt. Give a few more rights
      to dex2oat for postinstall files.
      
      Allow postinstall files to call the system server.
      
      Bug: 25612095
      Change-Id: If7407473d50c9414668ff6ef869c2aadd14264e7
      e5d8a947
  9. Mar 24, 2016
    • Mark Salyzyn's avatar
      Add recovery_persist & recovery_refresh · 05806470
      Mark Salyzyn authored
      (cherry pick from commit 16fe52c9)
      
      One time executables. recovery_refresh can be used at any time to
      ensure recovery logs in pmsg are re-placed at the end of the FIFO.
      recovery_persist takes the recovery logs in pmsg and drops them
      into /data/misc/recovery/ directory.
      
      Bug: 27176738
      Change-Id: Ife3cf323930fb7a6a5d1704667961f9d42bfc5ac
      05806470
    • Mark Salyzyn's avatar
      Add recovery_persist & recovery_refresh · 16fe52c9
      Mark Salyzyn authored
      One time executables. recovery_refresh can be used at any time to
      ensure recovery logs in pmsg are re-placed at the end of the FIFO.
      recovery_persist takes the recovery logs in pmsg and drops them
      into /data/misc/recovery/ directory.
      
      Bug: 27176738
      Change-Id: Ife3cf323930fb7a6a5d1704667961f9d42bfc5ac
      16fe52c9
  10. Mar 14, 2016
    • dcashman's avatar
      Create sysfs_hwrandom type. · f100b2c4
      dcashman authored
      HwRngTest needs access to the hwrandom sysfs files, but untrused_app
      does not have access to sysfs.  Give these files their own label and
      allow the needed read access.
      
      (cherry-pick from internal commit: 85c0f8af)
      
      Bug: 27263241
      Change-Id: If572ad0931a534d76e148b688b76687460e99af9
      f100b2c4
  11. Mar 11, 2016
    • dcashman's avatar
      Create sysfs_hwrandom type. · 85c0f8af
      dcashman authored
      HwRngTest needs access to the hwrandom sysfs files, but untrused_app
      does not have access to sysfs.  Give these files their own label and
      allow the needed read access.
      
      Bug: 27263241
      Change-Id: I718ba485e9e6627bac6e579f746658d85134b24b
      85c0f8af
    • Janis Danisevskis's avatar
      Leftovers of SELinux policy reload mechanism · 1c983327
      Janis Danisevskis authored
      Remove references to /data/security and the corresponding
      type securitly_file.
      
      Bug: 26544104
      Change-Id: Iac00c293daa6b781a24c2bd4c12168dfb1cceac6
      1c983327
  12. Mar 10, 2016
  13. Mar 09, 2016
    • Makoto Onuki's avatar
      Allow "shortcut manager" icons to be returned to apps · 085c1691
      Makoto Onuki authored
      ... and client apps to read them.
      
      A full path looks like this:
      /data/system_ce/[user-id]/shortcut_service/bitmaps/[creator-app-package]/[timestamp].png
      
      System server will:
      - Create/delete the directories.
      - Write/remove PNG files in them.
      - Open the PNG files and return file descriptors to client apps
      
      Client apps will:
      - Receive file descriptors and read from them.
      
      Bug 27548047
      
      Change-Id: I3d9ac6ab0c92b2953b84c3c5aabe1f653e6bea6b
      085c1691
  14. Mar 04, 2016
    • Alex Deymo's avatar
      New postinstall domain and rules to run post-install program. · a52b5618
      Alex Deymo authored
      When using the A/B updater, a device specific hook is sometimes needed
      to run after the new partitions are updated but before rebooting into
      the new image. This hook is referred to throughout the code as the
      "postinstall" step.
      
      This patch creates a new execution domain "postinstall" which
      update_engine will use to run said hook. Since the hook needs to run
      from the new image (namelly, slot "B"), update_engine needs to
      temporarly mount this B partition into /postinstall and then run a
      program from there.
      
      Since the new program in B runs from the old execution context in A, we
      can't rely on the labels set in the xattr in the new filesystem to
      enforce the policies baked into the old running image. Instead, when
      temporarily mounting the new filesystem in update_engine, we override
      all the new file attributes with the new postinstall_file type by
      passing "context=u:object_r:postinstall_file:s0" to the mount syscall.
      This allows us to set new rules specific to the postinstall environment
      that are consistent with the rules in the old system.
      
      Bug: 27177071
      TEST=Deployed a payload with a trivial postinstall script to edison-eng.
      
      (cherry picked from commit 6cb2c893)
      
      Change-Id: I49a529eecf1ef0524819470876ef7c8c2659c7ef
      a52b5618
  15. Mar 02, 2016
    • Alex Deymo's avatar
      New postinstall domain and rules to run post-install program. · 6cb2c893
      Alex Deymo authored
      When using the A/B updater, a device specific hook is sometimes needed
      to run after the new partitions are updated but before rebooting into
      the new image. This hook is referred to throughout the code as the
      "postinstall" step.
      
      This patch creates a new execution domain "postinstall" which
      update_engine will use to run said hook. Since the hook needs to run
      from the new image (namelly, slot "B"), update_engine needs to
      temporarly mount this B partition into /postinstall and then run a
      program from there.
      
      Since the new program in B runs from the old execution context in A, we
      can't rely on the labels set in the xattr in the new filesystem to
      enforce the policies baked into the old running image. Instead, when
      temporarily mounting the new filesystem in update_engine, we override
      all the new file attributes with the new postinstall_file type by
      passing "context=u:object_r:postinstall_file:s0" to the mount syscall.
      This allows us to set new rules specific to the postinstall environment
      that are consistent with the rules in the old system.
      
      Bug: 27177071
      TEST=Deployed a payload with a trivial postinstall script to edison-eng.
      
      Change-Id: Ib06fab92afb45edaec3c9c9872304dc9386151b4
      6cb2c893
    • Tao Bao's avatar
      Add /dev/socket/uncrypt. · c285cad1
      Tao Bao authored
      system_server used to communicate with uncrypt via files (e.g.
      /cache/recovery/command and /cache/recovery/uncrypt_status). Since A/B
      devices may not have /cache partitions anymore, we switch to communicate
      via /dev/socket/uncrypt to allow things like factory reset to keep
      working.
      
      Bug: 27176738
      Change-Id: I73b6d6f1ecdf16fd4f3600b5e524da06f35b5bca
      c285cad1
  16. Mar 01, 2016
    • Calin Juravle's avatar
      Add SElinux policies to allow foreign dex usage tracking. · 837bc42f
      Calin Juravle authored
      This is a special profile folder where apps will leave profile markers
      for the dex files they load and don't own. System server will read the
      markers and decide which apk should be fully compiled instead of
      profile guide compiled.
      
      Apps need only to be able to create (touch) files in this directory.
      System server needs only to be able to check wheter or not a file with a
      given name exists.
      
      Bug: 27334750
      Bug: 26080105
      
      Change-Id: I2256e4aba1ec0e5117de6497123223b9a74f404e
      837bc42f
  17. Feb 24, 2016
  18. Feb 23, 2016
    • Jeff Sharkey's avatar
      Offer to cache ringtones in system DE storage. · 62bb52c4
      Jeff Sharkey authored
      Ringtones often live on shared media, which is now encrypted with CE
      keys and not available until after the user is unlocked.  To improve
      the user experience while locked, cache the default ringtone,
      notification sound, and alarm sound in a DE storage area.
      
      Also fix bug where wallpaper_file wasn't getting data_file_type.
      
      Bug: 26730753
      Change-Id: Ib1f08d03eb734c3dce91daab41601d3ed14f4f0d
      62bb52c4
  19. Feb 19, 2016
  20. Feb 18, 2016
  21. Feb 13, 2016
    • Jeff Tinker's avatar
      Add mediadrm service · 0d5bac13
      Jeff Tinker authored
      Part of media security hardening
      
      This is an intermediate step toward moving
      mediadrm to a new service separate from mediaserver.
      This first step allows mediadrmservice to run based
      on the system property media.mediadrmservice.enable
      so it can be selectively enabled on devices that
      support using native_handles for secure buffers.
      
      bug: 22990512
      Change-Id: I2208c1e87a6bd8d5bfaed06b1fdcb0509c11cff2
      0d5bac13
  22. Feb 09, 2016
  23. Feb 05, 2016
  24. Jan 29, 2016
  25. Jan 28, 2016
  26. Jan 27, 2016
  27. Jan 26, 2016
    • James Hawkins's avatar
      bootstat: Fix the SELinux policy after removing domain_deprecated. · 2e8d71c3
      James Hawkins authored
      * Allow reading /proc.
      
      type=1400 audit(1453834004.239:7): avc: denied { read } for pid=1305
      comm="bootstat" name="uptime" dev="proc" ino=4026536600
      scontext=u:r:bootstat:s0 tcontext=u:object_r:proc:s0 tclass=file
      permissive=0
      
      * Define domain for the /system/bin/bootstat file.
      
      init: Service exec 4 (/system/bin/bootstat) does not have a SELinux
      domain defined.
      
      Bug: 21724738
      Change-Id: I4baa2fa7466ac35a1ced79776943c07635ec9804
      2e8d71c3
  28. Jan 22, 2016
  29. Jan 12, 2016
  30. Jan 04, 2016
    • Felipe Leme's avatar
      Creates a new permission for /cache/recovery · 549ccf77
      Felipe Leme authored
      This permission was created mostly for dumpstate (so it can include
      recovery files on bugreports when an OTA fails), but it was applied to
      uncrypt and recovery as well (since it had a wider access before).
      
      Grant access to cache_recovery_file where we previously granted access
      to cache_file. Add auditallow rules to determine if this is really
      needed.
      
      BUG: 25351711
      Change-Id: I07745181dbb4f0bde75694ea31b3ab79a4682f18
      549ccf77
    • dcashman's avatar
      Create sysfs_zram label. · 36f255ff
      dcashman authored
      Address following denials:
      avc: denied { getattr } for path="/sys/devices/virtual/block/zram0/disksize" dev="sysfs" ino=14958 scontext=u:r:init:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
      avc: denied { search } for name="zram0" dev="sysfs" ino=14903 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0
      avc: denied { read } for name="mem_used_total" dev="sysfs" ino=14970 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
      avc: denied { write } for name="uevent" dev="sysfs" ino=14904 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
      avc: denied { open } for path="/sys/devices/virtual/block/zram0/uevent" dev="sysfs" ino=14904 scontext=u:r:ueventd:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=file permissive=0
      avc: denied { read } for pid=348 comm="vold" name="zram0" dev="sysfs" ino=15223 scontext=u:r:vold:s0 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0
      avc: denied { search } for pid=3494 comm="ContactsProvide" name="zram0"dev="sysfs" ino=15223 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:sysfs_zram:s0 tclass=dir permissive=0
      
      Bug: 22032619
      Change-Id: I40cf918b7cafdba6cb3d42b04b1616a84e4ce158
      36f255ff
  31. Dec 14, 2015
    • Nick Kralevich's avatar
      label /sys/kernel/debug/tracing and remove debugfs write · fe12b616
      Nick Kralevich authored
      Start labeling the directory /sys/kernel/debug/tracing. The files
      in this directory need to be writable to the shell user.
      
      Remove global debugfs:file write access. This was added in the days
      before we could label individual debugfs files.
      
      Change-Id: I79c1fcb63b4b9b903dcabd99b6b25e201fe540a3
      fe12b616
Loading