-----BEGIN PGP SIGNED MESSAGE-----
AUSCERT External Security Bulletin Redistribution
ESB-2000.081 -- FreeBSD-SA-00:14
imap-uw contains security vulnerabilities for "closed" mail servers
04 May 2000
AusCERT Security Bulletin Summary
Operating System: FreeBSD 4.0
Impact: Execute Arbitrary Code
Access Required: Existing User, Remote
- --------------------------BEGIN INCLUDED TEXT--------------------
- -----BEGIN PGP SIGNED MESSAGE-----
FreeBSD-SA-00:14 Security Advisory
Topic: imap-uw contains security vulnerabilities for "closed"
Credits: Michal Zalewski <lcamtuf@DIONE.IDS.PL>
Michal Szymanski <siva9@CLICO.PL> via BugTraq
Affects: Ports collection.
Corrected: See below.
Vendor status: Aware of the problem, no satisfactory solution provided.
FreeBSD only: NO
imap-uw is a popular IMAP4/POP2/POP3 mail server from the University
II. Problem Description
There are numerous buffer overflows available to an imap user after
they have successfully logged into their mail account
(i.e. authenticated themselves by giving the correct password,
etc). Once the user logs in, imapd has dropped root privileges and is
running as the user ID of the mail account which has been logged into,
so the buffer overflow can only allow code to be executed as that
Thus, the vulnerability is only relevant on a "closed" mail server,
i.e. one which does not normally allow interactive logins by mail
users. For a system which allows users to log in or execute code on
the system, there is minimal vulnerability.
Note that once a user has successfully exploited the vulnerability to
gain access to their user account they may be able to mount further
attacks against the local (or a remote) machine to upgrade their
The imap-uw port is not installed by default, nor is it "part of
FreeBSD" as such: it is part of the FreeBSD ports collection, which
contains over 3200 third-party applications in a ready-to-install
format. The ports collection shipped with FreeBSD 4.0 contains this
problem since it was discovered after the release.
FreeBSD makes no claim about the security of these third-party
applications, although an effort is underway to provide a security
audit of the most security-critical ports.
A user with a mail account on the imap server can execute arbitrary
code as themselves on that machine. This is only likely to be a
security issue on "closed" mail servers which do not allow interactive
Only imapd is known to be vulnerable to this time - the other daemons
installed by the imap-uw port (ipop2d/ipop3d) are not known to suffer
from the same vulnerability.
If you have not chosen to install the imap-uw port/package, then your
system is not vulnerable to this problem.
1) Deinstall the imap-uw port/package, if you you have installed it.
2) If you do not specifically require imap functionality
(i.e. pop2/pop3 is sufficient) then disable the imap daemon in
/etc/inetd.conf and restart inetd (e.g. with the command 'killall -HUP
Unfortunately the vulnerabilities in imapd are quite extensive and no
patch is currently available to address them. There is also no
"drop-in" replacement for imap-uw currently available in ports,
although the mail/cyrus port is another imap server which may be a
suitable replacement. Cyrus has different configuration and
operational requirements than imap-uw however, which may make it
unsuitable for many users.
Until a security audit of the imap-uw source can be completed and the
vulnerabilities patched, it is recommended that operators of "closed"
imapd servers take steps to minimize the impact of users being able to
run code on the server (i.e., by tightening the local security on the
machine to minimize the damage an intruding user can cause).
This advisory will be updated once the known vulnerabilities in
imap-uw have been addressed.
- -----BEGIN PGP SIGNATURE-----
- -----END PGP SIGNATURE-----
- --------------------------END INCLUDED TEXT--------------------
This security bulletin is provided as a service to AusCERT's members. As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.
NOTE: This is only the original release of the security bulletin. It may
not be updated when updates to the original are made. If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the original authors to ensure that the information is still current.
Contact information for the authors of the original document is included
in the Security Bulletin above. If you have any questions or need further
information, please contact them directly.
Previous advisories and external security bulletins can be retrieved from:
If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security
Internet Email: email@example.com
Facsimile: (07) 3365 7031
Telephone: (07) 3365 4417 (International: +61 7 3365 4417)
AusCERT personnel answer during Queensland business hours
which are GMT+10:00 (AEST).
On call after hours for emergencies.
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----