DSA-228-1 libmcrypt -- buffer overflows and memory leak

Related Vulnerabilities: CVE-2003-0031   CVE-2003-0032  

Ilia Alshanetsky discovered several buffer overflows in libmcrypt, a decryption and encryption library, that originates from improper or lacking input validation. By passing input which is longer than expected to a number of functions (multiple functions are affected) the user can successfully make libmcrypt crash and may be able to insert arbitrary, malicious code which will be executed under the user libmcrypt runs as, e.g. inside a web server. Another vulnerability exists in the way libmcrypt loads algorithms via libtool. When different algorithms are loaded dynamically, each time an algorithm is loaded a small part of memory is leaked. In a persistent environment (web server) this could lead to a memory exhaustion attack that will exhaust all available memory by launching repeated requests at an application utilizing the mcrypt library. For the current stable distribution (woody) these problems have been fixed in version 2.5.0-1woody1. The old stable distribution (potato) does not contain libmcrypt packages. For the unstable distribution (sid) these problems have been fixed in version 2.5.5-1. We recommend that you upgrade your libmcrypt packages.

Debian Security Advisory

DSA-228-1 libmcrypt -- buffer overflows and memory leak

Date Reported:
14 Jan 2003
Affected Packages:
libmcrypt
Vulnerable:
Yes
Security database references:
In the Bugtraq database (at SecurityFocus): BugTraq ID 6510, BugTraq ID 6512.
In Mitre's CVE dictionary: CVE-2003-0031, CVE-2003-0032.
More information:

Ilia Alshanetsky discovered several buffer overflows in libmcrypt, a decryption and encryption library, that originates from improper or lacking input validation. By passing input which is longer than expected to a number of functions (multiple functions are affected) the user can successfully make libmcrypt crash and may be able to insert arbitrary, malicious code which will be executed under the user libmcrypt runs as, e.g. inside a web server.

Another vulnerability exists in the way libmcrypt loads algorithms via libtool. When different algorithms are loaded dynamically, each time an algorithm is loaded a small part of memory is leaked. In a persistent environment (web server) this could lead to a memory exhaustion attack that will exhaust all available memory by launching repeated requests at an application utilizing the mcrypt library.

For the current stable distribution (woody) these problems have been fixed in version 2.5.0-1woody1.

The old stable distribution (potato) does not contain libmcrypt packages.

For the unstable distribution (sid) these problems have been fixed in version 2.5.5-1.

We recommend that you upgrade your libmcrypt packages.

Fixed in:

Debian GNU/Linux 3.0 (woody)

Source:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt_2.5.0-1woody1.dsc
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt_2.5.0-1woody1.diff.gz
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt_2.5.0.orig.tar.gz
Alpha:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_alpha.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_alpha.deb
ARM:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_arm.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_arm.deb
Intel IA-32:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_i386.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_i386.deb
Intel IA-64:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_ia64.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_ia64.deb
HPPA:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_hppa.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_hppa.deb
Motorola 680x0:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_m68k.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_m68k.deb
Big endian MIPS:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_mips.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_mips.deb
Little endian MIPS:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_mipsel.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_mipsel.deb
PowerPC:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_powerpc.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_powerpc.deb
IBM S/390:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_s390.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_s390.deb
Sun Sparc:
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt-dev_2.5.0-1woody1_sparc.deb
http://security.debian.org/pool/updates/main/libm/libmcrypt/libmcrypt4_2.5.0-1woody1_sparc.deb

MD5 checksums of the listed files are available in the original advisory.