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 949036 - python-dmidecode produces invalid XML data on some hardware
Summary: python-dmidecode produces invalid XML data on some hardware
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-dmidecode
Version: 6.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Ales Ledvinka
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 883504 975059
TreeView+ depends on / blocked
 
Reported: 2013-04-05 16:56 UTC by David Sommerseth
Modified: 2016-09-20 04:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
On some hardware, the DMI tables contain data which makes python-dmidecode generate XML tags with duplicated "dmispec" attributes. In some cases, when running the XML data through xmllint or other XML libraries, it failed to parse the data. This update corrects the duplicate "installed" and "dmispec" attributes, and data parsing no longer fails in the described scenario.
Clone Of:
Environment:
Last Closed: 2013-11-14 10:35:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Do not add explictly 'dmispec' attributes inside switch() in dmi_decode() (1.59 KB, patch)
2013-04-05 16:56 UTC, David Sommerseth
no flags Details | Diff

Description David Sommerseth 2013-04-05 16:56:24 UTC
Created attachment 731964 [details]
Do not add explictly 'dmispec' attributes inside switch() in dmi_decode()

On some hardware, the DMI tables contains data which makes python-dmidecode generate XML tags with duplicated 'dmispec' attributes.

In the case of libxml2, it handles this without any errors.  But running the XML data through xmllint or other XML libraries which are more picky (such as python-lxml), it will fail to parse the data.

The attached patch resolves this issue.

Comment 6 David Sommerseth 2013-05-13 12:02:31 UTC
Just to clarify the XML error in this bug.  What happens is that python-dmidecode in some DMI tables decodes sections not often found.  Inside these sections, an additional XML attribute was added, such as dmispec="3.3.41" or dmispec="3.3.42".

The problem is that python-dmidecode had already added the dmispec attribute.  So there output libxml2 allows is:

   <tag dmispec="3.3.41" dmispec="3.3.41"/>

This is an invalid XML, as attributes are not allowed to be duplicates.  And this is what python-lxml reacts to.  What the fix does is to remove the duplication of the dmispec attributes.  Those two places it was found should never have been there.  The reason this was not discovered earlier was that these DMI table sections are seldom found.

Comment 13 Ales Ledvinka 2013-06-20 12:23:07 UTC
was "dmispec", reopened for "installed".


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