Package: ipmitool
Version: 1.8.1-1
Severity: normal
Tags: patch upstream

ipmitool segfaults. Upstream bug. Patch attached.

$ gdb --quiet src/ipmitool
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) set args lan print 2
(gdb) directory /tmp/ipmitool-1.8.1/lib
(gdb) directory /tmp/ipmitool-1.8.1/src
(gdb) run
Program received signal SIGSEGV, Segmentation fault.
ipmi_lan_print (intf=0x80953c0, chan=2 '\002') at ipmi_lanp.c:647
647                     unsigned char cipher_suite_count = p->data[0];
(gdb) where
#0  ipmi_lan_print (intf=0x80953c0, chan=2 '\002') at ipmi_lanp.c:647
#1  0x08059782 in ipmi_lanp_main (intf=0x80953c0, argc=2, argv=0xbfffecbc) at 
ipmi_lanp.c:1323
#2  0x0804a8ca in ipmi_cmd_run (intf=0x0, name=0xbffffba3 "lan", argc=0, 
argv=0x0)
    at ipmitool.c:165
#3  0x0804b1fb in main (argc=3, argv=0xbfffecb4) at ipmitool.c:519
(gdb) list
642             p = get_lan_param(intf, chan, IPMI_LANP_RMCP_CIPHER_SUPPORT);
643             if (p == NULL)
644                     return -1;
645             else
646             {
647                     unsigned char cipher_suite_count = p->data[0];
648
649                     p = get_lan_param(intf, chan, IPMI_LANP_RMCP_CIPHERS);
650                     if (p == NULL)
651                             return -1;
(gdb) print p
$2 = (struct lan_param *) 0x8090150
(gdb) print p->data
$3 = (uint8_t *) 0x0

--- ipmitool-1.8.1/lib/ipmi_lanp.c~     2005-03-24 02:39:01.000000000 +0100
+++ ipmitool-1.8.1/lib/ipmi_lanp.c      2005-04-28 18:01:50.000000000 +0200
@@ -642,8 +642,7 @@ ipmi_lan_print(struct ipmi_intf * intf, 
        p = get_lan_param(intf, chan, IPMI_LANP_RMCP_CIPHER_SUPPORT);
        if (p == NULL)
                return -1;
-       else
-       {
+       if (p->data != NULL) {
                unsigned char cipher_suite_count = p->data[0];
 
                p = get_lan_param(intf, chan, IPMI_LANP_RMCP_CIPHERS);


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (989, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11.7
Locale: LANG=de_DE.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages ipmitool depends on:
ii  libc6                       2.3.2.ds1-21 GNU C Library: Shared libraries an
ii  libreadline4                4.3-15       GNU readline and history libraries
ii  libssl0.9.7                 0.9.7e-3     SSL shared libraries


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to