J-Security Center

Title: Asterisk PBX Multiple Logging Format String Vulnerabilities

Severity: HIGH

Description:

Asterisk is a software-based PBX system, which is available for Linux operating systems. Asterisk includes support for various protocols including SIP, IAX v1 and v2, and H323.

It is reported that Asterisk is susceptible to format string vulnerabilities in its logging functions.

In the file logger.c, there are several vulnerable calls in three different locations:
syslog(syslog_level_map[level], buf);
fprintf(chan->fileptr, buf);
fprintf(stdout, buf);

An attacker can control what is in the 'buf' variable. The variable is not properly sanitized, allowing for format string attacks. It is reported that these vulnerable functions are only called when sufficient logging levels are enabled in the configuration file. Logging to both syslog and files are both vulnerable.

An attacker may use these vulnerabilities to corrupt memory, and read or write arbitrary memory. Remote code execution is likely possible.

Due to the nature of these vulnerabilities, there may exist many different avenues of attack. Anything that can potentially call the logging functions with user-supplied data is vulnerable.

Versions 0.7.0 through to 0.7.2 are reported vulnerable.

Affected Products:

  • Asterisk Asterisk 0.7.0 .0
  • Asterisk Asterisk 0.7.1
  • Asterisk Asterisk 0.7.2

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.