Skip to content
Snippets Groups Projects
  1. Apr 18, 2017
    • Dan Cashman's avatar
      Remove vndservice_manager object classes. · 2f1c7ba7
      Dan Cashman authored
      vndservicemanager is a copy of servicemanager, and so has the exact
      same properties.  This should be reflected in the sharing of an object
      manager in SELinux policy, rather than creating a second one, which is
      effectively an attempt at namespacing based on object rather than type
      labels.  hwservicemanager, however, provides different and additional
      functionality that may be reflected in changed permissions, though they
      currently map to the existing servicemanager permissions.  Keep the new
      hwservice_manager object manager but remove the vndservice_manager one.
      
      Bug: 34454312
      Bug: 36052864
      Test: policy builds and device boots.
      Change-Id: I9e0c2757be4026101e32ba780f1fa67130cfa14e
      2f1c7ba7
  2. Apr 06, 2017
  3. Feb 06, 2017
    • Stephen Smalley's avatar
      Remove obsolete netlink_firewall_socket and netlink_ip6fw_socket classes. · 4921085d
      Stephen Smalley authored
      
      The implementation for NETLINK_FIREWALL and NETLINK_IP6_FW protocols
      was removed from the kernel in commit
      d16cf20e2f2f13411eece7f7fb72c17d141c4a84 ("netfilter: remove ip_queue
      support") circa Linux 3.5.  Unless we need to retain compatibility
      for kernels < 3.5, we can drop these classes from the policy altogether.
      
      Possibly the neverallow rule in app.te should be augmented to include
      the newer netlink security classes, similar to webview_zygote, but
      that can be a separate change.
      
      Test: policy builds
      
      Change-Id: Iab9389eb59c96772e5fa87c71d0afc86fe99bb6b
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      4921085d
    • Stephen Smalley's avatar
      Define extended_socket_class policy capability and socket classes · 431bdd9f
      Stephen Smalley authored
      
      Add a definition for the extended_socket_class policy capability used
      to enable the use of separate socket security classes for all network
      address families rather than the generic socket class.  The capability
      also enables the use of separate security classes for ICMP and SCTP
      sockets, which were previously mapped to rawip_socket class.  Add
      definitions for the new socket classes and access vectors enabled by
      this capability.  Add the new socket classes to the socket_class_set
      macro, and exclude them from webview_zygote domain as with other socket
      classes.
      
      Allowing access by specific domains to the new socket security
      classes is left to future commits.  Domains previously allowed
      permissions to the 'socket' class will require permission to the
      more specific socket class when running on kernels with this support.
      
      The kernel support will be included upstream in Linux 4.11.  The
      relevant kernel commits are da69a5306ab92e07224da54aafee8b1dccf024f6
      ("selinux: support distinctions among all network address families"),
      ef37979a2cfa3905adbf0c2a681ce16c0aaea92d ("selinux: handle ICMPv6
      consistently with ICMP"), and b4ba35c75a0671a06b978b6386b54148efddf39f
      ("selinux: drop unused socket security classes").
      
      This change requires selinux userspace commit
      d479baa82d67c9ac56c1a6fa041abfb9168aa4b3 ("libsepol: Define
      extended_socket_class policy capability") in order to build the
      policy with this capability enabled.  This commit is already in
      AOSP master.
      
      Test: policy builds
      
      Change-Id: I788b4be9f0ec0bf2356c0bbef101cd42a1af49bb
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      431bdd9f
    • Stephen Smalley's avatar
      Define the user namespace capability classes and access vectors. · 8a003607
      Stephen Smalley authored
      
      Kernel commit 8e4ff6f228e4722cac74db716e308d1da33d744f
      (selinux: distinguish non-init user namespace capability checks)
      introduced support for distinguishing capability
      checks against a target associated with the init user namespace
      versus capability checks against a target associated with a non-init
      user namespace by defining and using separate security classes for the
      latter.  This support is needed on Linux to support e.g. Chrome usage of
      user namespaces for the Chrome sandbox without needing to allow Chrome to
      also exercise capabilities on targets in the init user namespace.
      
      Define the new security classes and access vectors for the Android policy.
      Refactor the original capability and capability2 access vector definitions
      as common declarations to allow reuse by the new cap_userns and cap2_userns
      classes.
      
      This change does not allow use of the new classes by any domain; that
      is deferred to future changes as needed if/when Android enables user
      namespaces and the Android version of Chrome starts using them.
      
      The kernel support went upstream in Linux 4.7.
      
      Based on the corresponding refpolicy patch by Chris PeBenito, but
      reworked for the Android policy.
      
      Test: policy builds
      
      Change-Id: I71103d39e93ee0e8c24816fca762944d047c2235
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      8a003607
  4. 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
  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. Mar 03, 2016
    • Stephen Smalley's avatar
      Update netlink socket classes. · 423fd19d
      Stephen Smalley authored
      
      Define new netlink socket security classes introduced by upstream kernel commit
      6c6d2e9bde1c1c87a7ead806f8f5e2181d41a652 ("selinux: update netlink socket
      classes").  This was merged in Linux 4.2 and is therefore only required
      for Android kernels based on 4.2 or newer (e.g. the android-4.4 branch
      of the kernel/common tree).
      
      Add the new socket classes to socket_class_set.
      Add an initial set of allow rules although further refinement
      will likely be necessary.  Any allow rule previously written
      on :netlink_socket may need to be rewritten or duplicated for
      one or more of the more specific classes.  For now, we retain
      the existing :netlink_socket rules for compatibility on older kernels.
      
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      
      (cherry picked from commit 01d95c23)
      
      Change-Id: Ic00a0d474730cda91ba3bc387e0cc14482f82114
      423fd19d
    • Stephen Smalley's avatar
      Update netlink socket classes. · 01d95c23
      Stephen Smalley authored
      
      Define new netlink socket security classes introduced by upstream kernel commit
      6c6d2e9bde1c1c87a7ead806f8f5e2181d41a652 ("selinux: update netlink socket
      classes").  This was merged in Linux 4.2 and is therefore only required
      for Android kernels based on 4.2 or newer (e.g. the android-4.4 branch
      of the kernel/common tree).
      
      Add the new socket classes to socket_class_set.
      Add an initial set of allow rules although further refinement
      will likely be necessary.  Any allow rule previously written
      on :netlink_socket may need to be rewritten or duplicated for
      one or more of the more specific classes.  For now, we retain
      the existing :netlink_socket rules for compatibility on older kernels.
      
      Change-Id: I5040b30edd2d374538490a080feda96dd4bae5bf
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      01d95c23
  7. May 26, 2015
  8. Jul 24, 2014
  9. Jun 26, 2014
    • Riley Spahn's avatar
      Adding policies for KeyStore MAC. · 1196d2a5
      Riley Spahn authored
      Add keystore_key class and an action for each action supported
      by keystore. Add policies that replicate the access control that
      already exists in keystore. Add auditallow rules for actions
      not known to be used frequently. Add macro for those domains
      wishing to access keystore.
      
      Change-Id: Iddd8672b9e9b72b45ee208e6eda608cc9dc61edc
      1196d2a5
  10. 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
  11. Apr 04, 2012
    • Stephen Smalley's avatar
      Add policy for property service. · 124720a6
      Stephen Smalley authored
      New property_contexts file for property selabel backend.
      New property.te file with property type declarations.
      New property_service security class and set permission.
      Allow rules for setting properties.
      124720a6
  12. Jan 04, 2012
Loading