Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1314919 - crash in Print_Information_Processor
Summary: crash in Print_Information_Processor
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: i7z
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Raphael Groner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1279250 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-04 21:21 UTC by Przemek Klosowski
Modified: 2016-03-26 18:18 UTC (History)
2 users (show)

Fixed In Version: i7z-0.27.2-13.20131012git5023138.fc23 i7z-0.27.2-13.20131012git5023138.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-17 20:51:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Przemek Klosowski 2016-03-04 21:21:42 UTC
Description of problem: 
i7z crashes in Print_Information_Processor(). There's a type confusion in the second argument to this function: on function entry gdb reports both arguments as 64-bit memory pointers, but within the function the second argument is interpreted as 32-bit and causes SEGV

Version-Release number of selected component (if applicable):
i7z-0.27.2-11.fc23.x86_64

How reproducible: every time

Steps to Reproduce:
1. run i7v from command line (no arguments)

Actual results:
$ i7z
i7z DEBUG: i7z version: svn-r77-(20-Nov-2011)
i7z DEBUG: Found Intel Processor
i7z DEBUG:    Stepping 9
i7z DEBUG:    Model a
i7z DEBUG:    Family 6
i7z DEBUG:    Processor Type 0
i7z DEBUG:    Extended Model 3
i7z DEBUG: msr = Model Specific Register
i7z DEBUG: Detected an ivy bridege processor
Segmentation fault (core dumped)


Expected results: program runs, produces complete output, does not SEGV

Comment 1 Przemek Klosowski 2016-03-04 21:43:31 UTC
GDB session log is below. Note how in the Breakpoint 1, gdb reports both nehalem and sandy_bridge arguments as 64-bit pointers, but just few lines down, after the call to get_vendor(vendor_string), sandy_bridge is overwritten/truncated to 32 bits. Note that I misspoke in the first comment: this is not a wrong type (sandy_bridge is int * all along); it just accidentally gets a wrong value.

(gdb) b Print_Information_Processor 
Breakpoint 1 at 0x2e90: file helper_functions.c, line 344.

(gdb) r
Starting program: /usr/sbin/i7z 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
i7z DEBUG: i7z version: svn-r77-(20-Nov-2011)

Breakpoint 1, Print_Information_Processor (nehalem=0x55555576125c <prog_options+4>, sandy_bridge=0x55555576125d <prog_options+5>) at helper_functions.c:344
344	{

(gdb) n
348	    memset(vendor_string,0,13);
(gdb) 
350	    get_vendor (vendor_string);
(gdb) p sandy_bridge 
$1 = (int *) 0x55555576125d <prog_options+5>
(gdb) n
367	    if (strcmp (vendor_string, "GenuineIntel") == 0) {
(gdb) p sandy_bridge 
$2 = (int *) 0x5576125d

Comment 2 Przemek Klosowski 2016-03-04 21:44:42 UTC
Strangely, the program runs correctly, doesn't crash, and doesn't raise any errors  when run under valgrind

Comment 3 Fedora Admin XMLRPC Client 2016-03-07 18:59:09 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Raphael Groner 2016-03-08 14:31:35 UTC
*** Bug 1279250 has been marked as a duplicate of this bug. ***

Comment 5 Raphael Groner 2016-03-08 16:53:30 UTC
Thanks for debugging.

Will push a new build shortly. Please try with it to reproduce this bug.

Comment 6 Fedora Update System 2016-03-08 17:46:24 UTC
i7z-0.27.2-13.20131012git5023138.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0cf4a693dc

Comment 7 Fedora Update System 2016-03-08 17:46:36 UTC
i7z-0.27.2-13.20131012git5023138.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-fb51f84a82

Comment 8 Fedora Update System 2016-03-09 22:56:11 UTC
i7z-0.27.2-13.20131012git5023138.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0cf4a693dc

Comment 9 Fedora Update System 2016-03-10 01:57:02 UTC
i7z-0.27.2-13.20131012git5023138.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-fb51f84a82

Comment 10 Fedora Update System 2016-03-17 20:51:36 UTC
i7z-0.27.2-13.20131012git5023138.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2016-03-26 18:18:29 UTC
i7z-0.27.2-13.20131012git5023138.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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