Summary: | Setting metadata with special character in key value caused guest failed to start and disappeared after restarting libvirtd. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Ruifeng <rbian> |
Component: | libvirt | Assignee: | Erik Skultety <eskultet> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, eskultet, lhuang, mzhan, rbalakri, zhwang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.13-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 05:53:03 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: |
Description
Ruifeng
2014-09-18 09:18:58 UTC
Fixed upstream: commit 2c22954f99a70ed654e4116a18f433afa24d41c5 Author: Erik Skultety <eskultet> Date: Thu Dec 4 14:37:09 2014 +0100 util: check for an illegal character in a XML namespace prefix When user tries to insert element metadata providing a namespace declaration as well, currently we insert the element without any validation check for XML prefix (if provided). The next VM start would then fail with parse error. This patch fixes this issue by adding a call to xmlValidateNCName function to check for illegal characters in the prefix. v1.2.10-277-g2c22954 Verify this bug with libvirt-1.2.17-2.el7.x86_64: 1. # virsh metadata test4 "http://herp.derp/" "herp//" "<foo><bar>baz</bar></foo>" error: internal error: failed to validate prefix for a new XML namespace 2. test other # virsh metadata test4 "http://herp.derp/" "herp#" "<foo><bar>baz</bar></foo>" error: internal error: failed to validate prefix for a new XML namespace # virsh metadata test4 "http://herp.derp/" "herp@" "<foo><bar>baz</bar></foo>" error: internal error: failed to validate prefix for a new XML namespace # virsh metadata test4 "http://herp.derp/" "herp!" "<foo><bar>baz</bar></foo>" -bash: !": event not found # virsh metadata test4 "http://herp.derp/" "herp~" "<foo><bar>baz</bar></foo>" error: internal error: failed to validate prefix for a new XML namespace # virsh metadata test4 "http://herp.derp/" "herp?" "<foo><bar>baz</bar></foo>" error: internal error: failed to validate prefix for a new XML namespace # virsh metadata test4 "http://herp.derp/" "herp:" "<foo><bar>baz</bar></foo>" error: internal error: failed to validate prefix for a new XML namespace # virsh metadata test4 "http://herp.derp/" "herp}" "<foo><bar>baz</bar></foo>" error: internal error: failed to validate prefix for a new XML namespace # virsh metadata test4 "http://herp.derp/" "herp|" "<foo><bar>baz</bar></foo>" error: internal error: failed to validate prefix for a new XML namespace # virsh metadata test4 "http://herp.derp/" "herp|" "<foo><bar>baz</bar></foo>" error: internal error: failed to validate prefix for a new XML namespace 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://rhn.redhat.com/errata/RHBA-2015-2202.html |