Bug 428879 - Libvirt lacks xml escaping for xm config parsing
Summary: Libvirt lacks xml escaping for xm config parsing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 449772
TreeView+ depends on / blocked
 
Reported: 2008-01-15 20:41 UTC by Cole Robinson
Modified: 2009-12-14 21:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:22:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0142 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2009-01-20 16:05:03 UTC

Description Cole Robinson 2008-01-15 20:41:05 UTC
If you manually edit an xm config file to add a disk path containing the '&'
character, virt-manager and virtinst start dumping lots of errors like:

Entity: line 14: parser error : xmlParseEntityRef: no name
      <source file='/var/lib/xen/images/test&.img'/>
                                             ^

Since 'xm create' works fine with this config file and an '&' is a valid
character to have in a path, this seems like a bug.

See also bz 428209 for a similar bug.

# rpm -q libvirt
libvirt-0.3.3-4.el5

Comment 2 Daniel Veillard 2008-05-23 11:57:48 UTC
Still current, trivial to reproduce:

[root@test2 ~]# grep test /etc/xen/migr5 
disk = [ "tap:aio:/virt/migr5&test,xvda,w" ]
[root@test2 ~]#  virsh dumpxml migr5 | grep source
      <source file='/virt/migr5&test'/>
      <source bridge='xenbr0'/>
[root@test2 ~]#

  we need to XML escape path strings in the xm driver. This should not be
too hard, assuming it's not fixed already upstream.

Daniel

Comment 5 RHEL Program Management 2008-06-02 20:24:57 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Daniel Veillard 2008-06-20 14:33:31 UTC
Okay I have built a version libvirt-0.3.3-9.el5 in dist-5E-qu-candidate
with the fix,

Daniel

Comment 9 errata-xmlrpc 2009-01-20 21:22:16 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0142.html


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