Debian Security Advisory

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

Date Reported:
14 Jan 2003
Affected Packages:
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)

Intel IA-32:
Intel IA-64:
Motorola 680x0:
Big endian MIPS:
Little endian MIPS:
IBM S/390:
Sun Sparc:

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