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

Null pointer dereference in newVar3 (decompile.c) #162

Open
JsHuang opened this Issue Sep 21, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@JsHuang
Copy link

JsHuang commented Sep 21, 2018

A null pointer dereference bug was found in function newVar3() (in master version,not the issue #118 )

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106     ../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) bt
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x0000000000408a27 in newVar3 (var=0x0, var2=0x424ecd "===", var3=0x0) at decompile.c:569
#2  0x000000000040abf6 in decompileArithmeticOp (n=6, actions=0x634450, maxn=12) at decompile.c:1267
#3  0x0000000000411140 in decompileAction (n=6, actions=0x634450, maxn=12) at decompile.c:3385
#4  0x00000000004114dd in decompileActions (n=12, actions=0x634450, indent=6) at decompile.c:3494
#5  0x000000000040ec6b in decompileIF (n=2, actions=0x649d20, maxn=5) at decompile.c:2627
#6  0x0000000000411052 in decompileAction (n=2, actions=0x649d20, maxn=5) at decompile.c:3335
#7  0x00000000004114dd in decompileActions (n=5, actions=0x649d20, indent=5) at decompile.c:3494
#8  0x0000000000410a14 in decompileSETTARGET (n=3, actions=0x649be0, maxn=16, is_type2=1) at decompile.c:3169
#9  0x000000000041140d in decompileAction (n=3, actions=0x649be0, maxn=16) at decompile.c:3465
#10 0x00000000004114dd in decompileActions (n=16, actions=0x649be0, indent=4) at decompile.c:3494
#11 0x000000000040d60f in decompile_SWITCH (n=0, actions=0x649af0, maxn=28, off1end=175) at decompile.c:2235
#12 0x000000000040e9a2 in decompileIF (n=2, actions=0x63f100, maxn=4) at decompile.c:2594
#13 0x0000000000411052 in decompileAction (n=2, actions=0x63f100, maxn=4) at decompile.c:3335
#14 0x00000000004114dd in decompileActions (n=4, actions=0x63f100, indent=3) at decompile.c:3494
#15 0x0000000000410a14 in decompileSETTARGET (n=11, actions=0x63ed40, maxn=32, is_type2=1) at decompile.c:3169
#16 0x000000000041140d in decompileAction (n=11, actions=0x63ed40, maxn=32) at decompile.c:3465
#17 0x00000000004114dd in decompileActions (n=32, actions=0x63ed40, indent=2) at decompile.c:3494
#18 0x000000000040d60f in decompile_SWITCH (n=0, actions=0x63ec50, maxn=44, off1end=147) at decompile.c:2235
#19 0x000000000040e9a2 in decompileIF (n=2, actions=0x634910, maxn=10) at decompile.c:2594
#20 0x0000000000411052 in decompileAction (n=2, actions=0x634910, maxn=10) at decompile.c:3335
#21 0x00000000004114dd in decompileActions (n=10, actions=0x634910, indent=1) at decompile.c:3494
#22 0x0000000000410a14 in decompileSETTARGET (n=1, actions=0x634870, maxn=11, is_type2=1) at decompile.c:3169
#23 0x000000000041140d in decompileAction (n=1, actions=0x634870, maxn=11) at decompile.c:3465
#24 0x00000000004114dd in decompileActions (n=11, actions=0x634870, indent=0) at decompile.c:3494
#25 0x00000000004115df in decompile5Action (n=11, actions=0x634870, indent=0) at decompile.c:3517
#26 0x00000000004055e1 in outputSWF_DOACTION (pblock=0x631250) at outputscript.c:1551
#27 0x0000000000406907 in outputBlock (type=12, blockp=0x631250, stream=0x630010) at outputscript.c:2083
#28 0x000000000040737f in readMovie (f=0x630010) at main.c:281
#29 0x00000000004076cb in main (argc=2, argv=0x7fffffffe508) at main.c:354

to reproduce it ,run swftopython with segmentaion_fault_decompile_569

./swftopython segmentaion_fault_decompile_569

poc file https://github.com/JsHuang/libming-poc/blob/master/swftopython/segmentaion_fault_decompile_569

credit: ADLab of Venustech

segmentaion_fault_decompile_569.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment