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

A heap-buffer-overflow in swfaction.c:254 #114

Open
seviezhou opened this issue Aug 5, 2020 · 0 comments
Open

A heap-buffer-overflow in swfaction.c:254 #114

seviezhou opened this issue Aug 5, 2020 · 0 comments

Comments

@seviezhou
Copy link

seviezhou commented Aug 5, 2020

System info

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

Command line

./src/swfdump -D @@

AddressSanitizer output

=================================================================
==20124==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000efb4 at pc 0x7f2d4f82d1fb bp 0x7ffce65015f0 sp 0x7ffce6500d98
READ of size 4 at 0x60200000efb4 thread T0
    #0 0x7f2d4f82d1fa in strlen (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x701fa)
    #1 0x55fbc64ea928 in OpAdvance modules/swfaction.c:254
    #2 0x55fbc64eb521 in swf_DumpActions modules/swfaction.c:490
    #3 0x55fbc64da6bd in main /home/seviezhou/swftools/src/swfdump.c:1585
    #4 0x7f2d4f1d0b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #5 0x55fbc64de439 in _start (/home/seviezhou/swftools/src/swfdump+0xd0439)

0x60200000efb4 is located 0 bytes to the right of 4-byte region [0x60200000efb0,0x60200000efb4)
allocated by thread T0 here:
    #0 0x7f2d4f855612 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98612)
    #1 0x55fbc6619ca7 in rfx_alloc /home/seviezhou/swftools/lib/mem.c:30
    #2 0x7ffce6503c8f  (<unknown module>)

SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 strlen
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 fa fa fa fa 00 05 fa fa 05 fa fa fa 00 00
=>0x0c047fff9df0: fa fa 00 fa fa fa[04]fa fa fa 02 fa fa fa 01 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
==20124==ABORTING

POC

heap-overflow-OpAdvance-swfaction-254.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