Bug 469415 - Security bug in tmail and dmail
Summary: Security bug in tmail and dmail
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: uw-imap
Version: el5
Hardware: All
OS: Linux
medium
urgent
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: CVE-2008-5005
TreeView+ depends on / blocked
 
Reported: 2008-10-31 18:30 UTC by Pawel Salek
Modified: 2008-11-03 13:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-31 19:02:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pawel Salek 2008-10-31 18:30:34 UTC
Description of problem:
Copied from a post to imap-uw.edu:

There is a security bug in versions of the programs tmail and dmail distributed with the IMAP Toolkit versions 2007c or earlier (all versions prior to 2008-10-29). This includes the version distributed with Alpine 2.00. A fixed version of the programs is included in the IMAP Toolkit version 2007d.[cut]

If you are using tmail or dmail you should replace them with the fixed versions immediately. The bug is exploitable by local users with shell access and may be remotely exploitable on some systems. A default sendmail installation with tmail as a delivery agent is not remotely exploitable because of length limits imposed by sendmail.[cut]

http://mailman2.u.washington.edu/pipermail/imap-uw/2008-October/002267.html

Comment 1 Rex Dieter 2008-10-31 18:35:51 UTC
Pkgs built, update pending.

Comment 2 Rex Dieter 2008-10-31 19:02:40 UTC
updates push underway, expect to see uw-imap-2007d-1.el5 landing soon in an epel repo near you.

Comment 3 Tomas Hoger 2008-11-03 11:08:25 UTC
Rex, Pawel, do you have any further details about these issues?  Upstream announcement is fairly vague.  Additionally, description suggests that tmail issue can be used by local shell users to get root, but can not be exploited remotely over MTA.  On the first read, it sounds like this would expect tmail to be setuid root, which does not seem to be the case with Fedora packages by default, but seems to be suggested as required in some setups.

Sorry, I'm not very familiar with uw-imap, so suggestions are welcome.

Comment 4 Pawel Salek 2008-11-03 12:16:31 UTC
It's a classical stack overflow that can be triggered by passing
+VERYLONGSTRING as the argument to [dt]mail. The program attempts to copy the
string to a temporary buffer without checking its length. This is only root
exploit if the program is suid root. It is a remote exploit if the smtp
delivery program passes the argument to tmail longer than 1024 characters (eg
via $u variable in 
define(`LOCAL_MAILER_ARGS', `tmail $u')dnl

Comment 5 Tomas Hoger 2008-11-03 13:55:03 UTC
Pawel, thanks for the hint.  It seem to be consistent with what I managed to find out so far.  Further comments will be added to bug #469667, that will be used to track the issue across all affected products.


Note You need to log in before you can comment on or make changes to this bug.