Skip to content
Snippets Groups Projects
  1. Mar 04, 2016
  2. Mar 03, 2016
    • Stephen Smalley's avatar
      Update netlink socket classes. · d27df960
      Stephen Smalley authored
      am: 01d95c23
      
      * commit '01d95c23':
        Update netlink socket classes.
      d27df960
    • 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
  3. Mar 02, 2016
    • Alex Deymo's avatar
      New postinstall domain and rules to run post-install program. · 6cb2c893
      Alex Deymo authored
      When using the A/B updater, a device specific hook is sometimes needed
      to run after the new partitions are updated but before rebooting into
      the new image. This hook is referred to throughout the code as the
      "postinstall" step.
      
      This patch creates a new execution domain "postinstall" which
      update_engine will use to run said hook. Since the hook needs to run
      from the new image (namelly, slot "B"), update_engine needs to
      temporarly mount this B partition into /postinstall and then run a
      program from there.
      
      Since the new program in B runs from the old execution context in A, we
      can't rely on the labels set in the xattr in the new filesystem to
      enforce the policies baked into the old running image. Instead, when
      temporarily mounting the new filesystem in update_engine, we override
      all the new file attributes with the new postinstall_file type by
      passing "context=u:object_r:postinstall_file:s0" to the mount syscall.
      This allows us to set new rules specific to the postinstall environment
      that are consistent with the rules in the old system.
      
      Bug: 27177071
      TEST=Deployed a payload with a trivial postinstall script to edison-eng.
      
      Change-Id: Ib06fab92afb45edaec3c9c9872304dc9386151b4
      6cb2c893
    • Nick Kralevich's avatar
      suppress unnecessary makefile output · 1274aa15
      Nick Kralevich authored
      am: 6ef10bd4
      
      * commit '6ef10bd4':
        suppress unnecessary makefile output
      1274aa15
  4. Mar 01, 2016
    • Nick Kralevich's avatar
      suppress unnecessary makefile output · 6ef10bd4
      Nick Kralevich authored
      checkpolicy spits out a bunch of unnecessary lines during normal
      operation, which bloat the logs and hide other more important
      warnings. Suppress the normal output.
      
      SELinux compile time errors are printed to stderr, and are
      uneffected by this change.
      
      Change-Id: I07f2cbe8afcd14abf1c025355a169b5214ed5c6e
      6ef10bd4
  5. Feb 29, 2016
    • Nick Kralevich's avatar
      Allow bluetooth access to the tun device. · 087601e0
      Nick Kralevich authored
      am: 9a1347ee
      
      * commit '9a1347ee':
        Allow bluetooth access to the tun device.
      087601e0
    • 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
  6. Feb 27, 2016
    • Nick Kralevich's avatar
      Don\'t allow permissive SELinux domains on user builds. · 0551e9e8
      Nick Kralevich authored
      am: bca98efa
      
      * commit 'bca98efa':
        Don't allow permissive SELinux domains on user builds.
      0551e9e8
    • Nick Kralevich's avatar
      Don't allow permissive SELinux domains on user builds. · bca98efa
      Nick Kralevich authored
      It's a CTS requirement that all SELinux domains be in
      enforcing mode. Add the same assertion to the build system
      when targeting user builds.
      
      In particular, this avoids a situation where device integrity
      checking is enabled on user builds, but permissive denials
      are being generated, causing the device to unexpectedly reboot
      into safe mode.
      
      A developer wanting to put an SELinux domain into permissive
      mode for userdebug/eng purposes can write the following
      in their policy:
      
        userdebug_or_eng(`
          permissive foo;
        ')
      
      Bug: 26902605
      Bug: 27313768
      Change-Id: Ic0971d9e96a28f2a98f9d56a547661d24fb81a21
      bca98efa
  7. Feb 24, 2016
  8. Feb 23, 2016
  9. Feb 22, 2016
    • Tao Bao's avatar
      Add recovery service. · fe06f87e
      Tao Bao authored
      am: 65b5fde9
      
      * commit '65b5fde9':
        Add recovery service.
      fe06f87e
    • Tao Bao's avatar
      Add recovery service. · 65b5fde9
      Tao Bao authored
      RecoverySystemService is separated from PowerManagerService as a
      dedicated system service to handle recovery related requests (such as
      invoking uncrypt to uncrypt an OTA package on /data or to set up /
      clear the bootloader control block (i.e. /misc) and etc).
      
      The matching CL in frameworks/base is in:
        Change-Id: Ic606fcf5b31c54ce54f0ab12c1768fef0fa64560.
      
      Bug: 26830925
      Change-Id: Iee0583c458f784bfa422d0f7af5d1f2681d9609e
      65b5fde9
  10. Feb 19, 2016
  11. Feb 17, 2016
  12. Feb 16, 2016
  13. Feb 10, 2016
    • Sami Tolvanen's avatar
      Allow logd.auditd to reboot to safe mode · 9c168711
      Sami Tolvanen authored
      Bug: 26902605
      Change-Id: Ica825cf2af74f5624cf4091544bd24bb5482dbe7
      9c168711
    • Daniel Cashman's avatar
      c1e48835
    • dcashman's avatar
      Remove appdomain sysfs auditallow. · 0b80f4dc
      dcashman authored
      Large numbers of denials have been collected.  Remove from logging until
      further action is taken to address existing denials and remove sysfs
      access from additional appdomains.
      
      Change-Id: Ia7ad6264d85490824089b5074bf9c22303cc864a
      0b80f4dc
    • Jeffrey Vander Stoep's avatar
      Merge changes from topic 'checkseapp-fixups' · e931bdd6
      Jeffrey Vander Stoep authored
      * changes:
        checkseapp: remove .data = NULL assignments
        checkseapp: remove data types form static map
        checkseapp: generalize input validation
        checkseapp: update error message output
        checkseapp: declare internal function as static
      e931bdd6
    • Nick Kralevich's avatar
      uncrypt: drop generic block_device allow rules · eb43e654
      Nick Kralevich authored
      Currently, uncrypt has write access to "block_device". This is
      the generic label used for a file in /dev/block which doesn't
      have a more specific label assigned to it.
      
      This is an overly broad grant. Commit a10f789d
      started the process of deprecating "block_device" access in favor
      of "misc_block_device".
      
      This change completes the deprecation and removes the overly
      broad grant. Also update the neverallow rules so that
      this overly broad rule cannot be reintroduced into uncrypt.
      
      Bug: 25091603
      Change-Id: Ifc5fa412db2f95726ae89c32c577a6659885ae55
      eb43e654
  14. Feb 09, 2016
    • Tao Bao's avatar
      update_engine: Allow to access bootctrl_block_device. · 3ec34ceb
      Tao Bao authored
      update_engine needs to access bootctrl_block_device to get and set the slot to boot.
      avc: denied { write } for name="mmcblk0boot1" dev="tmpfs" ino=1266 scontext=u:r:update_engine:s0 tcontext=u:object_r:bootctrl_block_device:s0 tclass=blk_file
      avc: denied { open } for path="/dev/block/mmcblk0boot1" dev="tmpfs" ino=1266 scontext=u:r:update_engine:s0 tcontext=u:object_r:bootctrl_block_device:s0 tclass=blk_file
      
      Also track the name change of the native binder service.
      avc:  denied  { add } for service=android.os.UpdateEngineService pid=210 uid=0 scontext=u:r:update_engine:s0 tcontext=u:object_r:default_android_service:s0 tclass=service_manager
      
      Bug: 27106053
      Change-Id: Idbfef18578489db33fead0721e8f26d63db5ce09
      3ec34ceb
    • William Roberts's avatar
      untrusted_app: confine filesystem creation to sandbox · bd0768cc
      William Roberts authored
      
      untrusted_apps could be allowed to create/unlink files in world
      accessible /data locations. These applications could create
      files in a way that would need cap dac_override to remove from
      the system when they are uninstalled and/or leave orphaned
      data behind.
      
      Keep untrusted_app file creation to sandbox, sdcard and media
      locations.
      
      Change-Id: Ife680cb9425dad8223651f16b9be8a3179839ec3
      Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
      bd0768cc
    • Andre Eisenbach's avatar
      Allow system apps (Settings) to configure Bluetooth properties · eebdb473
      Andre Eisenbach authored
      Bug: 27078729
      Change-Id: I74115521e1def661dea5575eb532b93fe7f1f4ad
      eebdb473
  15. Feb 06, 2016
  16. Feb 05, 2016
    • dcashman's avatar
      Allow domain to read proc dirs. · abf31acb
      dcashman authored
      Ability to read all of proc was placed in domain_deprecated with the
      intention of reducing information leaking from proc.  Many processes try
      to read proc dirs, though.  Allow this with the belief that information
      leakage is from the proc files themselves rather than dir structure.
      
      Address the following denial:
      avc: denied { read } for name="/" dev="proc" ino=1 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=dir permissive=0
      
      Bug: 26833472
      Change-Id: I975ae022c093e1cf80de21487dc11e49f938e5a3
      abf31acb
    • Nick Kralevich's avatar
      Replace "neverallow domain" by "neverallow *" · 35a14514
      Nick Kralevich authored
      Modify many "neverallow domain" rules to be "neverallow *" rules
      instead. This will catch more SELinux policy bugs where a label
      is assigned an irrelevant rule, as well as catch situations where
      a domain attribute is not assigned to a process.
      
      Change-Id: I5b83a2504c13b384f9dff616a70ca733b648ccdf
      35a14514
    • Daichi Hirono's avatar
      Add SELinux label for app fuse. · e178ac5a
      Daichi Hirono authored
      The labels for filesystem and files are assigned by vold with using
      context= mount option.
      
      Change-Id: I8a9d701a46a333093a27107fc3c52b17a2af1a94
      e178ac5a
  17. Feb 04, 2016
  18. Feb 03, 2016
    • Daichi Hirono's avatar
      Fix SELinux warning when passing fuse FD from system server. · 59e3d7b4
      Daichi Hirono authored
      Before applying the CL, Android shows the following error when passing
      FD of /dev/fuse.
      
      > Binder_2: type=1400 audit(0.0:38): avc: denied { getattr } for
      > path="/dev/fuse" dev="tmpfs" ino=9300 scontext=u:r:system_server:s0
      > tcontext=u:object_r:fuse_device:s0 tclass=chr_file permissive=0
      
      Change-Id: I59dec819d79d4e2e1a8e42523b6f521481cb2afd
      59e3d7b4
  19. Feb 01, 2016
  20. Jan 29, 2016
Loading