J-Security Center

Title: QwikMail HELO Command Buffer Overflow Vulnerability

Severity: HIGH

Description:

QwikMail (qwik-smtpd) is an open source Mail Transfer Agent (MTA) designed for UNIX/Linux variants.

QwikMail is reportedly prone to a remotely exploitable buffer overflow vulnerability. The issue is due to insufficient bounds checking of client-supplied SMTP HELO request data.

This issue could theoretically be exploited to execute arbitrary code. The source of the vulnerability is that the client HELO request is copied into a 32 byte clientHelo buffer using the strcpy() function. This operation is performed without placing an adequate limit on the size of the source data.

Due to the memory layout, it is also reportedly possible to overwrite an adjacent buffer in a manner that will allow a remote attacker to abuse the server as an unauthorized mail relay. Specifically, the buffer for the localIP variable is stored adjacent to the 32 byte clientHelo buffer. If overwritten with a value of "127.0.0.1", the server will relay the incoming message. This could be abused to send spam or other malicious emails anonymously.

Affected Products:

  • Amir Malik QwikMail 0.3.0

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.