network in vhostuser server mode not hot-addable due to apparmor

Bug #1859016 reported by Christian Ehrhardt 
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Triaged
Medium
Unassigned
Bionic
Won't Fix
Undecided
Unassigned
Disco
Won't Fix
Undecided
Unassigned
Eoan
Won't Fix
Undecided
Unassigned

Bug Description

$ cat > vhostuser-SF-case.xml << EOF
<interface type='vhostuser'>
   <source type='unix' path='/run/test' mode='server'/>
   <model type='virtio'/>
   <driver queues='2'>
       <host mrg_rxbuf='on'/>
   </driver>
 </interface>
 EOF

$ virsh attach-device <anyguest> vhostuser-SF-case.xml

Expect:
- qemu gets sec label added
- qemu creates the new path

Happens:
- qemu gets no apparmor label for the path
- qemu is blocked to create the server socket

Works:
- static attachment (virt-aa-helper will render the apparmor rule)

Workaround:
- use overrides to allow the base path to be accessed via /etc/apparmor.d/local/abstractions/libvirt-qemu (if available) or /etc/apparmor.d/abstractions/libvirt-qemu

TODO:
- debug libvirt while doing the hot-add and check if it uses already any security labeling calls
  - if it does but apparmor is missing implement their backend
  - if they don't then we need to add a labelling call for the path attribute of any interface that carrys a type=unix source

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This would be nice to have, but the overall prio is rather low for now.
Once we know the changes needed we can decide on backportability to at least Bionic.

Next step as outlined above is debugging which (if any) security labeling calls are already triggered.

Changed in libvirt (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Steve Langasek (vorlon)
Changed in libvirt (Ubuntu Disco):
status: New → Won't Fix
Changed in libvirt (Ubuntu Eoan):
status: New → Won't Fix
Changed in libvirt (Ubuntu Bionic):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.