Skip to content
Snippets Groups Projects
  1. Sep 15, 2017
    • Jeff Vander Stoep's avatar
      do not expand hal_cas attribute · aa5f37da
      Jeff Vander Stoep authored
      Addresses:
      junit.framework.AssertionFailedError: The following errors were
      encountered when validating the SELinuxneverallow rule:
      neverallow {   domain   -adbd   -dumpstate   -hal_drm -hal_cas -init
      -mediadrmserver   -recovery   -shell   -system_server }
      serialno_prop:file { getattr open read ioctl lock map };
      Warning!  Type or attribute hal_cas used in neverallow undefined in
      policy being checked.
      libsepol.report_failure: neverallow violated by allow mediaextractor
      serialno_prop:file { ioctl read getattr lock map open };
      libsepol.report_failure: neverallow violated by allow mediacodec
      serialno_prop:file { ioctl read getattr lock map open };
      libsepol.report_failure: neverallow violated by allow hal_cas_default
      serialno_prop:file { ioctl read getattr lock map open };
      libsepol.check_assertions: 3 neverallow failures occurred
      
      Bug: 65681219
      Test: build
      Change-Id: I2a6445d6372ee4e768cc2cea2140c6de97707a74
      Merged-In: I1092aff40da9dcf09bd044400bedd1f549eb7e38
      aa5f37da
  2. Sep 11, 2017
  3. Sep 01, 2017
  4. Aug 31, 2017
    • Steven Moreland's avatar
      Add permissions for screencap for dumpstate. · b5dd44b1
      Steven Moreland authored
      screencap domain needs additional permissions for
      dumpstate to dump screenshots.
      
      Test: adb shell cmd activity bug-report
      Bug: 65206688
      Change-Id: I824f345fd90d286454d570576c5888d7719c4c5c
      b5dd44b1
    • Ray Essick's avatar
      Give media.metrics service access to uid/pkg info · 9b0924e1
      Ray Essick authored
      relax the sepolicy for media.metrics to allow access to
      package manager for uid->packagename mapping functionality.
      
      Bug: 65027506
      Test: read output of 'dumpsys media.metrics'
      Change-Id: I0d25af16c06dc65154cfda854e28ab70ada097c4
      9b0924e1
  5. Aug 29, 2017
    • Jeff Vander Stoep's avatar
      Allow all domains to stat symlinks in sysfs · 17e97257
      Jeff Vander Stoep authored
      This is needed to retain app's previous access to
      /sys/devices/system/cpu. When these files were previously
      labeled in file_contexts, symlinks were labeled as
      sysfs_devices_system_cpu. When labeling was moved to genfs_contexts
      symlinks all have the default sysfs label.
      
      avc: denied { getattr } for comm="main"
      path="/sys/devices/system/cpu/cpu0/cpufreq" dev="sysfs" ino=41897
      scontext=u:r:untrusted_app_25:s0:c512,c768
      tcontext=u:object_r:sysfs:s0 tclass=lnk_file permissive=0
      
      Change-Id: Idaa565390bca13d3819e147fcea4214956c0f589
      Bug: 64270911
      Test: build aosp_marlin
      (cherry picked from commit 8d021a94)
      17e97257
  6. Aug 28, 2017
  7. Aug 24, 2017
    • John Stultz's avatar
      sepolicy: Define and allow map permission for vendor dir · 9f3f3784
      John Stultz authored
      This patch tries to provide similar functionality as the previous
      change made here:
      https://android-review.googlesource.com/#/c/platform/system/sepolicy/+/432339/
      
      
      
      Only, making sure we add the same map permissions for the vendor
      directory.
      
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      
      (cherry picked from commit 24537b2e)
      
      Bug: 65011018
      Test: policy compiles.
      Change-Id: I4d0319011ef4ef043134bf299dc4823a6c418717
      9f3f3784
    • 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
  8. Aug 17, 2017
  9. Aug 16, 2017
    • Corey Tabaka's avatar
      Enable performanced to talk to the permission service. · 030a7ef6
      Corey Tabaka authored
      Performanced needs to talk to the permission service to verify
      permissions of clients to access certain restricted scheduler
      policies.
      
      Bug: 64337476
      Test: performance_service_tests passes; logs do not contain avc
            denials for performanced -> permission service.
      
      Change-Id: I31618ab1d3e79c3c10138d567b0f5606527020f9
      030a7ef6
    • Sandeep Patil's avatar
      DO NOT MERGE: Revert "Revert "Remove neverallow preventing hwservice access for apps."" · c9d4a86d
      Sandeep Patil authored
      
      This reverts commit ceed7204.
      
      New HALs services that are added in the policy while the CL was reverted
      will are not made visible to applications by default. They are:
        hal_neuralnetworks_hwservice
        hal_wifi_offload_hwservice
        system_net_netd_hwservice
        thermalcallback_hwservice
      
      Bug: 64578796
      Test: Boot device
      
      Change-Id: I84d65baddc757a5b0a38584430eff79a383aa8e0
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      c9d4a86d
    • Martijn Coenen's avatar
      Fix typo in servicemanager policy. · 1f743854
      Martijn Coenen authored
      Bug: Bug: 36866029
      Test: builds
      Change-Id: I520bd6f4af9278f7991950ccc4827928679c5927
      1f743854
    • Bowgo Tsai's avatar
      Moving adbd from rootdir to system/bin · e2423d14
      Bowgo Tsai authored
      Bug: 63910933
      Test: boot sailfish in normal mode, checks adbd is started
      Test: boot sailfish in recovery mode, checks adbd is started
      Test: boot bullhead in normal mode, checks adbd is started
      Test: boot bullhead in recovery mode, checks adbd is started
      
      Change-Id: I35ed78a15a34626fbd3c21d030e2bf51033f7b79
      e2423d14
  10. Aug 11, 2017
    • Steven Moreland's avatar
      Add screencap domain. · f27bba93
      Steven Moreland authored
      Only seeing this denial in permissive:
      allow shell screencap_exec:file getattr;
      
      Bug: 37565047
      Test: adb shell screencap w/o root
      Test: cts-tradefed run cts-dev --module CtsAadbHostTestCases
      Change-Id: I9f31d2067e002e7042646ee38dbfc06687481ac7
      f27bba93
    • Martijn Coenen's avatar
      Prevent access to nonplat_service_contexts on full_treble. · 431a03bb
      Martijn Coenen authored
      On Full Treble devices, servicemanager should only service
      services from the platform service_contexts file.
      
      Created new type to separate plat_ and nonplat_service_contexts,
      and added new type to mapping (although I don't think this type
      should have been used by vendors).
      
      Bug: 36866029
      Test: Marlin/Taimen boot
      Change-Id: Ied112c64f22f8486a7415197660faa029add82d9
      431a03bb
  11. Aug 09, 2017
  12. 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
  13. 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
  14. 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
  15. 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
  16. Jul 25, 2017
  17. 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
  18. 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
  19. 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
  20. Jul 13, 2017
  21. Jul 12, 2017
Loading