Skip to content
Snippets Groups Projects
  1. Feb 12, 2014
  2. Feb 11, 2014
  3. Feb 06, 2014
    • rpcraig's avatar
      Address screenrecord denials. · e21871c8
      rpcraig authored
      
      Steps to reproduce across devices.
        adb shell screenrecord --bit-rate 8000000 --time-limit 10 /data/local/tmp/test.mp4
      
      * Allow surfaceflinger to talk to mediaserver
         avc:  denied  { call } for  pid=122 comm="surfaceflinger" scontext=u:r:surfaceflinger:s0 tcontext=u:r:mediaserver:s0 tclass=binder
      
      * Give mediaserver access to gpu_device
         avc:  denied  { read write } for  pid=2793 comm="VideoEncMsgThre" name="kgsl-3d0" dev="tmpfs" ino=6556 scontext=u:r:mediaserver:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
         avc:  denied  { open } for  pid=2793 comm="VideoEncMsgThre" name="kgsl-3d0" dev="tmpfs" ino=6556 scontext=u:r:mediaserver:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
         avc:  denied  { ioctl } for  pid=2793 comm="VideoEncMsgThre" path="/dev/kgsl-3d0" dev="tmpfs" ino=6556 scontext=u:r:mediaserver:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file
      
      Change-Id: Id1812ec95662f4b2433e2989f5fccce6a85c3a41
      Signed-off-by: default avatarrpcraig <rpcraig@tycho.ncsc.mil>
      e21871c8
    • Dave Platt's avatar
      Finish fixing Zygote descriptor leakage problem · 0b218ec5
      Dave Platt authored
      In order to prevent Zygote descriptors from leaking into the child
      environment, they should be closed by the forked-off child process
      before the child switches to the application UID.  These changes close
      the descriptors via dup2(), substituting a descriptor open to
      /dev/null in their place; this allows the Zygote Java code to close
      the FileDescriptor objects cleanly.
      
      This is a multi-project change: dalvik, art, libcore, frameworks/base,
      and external/sepolicy are affected.  The CLs need to be approved
      together, lest the build break or the software fail to boot.
      
      Bug: 12114500
      Change-Id: Ie45ddf6d661a1ea8570cd49dfea76421f2cadf72
      0b218ec5
  4. Feb 05, 2014
    • Nick Kralevich's avatar
      Fix NFC image transfer · 629c98c2
      Nick Kralevich authored
      Image transfer over NFC is broken.
      
        STEPS TO REPRODUCE:
        -----------------------------------------
        1. Launch Gallery and open any picture
        2. Keep two devices close each other
        3. Tap on 'Touch to Beam' option on sender device and observe receiver device
      
        OBSERVED RESULTS:
        'Beam did not complete' message showing in Notification window.
      
        EXPECTED RESULTS:
        Beam should complete successfully and able to share picture through Beam
      
        ADDITIONAL INFORMATION :
        Device : Hammerhead
        Reproducibility : 3/3
      
      Addresses the following denials:
      
      <5>[ 3030.955024] type=1400 audit(1391625834.066:72): avc:  denied  { call } for  pid=311 comm="Binder_2" scontext=u:r:surfaceflinger:s0 tcontext=u:r:nfc:s0 tclass=binder
      <5>[ 3049.606559] type=1400 audit(1391625852.716:74): avc:  denied  { write } for  pid=26850 comm="id.nfc:handover" name="0" dev="fuse" ino=3086221568 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.606802] type=1400 audit(1391625852.716:75): avc:  denied  { add_name } for  pid=26850 comm="id.nfc:handover" name="beam" scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.607068] type=1400 audit(1391625852.716:76): avc:  denied  { create } for  pid=26850 comm="id.nfc:handover" name="beam" scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.610602] type=1400 audit(1391625852.716:77): avc:  denied  { remove_name } for  pid=26850 comm="id.nfc:handover" name="IMG_20140205_104344.jpg" dev="fuse" ino=3086246328 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      <5>[ 3049.610870] type=1400 audit(1391625852.716:78): avc:  denied  { rename } for  pid=26850 comm="id.nfc:handover" name="IMG_20140205_104344.jpg" dev="fuse" ino=3086246328 scontext=u:r:nfc:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=file
      
      Bug: 12891504
      Change-Id: I10dc964db9249f53a2b4d8fe871ad9a036c423a2
      629c98c2
  5. Feb 04, 2014
    • Nick Kralevich's avatar
    • Nick Kralevich's avatar
      Revert "Move tlcd_sock policy over to manta." · 1a1ad959
      Nick Kralevich authored
      This doesn't compile on non-manta devices because of a
      missing drmserver_socket declaration.
      
      external/sepolicy/mediaserver.te":68:ERROR 'unknown type drmserver_socket' at token ';' on line 6764:
      #line 68
      allow mediaserver drmserver_socket:sock_file write;
      checkpolicy:  error(s) encountered while parsing configuration
      make: *** [out/target/product/flo/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
      make: *** Waiting for unfinished jobs....
      
      This reverts commit 8cd400d3.
      
      Change-Id: Ib8f07b57008b9ed1165b945057502779e806f0f8
      1a1ad959
    • Nick Kralevich's avatar
      94e06523
    • Stephen Smalley's avatar
      Add file_contexts entries for socket files. · a7e4ace1
      Stephen Smalley authored
      
      So that we do not relabel them on a restorecon -R /data.
      
      Change-Id: I8dd915d9bb80067339621b905ea2b4ea0fa8d71e
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      a7e4ace1
    • Stephen Smalley's avatar
      Move tlcd_sock policy over to manta. · 8cd400d3
      Stephen Smalley authored
      
      Change-Id: I7d5a5f964133177e7d466b9759fcf6300fec345d
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      8cd400d3
    • Nick Kralevich's avatar
      allow wpa_cli to work. · ba1a7315
      Nick Kralevich authored
      With wpa_supplicant in enforcing, wpa_cli doesn't work.
      
      Denial:
      
      type=1400 audit(1390597866.260:59): avc:  denied  { write } for  pid=3410 comm="wpa_supplicant" name="wpa_ctrl_4852-1" dev="mmcblk0p28" ino=618993 scontext=u:r:wpa:s0 tcontext=u:object_r:wifi_data_file:s0 tclass=sock_file
      
      After I9e35cc93abf89ce3594860aa3193f84a3b42ea6e and
      I51b09c5e40946673a38732ea9f601b2d047d3b62, the /data/misc/wifi/sockets
      directory is labeled properly. This change allows the communication
      between the su domain and wpa.
      
      Steps to reproduce:
        Start wifi (so wpa_supplicant will run)
        Start wpa_cli - it will hand
        $ adb root
        $ adb shell
        # wpa_cli -g @android:wpa_wlan0
      
      Bug: 12721629
      Change-Id: I03170acc155ad122c5197baaf590d17fc1ace6a5
      ba1a7315
    • Stephen Smalley's avatar
      Label /data/misc/wifi/sockets with wpa_socket. · 418e2abd
      Stephen Smalley authored
      
      This will ensure that any sockets created in this directory
      will default to wpa_socket unless a type_transition is defined.
      Define a type transition for system_server to keep its separate
      system_wpa_socket type assigned for its socket.  Allow wpa
      to create and unlink sockets in the directory.  We leave the
      already existing rules for wifi_data_file in place for compatibility
      with existing devices that have wifi_data_file on /data/misc/wifi/sockets.
      
      Change-Id: I9e35cc93abf89ce3594860aa3193f84a3b42ea6e
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      418e2abd
    • Mark Salyzyn's avatar
      sepolicy: Add write_logd, read_logd & control_logd · 8ed750e9
      Mark Salyzyn authored
      - Add write_logd, read_logd and control_logd macros added along
        with contexts for user space logd.
      - Specify above on domain wide, or service-by-service basis
      - Add logd rules.
      - deprecate access_logcat as unused.
      - 'allow <domain> zygote:unix_dgram_socket write;' rule added to
        deal with fd inheritance. ToDo: investigate means to allow
        references to close, and reopen in context of application
        or call setsockcreatecon() to label them in child context.
      
      Change-Id: I35dbb9d5122c5ed9b8c8f128abf24a871d6b26d8
      8ed750e9
  6. Feb 03, 2014
  7. Feb 01, 2014
  8. Jan 31, 2014
    • Nick Kralevich's avatar
      drmserver: allow looking in efs_file directories · 7cbe44f2
      Nick Kralevich authored
      We can read any efs_files, but can't look in the directory
      containing them. Allow it.
      
      Without this patch, high resolution movie playback is broken.
      
      Addresses the following denial:
      
      [  276.780046] type=1400 audit(1391105234.431:5): avc:  denied  { search } for  pid=125 comm="drmserver" name="/" dev="mmcblk0p1" ino=2 scontext=u:r:drmserver:s0 tcontext=u:object_r:efs_file:s0 tclass=dir
      
      Bug: 12819852
      
      Change-Id: Ie9d13a224cef5e229de1bdb78d605841ed387a21
      7cbe44f2
    • Nick Kralevich's avatar
  9. Jan 30, 2014
    • Stephen Smalley's avatar
      Remove MAC capabilities from unconfined domains. · 04ee5dfb
      Stephen Smalley authored
      
      Linux defines two capabilities for Mandatory Access Control (MAC)
      security modules, CAP_MAC_OVERRIDE (override MAC access restrictions)
      and CAP_MAC_ADMIN (allow MAC configuration or state changes).
      SELinux predates these capabilities and did not originally use them,
      but later made use of CAP_MAC_ADMIN as a way to control the ability
      to set security context values unknown to the currently loaded
      SELinux policy on files.  That facility is used in Linux for e.g.
      livecd creation where a file security context that is being set
      on a generated filesystem is not known to the build host policy.
      Internally, files with such labels are treated as having the unlabeled
      security context for permission checking purposes until/unless the
      context is later defined through a policy reload.
      
      CAP_MAC_OVERRIDE is never checked by SELinux, so it never needs
      to be allowed.  CAP_MAC_ADMIN is only checked if setting an
      unknown security context value; the only legitimate use I can see
      in Android is the recovery console, where a context may need to be set
      on /system that is not defined in the recovery policy.
      
      Remove these capabilities from unconfined domains, allow
      mac_admin for the recovery domain, and add neverallow rules.
      
      Change-Id: Ief673e12bc3caf695f3fb67cabe63e68f5f58150
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      04ee5dfb
    • Robert Craig's avatar
      Drop the typealias for camera_calibration_file. · 0cbf06fd
      Robert Craig authored
      
      This was originally used for the /data/fdAlbum
      file. Device specific policy properly labels the
      file as camera_data_file either during its
      initial creation (type_transition rule) or with
      a single restorecon call in the respective init.*.rc
      file.
      
      Change-Id: Ie953dcf4c40883db09cfb4ffec2a42e8ccd6344c
      Signed-off-by: default avatarrpcraig <rpcraig@tycho.ncsc.mil>
      0cbf06fd
  10. Jan 29, 2014
    • Stephen Smalley's avatar
      Allow dumpstate to run am and shell. · 208deb33
      Stephen Smalley authored
      See http://code.google.com/p/android/issues/detail?id=65339
      
      
      
      Further denials were observed in testing and allowed as well.
      
      Change-Id: I54e56bf5650b50b61e092a6dac45c971397df60f
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      208deb33
    • Robert Craig's avatar
      Catch nonexistent BOARD_SEPOLICY_UNION policy files. · 6b0ff475
      Robert Craig authored
      
      Added a new check to make sure that all listed
      BOARD_SEPOLICY_UNION files are located somewhere
      in the listed BOARD_SEPOLICY_DIRS locations. The
      build will error out otherwise.
      
      Change-Id: Icc5febc5fe5a7cccb90ac5b83e6289c2aa5bf069
      Signed-off-by: default avatarrpcraig <rpcraig@tycho.ncsc.mil>
      6b0ff475
    • Nick Kralevich's avatar
      bluetooth: allow media_rw_data_file · 997680a3
      Nick Kralevich authored
      Allow bluetooth to handle media_rw_data_file file descriptors
      sent to it from other processes. Without this, bluetooth
      picture / video sharing is broken.
      
      Steps to reproduce:
      1. Take few pictures
      2. launch gallery and choose a picture/video and click on share and choose
         available BT device and share
      
      Other info from bug report:
      
      - Bluetooth process queries media content provider for a file descriptor,
        with an Uri like "content://media/external/images/media/69"
      - Media server resolves the uri to a file on the filesystem, in the case of
        Gallery at "/storage/emulated/0/DCIM/Camera/IMG_20140128_141656.jpg"
      - Media server returns the FD over binder to bluetooth
      - Bluetooth is unable to read the file backed by the file descriptor.
      
      Fixes Denial:
      
      <5>[  821.040286] type=1400 audit(1390952161.805:11): avc:  denied  { read } for  pid=1348 comm="Binder_3" path="/data/media/0/DCIM/Camera/IMG_20140128_141656.jpg" dev="mmcblk0p23" ino=236246 scontext=u:r:bluetooth:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=file
      
      Bug: 12457805
      Change-Id: I1423d06a98416ae4ab19508f0d005a6353acadc4
      997680a3
  11. Jan 28, 2014
    • Nick Kralevich's avatar
      Merge "fix healthd charger mode." · c669667e
      Nick Kralevich authored
      c669667e
    • Nick Kralevich's avatar
      Allow "mkdir /sdcard/foo" · 251ba76b
      Nick Kralevich authored
      Creation of directories on /sdcard was not allowed for the
      shell user. Fixed.
      
      Steps to reproduce:
      
      adb shell
      cd /sdcard
      mkdir foo
      
      Addresses the following denial:
      
      <5>[  446.361215] type=1400 audit(13427374.189:13): avc:  denied  { create } for  pid=3264 comm="mkdir" name="foo" scontext=u:r:shell:s0 tcontext=u:object_r:sdcard_internal:s0 tclass=dir
      
      Bug: 12778268
      Change-Id: I5a91b7581fe7e97fbf3caeed9fdf74981e49c58e
      251ba76b
    • Nick Kralevich's avatar
      fix healthd charger mode. · 0352393d
      Nick Kralevich authored
      Healthd has an optional "charger" mode. The device boots into a
      minimally running mode, and healthd displays the battery indicator.
      
      Without this patch, when a manta device boots into charger mode,
      the screen will never turn off and the battery indicator will not move.
      
      From reviewing the healthd code, it looks like this may affect lots
      of devices, not just manta. I'm adding this change to the generic
      policy.
      
      Steps to reproduce:
      
      1) Make sure the device is unplugged.
      2) Boot into a normal system.
      3) Shutdown the system normally using the power button.
      4) After shutdown, plugin the power cord.
      5) Device will boot into charger mode. Battery icon will display.
      6) Press the button to reboot into a normal mode.
      7) Examine /proc/last_kmsg and look for denials.
      
      Addresses the following denials:
      
      [    3.908457] type=1400 audit(1390866386.620:3): avc:  denied  { read write } for  pid=98 comm="charger" name="fb0" dev="tmpfs" ino=4286 scontext=u:r:healthd:s0 tcontext=u:object_r:graphics_device:s0 tclass=chr_file
      [    3.909085] type=1400 audit(1390866386.620:4): avc:  denied  { open } for  pid=98 comm="charger" name="fb0" dev="tmpfs" ino=4286 scontext=u:r:healthd:s0 tcontext=u:object_r:graphics_device:s0 tclass=chr_file
      [    3.909749] type=1400 audit(1390866386.620:5): avc:  denied  { ioctl } for  pid=98 comm="charger" path="/dev/graphics/fb0" dev="tmpfs" ino=4286 scontext=u:r:healthd:s0 tcontext=u:object_r:graphics_device:s0 tclass=chr_file
      [    4.889857] type=1400 audit(1390866387.605:6): avc:  denied  { read } for  pid=98 comm="charger" name="input" dev="tmpfs" ino=4153 scontext=u:r:healthd:s0 tcontext=u:object_r:input_device:s0 tclass=dir
      [    4.890873] type=1400 audit(1390866387.605:7): avc:  denied  { open } for  pid=98 comm="charger" name="input" dev="tmpfs" ino=4153 scontext=u:r:healthd:s0 tcontext=u:object_r:input_device:s0 tclass=dir
      [    4.891949] type=1400 audit(1390866387.605:8): avc:  denied  { search } for  pid=98 comm="charger" name="input" dev="tmpfs" ino=4153 scontext=u:r:healthd:s0 tcontext=u:object_r:input_device:s0 tclass=dir
      [    4.892677] type=1400 audit(1390866387.605:9): avc:  denied  { read } for  pid=98 comm="charger" name="event2" dev="tmpfs" ino=4279 scontext=u:r:healthd:s0 tcontext=u:object_r:input_device:s0 tclass=chr_file
      [    4.893576] type=1400 audit(1390866387.605:10): avc:  denied  { open } for  pid=98 comm="charger" name="event2" dev="tmpfs" ino=4279 scontext=u:r:healthd:s0 tcontext=u:object_r:input_device:s0 tclass=chr_file
      [    7.288104] type=1400 audit(1390866389.999:12): avc:  denied  { execmem } for  pid=98 comm="charger" scontext=u:r:healthd:s0 tcontext=u:r:healthd:s0 tclass=process
      [    7.288574] type=1400 audit(1390866389.999:13): avc:  denied  { execute } for  pid=98 comm="charger" path="/dev/ashmem" dev="tmpfs" ino=4113 scontext=u:r:healthd:s0 tcontext=u:object_r:ashmem_device:s0 tclass=chr_file
      
      Change-Id: I0118e08514caa0ad11d2aa7562c9846a96779a21
      0352393d
  12. Jan 27, 2014
Loading