Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12493

Move depends on uninitialised value when using IPMI

XMLWordPrintable

    • 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.

            Unassigned Unassigned
            vso Vladislavs Sokurenko
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: