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 exists in the function swf_FontExtract_DefineTextCallback in swftext.c #173

Open
cxlzff opened this issue Oct 7, 2021 · 0 comments

Comments

@cxlzff
Copy link

cxlzff commented Oct 7, 2021

system info

Ubuntu x86_64, clang 6.0, swfdump (latest master a9d5082)

Command line

./src/swfdump -D @@

AddressSanitizer output

==29246==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61600000ffa0 at pc 0x00000044059d bp 0x7fffffffd270 sp 0x7fffffffd260
WRITE of size 2 at 0x61600000ffa0 thread T0
#0 0x44059c in swf_FontExtract_DefineTextCallback modules/swftext.c:508
#1 0x449c46 in swf_FontExtract_DefineText modules/swftext.c:532
#2 0x44a355 in swf_FontExtract modules/swftext.c:617
#3 0x40c2dc in fontcallback2 /test/swftools-asan/src/swfdump.c:941
#4 0x4433c6 in swf_FontEnumerate modules/swftext.c:133
#5 0x409208 in main /test/swftools-asan/src/swfdump.c:1296
#6 0x7ffff68a683f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
#7 0x40c168 in _start (/test/swftools-asan/src/swfdump+0x40c168)

AddressSanitizer can not describe address in more detail (wild memory access suspected).
SUMMARY: AddressSanitizer: heap-buffer-overflow modules/swftext.c:508 swf_FontExtract_DefineTextCallback
Shadow bytes around the buggy address:
0x0c2c7fff9fa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9fd0: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
0x0c2c7fff9fe0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c2c7fff9ff0: fa fa fa fa[fa]fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fffa000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fffa010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fffa020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fffa030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fffa040: 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
==29246==ABORTING
POC
swf_FontExtract_DefineTextCallback_poc

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