Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 1117295

Summary: missing record in long_options array causes ipmidetectd segfaults
Product: Red Hat Enterprise Linux 5 Reporter: Karel Volný <kvolny>
Component: freeipmiAssignee: Josef Ridky <jridky>
Status: CLOSED WONTFIX QA Contact: Rachel Sibley <rasibley>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.11CC: extras-qa, jsafrane, mmalik
Target Milestone: rcKeywords: EasyFix, Patch, Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 460876 Environment:
Last Closed: 2017-04-18 21:57:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 460876    
Bug Blocks: 715605, 757710    
Attachments:
Description Flags
upstream patch none

Description Karel Volný 2014-07-08 12:59:08 UTC
this fails on RHEL 5.11 too (RHEL5.11-Server-20140625.0)
ipmidetectd 0.5.1

+++ This bug was initially created as a clone of Bug #460876 +++

Description of problem:
The source file ipmidetectd_config.c does not contain {0, 0, 0, 0} as the last record in the long_options array, which is necessary for getopt_long(). This missing record causes that getopt_long() gets out of array bounds when searching for an unsupported long option.

Version-Release number of selected component (if applicable):
freeipmi-ipmidetectd-0.4.6-3.fc8

How reproducible:
Always

Steps to Reproduce:
$ /usr/sbin/ipmidetectd --debug
Segmentation fault
$ /usr/sbin/ipmidetectd --config-file
Segmentation fault
$ 
  
Actual results:
/usr/sbin/ipmidetectd is terminated (segmentation fault) if it is executed with unsupported long option

Expected results:
/usr/sbin/ipmidetectd is not terminated (segmentation fault) if it is executed with unsupported long option

Additional info:

Comment 2 Josef Ridky 2016-11-10 11:04:54 UTC
Created attachment 1219312 [details]
upstream patch

Comment 3 Chris Williams 2017-04-18 21:57:51 UTC
Red Hat Enterprise Linux 5 shipped it's last minor release, 5.11, on September 14th, 2014. On March 31st, 2017 RHEL 5 exited Production Phase 3 and entered Extended Life Phase. For RHEL releases in the Extended Life Phase, Red Hat  will provide limited ongoing technical support. No bug fixes, security fixes, hardware enablement or root-cause analysis will be available during this phase, and support will be provided on existing installations only.  If the customer purchases the Extended Life-cycle Support (ELS), certain critical-impact security fixes and selected urgent priority bug fixes for the last minor release will be provided.  For more details please consult the Red Hat Enterprise Linux Life Cycle Page:
https://access.redhat.com/support/policy/updates/errata

This BZ does not appear to meet ELS criteria so is being closed WONTFIX. If this BZ is critical for your environment and you have an Extended Life-cycle Support Add-on entitlement, please open a case in the Red Hat Customer Portal, https://access.redhat.com ,provide a thorough business justification and ask that the BZ be re-opened for consideration of an errata. Please note, only certain critical-impact security fixes and selected urgent priority bug fixes for the last minor release can be considered.