Skip to content
Snippets Groups Projects
  1. Jan 27, 2017
    • Janis Danisevskis's avatar
      Preliminary policy for hal_keymaster (TREBLE) · e8acd769
      Janis Danisevskis authored
      This adds the premissions required for
      android.hardware.keymaster@2.0-service to access the keymaster TA
      as well as for keystore and vold to lookup and use
      android.hardware.keymaster@2.0-service.
      
      IT DOES NOT remove the privileges from keystore and vold to access
      the keymaster TA directly.
      
      Test: Run keystore CTS tests
      Bug: 32020919
      
      (cherry picked from commit 5090d6f3)
      
      Change-Id: Ib02682da26e2dbcabd81bc23169f9bd0e832eb19
      e8acd769
    • Badhri Jagan Sridharan's avatar
      sepolicy for usb hal · ae206f16
      Badhri Jagan Sridharan authored
      Bug: 31015010
      
      cherry-pick from b6e4d4bd
      
      Test: checked for selinux denial msgs in the dmesg logs.
      Change-Id: I8285ea05162ea0d75459e873e5c2bad2dbc7e5ba
      ae206f16
  2. Jan 25, 2017
    • Jeff Tinker's avatar
      Add sepolicy for drm HALs · c86f42b9
      Jeff Tinker authored
      bug:32815560
      Change-Id: I494141b47fcd2e7e0cc02aa58d8df9a222060b3f
      c86f42b9
    • Ray Essick's avatar
      rename mediaanalytics->mediametrics, wider access · 39185400
      Ray Essick authored
      reflect the change from "mediaanalytics" to "mediametrics"
      
      Also incorporates a broader access to the service -- e.g. anyone.
      This reflects that a number of metrics submissions come from application
      space and not only from our controlled, trusted media related processes.
      The metrics service (in another commit) checks on the source of any
      incoming metrics data and limits what is allowed from unprivileged
      clients.
      
      Bug: 34615027
      Test: clean build, service running and accessible
      Change-Id: I657c343ea1faed536c3ee1940f1e7a178e813a42
      39185400
  3. Jan 24, 2017
    • Calin Juravle's avatar
      SElinux policies for compiling secondary dex files · e5a1f64a
      Calin Juravle authored
      This CLs adds SElinux policies necessary to compile secondary dex files.
      
      When an app loads secondary dex files via the base class loader the
      files will get reported to PM. During maintance mode PM will compile the
      secondary dex files which were used via the standard installd model
      (fork, exec, change uid and lower capabilities).
      
      What is needed:
      dexoptanalyzer - needs to read the dex file and the boot image in order
      to decide if we need to actually comppile.
      dex2oat - needs to be able to create *.oat files next to the secondary
      dex files.
      
      Test: devices boots
            compilation of secondary dex files works without selinux denials
            cmd package compile --secondary-dex -f -m speed
      com.google.android.gms
      
      Bug: 32871170
      Change-Id: I038955b5bc9a72d49f6c24c1cb76276e0f53dc45
      e5a1f64a
  4. Jan 20, 2017
    • Paul Lawrence's avatar
      tracefs not debugfs · ef2a1709
      Paul Lawrence authored
      Test:   Device boots
              Can take photos
              Run "adb shell atrace -c -b 16000 -t 5 gfx" without root and check produces
              output
              Run "python systrace.py view gfx freq sched am wm dalvik
              binder_driver" from external/chromium-trace after adb root and
              check populated
      Bug: 31856701
      Change-Id: Ic319f8a0a3e395efa7ee8ba33a868ac55cb44fe4
      ef2a1709
    • Alex Klyubin's avatar
      Sort hal_* declarations alphabetically · e1ff7e88
      Alex Klyubin authored
      Test: No change to SELinux policy
      Change-Id: I45d6d6ab0538b9d4768b922cfdc2c972272d0b18
      e1ff7e88
    • Steven Moreland's avatar
      hal_light: add permission to sys/class/leds. · 62aee3b4
      Steven Moreland authored
      /sys/class/leds is the standard location for linux files dealing with
      leds, however the exact contents of this directory is non-standard
      (hence the need for a hal).
      
      Bug: 32022100
      Test: compiles and works for the subset of common files
      Change-Id: I7571d7267d5ed531c4cf95599d5f2acc22287ef4
      62aee3b4
  5. Jan 18, 2017
    • mukesh agrawal's avatar
      allow init and system_server access to tracing · 3a6bc68e
      mukesh agrawal authored
      Revise policy, to allow init and system_server to configure,
      clear, and read kernel trace events. This will enable us to
      debug certain WiFi failures.
      
      Note that system_server is restricted to only accessing
      a wifi-specific trace instance. (Hence, system_server is
      not allowed to interfere with atrace.) Moreover, even for
      the wifi trace instance, system_server is granted limited
      permissions. (system_server can not, e.g., change which
      events are traced.)
      
      Note also that init and system_server are only granted these
      powers on userdebug or eng builds.
      
      The init.te and system_server.te changes resolve the
      following denials:
      
      // Denials when wifi-events.rc configures tracing
      { write } for pid=1 comm="init" name="instances" dev="debugfs" ino=755 scontext=u:r:init:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1
      { add_name } for pid=1 comm="init" name="wifi" scontext=u:r:init:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1
      { create } for pid=1 comm="init" name="wifi" scontext=u:r:init:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1
      { write } for pid=1 comm="init" name="tracing_on" dev="debugfs" ino=18067 scontext=u:r:init:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { write } for pid=1 comm="init" name="buffer_size_kb" dev="debugfs" ino=18061 scontext=u:r:init:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=file permissive=1
      
      // Denials when system_server sets up fail-safe
      // (auto-terminate tracing if system_server dies)
      { search } for pid=882 comm="system_server" name="instances" dev="debugfs" ino=755 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1
      { read } for pid=882 comm="system_server" name="free_buffer" dev="debugfs" ino=18063 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { open } for pid=882 comm="system_server" path="/sys/kernel/debug/tracing/instances/wifi/free_buffer" dev="debugfs" ino=18063 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { getattr } for pid=882 comm="system_server" path="/sys/kernel/debug/tracing/instances/wifi/free_buffer" dev="debugfs" ino=18063 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      
      // Denials when system_server toggles tracing on or off
      // (WifiStateMachine is a thread in system_server)
      { search } for pid=989 comm="WifiStateMachin" name="instances" dev="debugfs" ino=755 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1
      { write } for pid=989 comm="WifiStateMachin" name="tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { open } for pid=989 comm="WifiStateMachin" path="/sys/kernel/debug/tracing/instances/wifi/tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { getattr } for pid=989 comm="WifiStateMachin" path="/sys/kernel/debug/tracing/instances/wifi/tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { write } for pid=989 comm="WifiStateMachin" name="tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { open } for pid=989 comm="WifiStateMachin" path="/sys/kernel/debug/tracing/instances/wifi/tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { getattr } for pid=989 comm="WifiStateMachin" path="/sys/kernel/debug/tracing/instances/wifi/tracing_on" dev="debugfs" ino=18067 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      
      // Denials when system_server reads the event trace
      // (This happens in response to a dumpsys request)
      { search } for pid=3537 comm="Binder:882_B" name="instances" dev="debugfs" ino=755 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_tracing_instances:s0 tclass=dir permissive=1
      { read } for pid=3537 comm="Binder:882_B" name="trace" dev="debugfs" ino=18059 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { open } for pid=3537 comm="Binder:882_B" path="/sys/kernel/debug/tracing/instances/wifi/trace" dev="debugfs" ino=18059 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { getattr } for pid=3537 comm="Binder:882_B" path="/sys/kernel/debug/tracing/instances/wifi/trace" dev="debugfs" ino=18059 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      { write } for pid=3537 comm="Binder:882_B" name="trace" dev="debugfs" ino=18059 scontext=u:r:system_server:s0 tcontext=u:object_r:debugfs_wifi_tracing:s0 tclass=file permissive=1
      
      Bug: 27254565
      Test: manual
      Manual test:
      - Build this CL along with CL:322337
      - Verify that system boots, and that we can connect to GoogleGuest.
        (Testing of actual trace functionality with require some more
        patches in frameworks/opt/net/wifi.)
      $ adb root && adb shell dmesg | egrep 'avc: denied.+debugfs'
      
      Change-Id: Ib6eb4116549277f85bd510d25fb30200f1752f4d
      3a6bc68e
    • 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
    • Eino-Ville Talvala's avatar
      DO NOT MERGE: Camera: Add initial Treble camera HAL sepolicy · 9c43a3ff
      Eino-Ville Talvala authored
      - Allow cameraservice to talk to hwbinder, hwservicemanager
      - Allow hal_camera to talk to the same interfaces as cameraservice
      
      Test: Compiles, confirmed that cameraservice can call hwservicemanager
      Bug: 32991422
      Change-Id: Ied0a3f5f7149e29c468a13887510c78d555dcb2a
      9c43a3ff
    • Jorim Jaggi's avatar
      Revert "property_context: split into platform and non-platform components." · aa03ef26
      Jorim Jaggi authored
      This reverts commit 262edc38.
      
      Fixes: 34370523
      Change-Id: I077d064d4031d40bc48cb39eba310e6c16b9627d
      aa03ef26
    • Sandeep Patil's avatar
      property_context: split into platform and non-platform components. · 262edc38
      Sandeep Patil authored
      
      Bug: 33746484
      Test: Successfully boot with original service and property contexts.
            Successfully boot with split serivce and property contexts.
      
      Change-Id: I7881af8922834dc69b37dae3b06d921e05206564
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      262edc38
    • Sandeep Patil's avatar
      service_context: split into platform and non-platform components. · a058b569
      Sandeep Patil authored
      
      Bug: 33746484
      Test: Successfully boot with original service and property contexts.
            Successfully boot with split serivce and property contexts.
      
      Change-Id: Ide67d37d85273c60b9e387e72fbeb87be6da306a
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      a058b569
  6. Jan 13, 2017
    • Jim Miller's avatar
      New SeLinux policy for fingerprint HIDL · 54e0e5af
      Jim Miller authored
      Move from fingerprintd to new fingerprint_hal and update SeLinux policy.
      
      Test: Boot with no errors related to fingerprint sepolicy
      Bug: 33199080
      Change-Id: Idfde0cb0530e75e705033042f64f3040f6df22d6
      54e0e5af
    • Hridya Valsaraju's avatar
      add selinux policy for GNSS hal · 953c4396
      Hridya Valsaraju authored
      The following are the avc denials that are addressed:
      
      avc: denied { call } for pid=889 comm="system_server"
      scontext=u:r:system_server:s0 tcontext=u:r:hal_gnss_default:s0
      tclass=binder permissive=0
      
      avc: denied { call } for scontext=u:r:hal_gnss_default:s0
      tcontext=u:r:system_server:s0 tclass=binder permissive=0
      
      avc: denied { read } for name="hw" dev="mmcblk0p43" ino=1837
      scontext=u:r:hal_gnss_default:s0 tcontext=u:object_r:system_file:s0
      tclass=dir permissive=0
      
      avc: denied { open } for path="/system/lib64/hw" dev="mmcblk0p43"
      ino=1837 scontext=u:r:hal_gnss_default:s0
      tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
      
      Bug:31974439
      
      Test: Checked that there no more related avc denial messages related to
      the GNSS HAL in dmesg.
      
      Change-Id: I5b43dc088017a5568dd8e442726d2bf52e95b1d5
      953c4396
    • Max Bires's avatar
      Auditing init and ueventd access to chr device files. · 9e7a5b0a
      Max Bires authored
      It seems likely that there is no reason to keep around a number of
      devices that are configured to be included into the pixel kernels. Init
      and ueventd should be the only processes with r/w access to these
      devices, so auditallow rules have been added to ensure that they aren't
      actually used.
      
      /dev/keychord was given its own type since it's one of the few character
      devices that's actually legitimately used and would cause log spam in
      the auditallow otherwise.
      
      Bug: 33347297
      Test: The phone boots without any apparent log spam.
      
      Change-Id: I3dd9557df8a9218b8c802e33ff549d15849216fb
      9e7a5b0a
  7. Jan 12, 2017
  8. Jan 11, 2017
  9. Jan 10, 2017
  10. Jan 09, 2017
  11. Jan 07, 2017
    • ynwang's avatar
      Storaged permission setting · 9fa8823c
      ynwang authored
      Allowing storaged for reading from pseudo filesystems and debugfs.
      
      Bug: 32221677
      
      Change-Id: I837cead9a68f0b399703b64d724cb9c4b205c335
      9fa8823c
  12. Jan 05, 2017
    • dcashman's avatar
      Split file_contexts for on-device compilation. · d225b697
      dcashman authored
      
      Simulate platform and non-platform split by compiling two different
      file_contexts files and loading them together on-device.  Leave the existing
      file_contexts.bin in place until we're ready to build images based on the new
      files.
      
      Bug: 31363362
      Test: Builds and boots without additional denials.
      Change-Id: I7248f876e2230cee3b3cbf386422063da1e3dde0
      
      Bring back file_contexts.bin.
      
      Change-Id: Ifec2c363579151080fdec48e8bc46bbbc8c97674
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      d225b697
  13. Jan 03, 2017
  14. Dec 29, 2016
  15. Dec 28, 2016
  16. Dec 22, 2016
  17. Dec 17, 2016
  18. Dec 16, 2016
    • Steven Moreland's avatar
      Add hal_dumpstate attribute. · d86a30a2
      Steven Moreland authored
      - Also allow dumpstate to talk to hal_dumpstate.
      
      Bug: 31982882
      Test: compiles
      Change-Id: Ib9cf0027ee7e71fa40b9ccc29fc8dccea6977e5c
      d86a30a2
    • Sandeep Patil's avatar
      health: add sepolicy for health hal service · 60e8886c
      Sandeep Patil authored
      
      Test: tested with default health HAL on angler running as service.
      Bug: b/32754732
      
      Change-Id: Ie0b70d43cb23cd0878e1b7b99b9bebdbd70d17c7
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      (cherry picked from commit ef62fd91)
      60e8886c
    • Sandeep Patil's avatar
      healthd: create SEPolicy for 'charger' and reduce healthd's scope · dc08245c
      Sandeep Patil authored
      
      healthd is being split into 'charger' and 'healthd' processes, that
      will never run together. 'charger' is to be run only in charge-only
      and recovery, while healthd runs with Android.
      
      While they both share much of battery monitoring code, they both now
      have reduced scope. E.g. 'charger', doesn't need to use binder anymore
      and healthd doesn't need to do charging ui animation. So, amend the
      SEPolicy for healthd to reduce it's scope and add a new one for charger.
      
      Test: Tested all modes {recovery, charger-only, android} with new policy
      
      Change-Id: If7f81875c605f7f07da4d23a313f308b9dde9ce8
      Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
      (cherry picked from commit c73d0022)
      dc08245c
  19. Dec 14, 2016
  20. Dec 13, 2016
  21. Dec 09, 2016
    • Jeff Sharkey's avatar
      installd has moved on to Binder; goodbye socket! · 8b1d4520
      Jeff Sharkey authored
      After a series of recent commits, installd has fully migrated over
      to Binder, and all socket-based communication has been removed.
      
      Test: builds, boots, apps install fine, pre-OTA dexopt works
      Bug: 13758960, 30944031
      Change-Id: Ia67b6260de58240d057c99b1bbd782b44376dfb5
      8b1d4520
  22. Dec 05, 2016
    • Max's avatar
      /dev/port does not seem to be used, adding in rules to confirm. · c27c23fb
      Max authored
      Only init and ueventd have any access to /dev/port, and neither should
      have any use for it. As it stands, leaving port in just represents
      additional attack surface with no useful functionality, so it should be
      removed if possible, not only from Pixel devices, but from all Android
      devices.
      
      Test: The phone boots successfully
      
      Bug:33301618
      Change-Id: Iedc51590f1ffda02444587d647889ead9bdece3f
      c27c23fb
  23. Dec 03, 2016
    • Ray Essick's avatar
      Allow access to mediaanalytics service · 090f4a4d
      Ray Essick authored
      media framework analytics are gathered in a separate service.
      define a context for this new service, allow various
      media-related services and libraries to access this new service.
      
      Bug: 30267133
      Test: ran media CTS, watched for selinux denials.
      Change-Id: I5aa5aaa5aa9e82465b8024f87ed32d6ba4db35ca
      090f4a4d
  24. Nov 22, 2016
    • Nick Kralevich's avatar
      label /bugreports · d314376d
      Nick Kralevich authored
      /data/bugreports is moving to /bugreports
      
      Bug: 27262109
      Bug: 27204904
      Bug: 32799236
      Test: new symlink is in /bugreports and is labeled correctly
      Change-Id: Ib6a492fba8388bf43debad28cfc851679f8c6151
      d314376d
  25. Nov 21, 2016
    • Nick Kralevich's avatar
      Collapse urandom_device into random_device · 5eadcb8c
      Nick Kralevich authored
      urandom_device and random_device have the exact same security
      properties. Collapse them into one type.
      
      Test: device boots and /dev/urandom is labeled correctly.
      Change-Id: I12da30749291bc5e37d99bc9422bb86cb58cec41
      5eadcb8c
  26. Nov 18, 2016
    • dcashman's avatar
      Move hal_light to attribute. · 3319d5ee
      dcashman authored
      HAL policy defines how the platform and a given HAL interact, but not how the
      HAL is implemented.  This policy should be represented as an attribute that all
      processes implementing the HAL can include.
      
      Bug: 32123421
      Test: Builds.
      Change-Id: I17e5612c0835773c28e14f09e2ce7bdc3f210c15
      3319d5ee
Loading