Skip to content
Snippets Groups Projects
  1. Jul 03, 2017
    • Jeff Vander Stoep's avatar
      recovery: clean up audit logspam · 9bbe420b
      Jeff Vander Stoep authored
      avc: granted { search } scontext=u:r:recovery:s0 tcontext=u:object_r:cache_file:s0 tclass=dir
      avc: granted { getattr } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file
      avc: granted { read } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file
      avc: granted { read open } scontext=u:r:recovery:s0 tcontext=u:object_r:rootfs:s0 tclass=file
      avc: granted { read } scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs:s0 tclass=file
      avc: granted { read open } scontext=u:r:recovery:s0 tcontext=u:object_r:sysfs:s0 tclass=file
      avc: granted { search } scontext=u:r:recovery:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir
      
      Fixes: 62619253
      Test: policy builds, no more "granted" messages in dmesg for recovery.
      Merged-In: I3f6d8ceee80307a01a8fd40cb4f8362a9825b1a3
      Change-Id: I3f6d8ceee80307a01a8fd40cb4f8362a9825b1a3
      (cherry picked from commit ea1d6e7d)
      9bbe420b
    • Jeff Sharkey's avatar
      Allow installd to delete files via sdcardfs. · dd57e698
      Jeff Sharkey authored
      When installd clears cached files on external storage, the sdcardfs
      kernel filesystem needs to be kept in the loop to release any cached
      dentries that it's holding onto.  (Otherwise the underlying disk
      space isn't actually released.)
      
      installd can already delete the underlying files directly (via the
      media_rw_data_file rules), so this technically isn't expanding its
      capabilities.
      
      avc: granted { search } for name="/" dev="tmpfs" ino=6897 scontext=u:r:installd:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir
      avc: denied { open } for path="/mnt/runtime/default/emulated/0/Android/data" dev="sdcardfs" ino=589830 scontext=u:r:installd:s0 tcontext=u:object_r:sdcardfs:s0 tclass=dir permissive=1
      avc: denied { write } for name="com.google.android.inputmethod.japanese" dev="sdcardfs" ino=590040 scontext=u:r:installd:s0 tcontext=u:object_r:sdcardfs:s0 tclass=dir permissive=0
      avc: denied { remove_name } for name="cache_r.m" dev="sdcardfs" ino=589868 scontext=u:r:installd:s0 tcontext=u:object_r:sdcardfs:s0 tclass=dir permissive=0
      avc: denied { getattr } for path="/mnt/runtime/default/emulated/0/Android/data/.nomedia" dev="sdcardfs" ino=589831 scontext=u:r:installd:s0 tcontext=u:object_r:sdcardfs:s0 tclass=file permissive=1
      
      Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
      Bug: 37486230
      Change-Id: Icfd00a9ba379b1f50c48fe85849304cf9859bcb2
      (cherry picked from commit 72f4c619)
      dd57e698
    • Jeff Vander Stoep's avatar
      domain_deprecated: remove ion access · 88e4be54
      Jeff Vander Stoep authored
      Logs show that only dumpstate requires access.
      
      avc: granted { read open } for comm="screencap" path="/dev/ion"
      dev="tmpfs" ino=14324 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:ion_device:s0 tclass=chr_file
      avc: granted { ioctl } for comm="screencap" path="/dev/ion" dev="tmpfs"
      ino=14324 ioctlcmd=4906 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:ion_device:s0 tclass=chr_file
      
      Grant ion permission to dumpstate which uses it for screencap
      feature.
      
      Bug: 28760354
      Test: build. Check logs.
      Change-Id: I6435b7dbf7656669dac5dcfb205cf0aeda93991b
      88e4be54
  2. Jul 01, 2017
  3. Jun 30, 2017
    • Jeff Vander Stoep's avatar
      dexoptanalyzer: suppress access(2) denial · 06aee357
      Jeff Vander Stoep authored
      A legitimate call to access(2) is generating a denial. Use the
      audit_access permission to suppress the denial on just the access()
      call.
      
      avc: denied { write } for name="verified_jars"
      scontext=u:r:dexoptanalyzer:s0
      tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir
      
      Bug: 62597207
      Test: build policy
      Test: The following cmd succeeds but no longer generates a denial
          adb shell cmd package compile -r bg-dexopt --secondary-dex \
          com.google.android.googlequicksearchbox
      
      Change-Id: I7d03df2754c24c039bce11426bf8f317232f5e5f
      (cherry picked from commit 575e6270)
      06aee357
  4. Jun 26, 2017
    • Stephen Smalley's avatar
      Define smc_socket security class. · 2be9799b
      Stephen Smalley authored
      
      Linux kernel commit da69a5306ab9 ("selinux: support distinctions among all
      network address families") triggers a build error if a new address family
      is added without defining a corresponding SELinux security class.  As a
      result, the smc_socket class was added to the kernel to resolve a build
      failure as part of merge commit 3051bf36c25d that introduced AF_SMC circa
      Linux 4.11.  Define this security class and its access vector, add
      it to the socket_class_set macro, and exclude it from webview_zygote
      like other socket classes.
      
      Test:  Policy builds
      
      Change-Id: Idbb8139bb09c6d1c47f1a76bd10f4ce1e9d939cb
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      2be9799b
    • Treehugger Robot's avatar
  5. Jun 22, 2017
  6. Jun 19, 2017
    • Yabin Cui's avatar
      Avoid audit when running `adb shell -t run-as xxx`. · 3b7d9e49
      Yabin Cui authored
      run-as uses file descriptor created by adbd when running
      `adb shell -t run-as xxx`. It produces audit warnings like below:
      
      [ 2036.555371] c1    509 type=1400 audit(1497910817.864:238): avc: granted { use } for pid=4945 comm="run-as" path="/dev/pts/0" dev="devpts" ino=3 scontext=u:r:runas:s0 tcontext=u:r:adbd:s0 tclass=fd
      
      Bug: http://b/62358246
      Test: test manually that the warning disappears.
      Change-Id: I19023ac876e03ce2afe18982fe753b07e4c876bb
      3b7d9e49
  7. Jun 15, 2017
  8. Jun 13, 2017
    • Tom Cherry's avatar
      Add getpgid to system_service and init · c59eb4d8
      Tom Cherry authored
      In libprocessgroup, we want to only send signals once to processes,
      particularly for SIGTERM.  We must send the signal both to all
      processes within a POSIX process group and a cgroup.  To ensure that
      we do not duplicate the signals being sent, we check the processes in
      the cgroup to see if they're in the POSIX process groups that we're
      killing.  If they are, we skip sending a second signal.  This requires
      getpgid permissions, hence this SELinux change.
      
      avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=1
      avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:untrusted_app_25:s0:c512,c768 tclass=process permissive=1
      avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:system_app:s0 tclass=process permissive=1
      avc: denied { getpgid } for pid=797 comm="ActivityManager" scontext=u:r:system_server:s0 tcontext=u:r:system_app:s0 tclass=process permissive=1
      avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:zygote:s0 tclass=process permissive=1
      avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:zygote:s0 tclass=process permissive=1
      avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1
      avc: denied { getpgid } for pid=1 comm="init" scontext=u:r:init:s0 tcontext=u:r:system_server:s0 tclass=process permissive=1
      
      Bug: 37853905
      Bug: 62418791
      Test: Boot, kill zygote, reboot
      Change-Id: Ib6c265dbaac8833c47145ae28fb6594ca8545570
      c59eb4d8
    • Tomonori Nanbu's avatar
      Add sepolicy for hal_wifi to access /proc/modules · 403efef2
      Tomonori Nanbu authored
      Add sepolicy to hal_wifi to access /proc/modules
      to check if Wi-Fi driver is loaded.
      
      Bug: 62013623
      Change-Id: Ib700170095b183a1e0e6a36b64e7c65655174f21
      403efef2
  9. Jun 12, 2017
    • Joel Scherpelz's avatar
      SELinux policy for secure persistent netd storage · abb1ba65
      Joel Scherpelz authored
      This is used to persist RFC 7217 stable secrets across device reboots.
      
      First submit caused a merge conflict. This revision replaces netd_prop
      with a more unique name netd_stable_secret_prop.
      
      Test: as follows
          - Manually tested that stable_secret is generated on first use and
            persists until reset of user data partition (factory reset).
          - Tested that "adb shell getprop" was denied access to
            persist.netd.stable_secret after running "adb unroot".
      Bug: 17613910
      
      Change-Id: I0a609c724799a15b1926e62534c16810d34f2275
      abb1ba65
  10. Jun 08, 2017
    • Bartosz Fabianowski's avatar
      Revert "SELinux policy for secure persistent netd storage" · 06486796
      Bartosz Fabianowski authored
      This broke the build on master. See b/17613910#comment17
      for details.
      
      This reverts commit ef1fd98b.
      
      Change-Id: I11f7d463061a9b6340c11827135586266e26f016
      06486796
    • Joel Scherpelz's avatar
      SELinux policy for secure persistent netd storage · ef1fd98b
      Joel Scherpelz authored
      This is used to persist RFC 7217 stable secrets across device reboots.
      
      Test: as follows
          - Manually tested that stable_secret is generated on first use and
            persists until reset of user data partition (factory reset).
          - Tested that "adb shell getprop" was denied access to
            persist.netd.stable_secret after running "adb unroot".
      Bug: 17613910
      
      Change-Id: I4dad00fb189d697aceaffae49ad63987c7e45054
      ef1fd98b
  11. Jun 06, 2017
  12. Jun 05, 2017
  13. Jun 03, 2017
  14. Jun 02, 2017
  15. Jun 01, 2017
  16. May 31, 2017
    • Narayan Kamath's avatar
      SEPolicy: Allow app / system_server to write to dumpstate pipes. · a34781ae
      Narayan Kamath authored
      tombstoned allows dumpstate to install "intercepts" to java trace
      requests for a given process. When an "intercept" is installed, all
      trace output is redirected to a pipe provided by dumpstate instead
      of the default location (usually in /data/anr or /data/tombstone).
      
      Note that these processes are already granted "write" and "getattr"
      on dumpstate:fifo_file in order to communicate with dumpstate; this
      change adds "append" to the existing set of permissions.
      
      Bug: 32064548
      Test: manual
      Change-Id: Iccbd78c59071252fef318589f3e55ece51a3c64c
      a34781ae
    • Narayan Kamath's avatar
      SEPolicy: Changes for new stack dumping scheme. · e628cb5b
      Narayan Kamath authored
      Applications connect to tombstoned via a unix domain socket and request
      an open FD to which they can write their traces. This socket has a new
      label (tombstoned_java_trace_socket) and appdomain and system_server are
      given permissions to connect and write to it.
      
      Apps no longer need permissions to open files under /data/anr/ and
      these permissions will be withdrawn in a future change.
      
      Bug: 32064548
      Test: Manual
      
      Merged-In: I70a3e6e230268d12b454e849fa88418082269c4f
      Change-Id: Ib4b73fc130f4993c44d96c8d68f61b6d9bb2c7d5
      e628cb5b
  17. May 27, 2017
  18. May 26, 2017
  19. May 25, 2017
  20. May 24, 2017
  21. May 22, 2017
  22. May 18, 2017
  23. May 17, 2017
    • Stephen Smalley's avatar
      Define getrlimit permission for class process · 91a3eeac
      Stephen Smalley authored
      
      This permission was added to the kernel in commit 791ec491c372
      ("prlimit,security,selinux: add a security hook for prlimit")
      circa Linux 4.12 in order to control the ability to get the resource
      limits of another process.  It is only checked when acting on another
      process, so it is not required for getrlimit(2), only for prlimit(2)
      on another process.
      
      Test:  Policy builds
      
      Change-Id: Ic0079a341e959f1c5a3d045974df4b756fd4ab67
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      91a3eeac
  24. May 15, 2017
    • Alex Vakulenko's avatar
      SELinux policies for PDX services · c4055f0d
      Alex Vakulenko authored
      Specify per-service rules for PDX transport. Now being able to
      grant permissions to individual services provided by processes,
      not all services of a process.
      
      Also tighter control over which permissions are required for
      client and server for individual components of IPC (endpoints,
      channels, etc).
      
      Bug: 37646189
      Change-Id: I78eb8ae8b6e08105666445a66bfcbd2f1d69d0ea
      Merged-Id: I78eb8ae8b6e08105666445a66bfcbd2f1d69d0ea
      c4055f0d
  25. May 12, 2017
Loading