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 1012196 - libvirtd crashed when edit "backend model='egd' type='unix'" to guest xml file
Summary: libvirtd crashed when edit "backend model='egd' type='unix'" to guest xml file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-26 01:52 UTC by EricLee
Modified: 2014-06-18 00:56 UTC (History)
8 users (show)

Fixed In Version: libvirt-1.1.1-8.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:41:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description EricLee 2013-09-26 01:52:57 UTC
Created attachment 803188 [details]
back trace of libvirtd crashed.

Description
libvirtd crashed when edit "backend model='egd' type='unix'" to guest xml file

Version:
libvirt-1.1.1-6.el7.x86_64
qemu-kvm-1.5.3-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
# virsh edit guest
add following xml to guest:
"
    <rng model='virtio'>
      <rate bytes='1234' period='2000'/>
      <backend model='egd' type='unix'>
        <source mode='bind' service='1024'/>
        <source mode='connect' host='10.66.7.179' service='1024'/>
      </backend>
    </rng>
"
save then :
error: End of file while reading data: Input/output error
Failed. Try again? [y,n,f,?]:
error: One or more references were leaked after disconnect from the hypervisor
error: Failed to reconnect to the hypervisor

Actual results:
libvirtd crashed.

Expected results:
libvirtd not crash.

Comment 2 Peter Krempa 2013-09-26 07:29:10 UTC
Fix posted upstream
https://www.redhat.com/archives/libvir-list/2013-September/msg01551.html

Comment 3 Peter Krempa 2013-09-26 11:42:55 UTC
This issue is now fixed upstream:

commit 795527548fea79902ea4ce32747e069944cf3e61
Author: Peter Krempa <pkrempa>
Date:   Thu Sep 26 08:12:39 2013 +0200

    conf: Don't crash on invalid chardev source definition of RNGs and other
    
    Since commit 297c99a5 an invalid source definition XML of a character
    device that is used as backend for RNG devices, smartcards and redirdevs
    causes crash of the daemon when parsing such a definition.
    
    The device types mentioned above are not a part of a regular character
    device but are backends for other types. Thus when parsing such device
    NULL is passed as the argument @chr_def. Later when checking the
    validity of the definition @chr_def was dereferenced when parsing a UNIX
    socket backend with missing path of the socket and crashed the daemon.
    
    Sample offending configuration:
      <devices>
      ...
        <rng model='virtio'>
          <backend model='egd' type='unix'>
            <source mode='bind' service='1024'/>
          </backend>
        </rng>
      </devices>

Comment 6 chhu 2013-10-09 06:37:57 UTC
Reproduced with libvirt-1.1.1-6.el7.x86_64,
Verified with package:
libvirt-1.1.1-8.el7.x86_64

Test steps:
1. # virsh edit guest
add following xml to guest:
    <rng model='virtio'>
      <rate bytes='1234' period='2000'/>
      <backend model='egd' type='unix'>
        <source mode='bind' service='1024'/>
        <source mode='connect' host='10.66.7.179' service='1024'/>
      </backend>
    </rng>

save then:
error: internal error: Missing source path attribute for char device
Failed. Try again? [y,n,f,?]:

2. #virsh edit guest
add following xml to guest:
        <rng model='virtio'>
          <backend model='egd' type='unix'>
            <source mode='bind' service='1024'/>
          </backend>
        </rng>

save then:
error: internal error: Missing source path attribute for char device
Failed. Try again? [y,n,f,?]:

Test results:
no libvirt crash, change the status to VERIFIED

Comment 7 Ludek Smid 2014-06-13 09:41:30 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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