Protect yourself against future threats.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2005.0405 -- Four iDEFENSE Security Advisories Multiple Vulnerabilities in GNU Mailutils 27 May 2005 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Product: GNU Mailutils Publisher: iDEFENSE Operating System: Linux variants UNIX variants Impact: Execute Arbitrary Code/Commands Denial of Service Access: Remote/Unauthenticated CVE Names: CAN-2005-1520 CAN-2005-1521 CAN-2005-1522 CAN-2005-1523 Original Bulletin: http://www.idefense.com/application/poi/display?id=246&type=vulnerabilities http://www.idefense.com/application/poi/display?id=247&type=vulnerabilities http://www.idefense.com/application/poi/display?id=248&type=vulnerabilities http://www.idefense.com/application/poi/display?id=249&type=vulnerabilities Comment: This bulletin contains four iDEFENSE advisories dealing with multiple vulnerabilities in GNU Mailutils. - --------------------------BEGIN INCLUDED TEXT-------------------- GNU Mailutils 0.6 mail header_get_field_name() Buffer Overflow Vulnerability iDEFENSE Security Advisory 05.25.05 http://www.idefense.com/application/poi/display?type=vulnerabilities May 25, 2005 I. BACKGROUND The GNU mailutils package is a collection of mail-related utilities, including local and remote mailbox access services. More information is available at the following site: http://www.gnu.org/software/mailutils/mailutils.html II. DESCRIPTION Exploitation of a buffer overflow vulnerability in the mail binary of the GNU Projects Mailutils package may allow a remote attacker to execute commands with the privileges of the targeted user. Due to a coding error in the library function header_get_field_name() in mailbox/header.c, a buffer overflow condition exists. The code below checks if the value of 'len' is greater than the value of 'buflen', but always sets the value of 'len' to be the same, effectively performing no instruction. len = (len > buflen) ? len : len; This code will set 'len' to the value of 'buflen' if 'len' is greater than 'buflen'. This typo allows the buffer overflow to occur. The code should be: len = (len > buflen) ? buflen : len; III. ANALYSIS Successful exploitation of the vulnerability would allow an email sent by a remote user to cause a buffer overflow, allowing execution of arbitrary commands in the context of the targeted user. Access to a user account may allow further escalation of privileges via local attacks. IV. DETECTION iDEFENSE Labs has verified the existence of this vulnerability in versions 0.5 and 0.6 of the GNU Mailutils package. It is suspected that any previous versions may also be affected. It should be noted that the mail command from the GNU mailutils package is NOT the default mail client on the vast majority of Linux installations. The mailx mail client is by far much more likely to be installed. The mailx mail client is typically installed in /bin/mail, whereas the GNU mailutils mail client is typically installed in /usr/bin/mail. These values are not universal, and additional verification should be performed to determine which version you have installed. V. WORKAROUND When possible, run client software as a regular user with limited access to system resources. This may limit the immediate consequences of client-side vulnerabilities. VI. VENDOR RESPONSE This vulnerability has been fixed in GNU mailutils 0.6.90 which is available for download at: ftp://alpha.gnu.org/gnu/mailutils/ VII. CVE INFORMATION The Common Vulnerabilities and Exposures (CVE) project has assigned the name CAN-2005-1520 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. VIII. DISCLOSURE TIMELINE 05/12/2005 Initial vendor notification 05/12/2005 Initial vendor response 05/25/2005 Public disclosure IX. CREDIT infamous41md@hotpop.com is credited with the discovery of this vulnerability. Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp Free tools, research and upcoming events http://labs.idefense.com X. LEGAL NOTICES Copyright (c) 2005 iDEFENSE, Inc. Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDEFENSE. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please email customerservice@idefense.com for permission. Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information. ======================================== GNU Mailutils 0.6 imap4d fetch_io Heap overflow Vulnerability iDEFENSE Security Advisory 05.25.05 http://www.idefense.com/application/poi/display?type=vulnerabilities May 25, 2005 I. BACKGROUND The GNU mailutils package is a collection of mail-related utilities, including local and remote mailbox access services. More information is available at the following site: http://www.gnu.org/software/mailutils/mailutils.html II. DESCRIPTION Remote exploitation of an integer overflow in the fetch_io function of the imap4d server from the GNU Project's Mailutils package error may allow an authenticated remote attacker to execute arbitrary code. The imap4d server allows remote users to retrieve their email via the Internet Message Access Protocol, version 4rev1 as specified in RFC3501. This is a client/server protocol supported by a large number of email clients on multiple platforms. The vulnerability specifically exists in the handling of partial message requests. By supplying a value for the 'END' parameter equal to 2 less than the largest value an integer on the affected system can hold, it is possible to cause the server to allocate a much smaller chunk of memory. An overflow can occur when this memory chunk is referenced. III. ANALYSIS Successful exploitation of this vulnerability could allow a remote authenticated used execute arbitrary commands in the context of the 'daemon' user. As the service is forked from a parent process, it would be possible for a remote attacker to attempt to exploit this vulnerability multiple times, although each failed attempt which caused a crash would be logged. IV. DETECTION iDEFENSE Labs has verified the existance of this vulnerability in versions 0.5 and 0.6 of the GNU Mailutils package. It is suspected that any previous versions which contain the imap4d server are also affected. V. WORKAROUND iDEFENSE is currently unaware of any effective workarounds for this issue. Access to the affected host should be filtered at the network boundary if global accessibility is not required. Restricting access to only trusted hosts and networks may reduce the likelihood of exploitation. VI. VENDOR RESPONSE This vulnerability has been fixed in GNU mailutils 0.6.90 which is available for download at: ftp://alpha.gnu.org/gnu/mailutils/ VII. CVE INFORMATION The Common Vulnerabilities and Exposures (CVE) project has assigned the name CAN-2005-1521 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. VIII. DISCLOSURE TIMELINE 05/12/2005 Initial vendor notification 05/12/2005 Initial vendor response 05/25/2005 Public disclosure IX. CREDIT infamous41md@hotpop.com is credited with the discovery of this vulnerability. Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp Free tools, research and upcoming events http://labs.idefense.com X. LEGAL NOTICES Copyright (c) 2005 iDEFENSE, Inc. Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDEFENSE. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please email customerservice@idefense.com for permission. Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information. ======================================== GNU Mailutils 0.6 imap4d FETCH Commad Resource Consumption DoS Vulnerability iDEFENSE Security Advisory 05.25.05 http://www.idefense.com/application/poi/display?type=vulnerabilities May 25, 2005 I. BACKGROUND The GNU mailutils package is a collection of mail-related utilities, including local and remote mailbox access services. More information is available at the following site: http://www.gnu.org/software/mailutils/mailutils.html II. DESCRIPTION Remote exploitation of an input validation in the FETCH command of the imap4d server from the GNU Project's Mailutils package error may allow an authenticated remote attacker to perform a denial of service against an affected system. The imap4d server allows remote users to retrieve their email via the Internet Message Access Protocol, Version 4rev1 as specified in RFC3501. This is a client/server protocol supported by a large number of email clients on multiple platforms. The vulnerability specifically exists in the handling of the sequence range agument to the FETCH command. A sequence range such as 1:4294967294 will cause the the spawned instance of the server to enter what is effectively an infinite loop, allocating memory on each cycle. III. ANALYSIS Successful exploitation of the vulnerability would allow a remote authenticated used to cause the system hosting the imap4d to become unresponsive due to lack of memory resources. On some operating systems, such as Linux, processes will be killed by the kernel out of memory manager. IV. DETECTION iDEFENSE Labs has verified the existance of this vulnerability in versions 0.5 and 0.6 of the GNU Mailutils package. It is suspected that any previous versions which contain the imap4d server are also affected. V. WORKAROUND iDEFENSE is currently unaware of any effective workarounds for this issue. Access to the affected host should be filtered at the network boundary if global accessibility is not required. Restricting access to only trusted hosts and networks may reduce the likelihood of exploitation. Applying resource limits on the memory avaialable to the imap4d process will cause the spawned instance of the server to exit when it reaches the limit. Information on how to to perform this operation is operating system dependant, and may cause some normal operations, especially on large messages, to fail. VI. VENDOR RESPONSE This vulnerability has been fixed in GNU mailutils 0.6.90 which is available for download at: ftp://alpha.gnu.org/gnu/mailutils/ VII. CVE INFORMATION The Common Vulnerabilities and Exposures (CVE) project has assigned the name CAN-2005-1522 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. VIII. DISCLOSURE TIMELINE 05/12/2005 Initial vendor notification 05/12/2005 Initial vendor response 05/25/2005 Public disclosure IX. CREDIT infamous41md@hotpop.com is credited with the discovery of this vulnerability. Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp Free tools, research and upcoming events http://labs.idefense.com X. LEGAL NOTICES Copyright (c) 2005 iDEFENSE, Inc. Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDEFENSE. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please email customerservice@idefense.com for permission. Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information. ======================================== GNU Mailutils 0.6 imap4d Format String Vulnerability iDEFENSE Security Advisory 05.25.05 http://www.idefense.com/application/poi/display?type=vulnerabilities May 25, 2005 I. BACKGROUND The GNU mailutils package is a collection of mail-related utilities, including local and remote mailbox access services. More information is available at the following site: http://www.gnu.org/software/mailutils/mailutils.html II. DESCRIPTION Remote exploitation of a format string vulnerability in the imap4d server within version 0.6 of the GNU Project's Mailutils package could allow an unauthenticated attacker to execute arbitrary code. The imap4d server allows remote users to retrieve their email via the Internet Message Access Protocol, Version 4rev1 as specified in RFC3501. This is a client/server protocol supported by a large number of email clients on multiple platforms. The vulnerability specifically exists in the handling of the command tag supplied by the remote user. Each client command sent to the server is prefixed with an identifier which is typically a short alphanumeric string such as "A0001". A different tag is generated by the client for each command. When the server has completed the task, with either success or failure, the server will send a reply with the same tag. The following snippet of code shows some of the vulnerable code: asprintf (&tempbuf, "%s %s%s %s\r\n", command->tag, sc2string (rc), command->name, format); va_start (ap, format); vasprintf (&buf, tempbuf, ap); The asprintf() command allocates a new string, created by joining the values of the tag supplied by the remote user, the text version of the result code, the name of the command being executed, and the original format string supplied to this function. The effect of this line is to generate a new format string string which is used to generate the output. As there is no check for format specifiers in the user supplied input, a remotely exploitable condition occurs. III. ANALYSIS Successful exploitation allows remote unauthenticated attackers to execute arbitrary commands on an affected system as the 'daemon' user. Sending the following command to an affected server will cause the current connection to die when the fork()ed instance of the server crashes: %n%n%n%n%n die. The '%n' format specifier writes the number of characters in the output string generated so far to the memory address pointed at by the current argument. In this case, the process attempts to write the value 0 to the next 5 memory locations in the argument list. As some of these arguments are not valid pointers, the server dies attempting to write to an invalid memory location. This will not cause a denial of service, as a new instance of the server is spawned for each accepted connection. Information about the values on the stack below the current position can be gained by sending a string similar to: %p-%p-%p-%p-%p-%p-%p-%p-%p-%p-%p info Using these format specifiers it is posslbe to contrstruct a sequence of commands which will cause arbitrary values to be written to arbitrary locations, allowing the execution of arbitrary code. IV. DETECTION iDEFENSE Labs has verified the existance of this vulnerability in versions 0.5 and 0.6 of the GNU Mailutils package. It is suspected that any previous versions which contain the imap4d server are also affected. V. WORKAROUND iDEFENSE is currently unaware of any effective workarounds for this issue. Access to the affected host should be filtered at the network boundary if global accessibility is not required. Restricting access to only trusted hosts and networks may reduce the likelihood of exploitation. VI. VENDOR RESPONSE This vulnerability has been fixed in GNU mailutils 0.6.90 which is available for download at: ftp://alpha.gnu.org/gnu/mailutils/ VII. CVE INFORMATION The Common Vulnerabilities and Exposures (CVE) project has assigned the name CAN-2005-1523 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. VIII. DISCLOSURE TIMELINE 05/12/2005 Initial vendor notification 05/12/2005 Initial vendor response 05/25/2005 Public disclosure IX. CREDIT infamous41md@hotpop.com is credited with the discovery of this vulnerability. Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp Free tools, research and upcoming events http://labs.idefense.com X. LEGAL NOTICES Copyright (c) 2005 iDEFENSE, Inc. Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDEFENSE. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please email customerservice@idefense.com for permission. Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information. - --------------------------END INCLUDED TEXT-------------------- You have received this e-mail bulletin as a result of your organisation's registration with AusCERT. The mailing list you are subscribed to is maintained within your organisation, so if you do not wish to continue receiving these bulletins you should contact your local IT manager. If you do not know who that is, please send an email to auscert@auscert.org.au and we will forward your request to the appropriate person. NOTE: Third Party Rights 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 follow or act on information or advice contained in this security bulletin is the responsibility of each user or organisation, and should be considered in accordance with your organisation's site policies and procedures. AusCERT takes no responsibility for consequences which may arise from following or acting on information or advice contained in this security bulletin. 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 author's website 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: http://www.auscert.org.au/render.html?cid=1980 If you believe that your computer system has been compromised or attacked in any way, we encourage you to let us know by completing the secure National IT Incident Reporting Form at: http://www.auscert.org.au/render.html?it=3192 =========================================================================== Australian Computer Emergency Response Team The University of Queensland Brisbane Qld 4072 Internet Email: auscert@auscert.org.au 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 member emergencies only. =========================================================================== -----BEGIN PGP SIGNATURE----- Comment: http://www.auscert.org.au/render.html?it=1967 iQCVAwUBQpauTih9+71yA2DNAQLdgQP/WhFBsiGEyRHXB7AnIi771OdDJDSpDUbq YJ0QVJRtG5dCv0Fe+ZT22nxebhNqczfWcHPWi8I9kmeU0/67qmf4VRj/0UCQK3xC Hw3s/EVjeawPWpCHMCNEfBynUaHTH5h2z8sEVPq1gunDtk3NOoqwYxedzMgNQS/W s0U+GTgvOy4= =bt6w -----END PGP SIGNATURE-----