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 864122 - virtualport parameter profileid in a <network> or <portgroup> causes failure to initialize guest interface
Summary: virtualport parameter profileid in a <network> or <portgroup> causes failure ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-08 16:02 UTC by Laine Stump
Modified: 2013-02-21 07:25 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.10.2-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:25:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Laine Stump 2012-10-08 16:02:23 UTC
If a guest <interface type='network'> points to a network and/or portgroup that specifies a "profileid" attribute in the virtualport <parameters> element, the interface will fail to be initialized, with an error message like the following:

  virNetDevVPortProfileMerge:380: corrupted profileid string

This is because a successful return code for virStrcpyStatic() is being incorrectly interpreted as a failure.

Example:

1) in the guest, define an interface as:

    <interface type='network'>
      <source network='ovs-test-net'/>
    </interface>

2) define and start a network called 'ovs-test-net' that uses an existing openvswitch bridge (see Bug 805564 for more details on this):

   <network>
     <name>ovs-test-net</name>
     <forward mode='bridge'/>
     <bridge name='ovsbr'/>
     <virtualport type='openvswitch'>
       <parameters profileid='testprofile'/>
     </virtualport>
   </network>

3) start the guest.

You will get the error above.

Comment 1 Laine Stump 2012-10-08 16:03:21 UTC
This bug was originally reported/fixed upstream:

commit 83aebf6de4e2902c621edcba65de1d1556bee454
Author: Kyle Mestery <kmestery>
Date:   Wed Oct 3 15:46:55 2012 -0400

    Correct checking of virStrcpyStatic() return value
    
    Correct the check for the return value of virStrcpyStatic()
    when copying port-profile names. Fixes Open vSwitch ports
    which utilize port-profiles from network definitions.
    
    Signed-off-by: Kyle Mestery <kmestery>

diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c
index d774fb1..ac7aa5f 100644
--- a/src/util/virnetdevvportprofile.c
+++ b/src/util/virnetdevvportprofile.c
@@ -374,7 +374,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfilePtr orig,
                            orig->profileID, mods->profileID);
             return -1;
         }
-        if (virStrcpyStatic(orig->profileID, mods->profileID)) {
+        if (virStrcpyStatic(orig->profileID, mods->profileID) == NULL) {
             /* this should never happen - it indicates mods->profileID
              * isn't properly null terminated. */
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",

Comment 4 Huang Wenlong 2012-10-09 08:06:28 UTC
Verify this bug with: 
libvirt-0.10.2-2.el6.x86_64
openvswitch-1.7.1-1.x86_64

1)setup a openvswitch env 
http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL;hb=HEAD

2)create in the test guest, define an interface as:

    <interface type='network'>
      <source network='ovs-test-net'/>
    </interface>

2) define and start a network called 'ovs-test-net' that uses an existing openvswitch bridge :

   <network>
     <name>ovs-test-net</name>
     <forward mode='bridge'/>
     <bridge name='ovsbr'/>
     <virtualport type='openvswitch'>
       <parameters profileid='testprofile'/>
     </virtualport>
   </network>

then start domain , it can start success no error.

Comment 5 errata-xmlrpc 2013-02-21 07:25:51 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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html


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