CVE:CVE-2008-5005
CNNVD:CNNVD-200811-159
UW-IMAP是Linux和UNIX系统的免费IMAP服务，捆绑于各种Linux版本中。
tmail和dmail都是UW-IMAP所使用的邮件传输代理，这两个应用没有对从命令行所传送的文件名扩展名参数执行边界检查，如果用户提交了超长的文件夹名称的话就可以触发栈溢出。
对于tmail，这个溢出可能导致以root用户权限执行任意代码；对于dmail，可能导致以收件人的权限执行任意代码。以下是存在漏洞的代码段：
  [tmail.c]
    char *getusername (char *s,char **t)
    {
    char tmp[MAILTMPLEN];
      if (*t = strchr (s,'+')) {    /* have a mailbox specifier? */
        *(*t)++ = '\0';             /* yes, tie off user name */
                                    /* user+ and user+INBOX same as user */
        if (!**t || !strcmp ("INBOX",ucase (strcpy (tmp,*t)))) *t = NIL;
      }
      return s;                     /* return user name */
    }
 [dmail.c]
 int deliver (FILE *f,unsigned long msglen,char *user)
{
 MAILSTREAM *ds = NIL;
solution:Upgrade university_of_washington alpine to a higher version than 0.80,0.81,0.82,0.83,0.98,0.99,0.999,0.9999,0.99999,0.999999,1.00,1.10,2.00,and avoid the version 0.80,0.81,0.82,0.83,0.98,0.99,0.999,0.9999,0.99999,0.999999,1.00,1.10,2.00; Upgrade university_of_washington imap_toolkit to a higher version than 2002,2003,2004,2005,2006,2007,2007c,and avoid the version 2002,2003,2004,2005,2006,2007,2007c