Skip to content
Snippets Groups Projects
  1. Jan 20, 2017
  2. Jan 18, 2017
  3. Jan 17, 2017
    • Alex Klyubin's avatar
      Group all HAL impls using haldomain attribute · f41d89eb
      Alex Klyubin authored
      This marks all HAL domain implementations with the haldomain attribute
      so that rules can be written which apply to all HAL implementations.
      
      This follows the pattern used for appdomain, netdomain and
      bluetoothdomain.
      
      Test: No change to policy according to sesearch.
      Bug: 34180936
      Change-Id: I0cfe599b0d49feed36538503c226dfce41eb65f6
      f41d89eb
  4. 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
  5. Jan 10, 2017
  6. Jan 03, 2017
  7. Dec 29, 2016
  8. Dec 28, 2016
  9. Dec 27, 2016
  10. Dec 17, 2016
  11. Dec 16, 2016
  12. Dec 14, 2016
  13. Dec 13, 2016
  14. 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
  15. 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
  16. Aug 10, 2016
    • Alex Deymo's avatar
      Allow executing update_engine_sideload from recovery. · 27f19427
      Alex Deymo authored
      The recovery flow for A/B devices allows to sideload an OTA downloaded
      to a desktop and apply from recovery. This patch allows the "recovery"
      context to perform all the operations required to apply an update as
      update_engine would do in the background. These rules are now extracted
      into a new attributte called update_engine_common shared between
      recovery and update_engine.
      
      Bug: 27178350
      
      (cherry picked from commit d63084d3)
      
      Change-Id: I1f3e1e83a21e37e09b69cd9c497f87b42b9cbeb1
      27f19427
  17. Aug 09, 2016
    • Alex Deymo's avatar
      Allow executing update_engine_sideload from recovery. · d63084d3
      Alex Deymo authored
      The recovery flow for A/B devices allows to sideload an OTA downloaded
      to a desktop and apply from recovery. This patch allows the "recovery"
      context to perform all the operations required to apply an update as
      update_engine would do in the background. These rules are now extracted
      into a new attributte called update_engine_common shared between
      recovery and update_engine.
      
      Bug: 27178350
      Change-Id: I97b301cb2c039fb002e8ebfb23c3599463ced03a
      d63084d3
  18. Apr 22, 2016
    • Alex Deymo's avatar
      Move boot_control HAL permissions to an attribute. · 7b8413db
      Alex Deymo authored
      The boot_control HAL is library loaded by our daemons (like
      update_engine and update_verifier) that interacts with the bootloader.
      The actual implementation of this library is provided by the vendor and
      its runtime permissions are tied to this implementation which varies a
      lot based on how the bootloader and the partitions it uses are
      structured.
      
      This patch moves these permissions to an attribute so the attribute can
      be expanded on each device without the need to repeat that on each one
      of our daemons using the boot_control HAL.
      
      Bug: 27107517
      
      (cherry picked from commit 0f8d9261)
      
      Change-Id: Icb2653cb89812c0de81381ef48280e4ad1e9535c
      7b8413db
    • Alex Deymo's avatar
      Move boot_control HAL permissions to an attribute. · 0f8d9261
      Alex Deymo authored
      The boot_control HAL is library loaded by our daemons (like
      update_engine and update_verifier) that interacts with the bootloader.
      The actual implementation of this library is provided by the vendor and
      its runtime permissions are tied to this implementation which varies a
      lot based on how the bootloader and the partitions it uses are
      structured.
      
      This patch moves these permissions to an attribute so the attribute can
      be expanded on each device without the need to repeat that on each one
      of our daemons using the boot_control HAL.
      
      Bug: 27107517
      Change-Id: Idfe6a208720b49802b03f70fee4a3e73030dae2e
      0f8d9261
  19. Apr 19, 2016
    • mukesh agrawal's avatar
      limit shell's access to log.* properties · 84cfde22
      mukesh agrawal authored
      Restrict the ability of the shell to set the log.*
      properties. Namely: only allow the shell to set
      such properities on eng and userdebug builds.
      
      The shell (and other domains) can continue to
      read log.* properties on all builds.
      
      While there: harmonize permissions for log.* and
      persist.log.tag. Doing so introduces two changes:
      - log.* is now writable from from |system_app|. This
        mirrors the behavior of persist.log.tag, which is
        writable to support "Developer options" ->
        "Logger buffer sizes" -> "Off".
        (Since this option is visible on user builds, the
        permission is enabled for all builds.)
      - persist.log.tag can now be set from |shell| on
        userdebug_or_eng().
      
      BUG=28221972
      TEST=manual (see below)
      
      Testing details
      - user build (log.tag)
        $ adb shell setprop log.tag.foo V
        $ adb shell getprop log.tag
        <blank line>
        $ adb bugreport | grep log.tag.foo
        [  146.525836] init: avc:  denied  { set } for property=log.tag.foo pid=4644 uid=2000 gid=2000 scontext=u:r:shell:s0 tcontext=u:object_r:log_prop:s0 tclass=property_service permissive=0
        [  146.525878] init: sys_prop: permission denied uid:2000  name:log.tag.foo
      - userdebug build (log.tag)
        $ adb shell getprop log.tag.foo
        <blank line>
        $ adb shell setprop log.tag.foo V
        $ adb shell getprop log.tag.foo
        V
      - user build (persist.log.tag)
        $ adb shell getprop | grep log.tag
        <no match>
        - Developer options -> Logger buffer sizes -> Off
        $ adb shell getprop | grep log.tag
        [persist.log.tag]: [Settings]
        [persist.log.tag.snet_event_log]: [I]
      
      Change-Id: Idf00e7a623723a7c46bf6d01e386aeca92b2ad75
      84cfde22
  20. Dec 14, 2015
    • William Roberts's avatar
      checkfc: add attribute test · ad3cb39e
      William Roberts authored
      
      Enable checkfc to check *_contexts against a set of valid attributes
      which must be associated with all types in the contexts file that
      is being checked.
      
      Since it's imperative that checkfc knows which file its checking to
      choose the proper attribute set, the -s option is introduced to
      indicate the service_contexts file. The property_contexts file continues
      to use the existing -p and file_contexts requires no specification, aka
      it's the default.
      
      Failure examples:
      file_contexts:
      Error: type "init" is not of set: "fs_type, dev_type, file_type"
      
      service_contexts:
      Error: type "init_exec" is not of set: "service_manager_type"
      
      property_contexts:
      Error: type "bluetooth_service" is not of set: "property_type"
      
      Change-Id: I62077e4d0760858a9459e753e14dfd209868080f
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      ad3cb39e
  21. Dec 08, 2015
    • Nick Kralevich's avatar
      Remove property read access for non-core properties · 5a570a4b
      Nick Kralevich authored
      Instead of allowing global read access to all properties,
      only allow read access to the properties which are part of
      core SELinux policy. Device-specific policies are no longer
      readable by default and need to be granted in device-specific
      policy.
      
      Grant read-access to any property where the person has write
      access. In most cases, anyone who wants to write a property
      needs read access to that property.
      
      Change-Id: I2bd24583067b79f31b3bb0940b4c07fc33d09918
      5a570a4b
    • Nick Kralevich's avatar
      Add initial debugfs labeling support and label /sys/kernel/debug/tracing/trace_marker · 44826cb5
      Nick Kralevich authored
      Add initial support for labeling files on /sys/kernel/debug.
      The kernel support was added in https://android-review.googlesource.com/122130
      but the userspace portion of the change was never completed until now.
      
      Start labeling the file /sys/kernel/debug/tracing/trace_marker . This
      is the trace_marker file, which is written to by almost all processes
      in Android. Allow global write access to this file.
      
      This change should be submitted at the same time as the system/core
      commit with the same Change-Id as this patch.
      
      Change-Id: Id1d6a9ad6d0759d6de839458890e8cb24685db6d
      44826cb5
  22. Nov 03, 2015
    • Jeff Vander Stoep's avatar
      Create attribute for moving perms out of domain · d22987b4
      Jeff Vander Stoep authored
      Motivation: Domain is overly permissive. Start removing permissions
      from domain and assign them to the domain_deprecated attribute.
      Domain_deprecated and domain can initially be assigned to all
      domains. The goal is to not assign domain_deprecated to new domains
      and to start removing domain_deprecated where it is not required or
      reassigning the appropriate permissions to the inheriting domain
      when necessary.
      
      Bug: 25433265
      Change-Id: I8b11cb137df7bdd382629c98d916a73fe276413c
      d22987b4
  23. Jun 08, 2015
    • dcashman's avatar
      Remove service_manager_local_audit_domain. · 4b4b2b92
      dcashman authored
      service_manager_local_audit_domain was used to fine tune the service_manager
      auditallow rules when introducing the service_manager SELinux rules.  This is no
      longer needed.
      
      (cherry-pick of commit: eab26faa)
      
      Bug: 21656807
      Change-Id: Ia042a887e7bf9eb2a2b08b8d831e68dfe6395f75
      4b4b2b92
    • dcashman's avatar
      Remove service_manager_local_audit_domain. · eab26faa
      dcashman authored
      service_manager_local_audit_domain was used to fine tune the service_manager
      auditallow rules when introducing the service_manager SELinux rules.  This is no
      longer needed.
      
      Bug: 21656807
      Change-Id: Ia042a887e7bf9eb2a2b08b8d831e68dfe6395f75
      eab26faa
  24. Apr 09, 2015
    • dcashman's avatar
      Enforce more specific service access. · bd7f5803
      dcashman authored
      Move the remaining services from tmp_system_server_service to appropriate
      attributes and remove tmp_system_server and associated logging:
      
      registry
      restrictions
      rttmanager
      scheduling_policy
      search
      sensorservice
      serial
      servicediscovery
      statusbar
      task
      textservices
      telecom_service
      trust_service
      uimode
      updatelock
      usagestats
      usb
      user
      vibrator
      voiceinteraction
      wallpaper
      webviewupdate
      wifip2p
      wifi
      window
      
      Bug: 18106000
      Change-Id: Ia0a6d47099d82c53ba403af394537db6fbc71ca0
      bd7f5803
  25. Apr 03, 2015
    • dcashman's avatar
      Add system_api_service and app_api_service attributes. · d12993f0
      dcashman authored
      System services differ in designed access level.  Add attributes reflecting this
      distinction and label services appropriately.  Begin moving access to the newly
      labeled services by removing them from tmp_system_server_service into the newly
      made system_server_service attribute.  Reflect the move of system_server_service
      from a type to an attribute by removing access to system_server_service where
      appropriate.
      
      Change-Id: I7fd06823328daaea6d6f96e4d6bd00332382230b
      d12993f0
  26. Feb 28, 2015
  27. Jan 14, 2015
    • dcashman's avatar
      Make system_server_service an attribute. · 4a89cdfa
      dcashman authored
      Temporarily give every system_server_service its own
      domain in preparation for splitting it and identifying
      special services or classes of services.
      
      Change-Id: I81ffbdbf5eea05e0146fd7fd245f01639b1ae0ef
      4a89cdfa
  28. Jul 25, 2014
    • Nick Kralevich's avatar
      Resync lmp-dev-plus-aosp with master · d065f048
      Nick Kralevich authored
      A DO NOT MERGE change merged from lmp-dev to lmp-dev-plus-aosp.
      This is expected, but it's causing unnecessary merge conflicts
      when handling AOSP contributions.
      
      Resolve those conflicts.
      
      This is essentially a revert of bf696327
      for lmp-dev-plus-aosp only.
      
      Change-Id: Icc66def7113ab45176ae015f659cb442d53bce5c
      d065f048
  29. Jul 18, 2014
  30. Jul 15, 2014
    • Riley Spahn's avatar
      Add access control for each service_manager action. · 344fc109
      Riley Spahn authored
      Add SELinux MAC for the service manager actions list
      and find. Add the list and find verbs to the
      service_manager class. Add policy requirements for
      service_manager to enforce policies to binder_use
      macro.
      
      (cherry picked from commit b8511e0d)
      
      Change-Id: I980d4a8acf6a0c6e99a3a7905961eb5564b1be15
      344fc109
  31. Jul 14, 2014
    • Riley Spahn's avatar
      Add access control for each service_manager action. · b8511e0d
      Riley Spahn authored
      Add SELinux MAC for the service manager actions list
      and find. Add the list and find verbs to the
      service_manager class. Add policy requirements for
      service_manager to enforce policies to binder_use
      macro.
      
      Change-Id: I224b1c6a6e21e3cdeb23badfc35c82a37558f964
      b8511e0d
  32. Jun 16, 2014
  33. Jun 12, 2014
    • Riley Spahn's avatar
      Add SELinux rules for service_manager. · f90c41f6
      Riley Spahn authored
      Add a service_mananger class with the verb add.
      Add a type that groups the services for each of the
      processes that is allowed to start services in service.te
      and an attribute for all services controlled by the service
      manager. Add the service_contexts file which maps service
      name to target label.
      
      Bug: 12909011
      Change-Id: I017032a50bc90c57b536e80b972118016d340c7d
      f90c41f6
  34. Jun 11, 2014
    • Stephen Smalley's avatar
      Refactor the shell domains. · 42fb824c
      Stephen Smalley authored
      
      Originally we used the shell domain for ADB shell only and
      the init_shell domain for the console service, both transitioned
      via automatic domain transitions on sh.  So they originally
      shared a common set of rules.  Then init_shell started to be used
      for sh commands invoked by init.<board>.rc files, and we switched
      the console service to just use the shell domain via seclabel entry
      in init.rc.  Even most of the sh command instances in init.<board>.rc
      files have been converted to use explicit seclabel options with
      more specific domains (one lingering use is touch_fw_update service
      in init.grouper.rc).  The primary purpose of init_shell at this point
      is just to shed certain permissions from the init domain when init invokes
      a shell command.  And init_shell and shell are quite different in
      their permission requirements since the former is used now for
      uid-0 processes spawned by init whereas the latter is used for
      uid-shell processes spawned by adb or init.
      
      Given these differences, drop the shelldomain attribute and take those
      rules directly into shell.te.  init_shell was an unconfined_domain(),
      so it loses nothing from this change.  Also switch init_shell to
      permissive_or_unconfined() so that we can see its actual denials
      in the future in userdebug/eng builds.
      
      Change-Id: I6e7e45724d1aa3a6bcce8df676857bc8eef568f0
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      42fb824c
  35. May 09, 2014
Loading