J-Security Center

Title: Balabit syslog-ng Incomplete Priority String Remote DoS Vulnerability

Severity: MODERATE

Description:

syslog-ng is a replacement for syslogd on Unix systems. Due to a fault in the log message parsing function, it can be remotely terminated via a SIGSEGV by causing a certain string to be included in a log message.

Each log message has a priority label, in the format <n> where n is the priority rating. The message parsing function uses a variable named "left" to store the number of characters remaining in the message. If the priority label does not have the trailing '>' this value gets set to -1 due to a bug. Therefore, when the program checks to see if it is at the end of the message by evaluating whether left=0, it does not register as being at the end of the message.

In versions 1.4.7 and 1.4.8, the software replaces all \r and \n characters with spaces, and this replacement process will under the above conditions cause the program to attempt to write to unaccessible memory, causing a segmentation fault. So for example, including the string <6 terminated with a newline into any logged input will crash syslog-ng.

Versions prior to 1.4.7 can also be exploited in a similar manner, however more precise details are not currently available.

Affected Products:

  • Balabit syslog-ng 1.4.6
  • Balabit syslog-ng 1.4.7
  • Balabit syslog-ng 1.4.8

References:

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.