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 1385410 - python-dmidecode segfaults when reading invalid dmidecode data
Summary: python-dmidecode segfaults when reading invalid dmidecode data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-dmidecode
Version: 7.2
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: 7.4
Assignee: Petr Oros
QA Contact: Mike Gahagan
URL:
Whiteboard:
Depends On:
Blocks: 1394638 1404314 1431702
TreeView+ depends on / blocked
 
Reported: 2016-10-16 22:28 UTC by David Pinkerton
Modified: 2019-02-15 03:10 UTC (History)
1 user (show)

Fixed In Version: python-dmidecode-3.12.2-1.el7
Doc Type: Bug Fix
Doc Text:
Previously, the dmidecode Python module did not check for presence of entries in the Desktop Management Interface (DMI) table and was unable to handle malformed data when querying the DMI table. As a consequence, when querying a non-existent or invalid DMI table entry, the dmidecode module terminated unexpectedly with a segmentation fault. This update adds a check for the presence and format of the DMI table entries. As a result, the dmidecode module no longer terminates with a segmentation fault when querying malformed DMI tables, and correctly returns empty data in the described situation.
Clone Of:
: 1431702 (view as bug list)
Environment:
Last Closed: 2017-08-01 19:18:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
All the logs and pythong codes used to isolate fault. (166.04 KB, application/x-gzip)
2016-10-16 22:28 UTC, David Pinkerton
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:2080 0 normal SHIPPED_LIVE python-dmidecode bug fix update 2017-08-01 18:14:01 UTC

Description David Pinkerton 2016-10-16 22:28:32 UTC
Created attachment 1211145 [details]
All the logs and pythong codes used to isolate fault.

Description of problem:


Version-Release number of selected component (if applicable):

rhel7.2
python-dmidecode-3.10.13-11.el7.x86_64

How reproducible:


Steps to Reproduce:
1. Tried to install RHV4 on Supermicro Servers
2. Ran the attached python code to isolate error to OS.
3.

Actual results:

python-dmidecode segfaults


Expected results:

output of dmidecode information


Additional info:

With the help of Dan Kenigsberg and Nir Soffer ran the following steps to isolate initial error (RHV4 installation failure) to python-dmidecode)

sudo debuginfo-install -y python
sudo gdb python
(gdb) run

from vdsm import dmidecodeUtil
dmidecodeUtil.getHardwareInfoStructure()

(gdb) thread apply all bt full



I used the attached python dmidecode code to confirm issue was python-dmidecode-3.10.13-11.el7.x86_64.


Installed fedora24 package (python-dmidecode-3.12.2-3.fc24.x86_64)
This worked successfully.  I was able to successfully install RHV4

Comment 7 Mike Gahagan 2017-04-19 19:04:21 UTC
Confirmed updated python-dmidecode has fixed this issue:

python-dmidecode-3.12.2-1.el7.x86_64
>>> import dmidecode
>>> dmidecode.get_dev()
'/dev/mem'
>>> dmidecode.set_dev("./dmidecode-dump-bin")
True
>>> dmidecode.get_dev()
'./dmidecode-dump-bin'
>>> dmidecode.QuerySection('bios')
{'0x000d': {'dmi_type': 0, 'data': {'Vendor': '', 'Characteristics': {'NEC PC-98': False, 'EDD is supported': False, 'PC Card (PCMCIA) is supported': False, '3.5"/2.88 MB floppy services are supported (int 13h)': False, '5.25"/360 kB floppy services are supported (int 13h)': True, 'Printer services are supported (int 17h)': False, 'BIOS is upgradeable': False, '8042 keyboard services are supported (int 9h)': True, 'BIOS shadowing is allowed': True, 'BIOS ROM is socketed': True, 'APM is supported': False, 'PNP is supported': False, 'VLB is supported': False, 'ISA is supported': False, 'Japanese floppy for Toshiba 1.2 MB is supported (int 13h)': False, 'CGA/mono video services are supported (int 10h)': True, 'Serial services are supported (int 14h)': False, '3.5"/720 kB floppy services are supported (int 13h)': True, 'MCA is supported': False, 'PCI is supported': False, '5.25"/1.2 MB floppy services are supported (int 13h)': False, 'Selectable boot is supported': True, 'Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)': False, 'EISA is supported': False, 'Boot from PC Card (PCMCIA) is supported': False, 'ESCD support is available': True, 'Boot from CD is supported': False, 'Print screen service is supported (int 5h)': False}, 'Runtime Size': '1040336 bytes', 'BIOS Revision': '0.1', 'Version': '', 'ROM Size': '832 KB', 'Characteristic x2': {'System is a virtual machine': False, 'UEFI is supported': False, 'Targeted content distribution': False, 'Function key-initiated network boot': False, 'BIOS boot specification': False}, 'Address': '0x02030', 'Release Date': '', 'Characteristic x1': {'I2O boot': False, 'USB legacy': False, 'ATAPI Zip drive boot': False, 'Smart battery': False, 'IEEE 1394 boot': False, 'ACPI': False, 'LS-120 boot': False, 'AGP': False}}, 'dmi_handle': '0x000d', 'dmi_size': 252}, '0x000e': {'dmi_type': 0, 'data': {'Vendor': None, 'Characteristics': {}, 'Runtime Size': ' ', 'BIOS Revision': None, 'Version': None, 'ROM Size': ' ', 'Characteristic x2': {}, 'Address': None, 'Release Date': None, 'Characteristic x1': {}}, 'dmi_handle': '0x000e', 'dmi_size': 17}, '0x0000': {'dmi_type': 0, 'data': {'Vendor': 'American Megatrends Inc.', 'Characteristics': {'NEC PC-98': False, 'EDD is supported': True, 'PC Card (PCMCIA) is supported': False, '3.5"/2.88 MB floppy services are supported (int 13h)': True, '5.25"/360 kB floppy services are supported (int 13h)': False, 'Printer services are supported (int 17h)': True, 'BIOS is upgradeable': True, '8042 keyboard services are supported (int 9h)': True, 'BIOS shadowing is allowed': True, 'BIOS ROM is socketed': True, 'APM is supported': True, 'PNP is supported': True, 'VLB is supported': False, 'ISA is supported': True, 'Japanese floppy for Toshiba 1.2 MB is supported (int 13h)': False, 'CGA/mono video services are supported (int 10h)': True, 'Serial services are supported (int 14h)': True, '3.5"/720 kB floppy services are supported (int 13h)': True, 'MCA is supported': False, 'PCI is supported': True, '5.25"/1.2 MB floppy services are supported (int 13h)': True, 'Selectable boot is supported': True, 'Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)': False, 'EISA is supported': False, 'Boot from PC Card (PCMCIA) is supported': False, 'ESCD support is available': True, 'Boot from CD is supported': True, 'Print screen service is supported (int 5h)': True}, 'Runtime Size': '64 KB', 'BIOS Revision': '8.14', 'Version': '080014 ', 'ROM Size': '1024 KB', 'Characteristic x2': {'System is a virtual machine': True, 'UEFI is supported': False, 'Targeted content distribution': False, 'Function key-initiated network boot': True, 'BIOS boot specification': True}, 'Address': '0xf0000', 'Release Date': '10/22/2009', 'Characteristic x1': {'I2O boot': False, 'USB legacy': True, 'ATAPI Zip drive boot': True, 'Smart battery': False, 'IEEE 1394 boot': False, 'ACPI': True, 'LS-120 boot': True, 'AGP': False}}, 'dmi_handle': '0x0000', 'dmi_size': 24}}
# also works with 'system' and 'processor'


with python-dmidecode-3.10.13-11.el7.x86_64:

>>> import dmidecode
>>> dmidecode.get_dev()
'/dev/mem'
>>> dmidecode.set_dev("./dmidecode-dump-bin")
True
>>> dmidecode.QuerySection('bios')
Segmentation fault

Comment 8 errata-xmlrpc 2017-08-01 19:18:00 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.

https://access.redhat.com/errata/RHEA-2017:2080


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