Bug 1259719 - hpithres, segmentation fault in case input closed
hpithres, segmentation fault in case input closed
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openhpi (Show other bugs)
7.1
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Rafael Fonseca
Radka Skvarilova
:
Depends On:
Blocks: 1274397 1289025 1305230
  Show dependency treegraph
 
Reported: 2015-09-03 08:23 EDT by Jan Ščotka
Modified: 2016-11-04 00:35 EDT (History)
3 users (show)

See Also:
Fixed In Version: 3.4.0-4
Doc Type: No Doc Update
Doc Text:
Doc already covered by #1255041.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-04 00:35:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Ščotka 2015-09-03 08:23:25 EDT
Hi,
I've tested to use command: hpithres, and in case stdin is closed, witout quit command it causes SegFault

Version-Release number of selected component (if applicable):
hpithres - This program came with OpenHPI 3.4.0


How reproducible:
100%

Steps to Reproduce:
1.  echo "rpt" | hpithres

Actual results:
hpithres - This program came with OpenHPI 3.4.0
SAF HPI Version B.03.02

Available commands:
	exit, quit, q		- exit
	help, h			- this instruction
	rpt			- show all RPT entries
	rpt <id>		- show #id RPT entry
	rdr			- show all RDR entries
	rdr <rptid>		- show RDRs entries for #rptid
	rdr <rptid> <rdrid>	- show #rdrid RDR entry for #rptid
	sen			- show all sensors
	sen <rptid>		- show sensors for #rptid
	sen <rptid> <num>	- show #num sensor for #rptid
	mod			- modify thresholds
	undo			- delete all changes
==> rpt
  0 RPT: id =  16  ResourceId =  16  Tag = Chassis 1
  1 RPT: id =  17  ResourceId =  17  Tag = CPU 1
  2 RPT: id =  18  ResourceId =  18  Tag = DASD 1 1
  3 RPT: id =  19  ResourceId =  19  Tag = HS DASD 1 2
  4 RPT: id =  20  ResourceId =  20  Tag = Fan 1
  5 RPT: id =  21  ResourceId =  21  Tag = Chassis 3
  6 RPT: id =  22  ResourceId =  22  Tag = CPU 1
  7 RPT: id =  23  ResourceId =  23  Tag = DASD 1 1
  8 RPT: id =  24  ResourceId =  24  Tag = HS DASD 1 2
  9 RPT: id =  25  ResourceId =  25  Tag = Fan 1
 10 RPT: id =  26  ResourceId =  26  Tag = Chassis 4
 11 RPT: id =  27  ResourceId =  27  Tag = CPU 1
 12 RPT: id =  28  ResourceId =  28  Tag = DASD 1 1
 13 RPT: id =  29  ResourceId =  29  Tag = HS DASD 1 2
 14 RPT: id =  30  ResourceId =  30  Tag = Fan 1
==> Segmentation fault


Expected results:
no segfault but finish correctly

    Regards
    Honza
Comment 2 Rafael Fonseca 2015-09-03 08:53:55 EDT
Reported upstream with patch attached [1].

[1] https://sourceforge.net/p/openhpi/bugs/1899/
Comment 3 Rafael Fonseca 2015-09-04 11:41:26 EDT
Patch was accepted upstream and the fix is simple.
Comment 6 Radka Skvarilova 2016-05-19 08:13:01 EDT
Old package :
openhpi-3.4.0-2.el7.x86_64

run :  echo "rpt" | hpithres 
:: [   FAIL   ] :: Test if there is no segmentation fault (Expected 0, got 139)

******************************************

New package:
 openhpi-3.4.0-3.el7.x86_64

run: echo "rpt" | hpithres 
:: [   PASS   ] :: Test if there is no segmentation fault (Expected 0, got 0)


As there is no segmentation fault in new package on all architectures => Verified
Comment 8 errata-xmlrpc 2016-11-04 00:35:22 EDT
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://rhn.redhat.com/errata/RHBA-2016-2357.html

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