Skip to content
Snippets Groups Projects
  1. Jul 12, 2017
    • Peng Xu's avatar
      Allow system to dump sensor hal process · e4968f90
      Peng Xu authored
      Test: tested taking bugreport, sensor HAL traces show up in
            "VM TRACES JUST NOW"
      Test: tested trigger ANR by `adb shell am hang --allow-restart`,
            sensor HAL traces shows up in /data/anr/traces.txt
      Bug: 63096400
      Change-Id: I1d012b9d9810f987be7aaf9d68abfd9c3184ac5c
      e4968f90
  2. May 15, 2017
    • Jeff Vander Stoep's avatar
      Move domain_deprecated into private policy · 76aab82c
      Jeff Vander Stoep authored
      This attribute is being actively removed from policy. Since
      attributes are not being versioned, partners must not be able to
      access and use this attribute. Move it from private and verify in
      the logs that rild and tee are not using these permissions.
      
      Bug: 38316109
      Test: build and boot Marlin
      Test: Verify that rild and tee are not being granted any of these
            permissions.
      Change-Id: I31beeb5bdf3885195310b086c1af3432dc6a349b
      76aab82c
  3. Apr 21, 2017
    • Chia-I Wu's avatar
      Allow dumping hal_graphics_composer_server and fix watchdog · e4d21465
      Chia-I Wu authored
      Bug: 37152880
      Bug: 37554633
      Test: adb shell am hang --allow-restart
      Test: adb shell dumpstate
      Change-Id: Ie68607f3e3245a40056bdde7dd810ddf212b4295
      e4d21465
    • Alex Klyubin's avatar
      Grant dumpstate hwservermanager list permission · 09423b50
      Alex Klyubin authored
      This lets dumpstate obtain the list of currently registered HwBinder
      services.
      
      Test: adb bugreport -- no denials to do with dumpstate access to
            hwservicemanager list functionality.
      Bug: 37554633
      
      Change-Id: I95512168948ca45a0dd830c20922e3c776ffaf41
      09423b50
    • Alex Klyubin's avatar
      Restrict access to hwservicemanager · 53656c17
      Alex Klyubin authored
      This adds fine-grained policy about who can register and find which
      HwBinder services in hwservicemanager.
      
      Test: Play movie in Netflix and Google Play Movies
      Test: Play video in YouTube app and YouTube web page
      Test: In Google Camera app, take photo (HDR+ and conventional),
            record video (slow motion and normal), and check that photos
            look fine and videos play back with sound.
      Test: Cast screen to a Google Cast device
      Test: Get location fix in Google Maps
      Test: Make and receive a phone call, check that sound works both ways
            and that disconnecting the call frome either end works fine.
      Test: Run RsHelloCompute RenderScript demo app
      Test: Run fast subset of media CTS tests:
            make and install CtsMediaTestCases.apk
            adb shell am instrument -e size small \
                -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
      Test: Play music using Google Play music
      Test: Adjust screen brightness via the slider in Quick Settings
      Test: adb bugreport
      Test: Enroll in fingerprint screen unlock, unlock screen using
            fingerprint
      Test: Apply OTA update:
            Make some visible change, e.g., rename Settings app.
            make otatools && \
            make dist
            Ensure device has network connectivity
            ota_call.py -s <serial here> --file out/dist/sailfish-ota-*.zip
            Confirm the change is now live on the device
      Bug: 34454312
      (cherry picked from commit 632bc494)
      Merged-In: Iecf74000e6c68f01299667486f3c767912c076d3
      Change-Id: I7a9a487beaf6f30c52ce08e04d415624da49dd31
      53656c17
    • Pavel Grafov's avatar
      Let shell and bugreport read logging related properties. · a283ac71
      Pavel Grafov authored
      Currently ro.device_owner and persist.logd.security aren't accessible
      without root, so "adb shell getprop" returns empty reply which is
      confusing. Also these properties aren't seen from bugreport unless
      their change happened recently.
      
      Bug: 37053313
      Test: manual, took bugreport and ran getprop after "adb unroot".
      Change-Id: Id41cdabc282f2ebcdfc0ac7fe9df756322a0863d
      a283ac71
  4. Apr 20, 2017
    • Alex Klyubin's avatar
      Restrict access to hwservicemanager · 632bc494
      Alex Klyubin authored
      This adds fine-grained policy about who can register and find which
      HwBinder services in hwservicemanager.
      
      Test: Play movie in Netflix and Google Play Movies
      Test: Play video in YouTube app and YouTube web page
      Test: In Google Camera app, take photo (HDR+ and conventional),
            record video (slow motion and normal), and check that photos
            look fine and videos play back with sound.
      Test: Cast screen to a Google Cast device
      Test: Get location fix in Google Maps
      Test: Make and receive a phone call, check that sound works both ways
            and that disconnecting the call frome either end works fine.
      Test: Run RsHelloCompute RenderScript demo app
      Test: Run fast subset of media CTS tests:
            make and install CtsMediaTestCases.apk
            adb shell am instrument -e size small \
                -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
      Test: Play music using Google Play music
      Test: Adjust screen brightness via the slider in Quick Settings
      Test: adb bugreport
      Test: Enroll in fingerprint screen unlock, unlock screen using
            fingerprint
      Test: Apply OTA update:
            Make some visible change, e.g., rename Settings app.
            make otatools && \
            make dist
            Ensure device has network connectivity
            ota_call.py -s <serial here> --file out/dist/sailfish-ota-*.zip
            Confirm the change is now live on the device
      Bug: 34454312
      Change-Id: Iecf74000e6c68f01299667486f3c767912c076d3
      632bc494
    • Chia-I Wu's avatar
      dumpstate is a client of graphics allocator · c0044bfa
      Chia-I Wu authored
      This fixes
      
      avc: denied { call } for comm="screencap" scontext=u:r:dumpstate:s0
        tcontext=u:r:hal_graphics_allocator_default:s0 tclass=binder
        permissive=0
      
      Bug: 37360953
      Test: adb shell dumpstate -p -o <path>
      Change-Id: Ia9387559e3ec1ba51b614bb9d24294fbbbd51b1a
      c0044bfa
  5. Apr 14, 2017
    • Jeff Vander Stoep's avatar
      restore permissions to /vendor for non-treble devices · f627e558
      Jeff Vander Stoep authored
      Relabeling /vendor and /system/vendor to vendor_file removed
      previously granted permissions. Restore these for non-treble devices.
      
      Addresses:
      avc: denied { execute_no_trans } for pid=2944 comm="dumpstate"
      path="/system/vendor/bin/wpa_cli" dev="mmcblk0p10" ino=1929
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:vendor_file:s0
      tclass=file
      
      And potentially some other bugs that have yet to surface.
      
      Bug: 37105075
      Test: build Fugu
      Change-Id: I8e7bd9c33819bf8206f7c110cbce72366afbcef8
      f627e558
  6. Mar 31, 2017
    • Daniel Nicoara's avatar
      VR: Add sepolicy for VR HWC service · 6907e39a
      Daniel Nicoara authored
      VR HWC is being split out of VR Window Manager. It creates a HW binder
      interface used by SurfaceFlinger which implements the HWComposer HAL and
      a regular binder interface which will be used by a system app to receive
      the SurfaceFlinger output.
      
      Bug: b/36051907
      Test: Ran in permissive mode and ensured no permission errors show in
      logcat.
      
      Change-Id: If1360bc8fa339a80100124c4e89e69c64b29d2ae
      6907e39a
  7. Mar 23, 2017
    • Steven Moreland's avatar
      Allow bugreport to dump some HAL processes. · f20b04ef
      Steven Moreland authored
      Whitelist several hals which can be dumped by bugreports. Don't want to
      dump more because of the time it takes and also certain hals have
      sensitive data which shouldn't be dumped (i.e. keymaster).
      
      Test: dumps work for given hals
      Bug: 36414311
      Change-Id: Ic0eddfa95fa33abbc983d3b5161e42c240663f22
      f20b04ef
  8. Mar 17, 2017
    • Alex Klyubin's avatar
      Annotate most remaining HALs with _client/_server · 9e6b24c6
      Alex Klyubin authored
      This switches most remaining HALs to the _client/_server approach.
      To unblock efforts blocked on majority of HALs having to use this
      model, this change does not remove unnecessary rules from clients of
      these HALs. That work will be performed in follow-up commits. This
      commit only adds allow rules and thus does not break existing
      functionality.
      
      The HALs not yet on the _client/_server model after this commit are:
      * Allocator HAL, because it's non-trivial to declare all apps except
        isolated apps as clients of this HAL, which they are.
      * Boot HAL, because it's still on the non-attributized model and I'm
        waiting for update_engine folks to answer a couple of questions
        which will let me refactor the policy of this HAL.
      
      Test: mmm system/sepolicy
      Test: Device boots, no new denials
      Test: Device boots in recovery mode, no new denials
      Bug: 34170079
      Change-Id: I03e6bcec2fa02f14bdf17d11f7367b62c68a14b9
      9e6b24c6
  9. Mar 07, 2017
    • Calin Juravle's avatar
      SElinux: Clean up code related to foreign dex use · 2b291121
      Calin Juravle authored
      We simplified the way we track whether or not a dex file is used by
      other apps. DexManager in the framework keeps track of the data and we
      no longer need file markers on disk.
      
      Test: device boots, foreign dex markers are not created anymore
      
      Bug: 32871170
      Change-Id: I464ed6b09439cf0342020ee07596f9aa8ae53b62
      2b291121
  10. Feb 22, 2017
    • Alex Klyubin's avatar
      Switch Dumpstate HAL policy to _client/_server · aa60f9a8
      Alex Klyubin authored
      This switches Dumpstate HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Dumpstate HAL.
      
      Domains which are clients of Dumpstate HAL, such as dumpstate domain,
      are granted rules targeting hal_dumpstate only when the Dumpstate HAL
      runs in passthrough mode (i.e., inside the client's process). When the
      HAL runs in binderized mode (i.e., in another process/domain, with
      clients talking to the HAL over HwBinder IPC), rules targeting
      hal_dumpstate are not granted to client domains.
      
      Domains which offer a binderized implementation of Dumpstate HAL, such
      as hal_dumpstate_default domain, are always granted rules targeting
      hal_dumpstate.
      
      Test: adb bugreport
      Test: Take bugreport through system UI
      Bug: 34170079
      
      (cherry picked from commit 47174e3b)
      
      Change-Id: I3e827534af03cdfa876921c5fa4af3a53025ba27
      aa60f9a8
    • Alex Klyubin's avatar
      Switch Dumpstate HAL policy to _client/_server · 47174e3b
      Alex Klyubin authored
      This switches Dumpstate HAL policy to the design which enables us to
      conditionally remove unnecessary rules from domains which are clients
      of Dumpstate HAL.
      
      Domains which are clients of Dumpstate HAL, such as dumpstate domain,
      are granted rules targeting hal_dumpstate only when the Dumpstate HAL
      runs in passthrough mode (i.e., inside the client's process). When the
      HAL runs in binderized mode (i.e., in another process/domain, with
      clients talking to the HAL over HwBinder IPC), rules targeting
      hal_dumpstate are not granted to client domains.
      
      Domains which offer a binderized implementation of Dumpstate HAL, such
      as hal_dumpstate_default domain, are always granted rules targeting
      hal_dumpstate.
      
      Test: adb bugreport
      Test: Take bugreport through system UI
      Bug: 34170079
      Change-Id: I3e827534af03cdfa876921c5fa4af3a53025ba27
      47174e3b
  11. Feb 18, 2017
    • Nick Kralevich's avatar
      dumpstate: assert no process ptrace · 6bae84a5
      Nick Kralevich authored
      dumpstate has CAP_SYS_PTRACE solely for the purpose of reading sensitive
      /proc/PID files, not for using ptrace attach. Add an assert to ensure
      that's the case.
      
      Test: policy compiles.
      Change-Id: I975308fae3f8e9a039b9efdc0e9605192b405ce7
      6bae84a5
  12. Feb 09, 2017
  13. Feb 07, 2017
  14. Jan 31, 2017
    • Calin Juravle's avatar
      Remove SElinux audit to libart_file · 01ee59a7
      Calin Juravle authored
      Since it was introduced it caused quite a few issues and it spams the
      SElinux logs unnecessary.
      
      The end goal of the audit was to whitelist the access to the
      interpreter. However that's unfeasible for now given the complexity.
      
      Test: devices boots and everything works as expected
            no more auditallow logs
      
      Bug: 29795519
      Bug: 32871170
      Change-Id: I9a7a65835e1e1d3f81be635bed2a3acf75a264f6
      01ee59a7
    • Mark Salyzyn's avatar
      logd: restrict access to /dev/event-log-tags · d33a9a19
      Mark Salyzyn authored
      Create an event_log_tags_file label and use it for
      /dev/event-log-tags.  Only trusted system log readers are allowed
      direct read access to this file, no write access.  Untrusted domain
      requests lack direct access, and are thus checked for credentials via
      the "plan b" long path socket to the event log tag service.
      
      Test: gTest logd-unit-tests, liblog-unit-tests and logcat-unit-tests
      Bug: 31456426
      Bug: 30566487
      Change-Id: Ib9b71ca225d4436d764c9bc340ff7b1c9c252a9e
      d33a9a19
  15. Jan 26, 2017
    • Steven Moreland's avatar
      Dumpstate: hwbinder_use · ba68f554
      Steven Moreland authored
      Dumpstate needs the hwbinder_use permission in order to talk to hardware
      services.
      
      Bug: 34709307
      Test: no denials submitting bugreport
      Change-Id: Ic51da5371cd346c0fa9fb3881a47adaf53c93566
      ba68f554
    • William Roberts's avatar
      te_macros: introduce add_service() macro · 606d2fd6
      William Roberts authored
      
      Introduce the add_service() macro which wraps up add/find
      permissions for the source domain with a neverallow preventing
      others from adding it. Only a particular domain should
      add a particular service.
      
      Use the add_service() macro to automatically add a neverallow
      that prevents other domains from adding the service.
      
      mediadrmserver was adding services labeled mediaserver_service.
      Drop the add permission as it should just need the find
      permission.
      
      Additionally, the macro adds the { add find } permission which
      causes some existing neverallow's to assert. Adjust those
      neverallow's so "self" can always find.
      
      Test: compile and run on hikey and emulator. No new denials were
      found, and all services, where applicable, seem to be running OK.
      
      Change-Id: Ibbd2a5304edd5f8b877bc86852b0694732be993c
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      606d2fd6
  16. Jan 20, 2017
  17. Jan 18, 2017
    • Josh Gao's avatar
      Introduce crash_dump debugging helper. · cb3eb4ee
      Josh Gao authored
      Replace the global debuggerd with a per-process debugging helper that
      gets exec'ed by the process that crashed.
      
      Bug: http://b/30705528
      Test: crasher/crasher64, `debuggerd <pid>`, `kill -ABRT <pid>`
      Change-Id: Iad1b7478f7a4e2690720db4b066417d8b66834ed
      cb3eb4ee
  18. Dec 22, 2016
    • Alex Klyubin's avatar
      Restrict access to ro.serialno and ro.boot.serialno · 20151072
      Alex Klyubin authored
      This restricts access to ro.serialno and ro.boot.serialno, the two
      system properties which contain the device's serial number, to a
      select few SELinux domains which need the access. In particular, this
      removes access to these properties from Android apps. Apps can access
      the serial number via the public android.os.Build API. System
      properties are not public API for apps.
      
      The reason for the restriction is that serial number is a globally
      unique identifier which cannot be reset by the user. Thus, it can be
      used as a super-cookie by apps. Apps need to wean themselves off of
      identifiers not resettable by the user.
      
      Test: Set up fresh GMS device, install some apps via Play, update some apps, use Chrome
      Test: Access the device via ADB (ADBD exposes serial number)
      Test: Enable MTP over USB, use mtp-detect to confirm that serial number is reported in MTP DeviceInfo
      Bug: 31402365
      Bug: 33700679
      Change-Id: I4713133b8d78dbc63d8272503e80cd2ffd63a2a7
      20151072
  19. Dec 16, 2016
  20. Dec 06, 2016
    • dcashman's avatar
      sepolicy: add version_policy tool and version non-platform policy. · 2e00e637
      dcashman authored
      In order to support platform changes without simultaneous updates from
      non-platform components, the platform and non-platform policies must be
      split.  In order to provide a guarantee that policy written for
      non-platform objects continues to provide the same access, all types
      exposed to non-platform policy are versioned by converting them and the
      policy using them into attributes.
      
      This change performs that split, the subsequent versioning and also
      generates a mapping file to glue the different policy components
      together.
      
      Test: Device boots and runs.
      Bug: 31369363
      Change-Id: Ibfd3eb077bd9b8e2ff3b2e6a0ca87e44d78b1317
      2e00e637
  21. Nov 29, 2016
  22. Nov 01, 2016
    • Felipe Leme's avatar
      Added permissions for the dumpstate service. · b5f5931e
      Felipe Leme authored
      - Allow dumpstate to create the dumpservice service.
      - Allow System Server and Shell to find that service.
      - Don't allow anyone else to create that service.
      - Don't allow anyone else to find that service.
      
      BUG: 31636879
      Test: manual verification
      Change-Id: I642fe873560a2b123e6bafde645467d45a5f5711
      b5f5931e
  23. Oct 29, 2016
    • Nick Kralevich's avatar
      Get rid of more auditallow spam · 2c8ea36a
      Nick Kralevich authored
      Addresses the following audit messages:
      
      [    7.984957] type=1400 audit(33873666.610:40): avc: granted { getattr
      } for pid=1 comm="init" name="system@framework@boot-ext.art" dev="dm-2"
      ino=106324 scontext=u:r:init:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      [   65.528068] type=1400 audit(1477751916.508:96): avc: granted { search
      } for pid=6330 comm="main" name="/" dev="cgroup" ino=12428
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      [   65.530425] type=1400 audit(1477751916.508:97): avc: granted { search
      } for pid=6330 comm="main" name="/" dev="cgroup" ino=12428
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      [   65.530487] type=1400 audit(1477751916.508:98): avc: granted { open }
      for pid=6330 comm="main" path="/dev/cpuctl/tasks" dev="cgroup" ino=12429
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=file
      
      [   65.530800] type=1400 audit(1477751916.508:98): avc: granted { open }
      for pid=6330 comm="main" path="/dev/cpuctl/tasks" dev="cgroup" ino=12429
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=file
      
      [   65.530842] type=1400 audit(1477751916.508:99): avc: granted { search
      } for pid=6330 comm="main" name="/" dev="cgroup" ino=12428
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      [   65.531138] type=1400 audit(1477751916.508:99): avc: granted { search
      } for pid=6330 comm="main" name="/" dev="cgroup" ino=12428
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      [   65.531176] type=1400 audit(1477751916.508:100): avc: granted {
      search } for pid=6330 comm="main" name="bg_non_interactive" dev="cgroup"
      ino=12444 scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0
      tclass=dir
      
      [   65.531465] type=1400 audit(1477751916.508:100): avc: granted {
      search } for pid=6330 comm="main" name="bg_non_interactive" dev="cgroup"
      ino=12444 scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0
      tclass=dir
      
      [   65.531502] type=1400 audit(1477751916.508:101): avc: granted { open
      } for pid=6330 comm="main" path="/dev/cpuctl/bg_non_interactive/tasks"
      dev="cgroup" ino=12445 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:cgroup:s0 tclass=file
      
      [   65.531789] type=1400 audit(1477751916.508:101): avc: granted { open
      } for pid=6330 comm="main" path="/dev/cpuctl/bg_non_interactive/tasks"
      dev="cgroup" ino=12445 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:cgroup:s0 tclass=file
      
      [   65.531827] type=1400 audit(1477751916.508:102): avc: granted {
      search } for pid=6330 comm="main" name="/" dev="cgroup" ino=12459
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      [   65.713056] type=1400 audit(1477751916.508:102): avc: granted {
      search } for pid=6330 comm="main" name="/" dev="cgroup" ino=12459
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:cgroup:s0 tclass=dir
      
      Bug: 32246161
      Test: policy compiles
      Test: dumpstate no longer generates the audit messages above.
      Change-Id: Id5afe2ebeb24f8a7407aac1a0a09806b1521b0e4
      2c8ea36a
  24. Oct 28, 2016
    • Nick Kralevich's avatar
      Get rid of auditallow spam. · 79a08e13
      Nick Kralevich authored
      Fixes the following SELinux messages when running adb bugreport:
      
      avc: granted { read } for name="libart.so" dev="dm-0" ino=1886
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0 tclass=file
      
      avc: granted { read open } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { getattr } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read execute } for path="/system/lib64/libart.so"
      dev="dm-0" ino=1886 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:libart_file:s0 tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { read } for path="/system/lib64/libart.so" dev="dm-0"
      ino=1886 scontext=u:r:dumpstate:s0 tcontext=u:object_r:libart_file:s0
      tclass=file
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { getattr } for path="/data/dalvik-cache/arm64" dev="dm-2"
      ino=106290 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=dir
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { search } for name="arm64" dev="dm-2" ino=106290
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { getattr } for
      path="/data/dalvik-cache/arm64/system@framework@boot.art" dev="dm-2"
      ino=106318 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { search } for name="arm64" dev="dm-2" ino=106290
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      avc: granted { read } for name="system@framework@boot.art" dev="dm-2"
      ino=106318 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      avc: granted { read open } for
      path="/data/dalvik-cache/arm64/system@framework@boot.art" dev="dm-2"
      ino=106318 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:dalvikcache_data_file:s0 tclass=file
      
      avc: granted { search } for name="dalvik-cache" dev="dm-2" ino=106289
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:dalvikcache_data_file:s0
      tclass=dir
      
      [  169.349480] type=1400 audit(1477679159.734:129): avc: granted { read
      } for pid=6413 comm="main" name="ipv6_route" dev="proc" ino=4026535947
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350030] type=1400 audit(1477679159.734:130): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350361] type=1400 audit(1477679159.734:130): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350399] type=1400 audit(1477679159.734:131): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.350963] type=1400 audit(1477679159.734:131): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/ipv6_route"
      dev="proc" ino=4026535947 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351002] type=1400 audit(1477679159.734:132): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351330] type=1400 audit(1477679159.734:132): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351366] type=1400 audit(1477679159.734:133): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351861] type=1400 audit(1477679159.734:133): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.351910] type=1400 audit(1477679159.734:134): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353105] type=1400 audit(1477679159.734:134): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353186] type=1400 audit(1477679159.734:135): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353594] type=1400 audit(1477679159.734:135): avc: granted { read
      } for pid=6413 comm="main" name="if_inet6" dev="proc" ino=4026535946
      scontext=u:r:dumpstate:s0 tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.353636] type=1400 audit(1477679159.734:136): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.354230] type=1400 audit(1477679159.734:136): avc: granted { read
      open } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.354437] type=1400 audit(1477679159.734:137): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      [  169.395359] type=1400 audit(1477679159.734:137): avc: granted {
      getattr } for pid=6413 comm="main" path="/proc/6413/net/if_inet6"
      dev="proc" ino=4026535946 scontext=u:r:dumpstate:s0
      tcontext=u:object_r:proc_net:s0 tclass=file
      
      Test: policy compiles
      Test: adb bugreport runs without auditallow messages above.
      Bug: 32246161
      Change-Id: Ie0ab2ed3c6babc1f93d3b8ae47c92dd905ebc93a
      79a08e13
  25. Oct 07, 2016
  26. Oct 06, 2016
    • dcashman's avatar
      Split general policy into public and private components. · cc39f637
      dcashman authored
      Divide policy into public and private components.  This is the first
      step in splitting the policy creation for platform and non-platform
      policies.  The policy in the public directory will be exported for use
      in non-platform policy creation.  Backwards compatibility with it will
      be achieved by converting the exported policy into attribute-based
      policy when included as part of the non-platform policy and a mapping
      file will be maintained to be included with the platform policy that
      maps exported attributes of previous versions to the current platform
      version.
      
      Eventually we would like to create a clear interface between the
      platform and non-platform device components so that the exported policy,
      and the need for attributes is minimal.  For now, almost all types and
      avrules are left in public.
      
      Test: Tested by building policy and running on device.
      
      Change-Id: Idef796c9ec169259787c3f9d8f423edf4ce27f8c
      cc39f637
  27. Oct 04, 2016
  28. Sep 27, 2016
    • Lorenzo Colitti's avatar
      Don't allow dumpstate to call ioctl on netlink_tcpdiag_socket. · a8239c61
      Lorenzo Colitti authored
      This fixes the build error:
      
      =====
      libsepol.report_assertion_extended_permissions: neverallowxperm on line 166 of system/sepolicy/domain.te (or line 9201 of policy.conf) violated by
      allow dumpstate dumpstate:netlink_tcpdiag_socket { ioctl };
      libsepol.check_assertions: 1 neverallow failures occurred
      =====
      
      Which is caused, in AOSP and downstream branches, by
      I123e5d40955358665800fe3b86cd5f8dbaeb8717.
      
      Test: builds.
      Change-Id: I925dec63df7c3a0f731b18093a8ac5c70167c970
      a8239c61
    • Lorenzo Colitti's avatar
      Allow dumpstate to run ss. · bb9b4dd8
      Lorenzo Colitti authored
      (cherry picked from commit 63c7ad6e)
      
      Bug: 23113288
      Test: see http://ag/1476096
      Change-Id: I3beb21f1af092c93eceb3d5115f823c1b993727d
      bb9b4dd8
  29. Sep 26, 2016
  30. Sep 23, 2016
  31. Sep 21, 2016
    • Felipe Leme's avatar
      Let system_server writes to dumpstate.options property. · a5a8072f
      Felipe Leme authored
      Currently, we define 4 hardcoded init services to launch dumpstate with
      different command-line options (since dumpstate must be launched by
      root):
      
      - bugreport
      - bugreportplus
      - bugreportwear
      - bugreportremote
      
      This approach does not scale well; a better option is to have just one
      service, and let the framework pass the extra arguments through a system
      property.
      
      BUG: 31649719
      Test: manual
      
      Change-Id: I7ebbb7ce6a0fd3588baca6fd76653f87367ed0e5
      a5a8072f
  32. Sep 13, 2016
Loading