Skip Menu |

This queue is for tickets about the DMI-Decode CPAN distribution.

Report information
The Basics
Id: 128672
Status: new
Priority: 0/
Queue: DMI-Decode

People
Owner: Nobody in particular
Requestors: gboyd [...] crawford.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Segfault: core dumped with fresh CPAN install of DMI::Decode:
Date: Thu, 28 Feb 2019 18:48:38 +0000
To: "bug-DMI-Decode [...] rt.cpan.org" <bug-DMI-Decode [...] rt.cpan.org>
From: Guy Boyd <gboyd [...] crawford.com>
Just a Heads Up. I can work around this with raw dmidecode output. Thanks. ============================================================== Segfault: core dumped with DMI::Decode: # gdb /usr/bin/perl /tmp/core-perl-sig11-user0-group0-pid18920-time1551377664 #0 0x00007fd86dbc280c in __GI__IO_str_overflow () from /lib64/libc.so.6 #1 0x00007fd86dbc0df1 in __GI__IO_default_xsputn () from /lib64/libc.so.6 #2 0x00007fd86db90eb3 in vfprintf () from /lib64/libc.so.6 #3 0x00007fd86dbb52bb in vsprintf () from /lib64/libc.so.6 #4 0x00007fd86db97457 in sprintf () from /lib64/libc.so.6 #5 0x00007fd8663de648 in sprintf (__fmt=0x7fd8663e0a70 "%s", __s=<optimized out>) at /usr/include/bits/stdio2.h:33 #6 dmi_system_uuid (p=0x14797d4 "\315/\330\001PX\021˧d\315\022DիQ\006") at /root/.cpan/build/DMI-Decode-2.04-7gbQth/src/dmidecode.c:447 #7 dmi_decode (ver=<optimized out>, data=0x14797cc "\001\033\001") at /root/.cpan/build/DMI-Decode-2.04-7gbQth/src/dmidecode.c:2998 #8 dmi_table (fd=<optimized out>, base=<optimized out>, len=<optimized out>, num=<optimized out>, pname=<optimized out>, devmem=<optimized out>, ver=<optimized out>) at /root/.cpan/build/DMI-Decode-2.04-7gbQth/src/dmidecode.c:3903 #9 0x00007fd8663de969 in init (class=class@entry=0x106fc10 "DMI::Decode", devmem=0x1088d00 "/dev/mem") at Decode.xs:157 #10 0x00007fd8663df5cd in XS_DMI__Decode_init (my_perl=<optimized out>, cv=<optimized out>) at Decode.c:468 #11 0x00007fd86ef5c41f in Perl_pp_entersub () from /usr/lib64/perl5/CORE/libperl.so #12 0x00007fd86ef54b96 in Perl_runops_standard () from /usr/lib64/perl5/CORE/libperl.so #13 0x00007fd86eef1985 in perl_run () from /usr/lib64/perl5/CORE/libperl.so #14 0x0000000000400ce9 in main () 87 char *system_uuid; /* (...) */ 427 static char *dmi_system_uuid(u8 *p) 428 { /* (...) */ 442 if(only0x00) 443 { 444 return "Not Settable"; 445 } 446 447 sprintf(system_uuid, "%s", " %02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9], p[10] , p[11], p[12], p[13], p[14], p[15]); 448 449 return system_uuid; 450 } (gdb) info args No symbol table info available. How to reproduce: perl -MCPAN -e shell i /DMI::Decode/ install DMI::Decode quit #!/usr/bin/perl use strict; use warnings; use Data::Dumper; use DMI::Decode; $Data::Dumper::Indent = 1; my $dmi = new DMI::Decode; # goes boom() # my $bios = $dmi->bios_information; # print Dumper($bios); # perl -version This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi (with 39 registered patches, see perl -V for more detail) dmidecode version: Installed Packages Name : dmidecode Arch : x86_64 Epoch : 1 Version : 3.1 Release : 2.el7 Size : 198 k Repo : installed From repo : base Summary : Tool to analyse BIOS DMI data URL : http://www.nongnu.org/dmidecode/ License : GPLv2+ Description : dmidecode reports information about x86 & ia64 hardware as described in the ------------------------------------ SYSTEM INFORMATION FOLLOWS uname -a Linux localhost.localdomain 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux /etc/redhat-release CentOS Linux release 7.6.1810 (Core) cpan[1]> i /DMI::Decode/ Reading '/root/.cpan/Metadata' Database was generated on Tue, 26 Feb 2019 23:41:03 GMT Module id = DMI::Decode CPAN_USERID RUSSELLP (Russell Pettway <russell_pettway@yahoo.com>) CPAN_VERSION 2.04 CPAN_FILE R/RU/RUSSELLP/DMI-Decode-2.05.tar.gz UPLOAD_DATE 2007-05-16 MANPAGE DMI::Decode - Perl extension for extracting DMI Information INST_FILE /usr/local/lib64/perl5/DMI/Decode.pm INST_VERSION 2.04 Physical system information: # bash dmidecode # dmidecode 3.1 Getting SMBIOS data from sysfs. SMBIOS 2.6 present. 78 structures occupying 2863 bytes. Table at 0x000E0010. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: LENOVO Version: 6IET76WW (1.36 ) Release Date: 04/14/2011 Address: 0xE0000 Runtime Size: 128 kB ROM Size: 8192 kB Characteristics: PCI is supported PC Card (PCMCIA) is supported PNP is supported BIOS is upgradeable BIOS shadowing is allowed ESCD support is available Boot from CD is supported Selectable boot is supported EDD is supported 3.5"/720 kB floppy services are supported (int 13h) Print screen service is supported (int 5h) 8042 keyboard services are supported (int 9h) Serial services are supported (int 14h) Printer services are supported (int 17h) CGA/mono video services are supported (int 10h) ACPI is supported USB legacy is supported BIOS boot specification is supported Targeted content distribution is supported BIOS Revision: 1.54 Firmware Revision: 1.20 Guy Crawford Media Services, Inc.

Message body is not shown because it is too large.

Subject: [ rt.cpan.org #128672 ] Segfault: core dumped with fresh CPAN install of DMI::Decode:
Date: Thu, 28 Feb 2019 21:40:01 +0000
To: "bug-DMI-Decode [...] rt.cpan.org" <bug-DMI-Decode [...] rt.cpan.org>
From: Guy Boyd <gboyd [...] crawford.com>
This seems to fix it for a system_uuid value of UUID: Inactive ... which is probably what exercises this particular bug. I don't have test case hardware at the moment for an expected UUID format value but the test change will probably break the original intent. I suspect that a UUID value of 'inactive' (string) may be invalid per the plethora of standards documents at the head of the source file. Arguably C (unlike Perl) can't just DWIM when strange things get pushed onto the stack. Perhaps some valid conditional test to switch between the two is needed. ~/.cpan/build/DMI-Decode-2.04-7gbQth/src/dmidecode.c 2998 /* system_uuid = strdup(dmi_system_uuid(data+0x08)); */ 2999 system_uuid = strdup(dmi_system_uuid(data[0x08])); Hope this helps.