Bug 499708

Summary: SELinux blocks libvirtd sysfs writes for virNodeDeviceDettach()/Reattach()/Reset()
Product: [Fedora] Fedora Reporter: Mark McLoughlin <markmc>
Component: libvirtAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: berrange, clalance, crobinso, itamar, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-07 15:22:18 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 480594    

Description Mark McLoughlin 2009-05-07 14:35:58 EDT
AVCs:

type=AVC msg=audit(1241720005.718:66): avc:  denied  { write } for  pid=2179 comm="libvirtd" name="unbind" dev=sysfs ino=4339 scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysfs_t:s0 tclass=file

type=AVC msg=audit(1241720068.546:67): avc:  denied  { write } for  pid=2182 comm="libvirtd" name="config" dev=sysfs ino=7822 scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysfs_t:s0 tclass=file

What these calls do:

dettach:

  - stats /sys/bus/pci/drivers/pci-stub
  - writes to /sys/bus/pci/drivers/pci-stub/new_id
  - writes to /sys/bus/pci/devices/$device/driver/unbind
  - stats/writes /sys/bus/pci/drivers/pci-stub/new_slot
  - writes to /sys/bus/pci/drivers/pci-stub/bind
  - writes to /sys/bus/pci/drivers/pci-stub/remove_id

reattach:

  - stats /sys/bus/pci/drivers/pci-stub
  - writes to /sys/bus/pci/drivers/pci-stub/unbind
  - stats/writes /sys/bus/pci/drivers/pci-stub/remove_slot
  - stats /sys/bus/pci/drivers/pci-stub/remove_id
  - writes to /sys/bus/pci/drivers_probe

reset:

  - reads/writes /sys/bus/pci/devices/$device/config
  - reads /sys/bus/pci/devices/$device/device
  - reads /sys/bus/pci/devices/$device/vendor
  - readdir /sys/bus/pci/devices/
Comment 1 Daniel Walsh 2009-05-07 15:22:18 EDT
Fixed in selinux-policy-3.6.12-31.fc11.noarch