Apple iTunes Playlist Parsing Buffer Overflow Vulnerability iDEFENSE Security Advisory 01.13.05: http://www.idefense.com/application/poi/display?type=vulnerabilities January 13, 2005 I. BACKGROUND Apple iTunes is a digital jukebox capable of playing a variety of sound file formats, sharing music and burning music CD's. More information about iTunes is available from: http://www.apple.com/itunes/ II. DESCRIPTION Remote exploitation of a buffer overflow vulnerability in Apple Computer Inc.'s iTunes music player allows attackers to execute arbitrary code. The problem specifically exists when parsing playlist files that contain long URL file entries. Malicious playlist files can come with either the .m3u or .pls extension. Though their formats are different, the vulnerability in each is the same. An example malicious .pls file with a long URL: [playlist] NumberOfEntries=1 File1=http://[A x 3045]1234 An example malicious .m3u file with a long URL: http://[A x 3045]1234 In both cases '[A x 3045]' represents any string of 3,045 bytes in length. Opening either malicious playlist file on the Microsoft Windows platform will cause iTunes to crash with an access violation when attempting to execute instruction 0x34333231, which is the little-endian ASCII code representation of '1234'. An attacker can exploit this vulnerability to redirect the flow of control and eventually execute arbitrary code. While this example is specific to the Microsoft Windows platform, exploitation on the Apple Mac OS platform is also possible. III. ANALYSIS Exploitation of the described vulnerability allows remote attackers to execute arbitrary code under the context of the user who started iTunes. Exploitation requires that an attacker convince a target user to open a malicious playlist file with a vulnerable version of iTunes. IV. DETECTION iTunes 4.7 as installed on the Microsoft Windows and Apple Mac OS platforms are affected. Earlier versions may also be susceptible. V. WORKAROUND Do not open playlist files from untrusted sources. Inspect the contents of .m3u and .pls playlist files for long URL file names prior to opening them with iTunes. VI. VENDOR RESPONSE This vulnerability is addressed in iTunes 4.7.1. iTunes 4.7.1 may be obtained from the Software Update pane in System Preferences, or Apple's iTunes download site: http://www.apple.com/itunes/download/ VII. CVE INFORMATION The Common Vulnerabilities and Exposures (CVE) project has assigned the names CAN-2005-0043 to these issues. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. VIII. DISCLOSURE TIMELINE 12/17/2004 Initial vendor notification 12/17/2004 Initial vendor response 01/13/2004 Public disclosure IX. CREDIT Sean de Regge (seanderegge[at]hotmail.com) is credited with this discovery. Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp X. LEGAL NOTICES Copyright (c) 2004 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@xxxxxxxxxxxx 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.