Bug 728971 - xml is not valid for specific binary dump
Summary: xml is not valid for specific binary dump
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-dmidecode
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Petr Oros
QA Contact: Mike Gahagan
URL:
Whiteboard:
Depends On:
Blocks: 1359574 1366045
TreeView+ depends on / blocked
 
Reported: 2011-08-08 14:17 UTC by Petr Sklenar ⛄
Modified: 2016-10-17 12:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-17 12:12:58 UTC


Attachments (Terms of Use)

Description Petr Sklenar ⛄ 2011-08-08 14:17:46 UTC
Description of problem:
xml is not valid for specific binary dump

Version-Release number of selected component (if applicable):
arch specific, only on s390x:
python-dmidecode-3.10.12-1.el6_1.1.s390x
libxml2-2.7.6-1.el6.s390x


How reproducible:
deterministic

Steps to Reproduce:
1, have a dump similar to in bug 583867
2,
# cat test1.py 
import dmidecode

dmidecode.clear_warnings() # Ignore warnings related to no SMBIOS found
dmidecode.set_dev('dmi-From-bug583867-dump')
x = dmidecode.dmidecodeXML()
x.SetResultType(dmidecode.DMIXML_DOC)
x.QuerySection('processor').saveFormatFileEnc('-','UTF-8',1)
3, python test1.py > some.xml
4, xmllint some.xml

some.xml:78: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xB2 0x20 0x29 0x2E
      <Vendor>      .&#65533; ).</Vendor>
-----------------------------------------------------------------------

Actual results:
xml is not valid

Expected results:
xml is utf-8 valid

Additional info:

Comment 4 Petr Sklenar ⛄ 2011-08-08 14:57:29 UTC
ppc64 has the same issue:

output:78: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xB2 0x20 0x29 0x2E
      <Vendor>      .� ).</Vendor>

Comment 8 Suzanne Yeghiayan 2012-02-14 23:12:37 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 9 Ales Ledvinka 2013-05-13 08:50:36 UTC
(In reply to comment #0)
> dmidecode.set_dev('dmi-From-bug583867-dump')
...
> some.xml:78: parser error : Input is not proper UTF-8, indicate encoding !
> Bytes: 0xB2 0x20 0x29 0x2E
>       <Vendor>      .&#65533; ).</Vendor>
> -----------------------------------------------------------------------

Either it's fixed in python-dmidecode-3.10.13-6.fc18.x86_64 or unable to reproduce.

Comment 10 David Sommerseth 2013-05-13 13:23:26 UTC
(In reply to comment #9)
> (In reply to comment #0)
> > dmidecode.set_dev('dmi-From-bug583867-dump')
> ...
> > some.xml:78: parser error : Input is not proper UTF-8, indicate encoding !
> > Bytes: 0xB2 0x20 0x29 0x2E
> >       <Vendor>      .&#65533; ).</Vendor>
> > -----------------------------------------------------------------------
> 
> Either it's fixed in python-dmidecode-3.10.13-6.fc18.x86_64 or unable to
> reproduce.

I wonder if this is a result of libxml2 being updated.  As python-dmidecode itself doesn't do any encoding at all, it feeds the data to libxml2 which produces the proper XML output in the end.

Some hardware do have corrupt DMI tables.  This is typically common on white-label boxes or prototypes.  And then such odd data may appear.  So it doesn't mean the contents of the field is wrong.  It is just what has been decoded from the DMI tables.  But anyway, python-dmidecode (or libxml2) shouldn't segfault or cause a program to abort in other ways on such data.

Comment 11 Petr Sklenar ⛄ 2013-05-13 14:35:05 UTC
I try it on s390x and I can see the issue:

# xmllint some.xml
some.xml:78: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xB2 0x20 0x29 0x2E
      <Vendor>      .� ).</Vendor>
                     ^
# rpm -q python-dmidecode
python-dmidecode-3.10.13-1.el6.s390x

Comment 13 Ales Ledvinka 2013-05-13 14:58:31 UTC
(In reply to comment #11)
> I try it on s390x and I can see the issue:

sorry, my misunderstanding. not the dump from s390 but runtime s390.
confirmed reproducible.

Comment 14 RHEL Product and Program Management 2013-10-14 01:01:54 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 17 Petr Oros 2016-10-17 12:12:58 UTC
Closing are based on comment10. There is broken dmitable. Python-dmidecode don't segfaulting, error message "parser error" is from xmllint.


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