Open binjo opened 7 years ago
Can you send a Pull Request fixing this.
what about providing a binary to reproduce the issue?
Hi @radare, try this one, it is a CWS compressed flash file. http://www.diyed.co.uk/diy-ed-information-book-sample/files/flash/expressInstall.swf you may use my trivial script to decompress, https://github.com/binjo/utils/blob/master/cws2fws.py
md5sum expressInstall.swf fws-expressInstall.swf
7b65fbfaec8b2955090389af60646e8b expressInstall.swf
7089405dc1945dd72bcfb14630900f46 fws-expressInstall.swf
it should crash on any flash file :<
@xarkes please have a look at this
Hi,
When I play with r2 and the swf plugin, it crashes with a buffer overflow.
Checking the code, turns out a simple stack buffer overflow.
the
header
is a variable on the stack, the memset call with size ofSWF_HDR_MIN_SIZE + rect_size_bytes
will easily exceeds the bound, leads to buffer overflow.The parser needs to decompress the flash file first when it's compressed flash(CWS/ZWS) and proceed the parse logic IMHO.
Cheers.