ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-8327

Possible agent crash when processing eventlog records

    Details

    • Type: Incident report Incident report
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.12, 2.2.3
    • Fix Version/s: 2.0.13rc1, 2.2.4rc1, 2.3.2
    • Component/s: Agent (G)
    • Labels:
    • Environment:
      Windows

      Description

      When translating eventlog message insert strings the size of allocated array is based on EVENTLOGRECORD.NumStrings, which apparently might not have the correct value, resulting in crash.

        Activity

        Hide
        Andris Zeila added a comment -

        From MSDN:

        Some event sources seem to set NumStrings to a value less than the number of placeholders in the message file. If you use this value to allocate an array of strings in order to get the full message, the subsequent call to FormatMessage may crash. One possibility is to always assume the maximum number of strings (99) when allocating memory and use memset to ensure that any excess strings will default to NULL.

        Show
        Andris Zeila added a comment - From MSDN: Some event sources seem to set NumStrings to a value less than the number of placeholders in the message file. If you use this value to allocate an array of strings in order to get the full message, the subsequent call to FormatMessage may crash. One possibility is to always assume the maximum number of strings (99) when allocating memory and use memset to ensure that any excess strings will default to NULL.
        Hide
        Andris Zeila added a comment -

        Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-8327

        Show
        Andris Zeila added a comment - Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-8327
        Hide
        Andris Zeila added a comment -

        Released in:
        pre-2.0.13rc1 r46339
        pre-2.2.4rc1 r46340
        pre-2.3.2 r46345

        Show
        Andris Zeila added a comment - Released in: pre-2.0.13rc1 r46339 pre-2.2.4rc1 r46340 pre-2.3.2 r46345
        Hide
        Andris Zeila added a comment -

        The pre-2.3.2 merge contained bug that was fixed in r47311

        Show
        Andris Zeila added a comment - The pre-2.3.2 merge contained bug that was fixed in r47311

          People

          • Assignee:
            Unassigned
            Reporter:
            Andris Zeila
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: