Description
Stack-based buffer overflow in the check_file_head function in extra.c in mcrypt 2.6.8 and earlier allows user-assisted remote attackers to execute arbitrary code via an encrypted file with a crafted header containing long salt data that is not properly handled during decryption.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | mcrypt | 2.6.8-1.1 | — |
| Debian 13 | mcrypt | 2.6.8-1.1 | — |
| Debian 12 | mcrypt | 2.6.8-1.1 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 2
- mcrypt 2.5.8 - Local Stack Overflow EDB-22928 · local · Nov 26, 2012 · verified
- mcrypt 2.6.8 - Stack Buffer Overflow (PoC) EDB-22938 · dos · Nov 26, 2012 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- FEDORA-2012-13599 vendor-advisory
- FEDORA-2012-13657 vendor-advisory
- http://packetstormsecurity.org/files/116268/mcrypt-2.6.8-Buffer-Overflow-Proof-Of-Concept.html
- FEDORA-2012-13656 vendor-advisory
- [oss-security] 20120906 Re: CVE request - mcrypt buffer overflow flaw mailing-list
- 51010 third-party-advisory
- 1027532 vdb-entry
- 50507 third-party-advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=855029