Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop in readMovie function() #154

Closed
JsHuang opened this issue Sep 3, 2018 · 1 comment
Closed

Infinite loop in readMovie function() #154

JsHuang opened this issue Sep 3, 2018 · 1 comment

Comments

@JsHuang
Copy link

JsHuang commented Sep 3, 2018

There is an infinite loop bug in readMovie fuction (utils/main.c) , an crafted file can cause listswf tool run infinitedly.
To reproduce it ,run listswf with poc:

$./listswf ./loop-poc
... run infinitely

stack trace:

#0  0x00007fbc5a42e2c0 in __write_nocancel () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fbc5a3afbff in _IO_new_file_write (f=0x7fbc5a6fc620 <_IO_2_1_stdout_>, data=0x7ffc535288e0, n=5534) at fileops.c:1263
#2  0x00007fbc5a3b038a in new_do_write (to_do=5534, data=0x7ffc535288e0 '\006' <repeats 200 times>..., fp=0x7fbc5a6fc620 <_IO_2_1_stdout_>) at fileops.c:518
#3  _IO_new_file_xsputn (f=0x7fbc5a6fc620 <_IO_2_1_stdout_>, data=<optimized out>, n=5534) at fileops.c:1342
#4  0x00007fbc5a386f94 in buffered_vfprintf (s=0x7fbc5a6fc620 <_IO_2_1_stdout_>, format=<optimized out>, args=<optimized out>) at vfprintf.c:2341
#5  0x00007fbc5a38432d in _IO_vfprintf_internal (s=0x7fbc5a6fc620 <_IO_2_1_stdout_>, format=0x426f5c " Password: %s\n", ap=0x7ffc5352aeb0) at vfprintf.c:1293
#6  0x00000000004012c9 in _iprintf (fmt=0x426f5c " Password: %s\n") at outputtxt.c:144
#7  0x0000000000406d97 in outputSWF_PROTECT (pblock=0x1ab9250) at outputtxt.c:1873
#8  0x00000000004098fd in outputBlock (type=24, blockp=0x1ab9250, stream=0x1ab8010) at outputtxt.c:2933
#9  0x000000000040a3a3 in readMovie (f=0x1ab8010) at main.c:281
#10 0x000000000040a6ef in main (argc=2, argv=0x7ffc5352b178) at main.c:354

loop-poc.zip

credit : ADLab of Venustech

@JsHuang
Copy link
Author

JsHuang commented Sep 3, 2018

sorry, not infinite, a big loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant