####################################################################### Luigi Auriemma Application: Winamp iPod Plugin (ml_ipod) http://www.mlipod.com Versions: <= 2.00p19 (11 Dec 2006) Platforms: Windows (Winamp plugin) Bug: buffer-overflow in readAA() Exploitation: local Date: 12 Dec 2006 Author: Luigi Auriemma e-mail: aluigi@autistici.org web: aluigi.org ####################################################################### 1) Introduction 2) Bug 3) The Code 4) Fix ####################################################################### =============== 1) Introduction =============== ml_ipod is the open source plugin created for handling the iPod files from Winamp (http://www.winamp.com). From version 5.2 Winamp has its own iPod plugin but ml_ipod still remains a better alternative at the moment. ####################################################################### ====== 2) Bug ====== The readAA() function located in read_aa.cpp is used to read the Audible.com files (*.aa). This function is vulnerable to a buffer-overflow caused by the reading of an arbitrary amount of data (32 bit, len2) in the tag buffer of only 100 bytes: static int readAA(const char*fn, itemRecord * item) ... char buf[1024], tag[100]; ... while (ok) { fread(&len1, 4, 1, fp); // length of tag len1 = ntohl(len1); fread(&len2, 4, 1, fp); // length of value len2 = ntohl(len2); fread(tag, 1, len1, fp); ... ####################################################################### =========== 3) The Code =========== no PoC available ####################################################################### ====== 4) Fix ====== Version 2.00p20, currently available only in CVS #######################################################################