Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

An invalid memory address dereference was discovered in gf_svg_delete_attribute_value(). The vulnerability causes a segmentation fault and application crash.

**Version:**

```
MP4Box - GPAC version 1.1.0-DEV-rev1555-g339e7a736-master
(c) 2000-2021 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: --prefix=/root/fuck_bin/gpac/test
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
```
**System information**
Ubuntu 20.04 focal, AMD EPYC 7742 64-Core @ 16x 2.25GHz

**command:**

```
./MP4Box -bt poc
```
**Result**
[gf_svg_delete_attribute_value-gf_svg_delete_attribute_value.zip](https://github.com/gpac/gpac/files/7708329/gf_svg_delete_attribute_value-gf_svg_delete_attribute_value.zip)

 gf_svg_delete_attribute_value-gf_svg_delete_attribute_value/id:000611,sig:11,src:005434,op:havoc,rep:8

```
../../test/lib/MP4Box -bt gf_svg_delete_attribute_value-gf_svg_delete_attribute_value/id:000611,sig:11,src:005434,op:havoc,rep:8
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 852734
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 852734
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[LASeR] samepath coded in bitstream but no path defined !
Scene loaded - dumping 1 systems streams
[SVG Dumping] smil duration not assigned
[SVG Dumping] field by of type UnknownType not supported
[1]    230016 segmentation fault  ../../test/lib/MP4Box -bt
```

**gdb**

 gf_svg_delete_attribute_value-gf_svg_delete_attribute_value/id:000611,sig:11,src:005434,op:havoc,rep:8

```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff78c9200 in gf_svg_delete_attribute_value () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
───────────────────────────────────────────────────[ REGISTERS ]───────────────────────────────────────────────────
 RAX  0x7ffff78c9200 (gf_svg_delete_attribute_value+576) ◂— mov    rdi, qword ptr [rsi + 0x10]
 RBX  0x5555555e1e10 ◂— 0x340072 /* 'r' */
 RCX  0x0
 RDX  0x7ffff7e0d840 ◂— 0xffabb7bdffabb7b0
 RDI  0x4b
 RSI  0x0
 R8   0x7
 R9   0x0
 R10  0xfffffffffffff279
 R11  0x7ffff76ca600 (__memmove_avx_unaligned) ◂— endbr64
 R12  0x5555555d36f0 ◂— 0x0
 R13  0x1
 R14  0x5555555d36f0 ◂— 0x0
 R15  0x0
 RBP  0x0
 RSP  0x7fffffff70d0 —▸ 0x5555555d3a60 —▸ 0x5555555e0ed0 —▸ 0x5555555e1eb0 ◂— 0x0
 RIP  0x7ffff78c9200 (gf_svg_delete_attribute_value+576) ◂— mov    rdi, qword ptr [rsi + 0x10]
────────────────────────────────────────────────────[ DISASM ]─────────────────────────────────────────────────────
 ► 0x7ffff78c9200 <gf_svg_delete_attribute_value+576>    mov    rdi, qword ptr [rsi + 0x10]
   0x7ffff78c9204 <gf_svg_delete_attribute_value+580>    lea    r13, [rsi + 8]
   0x7ffff78c9208 <gf_svg_delete_attribute_value+584>    test   rdi, rdi
   0x7ffff78c920b <gf_svg_delete_attribute_value+587>    jne    gf_svg_delete_attribute_value+746                <gf_svg_delete_attribute_value+746>
    ↓
   0x7ffff78c92aa <gf_svg_delete_attribute_value+746>    call   gf_free@plt                <gf_free@plt>

   0x7ffff78c92af <gf_svg_delete_attribute_value+751>    jmp    gf_svg_delete_attribute_value+593                <gf_svg_delete_attribute_value+593>

   0x7ffff78c92b4                                        nop    word ptr cs:[rax + rax]
   0x7ffff78c92bf                                        nop
   0x7ffff78c92c0 <gf_svg_reset_animate_values>          endbr64
   0x7ffff78c92c4 <gf_svg_reset_animate_values+4>        push   r14
   0x7ffff78c92c6 <gf_svg_reset_animate_values+6>        test   edi, 0xff00
─────────────────────────────────────────────────────[ STACK ]─────────────────────────────────────────────────────
00:0000│ rsp 0x7fffffff70d0 —▸ 0x5555555d3a60 —▸ 0x5555555e0ed0 —▸ 0x5555555e1eb0 ◂— 0x0
01:0008│     0x7fffffff70d8 —▸ 0x5555555e1e10 ◂— 0x340072 /* 'r' */
02:0010│     0x7fffffff70e0 —▸ 0x5555555e1e30 ◂— 0x4b /* 'K' */
03:0018│     0x7fffffff70e8 —▸ 0x5555555d36f0 ◂— 0x0
04:0020│     0x7fffffff70f0 ◂— 0x1
05:0028│     0x7fffffff70f8 —▸ 0x5555555d36f0 ◂— 0x0
06:0030│     0x7fffffff7100 ◂— 0x0
07:0038│     0x7fffffff7108 —▸ 0x7ffff78c9130 (gf_svg_delete_attribute_value+368) ◂— jmp    0x7ffff78c8ffd
───────────────────────────────────────────────────[ BACKTRACE ]───────────────────────────────────────────────────
 ► f 0   0x7ffff78c9200 gf_svg_delete_attribute_value+576
   f 1   0x7ffff78c9130 gf_svg_delete_attribute_value+368
   f 2   0x7ffff78e2b85 gf_node_delete_attributes+69
   f 3   0x7ffff78c8c3a gf_svg_node_del+282
   f 4   0x7ffff784b51d gf_node_unregister+349
   f 5   0x7ffff784b6f4 gf_node_unregister_children+36
   f 6   0x7ffff784b731 gf_sg_parent_reset+17
   f 7   0x7ffff78c8c42 gf_svg_node_del+290
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
pwndbg> bt
#0  0x00007ffff78c9200 in gf_svg_delete_attribute_value () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#1  0x00007ffff78c9130 in gf_svg_delete_attribute_value () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#2  0x00007ffff78e2b85 in gf_node_delete_attributes () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#3  0x00007ffff78c8c3a in gf_svg_node_del () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#4  0x00007ffff784b51d in gf_node_unregister () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#5  0x00007ffff784b6f4 in gf_node_unregister_children () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#6  0x00007ffff784b731 in gf_sg_parent_reset () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#7  0x00007ffff78c8c42 in gf_svg_node_del () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#8  0x00007ffff784b51d in gf_node_unregister () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#9  0x00007ffff7850396 in gf_sg_command_del () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#10 0x00007ffff7a893b3 in gf_sm_del () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#11 0x0000555555584423 in dump_isom_scene ()
#12 0x000055555557b42c in mp4boxMain ()
#13 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe1c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe1b8) at ../csu/libc-start.c:308
#14 0x000055555556c45e in _start ()
```


Invalid memory address dereference in gf_svg_delete_attribute_value()
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Invalid memory address dereference in gf_svg_delete_attribute_value()
Issue date:

--- start body ---
Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

An invalid memory address dereference was discovered in gf_svg_delete_attribute_value(). The vulnerability causes a segmentation fault and application crash.

**Version:**

```
MP4Box - GPAC version 1.1.0-DEV-rev1555-g339e7a736-master
(c) 2000-2021 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: --prefix=/root/fuck_bin/gpac/test
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
```
**System information**
Ubuntu 20.04 focal, AMD EPYC 7742 64-Core @ 16x 2.25GHz

**command:**

```
./MP4Box -bt poc
```
**Result**
[gf_svg_delete_attribute_value-gf_svg_delete_attribute_value.zip](https://github.com/gpac/gpac/files/7708329/gf_svg_delete_attribute_value-gf_svg_delete_attribute_value.zip)

 gf_svg_delete_attribute_value-gf_svg_delete_attribute_value/id:000611,sig:11,src:005434,op:havoc,rep:8

```
../../test/lib/MP4Box -bt gf_svg_delete_attribute_value-gf_svg_delete_attribute_value/id:000611,sig:11,src:005434,op:havoc,rep:8
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 852734
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 852734
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[LASeR] samepath coded in bitstream but no path defined !
Scene loaded - dumping 1 systems streams
[SVG Dumping] smil duration not assigned
[SVG Dumping] field by of type UnknownType not supported
[1]    230016 segmentation fault  ../../test/lib/MP4Box -bt
```

**gdb**

 gf_svg_delete_attribute_value-gf_svg_delete_attribute_value/id:000611,sig:11,src:005434,op:havoc,rep:8

```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff78c9200 in gf_svg_delete_attribute_value () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
───────────────────────────────────────────────────[ REGISTERS ]───────────────────────────────────────────────────
 RAX  0x7ffff78c9200 (gf_svg_delete_attribute_value+576) ◂— mov    rdi, qword ptr [rsi + 0x10]
 RBX  0x5555555e1e10 ◂— 0x340072 /* 'r' */
 RCX  0x0
 RDX  0x7ffff7e0d840 ◂— 0xffabb7bdffabb7b0
 RDI  0x4b
 RSI  0x0
 R8   0x7
 R9   0x0
 R10  0xfffffffffffff279
 R11  0x7ffff76ca600 (__memmove_avx_unaligned) ◂— endbr64
 R12  0x5555555d36f0 ◂— 0x0
 R13  0x1
 R14  0x5555555d36f0 ◂— 0x0
 R15  0x0
 RBP  0x0
 RSP  0x7fffffff70d0 —▸ 0x5555555d3a60 —▸ 0x5555555e0ed0 —▸ 0x5555555e1eb0 ◂— 0x0
 RIP  0x7ffff78c9200 (gf_svg_delete_attribute_value+576) ◂— mov    rdi, qword ptr [rsi + 0x10]
────────────────────────────────────────────────────[ DISASM ]─────────────────────────────────────────────────────
 ► 0x7ffff78c9200 <gf_svg_delete_attribute_value+576>    mov    rdi, qword ptr [rsi + 0x10]
   0x7ffff78c9204 <gf_svg_delete_attribute_value+580>    lea    r13, [rsi + 8]
   0x7ffff78c9208 <gf_svg_delete_attribute_value+584>    test   rdi, rdi
   0x7ffff78c920b <gf_svg_delete_attribute_value+587>    jne    gf_svg_delete_attribute_value+746                <gf_svg_delete_attribute_value+746>
    ↓
   0x7ffff78c92aa <gf_svg_delete_attribute_value+746>    call   gf_free@plt                <gf_free@plt>

   0x7ffff78c92af <gf_svg_delete_attribute_value+751>    jmp    gf_svg_delete_attribute_value+593                <gf_svg_delete_attribute_value+593>

   0x7ffff78c92b4                                        nop    word ptr cs:[rax + rax]
   0x7ffff78c92bf                                        nop
   0x7ffff78c92c0 <gf_svg_reset_animate_values>          endbr64
   0x7ffff78c92c4 <gf_svg_reset_animate_values+4>        push   r14
   0x7ffff78c92c6 <gf_svg_reset_animate_values+6>        test   edi, 0xff00
─────────────────────────────────────────────────────[ STACK ]─────────────────────────────────────────────────────
00:0000│ rsp 0x7fffffff70d0 —▸ 0x5555555d3a60 —▸ 0x5555555e0ed0 —▸ 0x5555555e1eb0 ◂— 0x0
01:0008│     0x7fffffff70d8 —▸ 0x5555555e1e10 ◂— 0x340072 /* 'r' */
02:0010│     0x7fffffff70e0 —▸ 0x5555555e1e30 ◂— 0x4b /* 'K' */
03:0018│     0x7fffffff70e8 —▸ 0x5555555d36f0 ◂— 0x0
04:0020│     0x7fffffff70f0 ◂— 0x1
05:0028│     0x7fffffff70f8 —▸ 0x5555555d36f0 ◂— 0x0
06:0030│     0x7fffffff7100 ◂— 0x0
07:0038│     0x7fffffff7108 —▸ 0x7ffff78c9130 (gf_svg_delete_attribute_value+368) ◂— jmp    0x7ffff78c8ffd
───────────────────────────────────────────────────[ BACKTRACE ]───────────────────────────────────────────────────
 ► f 0   0x7ffff78c9200 gf_svg_delete_attribute_value+576
   f 1   0x7ffff78c9130 gf_svg_delete_attribute_value+368
   f 2   0x7ffff78e2b85 gf_node_delete_attributes+69
   f 3   0x7ffff78c8c3a gf_svg_node_del+282
   f 4   0x7ffff784b51d gf_node_unregister+349
   f 5   0x7ffff784b6f4 gf_node_unregister_children+36
   f 6   0x7ffff784b731 gf_sg_parent_reset+17
   f 7   0x7ffff78c8c42 gf_svg_node_del+290
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
pwndbg> bt
#0  0x00007ffff78c9200 in gf_svg_delete_attribute_value () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#1  0x00007ffff78c9130 in gf_svg_delete_attribute_value () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#2  0x00007ffff78e2b85 in gf_node_delete_attributes () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#3  0x00007ffff78c8c3a in gf_svg_node_del () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#4  0x00007ffff784b51d in gf_node_unregister () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#5  0x00007ffff784b6f4 in gf_node_unregister_children () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#6  0x00007ffff784b731 in gf_sg_parent_reset () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#7  0x00007ffff78c8c42 in gf_svg_node_del () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#8  0x00007ffff784b51d in gf_node_unregister () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#9  0x00007ffff7850396 in gf_sg_command_del () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#10 0x00007ffff7a893b3 in gf_sm_del () from /root/fuck_bin/gpac/test/lib/libgpac.so.10
#11 0x0000555555584423 in dump_isom_scene ()
#12 0x000055555557b42c in mp4boxMain ()
#13 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe1c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe1b8) at ../csu/libc-start.c:308
#14 0x000055555556c45e in _start ()
```


--- end body ---
