Skip to content
Snippets Groups Projects
  1. Aug 24, 2017
    • Jeff Vander Stoep's avatar
      hal_configstore: use crash_dump fallback path · c5884836
      Jeff Vander Stoep authored
      Configstore HAL uses a seccomp filter which blocks the standard
      path of execing crash_dump to collect crash data. Add permission
      to use crash_dump's fallback mechanism.
      
      Allowing configstore to write to the socket provided by tombstoned
      required either exempting configstore from a neverallow rule, or
      removing the neverallow rule entirely. Since the neverallow rule
      could potentially prevent partners for doing security hardening,
      it has been removed.
      
      Bug: 64768925
      Bug: 36453956
      
      Test: killall -ABRT android.hardware.configstore@1.1-service
          Results in a call stack in logcat, and tombstone in
          /data/tombstones
      Test: configstore runs without crashing
      Test: SANITIZE_TARGET="address coverage" make vts -j64
          vts-tradefedrun commandAndExit vts --skip-all-system-status-check \
          -primary-abi-only --skip-preconditions -l VERBOSE --module \
          VtsHalConfigstoreV1_0IfaceFuzzer
      
      Change-Id: I1ed5265f173c760288d856adb9292c4026da43d6
      (cherry picked from commit 9924d782)
      c5884836
  2. Aug 04, 2017
    • Todd Kennedy's avatar
      Allow PackageManager to create a new service · 8bb80471
      Todd Kennedy authored
      A new API [getNamesForUids] was recently added to the PackageManager
      and this API needs to be accessible to native code. However, there
      were two constraints:
      1) Instead of hand-rolling the binder, we wanted to auto generate
      the bindings directly from the AIDL compiler.
      2) We didn't want to expose/annotate all 180+ PackageManager APIs
      when only a single API is needed.
      So, we chose to create a parallel API that can be used explicitly
      for native bindings without exposing the entirety of the
      PackageManager.
      
      Bug: 62805090
      Test: Manual
      Test: Create a native application that calls into the new service
      Test: See the call works and data and returned
      Change-Id: I0d469854eeddfa1a4fd04b5c53b7a71ba3ab1f41
      8bb80471
    • Todd Poynor's avatar
      thermal: sepolicy for thermalservice and Thermal HAL revision 1.1 · e9b2def7
      Todd Poynor authored
      Add sepolicy for thermalserviced daemon, IThermalService binder
      service, IThermalCallback hwservice, and Thermal HAL revision 1.1.
      
      Test: manual: marlin with modified thermal-engine.conf
      Bug: 30982366
      Change-Id: I207fa0f922a4e658338af91dea28c497781e8fe9
      (cherry picked from commit ec3b6b7e)
      e9b2def7
  3. Jul 28, 2017
    • Niranjan Pendharkar's avatar
      Add system_net_netd_hwservice. · 5aef6a94
      Niranjan Pendharkar authored
      This hidl service provides functionality for oem networking
      configuration to vendor services which is required by
      at least some vendor radio modules.
      
      Test: VtsHalNetNetdV1_0TargetTest, netd_integration_test, netd_unit_test
      Test: no denials
      Bug: 36682246
      Change-Id: I86ac9082166b406b2fc814972375ba737460ad7b
      5aef6a94
    • Tim Kryger's avatar
      Fix selinux denials during bugreport · 6763d28e
      Tim Kryger authored
      
      avc: denied { read } for pid=1704 comm="top" name="stat" dev="proc" ino=4026532297 scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0
      avc: denied { read } for pid=1636 comm="dumpstate" name="lcd-backlight" dev="sysfs" ino=16592 scontext=u:r:dumpstate:s0 tcontext=u:object_r:sysfs_leds:s0 tclass=lnk_file permissive=0
      avc: denied { call } for pid=2230 comm="dumpsys" scontext=u:r:dumpstate:s0 tcontext=u:r:installd:s0 tclass=binder permissive=0
      avc: denied { create } for pid=1700 comm="ip" scontext=u:r:dumpstate:s0 tcontext=u:r:dumpstate:s0 tclass=netlink_xfrm_socket permissive=0
      
      Bug: 62410287
      Bug: 35350306
      Change-Id: I65be3678c64214ebeb544e0e155bce88b21adf02
      Signed-off-by: default avatarTim Kryger <tkryger@google.com>
      (cherry picked from commit b7e1f2dd)
      6763d28e
  4. Jul 27, 2017
    • Jeff Vander Stoep's avatar
      netd: relax binder neverallow rules for hwservices · faaf86bc
      Jeff Vander Stoep authored
      Relax neverallow rule restricting binder access to/from netd so that
      netd can export hwbinder services to vendor components.
      
      Continue to disallow app access to netd via binder.
      
      Bug: 36682246
      Test: build
      Merged-In: I8e558ea1add6c36b966ec1da204062ea82df3f3f
      Change-Id: I063df6dded94d8b0f5214b2c94c4f46bdafb03d7
      faaf86bc
    • Jeff Vander Stoep's avatar
      netd: relax binder neverallow rules for hwservices · e98ab0cb
      Jeff Vander Stoep authored
      Relax neverallow rule restricting binder access to/from netd so that
      netd can export hwbinder services to vendor components.
      
      Continue to disallow app access to netd via binder.
      
      Bug: 36682246
      Test: build
      Change-Id: I8e558ea1add6c36b966ec1da204062ea82df3f3f
      (cherry picked from commit 07c650eb)
      e98ab0cb
  5. Jul 26, 2017
    • Jeff Vander Stoep's avatar
      bootanim: is a client of configstore HAL · b558da67
      Jeff Vander Stoep authored
      Addresses:
      avc:  denied  { find } for
      interface=android.hardware.configstore::ISurfaceFlingerConfigs pid=603
      scontext=u:r:bootanim:s0
      tcontext=u:object_r:hal_configstore_ISurfaceFlingerConfigs:s0
      tclass=hwservice_manager permissive=0
      
      Bug: 64067152
      Test: build
      Change-Id: I0605ab8ba07a46a3dc6909307e6f0b2fde68a7ba
      b558da67
  6. Jul 25, 2017
  7. Jul 20, 2017
    • Josh Gao's avatar
      crash_dump_fallback: allow writing to system_server pipes. · fde0e02a
      Josh Gao authored
      Allow mediacodec/mediaextractor to write to system_server pipes during
      ANR dumps.
      
      Addresses the following denials:
      avc: denied { write } for comm="mediaextractor" path="pipe:[1177610]" dev="pipefs" ino=1177610 scontext=u:r:mediaextractor:s0 tcontext=u:r:system_server:s0 tclass=fifo_file permissive=0
      avc: denied { write } for comm="omx@1.0-service" path="pipe:[1175808]" dev="pipefs" ino=1175808 scontext=u:r:mediacodec:s0 tcontext=u:r:system_server:s0 tclass=fifo_file permissive=0
      
      Bug: http://b/63801592
      Test: treehugger
      Change-Id: I944b1fa76c70402607ccd903be17dbddeaa73201
      (cherry picked from commit 3c9b9197)
      fde0e02a
  8. Jul 19, 2017
    • Jeff Vander Stoep's avatar
      runas: grant access to seapp_contexts files · dcec3ee9
      Jeff Vander Stoep authored
      To be replaced by commit 1e149967
      seapp_context: explicitly label all seapp context files
      
      Test: build policy
      Change-Id: I8d30bd1d50b9e4a55f878c25d134907d4458cf59
      Merged-In: I0f0e937e56721d458e250d48ce62f80e3694900f
      dcec3ee9
    • Jeff Vander Stoep's avatar
      Do not expand hal_audio attribute · 89f215e6
      Jeff Vander Stoep authored
      Fixes:
      neverallow hal_audio domain:{ tcp_socket udp_socket rawip_socket } *;
      Warning!  Type or attribute hal_audio used in neverallow undefined in
      policy being checked.
      
      hal_audio_client is not used in neverallows and was mistakenly marked
      as expandattribute false instead of hal_audio. Fix this.
      
      Bug: 63809360
      Test: build policy
      Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
          android.cts.security.SELinuxNeverallowRulesTest
      
          No more:
          Warning!  Type or attribute hal_audio used in neverallow
          undefined in policy being checked.
      
      Change-Id: Iedf1b80f669f95537ed201cbdbb0626e7e32be81
      89f215e6
  9. Jul 16, 2017
    • Tianjie Xu's avatar
      Allow update_engine to read postinstall_mnt_dir · 8f687053
      Tianjie Xu authored
      The denial message:
      update_engine: type=1400 audit(0.0:15213): avc: denied { getattr } for
      path="/postinstall" dev="dm-0" ino=38 scontext=u:r:update_engine:s0
      tcontext=u:object_r:postinstall_mnt_dir:s0 tclass=dir permissive=0
      
      update_engine: type=1400 audit(0.0:15214): avc: denied { sys_rawio } for
      capability=17 scontext=u:r:update_engine:s0 tcontext=u:r:update_engine:s0
      tclass=capability permissive=0
      
      auditd  : type=1400 audit(0.0:15213): avc: denied { getattr } for
      comm="update_engine" path="/postinstall" dev="dm-0" ino=38
      scontext=u:r:update_engine:s0 tcontext=u:object_r:postinstall_mnt_dir:s0
      tclass=dir permissive=0
      
      update_engine: [0428/070905:ERROR:utils.cc(716)] Error stat'ing /postinstall: Permission denied
      
      Bug: 37760573
      Test: apply an update and UE reads postinstall_mnt_dir without denial.
      Change-Id: I55506f5e8544233f60ccf7c1df846c9c93946a25
    • Lorenzo Colitti's avatar
      Explicitly allow netd to take the iptables lock. · 9273c1bb
      Lorenzo Colitti authored
      This was previously relying on domain_deprecated rules deleted in
      change I588a1e7ea7ef984907b79a5a391efb2dcd6e6431.
      
      Bug: 28760354
      Test: unbreaks networking on AOSP bullhead
      Change-Id: I873e1f08f72104dee7509e45b1db0b284ca56085
      9273c1bb
  10. Jul 13, 2017
  11. Jul 12, 2017
  12. Jul 11, 2017
    • Jeff Vander Stoep's avatar
      ueventd: Grant write access to all files in /sys · 5bf94caf
      Jeff Vander Stoep authored
      Ueventd needs write access to all files in /sys to generate uevents.
      
      Bug: 63147833
      Test: build. Verify no ueventd denials in the logs.
      Change-Id: I89d33aab158dd192e761f14eff8afa1c71594bca
      5bf94caf
    • Lorenzo Colitti's avatar
      Temporarily revert the SELinux policy for persist.netd.stable_secret. · 9fa11b77
      Lorenzo Colitti authored
      This change did not make it into core sepolicy in time for O.
      The revert allows devices to define these selinux policies in
      vendor-specific sepolicy instead of core sepolicy. It is
      necessary because:
      
      1. It is too late to change property_contexts in O.
      2. Adding the netd_stable_secret prop to vendor sepolicy results
         in a duplicate definition error at compile time.
      3. Defining a new vendor-specific context (such as
         net_stable_secret_vendor_prop) and applying it to
         persist.netd.stable_secret results in the device not booting
         due to attempting to apply two different contexts to the same
         property.
      
      Lack of the sepolicy no longer breaks wifi connectivity now that
      IpManager no longer considers failure to set the stable secret to
      be a fatal error.
      
      Once all interested devices have adopted the vendor sepolicy,
      this policy can safely be reinstated by reverting said vendor
      sepolicies in internal master.
      
      This reverts commit abb1ba65.
      
      Bug: 17613910
      Test: bullhead builds, boots, connects to wifi
      Change-Id: Idffcf78491171c54bca9f93cb920eab9b1c47709
      9fa11b77
    • Jeff Vander Stoep's avatar
      domain_deprecated: remove rootfs access · a12aad45
      Jeff Vander Stoep authored
      Grant audited permissions collected in logs.
      
      tcontext=platform_app
      avc: granted { getattr } for comm=496E666C6174657254687265616420
      path="/" dev="dm-0" ino=2 scontext=u:r:platform_app:s0:c512,c768
      tcontext=u:object_r:rootfs:s0 tclass=dir
      
      tcontext=system_app
      avc: granted { getattr } for comm="android:ui" path="/" dev="dm-0"
      scontext=u:r:system_app:s0 tcontext=u:object_r:rootfs:s0 tclass=dir
      avc: granted { getattr } for comm="android:ui" path="/" dev="dm-0"
      scontext=u:r:system_app:s0 tcontext=u:object_r:rootfs:s0 tclass=dir
      
      tcontext=update_engine
      avc: granted { getattr } for comm="update_engine" path="/" dev="dm-0"
      ino=2 scontext=u:r:update_engine:s0 tcontext=u:object_r:rootfs:s0
      tclass=dir
      avc: granted { getattr } for comm="update_engine" path="/fstab.foo"
      dev="dm-0" ino=25 scontext=u:r:update_engine:s0
      tcontext=u:object_r:rootfs:s0 tclass=file
      avc: granted { read open } for comm="update_engine" path="/fstab.foo"
      dev="dm-0" ino=25 scontext=u:r:update_engine:s0
      tcontext=u:object_r:rootfs:s0 tclass=file
      
      Bug: 28760354
      Test: build
      Change-Id: I6135eea1d10b903a4a7e69da468097f495484665
      a12aad45
  13. Jul 10, 2017
    • Jeff Vander Stoep's avatar
      domain_deprecated: remove cgroup access · 72b26547
      Jeff Vander Stoep authored
      Logs indicate that all processes that require read access
      have already been granted it.
      
      Bug: 28760354
      Test: build policy
      Merged-In: I5826c45f54af32e3d4296df904c8523bb5df5e62
      Change-Id: I5826c45f54af32e3d4296df904c8523bb5df5e62
      72b26547
    • Jeff Vander Stoep's avatar
      domain_deprecated: remove cache access · 790f4c7e
      Jeff Vander Stoep authored
      Address the "granted" permissions observed in the logs including:
      
      tcontext=uncrypt
      avc: granted { search } for comm="uncrypt" name="/" dev="mmcblk0p40"
      ino=2 scontext=u:r:uncrypt:s0 tcontext=u:object_r:cache_file:s0
      tclass=dir
      
      tcontext=install_recovery
      avc: granted { search } for comm="applypatch" name="saved.file"
      scontext=u:r:install_recovery:s0 tcontext=u:object_r:cache_file:s0
      tclass=dir
      avc: granted { read } for comm="applypatch" name="saved.file"
      dev="mmcblk0p6" ino=14 scontext=u:r:install_recovery:s0
      tcontext=u:object_r:cache_file:s0 tclass=file
      avc: granted { getattr } for comm="applypatch" path="/cache/saved.file"
      dev="mmcblk0p6" ino=14 scontext=u:r:install_recovery:s0
      tcontext=u:object_r:cache_file:s0 tclass=file
      
      tcontext=update_engine
      avc: granted { search } for comm="update_engine" name="cache"
      dev="sda35" ino=1409025 scontext=u:r:update_engine:s0
      tcontext=u:object_r:cache_file:s0 tclass=dir"
      avc: granted { read } for comm="update_engine" name="update.zip"
      dev="sda35" ino=1409037 scontext=u:r:update_engine:s0
      tcontext=u:object_r:cache_file:s0:c512,c768 tclass=file
      avc: granted { read } for comm="update_engine" name="cache" dev="dm-0"
      ino=16 scontext=u:r:update_engine:s0 tcontext=u:object_r:cache_file:s0
      tclass=lnk_file
      
      Bug: 28760354
      Test: build policy.
      Merged-In: Ia13fe47268df904bd4f815c429a0acac961aed1e
      Change-Id: Ia13fe47268df904bd4f815c429a0acac961aed1e
      790f4c7e
    • Stephen Smalley's avatar
      sepolicy: Define and allow map permission · 4397f082
      Stephen Smalley authored
      
      Kernel commit 3ba4bf5f1e2c ("selinux: add a map permission check for mmap")
      added a map permission check on mmap so that we can
      distinguish memory mapped access (since it has different implications
      for revocation).  The purpose of a separate map permission check on
      mmap(2) is to permit policy to prohibit memory mapping of specific files
      for which we need to ensure that every access is revalidated, particularly
      useful for scenarios where we expect the file to be relabeled at runtime
      in order to reflect state changes (e.g. cross-domain solution, assured
      pipeline without data copying).  The kernel commit is anticipated to
      be included in Linux 4.13.
      
      This change defines map permission for the Android policy.  It mirrors
      the definition in the kernel classmap by adding it to the common
      definitions for files and sockets.  This will break compatibility for
      kernels that predate the dynamic class/perm mapping support (< 2.6.33);
      on such kernels, one would instead need to add map permission
      to the end of each file and socket access vector.
      
      This change also adds map permission to the global macro definitions for
      file permissions, thereby allowing it in any allow rule that uses these
      macros, and to specific rules allowing mapping of files from /system
      and executable types. This should cover most cases where it is needed,
      although it may still need to be added to specific allow rules when the
      global macros are not used.
      
      Test: Policy builds
      
      Change-Id: Iab3ccd2b6587618e68ecab58218838749fe5e7f5
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      4397f082
    • Dan Cashman's avatar
      Split mediaprovider from priv_app. · 5637587d
      Dan Cashman authored
      This CL was accidentally reverted a second time by commit:
      cb5129f9.  Submit it for the third,
      and final, time.
      
      Bug: 62102757
      Test: Builds and boots.
      5637587d
    • Jeff Vander Stoep's avatar
      domain_deprecated: remove cache access · 1c54ec45
      Jeff Vander Stoep authored
      Address the "granted" permissions observed in the logs including:
      
      tcontext=uncrypt
      avc: granted { search } for comm="uncrypt" name="/" dev="mmcblk0p40"
      ino=2 scontext=u:r:uncrypt:s0 tcontext=u:object_r:cache_file:s0
      tclass=dir
      
      tcontext=install_recovery
      avc: granted { search } for comm="applypatch" name="saved.file"
      scontext=u:r:install_recovery:s0 tcontext=u:object_r:cache_file:s0
      tclass=dir
      avc: granted { read } for comm="applypatch" name="saved.file"
      dev="mmcblk0p6" ino=14 scontext=u:r:install_recovery:s0
      tcontext=u:object_r:cache_file:s0 tclass=file
      avc: granted { getattr } for comm="applypatch" path="/cache/saved.file"
      dev="mmcblk0p6" ino=14 scontext=u:r:install_recovery:s0
      tcontext=u:object_r:cache_file:s0 tclass=file
      
      tcontext=update_engine
      avc: granted { search } for comm="update_engine" name="cache"
      dev="sda35" ino=1409025 scontext=u:r:update_engine:s0
      tcontext=u:object_r:cache_file:s0 tclass=dir"
      avc: granted { read } for comm="update_engine" name="update.zip"
      dev="sda35" ino=1409037 scontext=u:r:update_engine:s0
      tcontext=u:object_r:cache_file:s0:c512,c768 tclass=file
      avc: granted { read } for comm="update_engine" name="cache" dev="dm-0"
      ino=16 scontext=u:r:update_engine:s0 tcontext=u:object_r:cache_file:s0
      tclass=lnk_file
      
      Bug: 28760354
      Test: build policy.
      
      Change-Id: Ia13fe47268df904bd4f815c429a0acac961aed1e
      (cherry picked from commit 5fd60597d7d04c1861e7d8f3938384efb0384386)
      1c54ec45
    • Lorenzo Colitti's avatar
      Temporarily revert the SELinux policy for persist.netd.stable_secret. · 07e631d2
      Lorenzo Colitti authored
      This change did not make it into core sepolicy in time for O.
      The revert allows devices to define these selinux policies in
      vendor-specific sepolicy instead of core sepolicy. It is
      necessary because:
      
      1. It is too late to change property_contexts in O.
      2. Adding the netd_stable_secret prop to vendor sepolicy results
         in a duplicate definition error at compile time.
      3. Defining a new vendor-specific context (such as
         net_stable_secret_vendor_prop) and applying it to
         persist.netd.stable_secret results in the device not booting
         due to attempting to apply two different contexts to the same
         property.
      
      Lack of the sepolicy no longer breaks wifi connectivity now that
      IpManager no longer considers failure to set the stable secret to
      be a fatal error.
      
      Once all interested devices have adopted the vendor sepolicy,
      this policy can safely be reinstated by reverting said vendor
      sepolicies in internal master.
      
      This reverts commit abb1ba65.
      
      Bug: 17613910
      Test: bullhead builds, boots, connects to wifi
      Change-Id: Idffcf78491171c54bca9f93cb920eab9b1c47709
      07e631d2
    • Jeff Vander Stoep's avatar
      domain_deprecated: remove access to /proc/meminfo · 3e5bb807
      Jeff Vander Stoep authored
      Logs indicate that all processes that require access already have it.
      
      Bug: 28760354
      Test: build
      Merged-In: I3dfa16bf4fba7f653c5f8525e8c565e9e24334a8
      Change-Id: I3dfa16bf4fba7f653c5f8525e8c565e9e24334a8
      3e5bb807
    • Jeff Vander Stoep's avatar
      dumpstate: remove domain_deprecated attribute · 90ae4f6b
      Jeff Vander Stoep authored
      Clean up "granted" logspam. Grant the observered audited permissions
      including:
      
      tcontext=cache_file
      avc: granted { getattr } for comm="df" path="/cache" dev="mmcblk0p9"
      ino=2 scontext=u:r:dumpstate:s0 tcontext=u:object_r:cache_file:s0
      tclass=dir
      avc: granted { search } for comm="Binder:8559_2" name="cache"
      dev="sda13" ino=1654785 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:cache_file:s0 tclass=dir
      avc: granted { read } for comm="Binder:8559_2" name="cache" dev="dm-0"
      ino=23 scontext=u:r:dumpstate:s0 tcontext=u:object_r:cache_file:s0
      tclass=lnk_file
      
      tcontext=proc
      avc: granted { getattr } for comm="Binder:14529_2"
      path="/proc/sys/fs/pipe-max-size" dev="proc" ino=247742
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc:s0
      tclass=file
      avc: granted { read } for comm="Binder:22671_2" name="cmdline"
      dev="proc" ino=4026532100 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc:s0 tclass=file
      avc: granted { read open } for comm="dumpstate"
      path="/proc/sys/fs/pipe-max-size" dev="proc" ino=105621
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc:s0
      tclass=file
      
      tcontext=sysfs
      avc: granted { read open } for comm="Binder:14459_2"
      path="/sys/devices/virtual/block/md0/stat" dev="sysfs" ino=51101
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:sysfs:s0 tclass=file
      avc: granted { read open } for comm="Binder:21377_2"
      path="/sys/devices/soc/1da4000.ufshc/host0/target0:0:0/0:0:0:1/block/sdb/sdb1"
      dev="sysfs" ino=40888 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:sysfs:s0 tclass=dir
      avc: granted { getattr } for comm="dumpstate" dev="sysfs" ino=40456
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:sysfs:s0 tclass=file
      
      tcontext=proc_meminfo
      avc: granted { read } for comm="top" name="meminfo" dev="proc"
      ino=4026532106 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_meminfo:s0 tclass=file
      avc: granted { read open } for comm="top" path="/proc/meminfo"
      dev="proc" ino=4026532106 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_meminfo:s0 tclass=file
      
      tcontext=rootfs
      avc: granted { getattr } for comm="df" path="/" dev="dm-0" ino=2
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:rootfs:s0 tclass=dir
      avc: granted { getattr } for comm="ip" path="/vendor" dev="rootfs"
      ino=99 scontext=u:r:dumpstate:s0 tcontext=u:object_r:rootfs:s0
      tclass=lnk_file
      
      tcontext=selinuxfs
      avc: granted { getattr } for comm="df" path="/sys/fs/selinux"
      dev="selinuxfs" ino=1 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:selinuxfs:s0 tclass=dir
      
      tcontext=system_file
      avc: granted { read open } for comm="dumpstate" path="/system/lib64/hw"
      dev="dm-0" ino=1947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:system_file:s0 tclass=dir
      
      tcontext=system_data_file
      avc: granted { read } for comm="ip" path="/data/misc/net/rt_tables"
      dev="sda10" ino=1458261 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:system_data_file:s0 tclass=file
      avc: granted { getattr } for comm="ip" path="/data/misc/net/rt_tables"
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:system_data_file:s0
      tclass=file
      
      Bug: 28760354
      Test: Build policy
      Change-Id: Iae69f710d6b6dc6158cf6bb6ff61168c8df11263
      90ae4f6b
    • Jeff Vander Stoep's avatar
      Remove dumpstate selinux spam from logs · f4ce8f6c
      Jeff Vander Stoep authored
      Addresses:
      avc: granted { read } for name="pipe-max-size" dev="proc" ino=470942 scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc:s0 tclass=file
      avc: granted { read open } for path="/proc/sys/fs/pipe-max-size" dev="proc" ino=470942 scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc:s0 tclass=file
      
      Test: build policy
      Change-Id: I7d8721c73c4f3c51b3885a97c697510e61d1221b
      (cherry picked from commit f44002b3)
      f4ce8f6c
  14. Jul 07, 2017
  15. Jul 06, 2017
    • Jeff Vander Stoep's avatar
      domain_deprecated: remove tmpfs dir access · ca5bb337
      Jeff Vander Stoep authored
      Address "granted" audit messages for dumpstate use of df.
      
      avc: granted { getattr } for comm="df" path="/mnt" dev="tmpfs"
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:tmpfs:s0
      tclass=dir
      avc: granted { search } for comm="df" name="/" dev="tmpfs"
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:tmpfs:s0
      tclass=dir
      
      Bug: 28760354
      Test: Build, check logs.
      Change-Id: I920948a5f0bce1b4bd2f15779730df8b3b1fea5a
      ca5bb337
  16. Jul 05, 2017
    • Jeff Vander Stoep's avatar
      Preserve attributes needed for CTS · 5f5aa962
      Jeff Vander Stoep authored
      Change fb889f23 "Force expand all hal_* attributes" annotated all
      hal_* attributes to be expanded to their associated types. However
      some of these attributes are used in CTS for neverallow checking.
      Mark these attributes to be preserved.
      
      In addition, remove the hacky workaround introduced in oc-dev
      for b/62658302 where extraneous neverallow rules were introduced
      to prevent unused or negated attributes from being auto-expanded
      from policy.
      
      Bug: 62658302
      Bug: 63135903
      Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
          android.cts.security.SELinuxNeverallowRulesTest
      
          armeabi-v7a CtsSecurityHostTestCases completed in 4s.
          501 passed, 0 failed, 0 not executed
      Merged-In: I989def70a16f66e7a18bef1191510793fbe9cb8c
      Change-Id: I989def70a16f66e7a18bef1191510793fbe9cb8c
      5f5aa962
    • Jeff Vander Stoep's avatar
      Preserve attributes needed for CTS · bf8ed096
      Jeff Vander Stoep authored
      Change fb889f23 "Force expand all hal_* attributes" annotated all
      hal_* attributes to be expanded to their associated types. However
      some of these attributes are used in CTS for neverallow checking.
      Mark these attributes to be preserved.
      
      In addition, remove the hacky workaround introduced in oc-dev
      for b/62658302 where extraneous neverallow rules were introduced
      to prevent unused or negated attributes from being auto-expanded
      from policy.
      
      Bug: 62658302
      Bug: 63135903
      Test: cts-tradefed run cts -m CtsSecurityHostTestCases -t \
          android.cts.security.SELinuxNeverallowRulesTest
      
          armeabi-v7a CtsSecurityHostTestCases completed in 4s.
          501 passed, 0 failed, 0 not executed
      Change-Id: I989def70a16f66e7a18bef1191510793fbe9cb8c
      bf8ed096
    • Jin Qian's avatar
      Revert "allow recovery to run mke2fs tools" · 0e479700
      Jin Qian authored
      This reverts commit 7e577318.
      0e479700
  17. 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
Loading