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

Memory leaking occurs in evaluate_LOGEVENTID() and evaluate_STR()

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.15, 2.0.4
    • Fix Version/s: 1.8.16rc1, 2.0.5rc1, 2.1.0
    • Component/s: Proxy (P), Server (S)
    • Labels:
    • Environment:
      Zabbix Server 1.8.15/2.0.4 in Linux 32/64bit

      Description

      Memory leaking occurs in evaluate_LOGEVENTID() and evaluate_STR().
      Both 1.8.x and 2.0.x has same memory leaking.

      Zabbix Server memory leaks in evaluate_STR() and evaluate_LOGEVENTID() in "src/libs/zbxserver/evalfunc.c".
      It doesn't free following strdup() memory in add_regexp_ex() called from evaluate_STR().
      ----------------------------------------------------------------------
      (*regexps)[*regexps_num].name = strdup(name);
      (*regexps)[*regexps_num].expression = strdup(expression);
      ----------------------------------------------------------------------
      "clean_regexps_ex(regexps, regexps_num)" should be called before "zbx_free(regexps)" in evaluate_STR().

      evaluate_STR() and evaluate_LOGEVENTID() are called when using "regexp()", "iregexp()", "logeventid()" trigger functions with "@" type regexp.
      So, the memory leak occurs when using "regexp()", "iregexp()", "logeventid()" trigger functions with "@" type regexp.

      I made patches for zabbix-1.8.15 and zabbix-2.0.4.
      We thank you for your time and are hoping to receive feedback.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tsuzuki Takanori Suzuki
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: