### Description
Heap-buffer-overflow in isomedia/box_funcs.c:2065 in gf_isom_box_dump_start_ex
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io

Please cite our work in your research:
        GPAC Filters: https://doi.org/10.1145/3339825.3394929
        GPAC: https://doi.org/10.1145/1291233.1291452

GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB  GPAC_DISABLE_3D 
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -diso mp4box-diso-heap-buffer-over-flow-0
```
### POC
https://github.com/17ssDP/fuzzer_crashes/blob/main/gpac/mp4box-diso-heap-buffer-over-flow-0
### ASAN
```

[iso file] Box "UNKN" (start 30833) has 12 extra bytes
=================================================================
==18339==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6040000002c4 at pc 0x7ff06818591e bp 0x7fff27b7c2e0 sp 0x7fff27b7c2d0
READ of size 4 at 0x6040000002c4 thread T0
    #0 0x7ff06818591d in gf_isom_box_dump_start_ex isomedia/box_funcs.c:2065
    #1 0x7ff06818591d in gf_isom_box_dump_start isomedia/box_funcs.c:2093
    #2 0x7ff068168ae7 in trgt_box_dump isomedia/box_dump.c:5807
    #3 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
    #4 0x7ff068118ffa in gf_isom_box_array_dump isomedia/box_dump.c:104
    #5 0x7ff068185da8 in gf_isom_box_dump_done isomedia/box_funcs.c:2115
    #6 0x7ff0681689d5 in trgr_box_dump isomedia/box_dump.c:5799
    #7 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
    #8 0x7ff068118ffa in gf_isom_box_array_dump isomedia/box_dump.c:104
    #9 0x7ff068185da8 in gf_isom_box_dump_done isomedia/box_funcs.c:2115
    #10 0x7ff06811d37b in trak_box_dump isomedia/box_dump.c:553
    #11 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
    #12 0x7ff068118ffa in gf_isom_box_array_dump isomedia/box_dump.c:104
    #13 0x7ff068185da8 in gf_isom_box_dump_done isomedia/box_funcs.c:2115
    #14 0x7ff06811a792 in moov_box_dump isomedia/box_dump.c:220
    #15 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
    #16 0x7ff0681194d6 in gf_isom_dump isomedia/box_dump.c:138
    #17 0x5610e0fba804 in dump_isom_xml /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/filedump.c:2067
    #18 0x5610e0f8ad79 in mp4box_main /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/mp4box.c:6364
    #19 0x7ff067188c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #20 0x5610e0f5b0a9 in _start (/home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/bin/gcc/MP4Box+0x4e0a9)

0x6040000002c4 is located 4 bytes to the right of 48-byte region [0x604000000290,0x6040000002c0)
allocated by thread T0 here:
    #0 0x7ff06a6f4b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
    #1 0x7ff0680c3d12 in trgt_box_new isomedia/box_code_base.c:10623

SUMMARY: AddressSanitizer: heap-buffer-overflow isomedia/box_funcs.c:2065 in gf_isom_box_dump_start_ex
Shadow bytes around the buggy address:
  0x0c087fff8000: fa fa fd fd fd fd fd fa fa fa 00 00 00 00 00 05
  0x0c087fff8010: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
  0x0c087fff8020: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 01
  0x0c087fff8030: fa fa 00 00 00 00 04 fa fa fa 00 00 00 00 00 03
  0x0c087fff8040: fa fa 00 00 00 00 01 fa fa fa 00 00 00 00 00 00
=>0x0c087fff8050: fa fa 00 00 00 00 00 00[fa]fa 00 00 00 00 00 00
  0x0c087fff8060: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
  0x0c087fff8070: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
  0x0c087fff8080: fa fa 00 00 00 00 00 00 fa fa fd fd fd fd fd fd
  0x0c087fff8090: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
  0x0c087fff80a0: fa fa 00 00 00 00 00 00 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
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  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
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==18339==ABORTING
```
### Environment
```
Ubuntu 16.04
Clang 10.0.1
gcc 5.5
```
heap-buffer-overflow isomedia/box_funcs.c:2065 in gf_isom_box_dump_start_ex
This is a GitHub Issue
repo:gpac
owner:gpac
Title : heap-buffer-overflow isomedia/box_funcs.c:2065 in gf_isom_box_dump_start_ex
Issue date:

--- start body ---
### Description
Heap-buffer-overflow in isomedia/box_funcs.c:2065 in gf_isom_box_dump_start_ex
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io

Please cite our work in your research:
        GPAC Filters: https://doi.org/10.1145/3339825.3394929
        GPAC: https://doi.org/10.1145/1291233.1291452

GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB  GPAC_DISABLE_3D 
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -diso mp4box-diso-heap-buffer-over-flow-0
```
### POC
https://github.com/17ssDP/fuzzer_crashes/blob/main/gpac/mp4box-diso-heap-buffer-over-flow-0
### ASAN
```

[iso file] Box "UNKN" (start 30833) has 12 extra bytes
=================================================================
==18339==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6040000002c4 at pc 0x7ff06818591e bp 0x7fff27b7c2e0 sp 0x7fff27b7c2d0
READ of size 4 at 0x6040000002c4 thread T0
    #0 0x7ff06818591d in gf_isom_box_dump_start_ex isomedia/box_funcs.c:2065
    #1 0x7ff06818591d in gf_isom_box_dump_start isomedia/box_funcs.c:2093
    #2 0x7ff068168ae7 in trgt_box_dump isomedia/box_dump.c:5807
    #3 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
    #4 0x7ff068118ffa in gf_isom_box_array_dump isomedia/box_dump.c:104
    #5 0x7ff068185da8 in gf_isom_box_dump_done isomedia/box_funcs.c:2115
    #6 0x7ff0681689d5 in trgr_box_dump isomedia/box_dump.c:5799
    #7 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
    #8 0x7ff068118ffa in gf_isom_box_array_dump isomedia/box_dump.c:104
    #9 0x7ff068185da8 in gf_isom_box_dump_done isomedia/box_funcs.c:2115
    #10 0x7ff06811d37b in trak_box_dump isomedia/box_dump.c:553
    #11 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
    #12 0x7ff068118ffa in gf_isom_box_array_dump isomedia/box_dump.c:104
    #13 0x7ff068185da8 in gf_isom_box_dump_done isomedia/box_funcs.c:2115
    #14 0x7ff06811a792 in moov_box_dump isomedia/box_dump.c:220
    #15 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
    #16 0x7ff0681194d6 in gf_isom_dump isomedia/box_dump.c:138
    #17 0x5610e0fba804 in dump_isom_xml /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/filedump.c:2067
    #18 0x5610e0f8ad79 in mp4box_main /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/mp4box.c:6364
    #19 0x7ff067188c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #20 0x5610e0f5b0a9 in _start (/home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/bin/gcc/MP4Box+0x4e0a9)

0x6040000002c4 is located 4 bytes to the right of 48-byte region [0x604000000290,0x6040000002c0)
allocated by thread T0 here:
    #0 0x7ff06a6f4b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
    #1 0x7ff0680c3d12 in trgt_box_new isomedia/box_code_base.c:10623

SUMMARY: AddressSanitizer: heap-buffer-overflow isomedia/box_funcs.c:2065 in gf_isom_box_dump_start_ex
Shadow bytes around the buggy address:
  0x0c087fff8000: fa fa fd fd fd fd fd fa fa fa 00 00 00 00 00 05
  0x0c087fff8010: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
  0x0c087fff8020: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 01
  0x0c087fff8030: fa fa 00 00 00 00 04 fa fa fa 00 00 00 00 00 03
  0x0c087fff8040: fa fa 00 00 00 00 01 fa fa fa 00 00 00 00 00 00
=>0x0c087fff8050: fa fa 00 00 00 00 00 00[fa]fa 00 00 00 00 00 00
  0x0c087fff8060: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
  0x0c087fff8070: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
  0x0c087fff8080: fa fa 00 00 00 00 00 00 fa fa fd fd fd fd fd fd
  0x0c087fff8090: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
  0x0c087fff80a0: fa fa 00 00 00 00 00 00 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
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  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
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==18339==ABORTING
```
### Environment
```
Ubuntu 16.04
Clang 10.0.1
gcc 5.5
```
--- end body ---
