Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-100109

libvirt use of RelaxNG APIs in libxml2 is not thread safe

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-10.1
    • rhel-10.1, rhel-9.7
    • libvirt
    • None
    • libvirt-11.5.0-1.el10
    • No
    • Moderate
    • rhel-virt-core-libvirt-1
    • 24
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • 11.5.0
    • None

      What were you trying to do that didn't work?

      Calling

        virDomainDefineXMLFlags(c, xml, VIR_DOMAIN_DEFINE_VALIDATE);

      concurrently from multiple threads leads to corruption of libxml2 state due to lack of thread safe global initialization.

      What is the impact of this issue to you?

      The libvirtd/virtqemud daemons sometimes need restarting after getting into the broken state.

      Please provide the package NVR for which the bug is seen:

      libvirt-libs-10.10.0-12.el9.x86_64

      How reproducible is this bug?:

      non-deterministic

      Steps to reproduce

      1.  Download badschema.c
      2.  gcc -o badschema badschema.c -lvirt
      3.  ./badschema

      Expected results

      No errors

      Actual results

       

      Varying errors, some % of the time

      $ ./badschema 
      libvirt: XML Util error : internal error: Unable to parse RelaxNG schema '/usr/share/libvirt/schemas/domain.rng': Error type 'string' is not exported by type library 'http://www.w3.org/2001/XMLSchema-datatypes'
      $ ./badschema 
      Relax-NG types library 'http://relaxng.org/ns/structure/1.0' already registered
      $ ./badschema 
      libvirt: XML Util error : internal error: Unable to parse RelaxNG schema '/usr/share/libvirt/schemas/domain.rng': Error type 'int' is not exported by type library 'http://www.w3.org/2001/XMLSchema-datatypes'
      libvirt: XML Util error : internal error: Unable to parse RelaxNG schema '/usr/share/libvirt/schemas/domain.rng': Error type 'unsignedInt' is not exported by type library 'http://www.w3.org/2001/XMLSchema-datatypes'

              rhn-engineering-berrange Daniel Berrangé
              rhn-engineering-berrange Daniel Berrangé
              Daniel Berrangé Daniel Berrangé
              Zhen Tang Zhen Tang
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: