{"vuid":"VU#388984","idnumber":"388984","name":"libpng fails to properly check length of transparency chunk (tRNS) data","keywords":["libpng","transparency chunk","length check","png_handle_tRNS() function","pngrutil.c"],"overview":"The Portable Network Graphics library (libpng) contains a remotely exploitable vulnerability, which could lead to arbitrary code execution on an affected system.","clean_desc":"The Portable Network Graphics (PNG) image format is used as an alternative to other image formats such as the Graphics Interchange Format (GIF). The libpng reference library is available for application developers to support the PNG image format. According to the PNG Chunk Specification, PNG images contain a series of chunks including the IHDR, IDAT, and IEND chunks. In addition to these required chunks, a PNG image may contain one or more optional chunks. The optional tRNS chunk is responsible for specifying images that use simple transparency. There are several components of the tRNS chunk. If the PLTE block is not present in a tRNS chunk, a logic error in the code responsible for validating the data segments of the tRNS chunk may lead to a buffer overflow condition. The buffer overflow vulnerability occurs in the png_handle_tRNS() function, which is responsible for ensuring that PNG images are formatted properly. When processing malformed PNG images, this function may fail to properly validate the length of the transparency chunk (tRNS) data. Multiple applications support the PNG image format, including web browsers, email clients, and various graphic utilities. Because multiple products have used the libpng reference library to implement native PNG image processing, multiple applications will be affected by this issue in different ways. Please note that this vulnerability is known to exist in Microsoft Windows Messenger and MSN Messenger. Please see MS05-009 for more details. For information regarding how this vulnerability affects Microsoft Internet Explorer, refer to MS05-025.","impact":"By introducing a malformed PNG image to a vulnerable application, a remote attacker could cause the application to crash or potentially execute arbitrary code with the privileges of the current user.","resolution":"Apply a patch from the vendor Patches have been released to address this vulnerability. Please see the Systems Affected section of this document for more details.","workarounds":"","sysaffected":"","thanks":"Thanks to Chris Evans for reporting this vulnerability.","author":"This document was written by Chad Dougherty and Damon Morda.","public":["http://scary.beasts.org/security/CESA-2004-001.txt","http://www.libpng.org/pub/png/","http://libpng.sourceforge.net/","http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html","http://www.microsoft.com/technet/security/Bulletin/MS05-009.mspx"],"cveids":["CVE-2004-0597"],"certadvisory":"","uscerttechnicalalert":null,"datecreated":"2004-07-16T14:42:25Z","publicdate":"2004-08-04T00:00:00Z","datefirstpublished":"2004-08-04T15:58:11Z","dateupdated":"2005-06-14T20:58:32Z","revision":39,"vrda_d1_directreport":"0","vrda_d1_population":"2","vrda_d1_impact":"2","cam_widelyknown":"15","cam_exploitation":"0","cam_internetinfrastructure":"10","cam_population":"13","cam_impact":"15","cam_easeofexploitation":"11","cam_attackeraccessrequired":"20","cam_scorecurrent":"20.109375","cam_scorecurrentwidelyknown":"24.13125","cam_scorecurrentwidelyknownexploited":"40.21875","ipprotocol":"","cvss_accessvector":"","cvss_accesscomplexity":"","cvss_authentication":null,"cvss_confidentialityimpact":"","cvss_integrityimpact":"","cvss_availabilityimpact":"","cvss_exploitablity":null,"cvss_remediationlevel":"","cvss_reportconfidence":"","cvss_collateraldamagepotential":"","cvss_targetdistribution":"","cvss_securityrequirementscr":"","cvss_securityrequirementsir":"","cvss_securityrequirementsar":"","cvss_basescore":"","cvss_basevector":"","cvss_temporalscore":"","cvss_environmentalscore":"","cvss_environmentalvector":"","metric":20.109375,"vulnote":null}