Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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.
DescriptionDavid 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.
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.
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.