-
Problem report
-
Resolution: Fixed
-
Trivial
-
2.2.20rc1, 3.0.11rc1, 3.2.8rc1, 3.4.0rc1
-
Sprint 16
-
1.5
Valgrind produces following error:
==10886== Conditional jump or move depends on uninitialised value(s) ==10886== at 0x5481205: ipmi_lanp_setup_con (in /usr/lib64/libOpenIPMI.so.0.0.5) ==10886== by 0x54820C6: ipmi_ip_setup_con (in /usr/lib64/libOpenIPMI.so.0.0.5) ==10886== by 0x42B4BB: zbx_init_ipmi_host (checks_ipmi.c:1236) ==10886== by 0x42CD22: get_value_ipmi (checks_ipmi.c:1420) ==10886== by 0x42945B: ipmi_poller_process_value_request (ipmi_poller.c:111) ==10886== by 0x42945B: ipmi_poller_thread (ipmi_poller.c:242) ==10886== by 0x474459: zbx_thread_start (threads.c:128) ==10886== by 0x418DE9: MAIN_ZABBIX_ENTRY (proxy.c:1097) ==10886== by 0x469352: daemon_start (daemon.c:392) ==10886== by 0x417A56: main (proxy.c:847) ==10886== Uninitialised value was created by a stack allocation ==10886== at 0x42B260: zbx_init_ipmi_host (checks_ipmi.c:1211
It appears that OpenIPMI sets port without respect of port count variable, it only checks that port is not NULL:
5583 for (i=0; i<MAX_IP_ADDR; i++) { 5584 if (!ports[i]) 5585 ports[i] = IPMI_LAN_STD_PORT_STR; 5586 }
Please also see patch attached, though OpenIPMI code must be carefully analyzed before changes are made.