RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1635228 - libvirt creating qemu channels with the wrong permissions [rhel-7.6.z]
Summary: libvirt creating qemu channels with the wrong permissions [rhel-7.6.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.6
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: jiyan
URL:
Whiteboard:
Depends On: 1633389
Blocks: 1635687
TreeView+ depends on / blocked
 
Reported: 2018-10-02 12:18 UTC by Oneata Mircea Teodor
Modified: 2018-11-03 16:27 UTC (History)
18 users (show)

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.
Clone Of: 1633389
Environment:
Last Closed: 2018-10-30 12:21:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3339 0 None None None 2018-10-30 12:21:51 UTC

Description Oneata Mircea Teodor 2018-10-02 12:18:31 UTC
This bug has been copied from bug #1633389 and has been proposed to be backported to 7.6 z-stream (EUS).

Comment 7 jiyan 2018-10-09 06:38:54 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.

Comment 9 errata-xmlrpc 2018-10-30 12:21:20 UTC
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


Note You need to log in before you can comment on or make changes to this bug.