• Nick Kralevich's avatar
    kernel: allow usbfs:dir search · 883fcfcf
    Nick Kralevich authored
    The deprecated/deleted usbfs kernel driver gets really unhappy when
    SELinux denies it access to directories. On flo (3.4.0 kernel), this
    comes across as an SELinux denial followed by a kernel panic.
    
    Steps to reproduce:
    
      1. plug in a USB device.
      2. notice nothing happens.
      3. unplug the USB device
      4. plug it in again, watch for restart.
    
    Expected:
      USB device works
    
    Actual:
      [329180.030242] Host mode: Set DC level as 0x68 for flo.
      [329180.030395] msm_hsusb_host msm_hsusb_host: Qualcomm On-Chip EHCI Host Controller
      [329180.030639] Unable to create devices usbfs file
      [329180.030944] type=1400 audit(1425327845.292:12): avc: denied { search } for pid=24033 comm="kworker/0:1" name="/" dev="usbfs" ino=291099 scontext=u:r:kernel:s0 tcontext=u:object_r:usbfs:s0 tclass=dir
      [329180.060394] msm_hsusb_host msm_hsusb_host: new USB bus registered, assigned bus number 1
      [329180.091583] msm_hsusb_host msm_hsusb_host: irq 132, io mem 0x12500000
      [deleted]
      [329180.120178...
    883fcfcf
kernel.te 3.07 KB