Home / vulnerabilities SA-20071031-0.txt
Posted on 31 October 2007
Source : packetstormsecurity.org Link
SEC Consult Security Advisory < 20071031-0 >
====================================================================================
title: Perdition IMAP proxy str_vwrite format string
vulnerability
program: Perdition Mail Retrieval Proxy
vulnerable version: <=1.17
homepage: http://www.vergenet.net/
found: August 2007
by: Bernhard Mueller / SEC Consult
permanent link: http://www.sec-consult.com/300.html
====================================================================================
Vendor description:
---------------
Perdition is a fully featured POP3 and IMAP4 proxy server. It is able to
handle both SSL and non-SSL connections and redirect users to a
real-server based on a database lookup.
Vulnerability overview:
---------------
Perdition IMAPD is affected by a format string bug in one of its IMAP
output-string formatting functions. The bug allows the execution of
arbitrary code on the affected server. A successful exploit does not
require prior authentication.
Vulnerability details:
---------------
1.) In certain situations, the IMAP-Tag (first part of IMAP-command) is
copied into a character buffer without validation. This buffer is then
ultimately passed to vsnprintf() as a format string.
2.) Before the call to vsnprintf, a validation of the format string is
performed as a protection against format string injection.
>From str.c:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
168: static const char *__str_vwrite(io_t * io, const flag_t flag,
169: const size_t nargs, const char *fmt, va_list ap,
170: int *bytes)
171: {
(...)
186: fmt_args = 0;
187: for (place = 0; fmt[place] != '