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

Heap-buffer-overflow in getName(util/decompile.c:455) #174

Open
cutedog2012 opened this issue Feb 11, 2019 · 0 comments
Open

Heap-buffer-overflow in getName(util/decompile.c:455) #174

cutedog2012 opened this issue Feb 11, 2019 · 0 comments

Comments

@cutedog2012
Copy link

cutedog2012 commented Feb 11, 2019

Hi, I found a heap buffer overflow in function getName at util/compile.c:455 on the latest master (5009802).
The details are as follows:
`==18470==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000efb8 at pc 0x000000411bef bp 0x7ffe69a3aaa0 sp 0x7ffe69a3aa90
READ of size 8 at 0x60200000efb8 thread T0
#0 0x411bee in getName /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/decompile.c:455
#1 0x417415 in decompileSETVARIABLE /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/decompile.c:1850
#2 0x41f022 in decompileAction /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/decompile.c:3303
#3 0x41f5ad in decompileActions /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/decompile.c:3494
#4 0x41f6e3 in decompile5Action /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/decompile.c:3517
#5 0x40bd72 in outputSWF_DOACTION /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/outputscript.c:1551
#6 0x40e3a1 in outputBlock /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/outputscript.c:2083
#7 0x40f3f7 in readMovie /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/main.c:281
#8 0x40fb2c in main /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/main.c:354
#9 0x7f10457e482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#10 0x401bc8 in _start (/home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/.libs/lt-swftocxx+0x401bc8)

0x60200000efb8 is located 0 bytes to the right of 8-byte region [0x60200000efb0,0x60200000efb8)
allocated by thread T0 here:
#0 0x7f104644d602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
#1 0x429372 in parseSWF_ACTIONRECORD /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/parser.c:1124
#2 0x437ed5 in parseSWF_DOACTION /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/parser.c:2434
#3 0x40fd89 in blockParse /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/blocktypes.c:145
#4 0x40f346 in readMovie /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/main.c:269
#5 0x40fb2c in main /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/main.c:354
#6 0x7f10457e482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/zyn/Lollycode/tested/libming0.4.8/poc-libming-master/util/decompile.c:455 getName
Shadow bytes around the buggy address:
0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9de0: fa fa 00 04 fa fa 00 02 fa fa 00 02 fa fa 05 fa
=>0x0c047fff9df0: fa fa 01 fa fa fa 00[fa]fa fa 02 fa fa fa 00 fa
0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9e40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
==18470==ABORTING`
poc-455.zip

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