Skip to content
Snippets Groups Projects
  1. Jan 10, 2017
  2. Dec 27, 2016
  3. Dec 08, 2016
    • dcashman's avatar
      Restore app_domain macro and move to private use. · 3e8dbf01
      dcashman authored
      app_domain was split up in commit: 2e00e637 to
      enable compilation by hiding type_transition rules from public policy.  These
      rules need to be hidden from public policy because they describe how objects are
      labeled, of which non-platform should be unaware.  Instead of cutting apart the
      app_domain macro, which non-platform policy may rely on for implementing new app
      types, move all app_domain calls to private policy.
      
      (cherry-pick of commit: 76035ea0)
      
      Bug: 33428593
      Test: bullhead and sailfish both boot. sediff shows no policy change.
      Change-Id: I4beead8ccc9b6e13c6348da98bb575756f539665
      3e8dbf01
  4. Dec 07, 2016
  5. 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
  6. Sep 16, 2016
  7. Sep 11, 2016
    • Jeff Vander Stoep's avatar
      Enforce ioctl command whitelisting on all sockets · bff98015
      Jeff Vander Stoep authored
      Remove the ioctl permission for most socket types. For others, such as
      tcp/udp/rawip/unix_dgram/unix_stream set a default unprivileged whitelist
      that individual domains may extend (except where neverallowed like
      untrusted_app). Enforce via a neverallowxperm rule.
      
      Change-Id: I15548d830f8eff1fd4d64005c5769ca2be8d4ffe
      bff98015
  8. Sep 10, 2016
  9. Aug 29, 2016
  10. Apr 06, 2016
    • Daniel Rosenberg's avatar
      Expand bluetooth access to media_rw_data_file for now. · 4a0c8036
      Daniel Rosenberg authored
      With sdcardfs, we no longer have a separate sdcardd acting as
      an intermediate between the outside world and /data/media.
      Unless we modify sdcardfs to change contexts, we need these.
      
      Remove this patch if sdcardfs is updated to change the
      secontext of fs accesses.
      
      Bug: 28040634
      
      Change-Id: I492c87e9f232c57f43abd09b7864b52847bc3555
      4a0c8036
  11. Apr 05, 2016
    • Daniel Rosenberg's avatar
      Allow search/getattr access to media_rw_data_file for now. · b80bdef0
      Daniel Rosenberg authored
      With sdcardfs, we no longer have a separate sdcardd acting as
      an intermediate between the outside world and /data/media.
      Unless we modify sdcardfs to change contexts, we need these.
      Added for: system_server, dumpstate, and bluetooth
      
      Remove this patch if sdcardfs is updated to change the
      secontext of fs accesses.
      
      Bug: 27932396
      Change-Id: I294cfe23269b7959586252250f5527f13e60529b
      b80bdef0
  12. Mar 24, 2016
  13. Feb 29, 2016
    • Nick Kralevich's avatar
      Allow bluetooth access to the tun device. · ba12da95
      Nick Kralevich authored
      Bluetooth uses the tun device for tethering. Allow access.
      
        STEPS TO REPRODUCE:
        0. Have two devices to test on, say Device A and Device B
        1. On Device A, Go to settings ->Bluetooth .
        2. Turn on the Bluetooth .
        3. Pair it with device B
        4. Tap on the paired device
      
        OBSERVED RESULTS:
        -Bluetooth share crash is observed with "Bluetooth share has stopped"
        error message
        -Unable to use Bluetooth tethering due to this issue
      
        EXPECTED RESULTS:
        No crash and Bluetooth devices should be able to connect for tethering
      
      Addresses the following denial:
      
      com.android.bluetooth: type=1400 audit(0.0:131): avc: denied { open }
      for comm=425420536572766963652043616C6C path="/dev/tun" dev="tmpfs"
      ino=12340 scontext=u:r:bluetooth:s0 tcontext=u:object_r:tun_device:s0
      tclass=chr_file permissive=0
      
      Bug: 27372573
      
      (cherry picked from commit 9a1347ee)
      
      Change-Id: Ibd16e48c09fe80ebb4f3779214de3b4806c12497
      ba12da95
    • Nick Kralevich's avatar
      Allow bluetooth access to the tun device. · 9a1347ee
      Nick Kralevich authored
      Bluetooth uses the tun device for tethering. Allow access.
      
        STEPS TO REPRODUCE:
        0. Have two devices to test on, say Device A and Device B
        1. On Device A, Go to settings ->Bluetooth .
        2. Turn on the Bluetooth .
        3. Pair it with device B
        4. Tap on the paired device
      
        OBSERVED RESULTS:
        -Bluetooth share crash is observed with "Bluetooth share has stopped"
        error message
        -Unable to use Bluetooth tethering due to this issue
      
        EXPECTED RESULTS:
        No crash and Bluetooth devices should be able to connect for tethering
      
      Addresses the following denial:
      
      com.android.bluetooth: type=1400 audit(0.0:131): avc: denied { open }
      for comm=425420536572766963652043616C6C path="/dev/tun" dev="tmpfs"
      ino=12340 scontext=u:r:bluetooth:s0 tcontext=u:object_r:tun_device:s0
      tclass=chr_file permissive=0
      
      Bug: 27372573
      Change-Id: I07724d8d68ffcdda691f1179787a4f40a0ab1c73
      9a1347ee
  14. Feb 22, 2016
  15. Feb 10, 2016
  16. Jan 27, 2016
  17. Dec 29, 2015
  18. Dec 28, 2015
  19. Dec 08, 2015
  20. Dec 03, 2015
    • Jeff Vander Stoep's avatar
      Further restrict access to tun_device · e555f4b9
      Jeff Vander Stoep authored
      Remove bluetooth's access to tun_device. Auditallow rule demonstrates
      that it's not used.
      
      Strengthen the neverallow on opening tun_device to include all Apps.
      
      Bug: 24744295
      Change-Id: Iba85ba016b1e24c6c12d5b33e46fe8232908aac1
      e555f4b9
  21. Nov 18, 2015
    • Nick Kralevich's avatar
      Move bluetoothdomain rules into their own file. · 85dcd53b
      Nick Kralevich authored
      Don't mix bluetooth rules with bluetoothdomain. The bluetoothdomain
      rules are used by several other SELinux domains, not just bluetooth,
      and keeping them in the same file is confusing.
      
      Change-Id: I487251ab1c1392467a39c7a87328cdaf802fc1f8
      85dcd53b
  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. Oct 15, 2015
  24. Oct 14, 2015
  25. Oct 08, 2015
    • Johan Redestig's avatar
      Allow bluetooth to find the drmservice · 32e5e31a
      Johan Redestig authored
      Address the following denial:
        SELinux  E  avc:  denied  { find } for service=drm.drmManager scontext=u:r:bluetooth:s0 tcontext=u:object_r:drmserver_service:s0
      
      This denial is triggered by Bluetooth when MmsFileProvider.java is
      using the PduPersister which in turn is using DRM.
      
      Change-Id: I4c077635f8afa39e6bc5e10178c3a7ae3cb6a9ea
      32e5e31a
  26. Oct 07, 2015
    • Jeff Vander Stoep's avatar
      Do not allow untrusted_app to open tun_device · de53051a
      Jeff Vander Stoep authored
      Third party vpn apps must receive open tun fd from the framework
      for device traffic.
      
      neverallow untrusted_app open perm and auditallow bluetooth
      access to see if the neverallow rule can be expanded to include
      all of appdomain.
      
      Bug: 24677682
      Change-Id: I68685587228a1044fe1e0f96d4dc08c2adbebe78
      de53051a
  27. Sep 01, 2015
  28. May 07, 2015
    • William Roberts's avatar
      Replace unix_socket_connect() and explicit property sets with macro · 2f5a6a96
      William Roberts authored
      
      A common source of mistakes when authoring sepolicy is properly
      setting up property sets. This is a 3 part step of:
      1. Allowing the unix domain connection to the init/property service
      2. Allowing write on the property_socket file
      3. Allowing the set on class property_service
      
      The macro unix_socket_connect() handled 1 and 2, but could be
      confusing for first time policy authors. 3 had to be explicitly
      added.
      
      To correct this, we introduce a new macros:
      set_prop(sourcedomain, targetprop)
      
      This macro handles steps 1, 2 and 3.
      
      No difference in sediff is expected.
      
      (cherrypicked from commit 625a3526)
      
      Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@linux.intel.com>
      2f5a6a96
    • William Roberts's avatar
      Replace unix_socket_connect() and explicit property sets with macro · 625a3526
      William Roberts authored
      
      A common source of mistakes when authoring sepolicy is properly
      setting up property sets. This is a 3 part step of:
      1. Allowing the unix domain connection to the init/property service
      2. Allowing write on the property_socket file
      3. Allowing the set on class property_service
      
      The macro unix_socket_connect() handled 1 and 2, but could be
      confusing for first time policy authors. 3 had to be explicitly
      added.
      
      To correct this, we introduce a new macros:
      set_prop(sourcedomain, targetprop)
      
      This macro handles steps 1, 2 and 3.
      
      No difference in sediff is expected.
      
      Change-Id: I630ba0178439c935d08062892990d43a3cc1239e
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@linux.intel.com>
      625a3526
  29. Apr 13, 2015
  30. 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
  31. Apr 08, 2015
    • dcashman's avatar
      Enforce more specific service access. · 03a6f64f
      dcashman authored
      Move the following services from tmp_system_server_service to appropriate
      attributes:
      
      network_management
      network_score
      notification
      package
      permission
      persistent
      power
      print
      processinfo
      procstats
      
      Bug: 18106000
      Change-Id: I9dfb41fa41cde72ef0059668410a2e9eb1af491c
      03a6f64f
  32. Apr 07, 2015
    • dcashman's avatar
      Enforce more specific service access. · 91b7c67d
      dcashman authored
      Move the following services from tmp_system_server_service to appropriate
      attributes:
      
      jobscheduler
      launcherapps
      location
      lock_settings
      media_projection
      media_router
      media_session
      mount
      netpolicy
      netstats
      
      Bug: 18106000
      Change-Id: Ia82d475ec41f658851f945173c968f4abf57e7e1
      91b7c67d
    • dcashman's avatar
      Enforce more specific service access. · 3cc6fc5f
      dcashman authored
      Move the following services from tmp_system_server_service to appropriate
      attributes:
      
      diskstats
      display
      dreams
      dropbox
      ethernet
      fingerprint
      graphicstats
      hardware
      hdmi_control
      input_method
      input_service
      
      Bug: 18106000
      Change-Id: Iadd8aab9e78d9d39fb00cf0b5a95fa1927d02095
      3cc6fc5f
    • dcashman's avatar
      Enforce more specific service access. · d4c78f4b
      dcashman authored
      Move the following services from tmp_system_server_service to appropriate
      attributes:
      
      battery
      bluetooth_manager
      clipboard
      commontime_management
      connectivity
      content
      country_detector
      device_policy
      deviceidle
      
      Bug: 18106000
      Change-Id: I0d0f2a075c0509a783631d88ba453ac13399cdf2
      d4c78f4b
  33. Apr 06, 2015
    • dcashman's avatar
      Assign app_api_service attribute to services. · 4cdea7fc
      dcashman authored
      Assign the alarm, appwidget, assetatlas, audio, backup and batterystats services
      the appropriate service access levels and move into enforcing.
      
      Bug: 18106000
      Change-Id: If3210bb25f3076edfdb6eec36ef6521ace1bd8d7
      4cdea7fc
  34. Apr 03, 2015
    • dcashman's avatar
      Assign app_api_service attribute to services. · b075338d
      dcashman authored
      Move accessibility, account, appops and activity services into enforcing with
      app_api_service level of access, with additional grants to mediaserver and
      isolated app.
      
      Bug: 18106000
      Change-Id: I1d5a79b9223026415f1690e8e9325ec4c270e3dd
      b075338d
    • 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
Loading