Bug 1635228
| Summary: | libvirt creating qemu channels with the wrong permissions [rhel-7.6.z] | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Oneata Mircea Teodor <toneata> |
| Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
| Status: | CLOSED ERRATA | QA Contact: | jiyan <jiyan> |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 7.6 | CC: | dfediuck, dyuan, fjin, hannsj_uhl, jdenemar, jiyan, jsuchane, jtomko, michal.skrivanek, mtessun, mzamazal, pmatyas, rbarry, rcyriac, virt-bugs, virt-maint, xuzhang, yafu |
| Target Milestone: | rc | Keywords: | Regression, ZStream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-4.5.0-10.el7_6.1 | Doc Type: | Bug Fix |
| Doc Text: |
Cause: Libvirt switched to creating UNIX sockets instead of letting QEMU do it. But forgot to adjust the file permissions.
Consequence: Users of the socket expecting qemu's permissions on it cannot access it.
Fix: Change the permissions after the socket is created.
Result: The socket now has QEMU's user and group.
|
Story Points: | --- |
| Clone Of: | 1633389 | Environment: | |
| Last Closed: | 2018-10-30 12:21:20 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1633389 | ||
| Bug Blocks: | 1635687 | ||
|
Description
Oneata Mircea Teodor
2018-10-02 12:18:31 UTC
Version:
kernel-3.10.0-957.el7.x86_64
qemu-kvm-rhev-2.12.0-18.el7.x86_64
libvirt-4.5.0-10.virtcov.el7_6.1.x86_64
Steps:
1. Prepare a VM with these two kinds of unix socket devices, start VM and check the dumpxml and qemu cmd line of VM.
# virsh list --all
Id Name State
----------------------------------------------------
- test1 shut off
# virsh edit test1
Domain test1 XML configuration edited.
# virsh start test1
Domain test1 started
# virsh dumpxml test1
<serial type='unix'>
<source mode='bind' path='/tmp/foo'/>
<target type='isa-serial' port='1'>
<model name='isa-serial'/>
</target>
<alias name='serial1'/>
</serial>
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-1-test1/com.redhat.rhevm.vdsm'/>
<target type='virtio' name='com.redhat.rhevm.vdsm' state='disconnected'/>
<alias name='channel0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
# ps -ef |grep test1 |sed 's/-device/\n-device/g'
-device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charserial1,fd=29,server,nowait
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev socket,id=charchannel1,fd=31,server,nowait
2. According to the dumpxml configuration, check the permission of corresponding files.
# ll -alZ /tmp/foo
srwxrwxr-x. qemu qemu system_u:object_r:tmp_t:s0 /tmp/foo
# ll -alZ /var/lib/libvirt/qemu/channel/target/domain-1-test1/com.redhat.rhevm.vdsm
srwxrwxr-x. qemu qemu system_u:object_r:svirt_image_t:s0:c500,c512 /var/lib/libvirt/qemu/channel/target/domain-1-test1/com.redhat.rhevm.vdsm
The results showed in step-2 are as expected, move this bug to be verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3339 |