[FreeImage] Integer overflow in PluginPCX.cpp

2015.08.28
Credit: pcheng
Risk: Medium
Local: Yes
Remote: No
CVE: N/A
CWE: N/A

The following bug was reported to upstream and Debian security team. CVE-2015-0852 was assigned by Debian security team. Name : FreeImage Affected Version: <= 3.17.0 URL : http://freeimage.sourceforge.net/ Description : An integer overflow issue in the FreeImage project was reported and fixed recently. Upstream fix: Revision 1.18 http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginPCX.cpp?view=log&pathrev=MAIN Details: The PluginPCX.cpp file(version 3.17.0) has: 371 unsigned width = header.window[2] - header.window[0] + 1; 372 unsigned height = header.window[3] - header.window[1] + 1; 373 unsigned bitcount = header.bpp * header.planes; However, it's possible that header.window[2] < header.window[0], and also header.window[3] < header.window[1]. In this two cases, width and height can be overflowed. And this can lead further issue in the rest of the code. Take the following lines for example: 568 for (x = 0; x < width; x++) { 569 bits[x * 3 + FI_RGBA_RED] = pline[x]; 570 } The write operation on buffer bits can help an attacker to corrupt the heap.

References:

http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginPCX.cpp?view=log&pathrev=MAIN


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top