Generate or decompile Adobe Flash SWF files using an XML dialect. Inspect and modify the XML by hand, or by using a built in XSLT processor.
GNU General Public License v2.0
131
stars
28
forks
source link
Integer overflow in SWF::Reader::getWord and the repair plan in the last of the report #51
Open
jinyu00 opened 6 years ago
When open a crafted
swf
file , it could tiggerInteger overflow
Let's see gdb output
As you can see , The program crash in
SWF::Reader::getWord
( SWFReader.cpp )From the gdb debug infomation , the
pos
is negative numberso when access data[pos] ( data + pos ), it could access invalid memory.
The vulnerability locate in
SWFReader.cpp
andSWFReader.h
.The
pos
andlength
is signed int value.And when read data from file , it could call
Reader::getXXX
.For example ,
Reader::getData
's code are as below:When read data from file , the
pos
would add , although pos+len > length.It can lead
pos
to be negative numberThe fix method is to change the type of
pos
andlength
tounsigned int
inSWFReader.h
The poc file