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 835542 - Test case failure: /CoreOS/ipmitool/Regression/bz311231-ipmitool-does-not-check-input-values
Summary: Test case failure: /CoreOS/ipmitool/Regression/bz311231-ipmitool-does-not-che...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipmitool
Version: 7.0
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ales Ledvinka
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-26 12:26 UTC by Karel Volný
Modified: 2016-09-20 04:32 UTC (History)
3 users (show)

Fixed In Version: 1.8.12-13073101
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-03 15:01:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Karel Volný 2012-06-26 12:26:41 UTC
Filed from caserun https://tcms.engineering.redhat.com/run/41363/#caserun_1236510

Version-Release number of selected component (if applicable):
RHEL-7.0-20120614.n.1


the new ipmitool segfaults on invalid input


[root@x86-64-v01 ~]# gdb ipmitool
GNU gdb (GDB) Red Hat Enterprise Linux (7.4.50.20120120-46.el7)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/ipmitool...Reading symbols from /usr/lib/debug/usr/bin/ipmitool.debug...done.
done.
(gdb) run sol payload status abcd
Starting program: /usr/bin/ipmitool sol payload status abcd
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory

Program received signal SIGSEGV, Segmentation fault.
ipmi_sol_payload_access_status (intf=intf@entry=0x68fae0, channel=channel@entry=0 '\000', userid=userid@entry=1 '\001') at ipmi_sol.c:166
166                     lprintf(LOG_ERR, "Error: Unexpected data length (%d) received",
Missing separate debuginfos, use: debuginfo-install zlib-1.2.7-3.el7.x86_64
(gdb) bt full
#0  ipmi_sol_payload_access_status (intf=intf@entry=0x68fae0, channel=channel@entry=0 '\000', userid=userid@entry=1 '\001') at ipmi_sol.c:166
        req = {msg = {netfn = 6 '\006', lun = 0 '\000', cmd = 77 'M', target_cmd = 0 '\000', data_len = 2, data = 0x7fffffffded0 ""}}
        rsp = 0x0
        data = "\000\001"
#1  0x00000000004144c3 in ipmi_sol_main (intf=0x68fae0, argc=3, argv=0x7fffffffe108) at ipmi_sol.c:1973
        channel = <optimized out>
        userid = 1 '\001'
        enable = -1
        retval = 0
#2  0x00000000004332db in ipmi_main (argc=<optimized out>, argv=<optimized out>, cmdlist=cmdlist@entry=0x67d500, intflist=intflist@entry=0x0) at ipmi_main.c:722
        intf = 0x68fae0
        sup = <optimized out>
        privlvl = 0
        target_addr = 0 '\000'
        target_channel = 0 '\000'
        transit_addr = 0 '\000'
        transit_channel = 0 '\000'
        target_lun = 0 '\000'
        my_addr = 0 '\000'
        lookupbit = 16 '\020'
        authtype = -1
        tmp = <optimized out>
        hostname = 0x0
        username = 0x0
        password = 0x0
        intfname = 0x0
        progname = 0x7fffffffe3f4 "ipmitool"
        oemtype = 0x0
        sdrcache = 0x0
        kgkey = 0x0
        seloem = 0x0
        port = 0
        devnum = 0
        cipher_suite_id = 3
        argflag = <optimized out>
        i = <optimized out>
        found = <optimized out>
        rc = -1
        sol_escape_char = 126 '~'
#3  0x0000000000404ed0 in main (argc=<optimized out>, argv=<optimized out>) at ipmitool.c:124
        rc = <optimized out>
(gdb)

Comment 2 Karel Volný 2012-11-14 15:55:13 UTC
still fails:
https://tcms.engineering.redhat.com/run/50413/#caserun_1767346

Comment 3 Ales Ledvinka 2012-11-20 13:03:16 UTC
rawhide 1.8.12-7

Comment 6 Karel Volný 2013-02-26 15:58:02 UTC
there's still failure with ipmitool-1.8.12-9.el7

http://beaker-archive.app.eng.bos.redhat.com/beaker-logs/2013/02/3829/382935/804028/10945829/TESTOUT.log

for example:

:: [   PASS   ] :: Running 'ipmitool sol payload status abcd &> 1-abcd.out'
:: [   FAIL   ] :: File '1-abcd.out' should contain 'Invalid channel' 
set-in-progress abcd output:
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Error: No valid response.


as channels are identified by numbers, ipmitool should reject "abcd" as channel name before even trying to use the ipmi device

Comment 8 Ales Ledvinka 2013-09-03 14:53:32 UTC
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Given Channel number 'abcd' is either invalid or out of range.
Channel number must be from ranges: <0..7>, <0xE..0xF>

1.8.12-13073101 (and above)


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