issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 261k β | issue_title stringlengths 1 925 | issue_comments_url stringlengths 56 81 | issue_comments_count int64 0 2.5k | issue_created_at stringlengths 20 20 | issue_updated_at stringlengths 20 20 | issue_html_url stringlengths 37 62 | issue_github_id int64 387k 2.46B | issue_number int64 1 127k |
|---|---|---|---|---|---|---|---|---|---|
[
"gpac",
"gpac"
] | 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 free was discovered in gf_sg_command_del(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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/poc_17
```
[poc_17.zip](https://github.com/gpac/gpac/files/7696726/poc_17.zip)
**Result**
```
[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] Unknown box type prl in parent dref
[iso file] Incomplete box mdat - start 11495 size 860323
[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] Unknown box type prl in parent dref
[iso file] Incomplete box mdat - start 11495 size 860323
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[MP4 Loading] decoding sample 1 from track ID 8 failed
free(): invalid pointer
[1] 3334251 abort ./MP4Box -bt ./poc/poc_17
```
**gdb**
```
free(): invalid pointer
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x7ffff72bf040 ββ 0x7ffff72bf040
RCX 0x7ffff758218b (raise+203) ββ mov rax, qword ptr [rsp + 0x108]
RDX 0x0
RDI 0x2
RSI 0x7fffffff6f20 ββ 0x0
R8 0x0
R9 0x7fffffff6f20 ββ 0x0
R10 0x8
R11 0x246
R12 0x7fffffff7190 ββ 0x0
R13 0x10
R14 0x7ffff7ffb000 ββ 0x6565726600001000
R15 0x1
RBP 0x7fffffff7270 ββΈ 0x5555555df1e0 ββΈ 0x5555555d4370 ββ 0x0
RSP 0x7fffffff6f20 ββ 0x0
RIP 0x7ffff758218b (raise+203) ββ mov rax, qword ptr [rsp + 0x108]
βββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff758218b <raise+203> mov rax, qword ptr [rsp + 0x108]
0x7ffff7582193 <raise+211> xor rax, qword ptr fs:[0x28]
0x7ffff758219c <raise+220> jne raise+260 <raise+260>
β
0x7ffff75821c4 <raise+260> call __stack_chk_fail <__stack_chk_fail>
0x7ffff75821c9 nop dword ptr [rax]
0x7ffff75821d0 <killpg> endbr64
0x7ffff75821d4 <killpg+4> test edi, edi
0x7ffff75821d6 <killpg+6> js killpg+16 <killpg+16>
0x7ffff75821d8 <killpg+8> neg edi
0x7ffff75821da <killpg+10> jmp kill <kill>
0x7ffff75821df <killpg+15> nop
ββββββββββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββββββββ
00:0000β rsi r9 rsp 0x7fffffff6f20 ββ 0x0
01:0008β 0x7fffffff6f28 ββΈ 0x7ffff77534c8 ββ 0xe001200003748 /* 'H7' */
02:0010β 0x7fffffff6f30 ββΈ 0x7fffffff72f0 ββΈ 0x5555555d47a0 ββΈ 0x5555555d4370 ββ 0x0
03:0018β 0x7fffffff6f38 ββΈ 0x7ffff7fe7c2e ββ mov r11, rax
04:0020β 0x7fffffff6f40 ββ 0x0
05:0028β 0x7fffffff6f48 ββ 0x0
06:0030β 0x7fffffff6f50 ββΈ 0x5555555df390 ββΈ 0x5555555df3f0 ββΈ 0x5555555df0f0 ββ 0x0
07:0038β 0x7fffffff6f58 ββ 0x0
ββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff758218b raise+203
f 1 0x7ffff7561859 abort+299
f 2 0x7ffff75cc3ee __libc_message+670
f 3 0x7ffff75d447c
f 4 0x7ffff75d5cac _int_free+748
f 5 0x7ffff784f461 gf_sg_command_del+353
f 6 0x7ffff7a88203 gf_sm_del+195
f 7 0x555555584423 dump_isom_scene+627
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
`break gf_svg_delete_attribute_value`
```
pwndbg>
0x00007ffff784f45c in gf_sg_command_del () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x0
RCX 0x5555555df310 ββ 0x0
*RDX 0x5555555d4370 ββ 0x0
RDI 0x0
RSI 0x5555555df300 ββ 0x0
R8 0x2
R9 0xfffffff6
R10 0x7ffff775ba72 ββ 'gf_node_unregister_children'
R11 0x7ffff784a6d0 (gf_node_unregister_children) ββ endbr64
R12 0x5555555df2e0 ββ 0x0
R13 0x5555555d47a0 ββΈ 0x5555555d4370 ββ 0x0
R14 0x5555555d4370 ββ 0x0
R15 0x0
RBP 0x5555555df1e0 ββΈ 0x5555555d4370 ββ 0x0
RSP 0x7fffffff7310 ββ 0x1
*RIP 0x7ffff784f45c (gf_sg_command_del+348) ββ call 0x7ffff78c7fb0
βββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββ
0x7ffff784f449 <gf_sg_command_del+329> mov rsi, qword ptr [r12 + 8]
0x7ffff784f44e <gf_sg_command_del+334> test rsi, rsi
0x7ffff784f451 <gf_sg_command_del+337> je gf_sg_command_del+255
<gf_sg_command_del+255>
0x7ffff784f453 <gf_sg_command_del+339> mov edi, dword ptr [r12 + 4]
0x7ffff784f458 <gf_sg_command_del+344> mov rdx, qword ptr [rbp]
βΊ 0x7ffff784f45c <gf_sg_command_del+348> call gf_svg_delete_attribute_value <gf_svg_delete_attribute_value>
rdi: 0x0
rsi: 0x5555555df300 ββ 0x0
rdx: 0x5555555d4370 ββ 0x0
rcx: 0x5555555df310 ββ 0x0
0x7ffff784f461 <gf_sg_command_del+353> jmp gf_sg_command_del+255
<gf_sg_command_del+255>
0x7ffff784f463 <gf_sg_command_del+355> nop dword ptr [rax + rax]
0x7ffff784f468 <gf_sg_command_del+360> mov rdi, qword ptr [r12 + 8]
0x7ffff784f46d <gf_sg_command_del+365> test rdi, rdi
0x7ffff784f470 <gf_sg_command_del+368> je gf_sg_command_del+384
<gf_sg_command_del+384>
ββββββββββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff7310 ββ 0x1
01:0008β 0x7fffffff7318 ββ 0x5cf4ff747866de00
02:0010β 0x7fffffff7320 ββΈ 0x7fffffff7340 ββΈ 0x5555555df1e0 ββΈ 0x5555555d4370 ββ 0x0
03:0018β 0x7fffffff7328 ββΈ 0x5555555defe0 ββ 0x8
04:0020β 0x7fffffff7330 ββΈ 0x5555555df130 ββ 0x0
05:0028β 0x7fffffff7338 ββΈ 0x7ffff7a88203 (gf_sm_del+195) ββ jmp 0x7ffff7a881c8
06:0030β 0x7fffffff7340 ββΈ 0x5555555df1e0 ββΈ 0x5555555d4370 ββ 0x0
07:0038β 0x7fffffff7348 ββ 0x5cf4ff747866de00
ββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff784f45c gf_sg_command_del+348
f 1 0x7ffff7a88203 gf_sm_del+195
f 2 0x555555584423 dump_isom_scene+627
f 3 0x55555557b42c mp4boxMain+9228
f 4 0x7ffff75630b3 __libc_start_main+243
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg>
free(): invalid pointer
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ
RAX 0x0
*RBX 0x7ffff72bf040 ββ 0x7ffff72bf040
*RCX 0x7ffff758218b (raise+203) ββ mov rax, qword ptr [rsp + 0x108]
*RDX 0x0
*RDI 0x2
*RSI 0x7fffffff6f20 ββ 0x0
*R8 0x0
*R9 0x7fffffff6f20 ββ 0x0
*R10 0x8
*R11 0x246
*R12 0x7fffffff7190 ββ 0x0
*R13 0x10
*R14 0x7ffff7ffb000 ββ 0x6565726600001000
*R15 0x1
*RBP 0x7fffffff7270 ββΈ 0x5555555df1e0 ββΈ 0x5555555d4370 ββ 0x0
*RSP 0x7fffffff6f20 ββ 0x0
*RIP 0x7ffff758218b (raise+203) ββ mov rax, qword ptr [rsp + 0x108]
βββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff758218b <raise+203> mov rax, qword ptr [rsp + 0x108]
0x7ffff7582193 <raise+211> xor rax, qword ptr fs:[0x28]
0x7ffff758219c <raise+220> jne raise+260 <raise+260>
β
0x7ffff75821c4 <raise+260> call __stack_chk_fail <__stack_chk_fail>
0x7ffff75821c9 nop dword ptr [rax]
0x7ffff75821d0 <killpg> endbr64
0x7ffff75821d4 <killpg+4> test edi, edi
0x7ffff75821d6 <killpg+6> js killpg+16 <killpg+16>
0x7ffff75821d8 <killpg+8> neg edi
0x7ffff75821da <killpg+10> jmp kill <kill>
0x7ffff75821df <killpg+15> nop
ββββββββββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββββββββ
00:0000β rsi r9 rsp 0x7fffffff6f20 ββ 0x0
01:0008β 0x7fffffff6f28 ββΈ 0x7ffff77534c8 ββ 0xe001200003748 /* 'H7' */
02:0010β 0x7fffffff6f30 ββΈ 0x7fffffff72f0 ββΈ 0x5555555d47a0 ββΈ 0x5555555d4370 ββ 0x0
03:0018β 0x7fffffff6f38 ββΈ 0x7ffff7fe7c2e ββ mov r11, rax
04:0020β 0x7fffffff6f40 ββ 0x0
05:0028β 0x7fffffff6f48 ββ 0x0
06:0030β 0x7fffffff6f50 ββΈ 0x5555555df390 ββΈ 0x5555555df3f0 ββΈ 0x5555555df0f0 ββ 0x0
07:0038β 0x7fffffff6f58 ββ 0x0
ββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff758218b raise+203
f 1 0x7ffff7561859 abort+299
f 2 0x7ffff75cc3ee __libc_message+670
f 3 0x7ffff75d447c
f 4 0x7ffff75d5cac _int_free+748
f 5 0x7ffff784f461 gf_sg_command_del+353
f 6 0x7ffff7a88203 gf_sm_del+195
f 7 0x555555584423 dump_isom_scene+627
```
| Invalid free in gf_sg_command_del() | https://api.github.com/repos/gpac/gpac/issues/1980/comments | 0 | 2021-12-11T09:14:52Z | 2021-12-13T13:22:09Z | https://github.com/gpac/gpac/issues/1980 | 1,077,479,083 | 1,980 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in lsr_read_id.part(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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_15
./MP4Box -bt poc_16
./MP4Box -bt poc_18
```
[poc.zip](https://github.com/gpac/gpac/files/7696725/poc.zip)
**Result**
poc_15
```
[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 852201
[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 852201
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[LASeR] samepolyXXX coded in bitstream but no polyXXX defined !
[LASeR] samepolyXXX coded in bitstream but no polyXXX defined !
[LASeR] samepolyXXX coded in bitstream but no polyXXX defined !
[LASeR] samerect coded in bitstream but no rect defined !
[LASeR] samerect coded in bitstream but no rect defined !
[1] 1501387 segmentation fault ./MP4Box -bt ./poc/poc_15
```
poc_16
```
[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 861267
[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 861267
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[1] 2404995 segmentation fault ./MP4Box -bt ./poc/poc_16
```
poc_18
```
[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 861267
[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 861267
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[1] 1048981 segmentation fault ./MP4Box -bt ./poc/poc_18
```
**gdb**
poc_15
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ
RAX 0x770000007c
RBX 0x0
RCX 0x5555555e5760 ββ 0x8b374bf60d8b0d94
RDX 0x0
RDI 0x5555555deda0 ββΈ 0x5555555e4e20 ββΈ 0x7fffffff69c0 ββ 0x5b0000006e /* 'n' */
RSI 0x0
R8 0x5555555e5740 ββΈ 0x5555555e4730 ββΈ 0x5555555e5530 ββ 0x0
R9 0x5555555e5a10 ββ 0x2b0
R10 0x5555555c6010 ββ 0x0
R11 0x7ffff7727be0 (main_arena+96) ββΈ 0x5555555e5af0 ββ 0x3529 /* ')5' */
R12 0x7fffffff69c0 ββ 0x5b0000006e /* 'n' */
R13 0x3
R14 0xe
R15 0x0
RBP 0x5555555dcf10 ββΈ 0x5555555d2750 ββ 0x0
RSP 0x7fffffff68a0 ββΈ 0x5555555e56e0 ββΈ 0x5555555e5700 ββ 0x800000030000042b
RIP 0x7ffff7b508f8 (lsr_read_id.part+232) ββ cmp byte ptr [rax], 0x23
βββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7b508f8 <lsr_read_id.part+232> cmp byte ptr [rax], 0x23
0x7ffff7b508fb <lsr_read_id.part+235> sete dl
0x7ffff7b508fe <lsr_read_id.part+238> xor esi, esi
0x7ffff7b50900 <lsr_read_id.part+240> lea rdi, [rax + rdx + 1]
0x7ffff7b50905 <lsr_read_id.part+245> mov edx, 0xa
0x7ffff7b5090a <lsr_read_id.part+250> call strtol@plt <strtol@plt>
0x7ffff7b5090f <lsr_read_id.part+255> cmp r14d, eax
0x7ffff7b50912 <lsr_read_id.part+258> je lsr_read_id.part+608 <lsr_read_id.part+608>
0x7ffff7b50918 <lsr_read_id.part+264> add r15d, 1
0x7ffff7b5091c <lsr_read_id.part+268> cmp r15d, r13d
0x7ffff7b5091f <lsr_read_id.part+271> jb lsr_read_id.part+208 <lsr_read_id.part+208>
ββββββββββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff68a0 ββΈ 0x5555555e56e0 ββΈ 0x5555555e5700 ββ 0x800000030000042b
... β 2 skipped
03:0018β 0x7fffffff68b8 ββΈ 0x7ffff784961e (gf_node_setup+30) ββ mov qword ptr [rbx], rax
04:0020β 0x7fffffff68c0 ββ 0x42b
... β 2 skipped
07:0038β 0x7fffffff68d8 ββ 0xaaefd0fae3bbeb00
ββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7b508f8 lsr_read_id.part+232
f 1 0x7ffff7b5e4bb lsr_read_rect+139
f 2 0x7ffff7b5a965 lsr_read_scene_content_model+661
f 3 0x7ffff7b5b62c lsr_read_group_content.part+316
f 4 0x7ffff7b5f0fc lsr_read_data+108
f 5 0x7ffff7b5ab3d lsr_read_scene_content_model+1133
f 6 0x7ffff7b5b62c lsr_read_group_content.part+316
f 7 0x7ffff7b5e536 lsr_read_rect+262
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7b5e4bb in lsr_read_rect () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7b5a965 in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7b5f0fc in lsr_read_data () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff7b5ab3d in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff7b5e536 in lsr_read_rect () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff7b5a965 in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#10 0x00007ffff7b5cea8 in lsr_read_audio.isra () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#11 0x00007ffff7b5ac18 in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#12 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#13 0x00007ffff7b60795 in lsr_read_svg () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#14 0x00007ffff7b575c7 in lsr_read_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#15 0x00007ffff7b59914 in lsr_decode_laser_unit () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#16 0x00007ffff7b6204d in gf_laser_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#17 0x00007ffff7aa1eb1 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#18 0x00005555555844a8 in dump_isom_scene ()
#19 0x000055555557b42c in mp4boxMain ()
#20 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe218, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe208) at ../csu/libc-start.c:308
#21 0x000055555556c45e in _start ()
```
poc_16
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x0
RCX 0x0
RDX 0x0
RDI 0x5555555de970 ββΈ 0x5555555dee00 ββΈ 0x5555555dedb0 ββ 0x0
RSI 0x1
R8 0x1999999999999999
R9 0x0
R10 0x7ffff76daac0 (_nl_C_LC_CTYPE_toupper+512) ββ 0x100000000
R11 0x7ffff76db3c0 (_nl_C_LC_CTYPE_class+256) ββ 0x2000200020002
R12 0x5555555dee88 ββ 0x0
R13 0x2
R14 0x2
R15 0x1
RBP 0x5555555dcc30 ββΈ 0x5555555d26d0 ββ 0x0
RSP 0x7fffffff6d40 ββΈ 0x5555555df280 ββΈ 0x5555555df2a0 ββ 0x800000030000041a
RIP 0x7ffff7b508f8 (lsr_read_id.part+232) ββ cmp byte ptr [rax], 0x23
βββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7b508f8 <lsr_read_id.part+232> cmp byte ptr [rax], 0x23
0x7ffff7b508fb <lsr_read_id.part+235> sete dl
0x7ffff7b508fe <lsr_read_id.part+238> xor esi, esi
0x7ffff7b50900 <lsr_read_id.part+240> lea rdi, [rax + rdx + 1]
0x7ffff7b50905 <lsr_read_id.part+245> mov edx, 0xa
0x7ffff7b5090a <lsr_read_id.part+250> call strtol@plt <strtol@plt>
0x7ffff7b5090f <lsr_read_id.part+255> cmp r14d, eax
0x7ffff7b50912 <lsr_read_id.part+258> je lsr_read_id.part+608 <lsr_read_id.part+608>
0x7ffff7b50918 <lsr_read_id.part+264> add r15d, 1
0x7ffff7b5091c <lsr_read_id.part+268> cmp r15d, r13d
0x7ffff7b5091f <lsr_read_id.part+271> jb lsr_read_id.part+208 <lsr_read_id.part+208>
ββββββββββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6d40 ββΈ 0x5555555df280 ββΈ 0x5555555df2a0 ββ 0x800000030000041a
... β 2 skipped
03:0018β 0x7fffffff6d58 ββΈ 0x7ffff784961e (gf_node_setup+30) ββ mov qword ptr [rbx], rax
04:0020β 0x7fffffff6d60 ββ 0x41a
... β 2 skipped
07:0038β 0x7fffffff6d78 ββ 0x5c21095cb581c200
ββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7b508f8 lsr_read_id.part+232
f 1 0x7ffff7b55c63 lsr_read_foreignObject+99
f 2 0x7ffff7b5abb0 lsr_read_scene_content_model+1248
f 3 0x7ffff7b5b62c lsr_read_group_content.part+316
f 4 0x7ffff7b60795 lsr_read_svg+885
f 5 0x7ffff7b575c7 lsr_read_command_list+759
f 6 0x7ffff7b59914 lsr_decode_laser_unit+708
f 7 0x7ffff7b6204d gf_laser_decode_command_list+333
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7b55c63 in lsr_read_foreignObject () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7b5abb0 in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7b60795 in lsr_read_svg () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff7b575c7 in lsr_read_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff7b59914 in lsr_decode_laser_unit () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff7b6204d in gf_laser_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff7aa1eb1 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00005555555844a8 in dump_isom_scene ()
#10 0x000055555557b42c in mp4boxMain ()
#11 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe218, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe208) at ../csu/libc-start.c:308
#12 0x000055555556c45e in _start ()
```
poc_18
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x0
RCX 0x0
RDX 0x0
RDI 0x5555555de970 ββΈ 0x5555555dee00 ββΈ 0x5555555dedb0 ββ 0x0
RSI 0x1
R8 0x1999999999999999
R9 0x0
R10 0x7ffff76daac0 (_nl_C_LC_CTYPE_toupper+512) ββ 0x100000000
R11 0x7ffff76db3c0 (_nl_C_LC_CTYPE_class+256) ββ 0x2000200020002
R12 0x5555555dee88 ββ 0x0
R13 0x2
R14 0x4
R15 0x1
RBP 0x5555555dcc30 ββΈ 0x5555555d26d0 ββ 0x0
RSP 0x7fffffff6d80 ββΈ 0x5555555df1f0 ββΈ 0x5555555df210 ββ 0x8000000300000415
RIP 0x7ffff7b508f8 (lsr_read_id.part+232) ββ cmp byte ptr [rax], 0x23
βββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7b508f8 <lsr_read_id.part+232> cmp byte ptr [rax], 0x23
0x7ffff7b508fb <lsr_read_id.part+235> sete dl
0x7ffff7b508fe <lsr_read_id.part+238> xor esi, esi
0x7ffff7b50900 <lsr_read_id.part+240> lea rdi, [rax + rdx + 1]
0x7ffff7b50905 <lsr_read_id.part+245> mov edx, 0xa
0x7ffff7b5090a <lsr_read_id.part+250> call strtol@plt <strtol@plt>
0x7ffff7b5090f <lsr_read_id.part+255> cmp r14d, eax
0x7ffff7b50912 <lsr_read_id.part+258> je lsr_read_id.part+608 <lsr_read_id.part+608>
0x7ffff7b50918 <lsr_read_id.part+264> add r15d, 1
0x7ffff7b5091c <lsr_read_id.part+268> cmp r15d, r13d
0x7ffff7b5091f <lsr_read_id.part+271> jb lsr_read_id.part+208 <lsr_read_id.part+208>
ββββββββββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6d80 ββΈ 0x5555555df1f0 ββΈ 0x5555555df210 ββ 0x8000000300000415
... β 2 skipped
03:0018β 0x7fffffff6d98 ββΈ 0x7ffff784961e (gf_node_setup+30) ββ mov qword ptr [rbx], rax
04:0020β 0x7fffffff6da0 ββ 0x415
... β 2 skipped
07:0038β 0x7fffffff6db8 ββ 0x812c333cc038400
ββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7b508f8 lsr_read_id.part+232
f 1 0x7ffff7b5d22e lsr_read_ellipse+78
f 2 0x7ffff7b5abc8 lsr_read_scene_content_model+1272
f 3 0x7ffff7b5b62c lsr_read_group_content.part+316
f 4 0x7ffff7b60795 lsr_read_svg+885
f 5 0x7ffff7b575c7 lsr_read_command_list+759
f 6 0x7ffff7b59914 lsr_decode_laser_unit+708
f 7 0x7ffff7b6204d gf_laser_decode_command_list+333
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7b5d22e in lsr_read_ellipse () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7b5abc8 in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7b60795 in lsr_read_svg () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff7b575c7 in lsr_read_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff7b59914 in lsr_decode_laser_unit () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff7b6204d in gf_laser_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff7aa1eb1 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00005555555844a8 in dump_isom_scene ()
#10 0x000055555557b42c in mp4boxMain ()
#11 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe218, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe208) at ../csu/libc-start.c:308
#12 0x000055555556c45e in _start ()
```
| Null Pointer Dereference in lsr_read_id.part() | https://api.github.com/repos/gpac/gpac/issues/1979/comments | 1 | 2021-12-11T09:14:24Z | 2021-12-13T13:22:41Z | https://github.com/gpac/gpac/issues/1979 | 1,077,478,960 | 1,979 |
[
"gpac",
"gpac"
] | 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_sg_vrml_mf_reset(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr poc_14
```
[poc_14.zip](https://github.com/gpac/gpac/files/7696722/poc_14.zip)
**Result**
```
./MP4Box -lsr ./poc/poc_14
[iso file] Box "stco" (start 2057) has 6144 extra bytes
[iso file] Box "stco" is larger than container box
[iso file] Box "stbl" size 1814 (start 415) invalid (read 7894)
[iso file] Unknown box type 00040000 in parent dref
[iso file] extra box maxr found in hinf, deleting
[iso file] Box "stss" (start 9939) has 32 extra bytes
[iso file] extra box maxr found in hinf, deleting
[iso file] Track with no sample description box !
[iso file] Incomplete box mdat - start 11495 size 859244
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] Box "stco" (start 2057) has 6144 extra bytes
[iso file] Box "stco" is larger than container box
[iso file] Box "stbl" size 1814 (start 415) invalid (read 7894)
[iso file] Unknown box type 00040000 in parent dref
[iso file] extra box maxr found in hinf, deleting
[iso file] Box "stss" (start 9939) has 32 extra bytes
[iso file] extra box maxr found in hinf, deleting
[iso file] Track with no sample description box !
[iso file] Incomplete box mdat - start 11495 size 859244
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[1] 250723 segmentation fault ./MP4Box -lsr ./poc/poc_14
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff78a0d66 in gf_sg_vrml_mf_reset () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x0
RCX 0x7fffffff6160 ββ 0x3f00000004
RDX 0x8
RDI 0x0
RSI 0x3f
R8 0x0
R9 0x0
R10 0x7ffff775c1f5 ββ 'gf_sg_script_field_get_info'
R11 0x7ffff788f770 (gf_sg_script_field_get_info) ββ endbr64
R12 0x7fffffff6160 ββ 0x3f00000004
R13 0x5555555deb80 ββ 0x0
R14 0x5555555dfbb0 ββΈ 0x5555555dfbe0 ββ 0x100000051 /* 'Q' */
R15 0x1d61
RBP 0x5555555d5d60 ββ 0x0
RSP 0x7fffffff6118 ββΈ 0x7ffff790fbe2 (gf_bifs_dec_field+130) ββ mov r15d, eax
RIP 0x7ffff78a0d66 (gf_sg_vrml_mf_reset+6) ββ cmp qword ptr [rdi + 8], 0
βββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff78a0d66 <gf_sg_vrml_mf_reset+6> cmp qword ptr [rdi + 8], 0
0x7ffff78a0d6b <gf_sg_vrml_mf_reset+11> je gf_sg_vrml_mf_reset+144
<gf_sg_vrml_mf_reset+144>
β
0x7ffff78a0df0 <gf_sg_vrml_mf_reset+144> ret
0x7ffff78a0df1 <gf_sg_vrml_mf_reset+145> nop dword ptr [rax]
0x7ffff78a0df8 <gf_sg_vrml_mf_reset+152> mov eax, dword ptr [rbp]
0x7ffff78a0dfb <gf_sg_vrml_mf_reset+155> mov r13, qword ptr [rbp + 8]
0x7ffff78a0dff <gf_sg_vrml_mf_reset+159> test eax, eax
0x7ffff78a0e01 <gf_sg_vrml_mf_reset+161> je gf_sg_vrml_mf_reset+198
<gf_sg_vrml_mf_reset+198>
β
0x7ffff78a0e26 <gf_sg_vrml_mf_reset+198> mov rdi, r13
0x7ffff78a0e29 <gf_sg_vrml_mf_reset+201> call gf_free@plt <gf_free@plt>
0x7ffff78a0e2e <gf_sg_vrml_mf_reset+206> jmp gf_sg_vrml_mf_reset+100
<gf_sg_vrml_mf_reset+100>
ββββββββββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6118 ββΈ 0x7ffff790fbe2 (gf_bifs_dec_field+130) ββ mov r15d, eax
01:0008β 0x7fffffff6120 ββΈ 0x7fffffff65b0 ββΈ 0x5555555dfbb0 ββΈ 0x5555555dfbe0 ββ 0x100000051 /* 'Q' */
02:0010β 0x7fffffff6128 ββΈ 0x7fffffff65b0 ββΈ 0x5555555dfbb0 ββΈ 0x5555555dfbe0 ββ 0x100000051 /* 'Q' */
03:0018β 0x7fffffff6130 ββ 0x0
04:0020β 0x7fffffff6138 ββΈ 0x5555555e0210 ββ 0x3f00000000
05:0028β 0x7fffffff6140 ββΈ 0x7fffffff6160 ββ 0x3f00000004
06:0030β 0x7fffffff6148 ββΈ 0x7fffffff65b0 ββΈ 0x5555555dfbb0 ββΈ 0x5555555dfbe0 ββ 0x100000051 /* 'Q' */
07:0038β 0x7fffffff6150 ββ 0x1d61
ββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff78a0d66 gf_sg_vrml_mf_reset+6
f 1 0x7ffff790fbe2 gf_bifs_dec_field+130
f 2 0x7ffff7916f02 ParseScriptField+274
f 3 0x7ffff7919c50 SFScript_Parse+1056
f 4 0x7ffff790eb3c gf_bifs_dec_sf_field+1548
f 5 0x7ffff790eff2 BD_DecMFFieldList+242
f 6 0x7ffff790fac5 gf_bifs_dec_node_mask+421
f 7 0x7ffff790e158 gf_bifs_dec_node+936
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff78a0d66 in gf_sg_vrml_mf_reset () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff790fbe2 in gf_bifs_dec_field () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7916f02 in ParseScriptField () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7919c50 in SFScript_Parse () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff790eb3c in gf_bifs_dec_sf_field () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff790eff2 in BD_DecMFFieldList () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff790fac5 in gf_bifs_dec_node_mask () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff790e158 in gf_bifs_dec_node () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff790f3b4 in BD_DecMFFieldVec () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00007ffff790f7f7 in gf_bifs_dec_node_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#10 0x00007ffff790e066 in gf_bifs_dec_node () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#11 0x00007ffff7906580 in BD_DecSceneReplace () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#12 0x00007ffff7914e5e in BM_SceneReplace () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#13 0x00007ffff7915023 in BM_ParseCommand () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#14 0x00007ffff7915353 in gf_bifs_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#15 0x00007ffff7aa1d91 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#16 0x00005555555844a8 in dump_isom_scene ()
#17 0x000055555557b42c in mp4boxMain ()
#18 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe208, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe1f8) at ../csu/libc-start.c:308
#19 0x000055555556c45e in _start ()
```
| Invalid memory address dereference in gf_sg_vrml_mf_reset() | https://api.github.com/repos/gpac/gpac/issues/1978/comments | 0 | 2021-12-11T09:10:17Z | 2021-12-13T13:22:09Z | https://github.com/gpac/gpac/issues/1978 | 1,077,478,008 | 1,978 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in lsr_read_id.part(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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_15
./MP4Box -bt poc_16
./MP4Box -bt poc_18
```
[poc.zip](https://github.com/gpac/gpac/files/7696720/poc.zip)
**Result**
poc_15
```
[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 852201
[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 852201
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[LASeR] samepolyXXX coded in bitstream but no polyXXX defined !
[LASeR] samepolyXXX coded in bitstream but no polyXXX defined !
[LASeR] samepolyXXX coded in bitstream but no polyXXX defined !
[LASeR] samerect coded in bitstream but no rect defined !
[LASeR] samerect coded in bitstream but no rect defined !
[1] 1501387 segmentation fault ./MP4Box -bt ./poc/poc_15
```
poc_16
```
[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 861267
[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 861267
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[1] 2404995 segmentation fault ./MP4Box -bt ./poc/poc_16
```
poc_18
```
[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 861267
[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 861267
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[1] 1048981 segmentation fault ./MP4Box -bt ./poc/poc_18
```
**gdb**
poc_15
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ
RAX 0x770000007c
RBX 0x0
RCX 0x5555555e5760 ββ 0x8b374bf60d8b0d94
RDX 0x0
RDI 0x5555555deda0 ββΈ 0x5555555e4e20 ββΈ 0x7fffffff69c0 ββ 0x5b0000006e /* 'n' */
RSI 0x0
R8 0x5555555e5740 ββΈ 0x5555555e4730 ββΈ 0x5555555e5530 ββ 0x0
R9 0x5555555e5a10 ββ 0x2b0
R10 0x5555555c6010 ββ 0x0
R11 0x7ffff7727be0 (main_arena+96) ββΈ 0x5555555e5af0 ββ 0x3529 /* ')5' */
R12 0x7fffffff69c0 ββ 0x5b0000006e /* 'n' */
R13 0x3
R14 0xe
R15 0x0
RBP 0x5555555dcf10 ββΈ 0x5555555d2750 ββ 0x0
RSP 0x7fffffff68a0 ββΈ 0x5555555e56e0 ββΈ 0x5555555e5700 ββ 0x800000030000042b
RIP 0x7ffff7b508f8 (lsr_read_id.part+232) ββ cmp byte ptr [rax], 0x23
βββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7b508f8 <lsr_read_id.part+232> cmp byte ptr [rax], 0x23
0x7ffff7b508fb <lsr_read_id.part+235> sete dl
0x7ffff7b508fe <lsr_read_id.part+238> xor esi, esi
0x7ffff7b50900 <lsr_read_id.part+240> lea rdi, [rax + rdx + 1]
0x7ffff7b50905 <lsr_read_id.part+245> mov edx, 0xa
0x7ffff7b5090a <lsr_read_id.part+250> call strtol@plt <strtol@plt>
0x7ffff7b5090f <lsr_read_id.part+255> cmp r14d, eax
0x7ffff7b50912 <lsr_read_id.part+258> je lsr_read_id.part+608 <lsr_read_id.part+608>
0x7ffff7b50918 <lsr_read_id.part+264> add r15d, 1
0x7ffff7b5091c <lsr_read_id.part+268> cmp r15d, r13d
0x7ffff7b5091f <lsr_read_id.part+271> jb lsr_read_id.part+208 <lsr_read_id.part+208>
ββββββββββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff68a0 ββΈ 0x5555555e56e0 ββΈ 0x5555555e5700 ββ 0x800000030000042b
... β 2 skipped
03:0018β 0x7fffffff68b8 ββΈ 0x7ffff784961e (gf_node_setup+30) ββ mov qword ptr [rbx], rax
04:0020β 0x7fffffff68c0 ββ 0x42b
... β 2 skipped
07:0038β 0x7fffffff68d8 ββ 0xaaefd0fae3bbeb00
ββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7b508f8 lsr_read_id.part+232
f 1 0x7ffff7b5e4bb lsr_read_rect+139
f 2 0x7ffff7b5a965 lsr_read_scene_content_model+661
f 3 0x7ffff7b5b62c lsr_read_group_content.part+316
f 4 0x7ffff7b5f0fc lsr_read_data+108
f 5 0x7ffff7b5ab3d lsr_read_scene_content_model+1133
f 6 0x7ffff7b5b62c lsr_read_group_content.part+316
f 7 0x7ffff7b5e536 lsr_read_rect+262
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7b5e4bb in lsr_read_rect () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7b5a965 in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7b5f0fc in lsr_read_data () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff7b5ab3d in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff7b5e536 in lsr_read_rect () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff7b5a965 in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#10 0x00007ffff7b5cea8 in lsr_read_audio.isra () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#11 0x00007ffff7b5ac18 in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#12 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#13 0x00007ffff7b60795 in lsr_read_svg () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#14 0x00007ffff7b575c7 in lsr_read_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#15 0x00007ffff7b59914 in lsr_decode_laser_unit () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#16 0x00007ffff7b6204d in gf_laser_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#17 0x00007ffff7aa1eb1 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#18 0x00005555555844a8 in dump_isom_scene ()
#19 0x000055555557b42c in mp4boxMain ()
#20 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe218, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe208) at ../csu/libc-start.c:308
#21 0x000055555556c45e in _start ()
```
poc_16
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x0
RCX 0x0
RDX 0x0
RDI 0x5555555de970 ββΈ 0x5555555dee00 ββΈ 0x5555555dedb0 ββ 0x0
RSI 0x1
R8 0x1999999999999999
R9 0x0
R10 0x7ffff76daac0 (_nl_C_LC_CTYPE_toupper+512) ββ 0x100000000
R11 0x7ffff76db3c0 (_nl_C_LC_CTYPE_class+256) ββ 0x2000200020002
R12 0x5555555dee88 ββ 0x0
R13 0x2
R14 0x2
R15 0x1
RBP 0x5555555dcc30 ββΈ 0x5555555d26d0 ββ 0x0
RSP 0x7fffffff6d40 ββΈ 0x5555555df280 ββΈ 0x5555555df2a0 ββ 0x800000030000041a
RIP 0x7ffff7b508f8 (lsr_read_id.part+232) ββ cmp byte ptr [rax], 0x23
βββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7b508f8 <lsr_read_id.part+232> cmp byte ptr [rax], 0x23
0x7ffff7b508fb <lsr_read_id.part+235> sete dl
0x7ffff7b508fe <lsr_read_id.part+238> xor esi, esi
0x7ffff7b50900 <lsr_read_id.part+240> lea rdi, [rax + rdx + 1]
0x7ffff7b50905 <lsr_read_id.part+245> mov edx, 0xa
0x7ffff7b5090a <lsr_read_id.part+250> call strtol@plt <strtol@plt>
0x7ffff7b5090f <lsr_read_id.part+255> cmp r14d, eax
0x7ffff7b50912 <lsr_read_id.part+258> je lsr_read_id.part+608 <lsr_read_id.part+608>
0x7ffff7b50918 <lsr_read_id.part+264> add r15d, 1
0x7ffff7b5091c <lsr_read_id.part+268> cmp r15d, r13d
0x7ffff7b5091f <lsr_read_id.part+271> jb lsr_read_id.part+208 <lsr_read_id.part+208>
ββββββββββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6d40 ββΈ 0x5555555df280 ββΈ 0x5555555df2a0 ββ 0x800000030000041a
... β 2 skipped
03:0018β 0x7fffffff6d58 ββΈ 0x7ffff784961e (gf_node_setup+30) ββ mov qword ptr [rbx], rax
04:0020β 0x7fffffff6d60 ββ 0x41a
... β 2 skipped
07:0038β 0x7fffffff6d78 ββ 0x5c21095cb581c200
ββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7b508f8 lsr_read_id.part+232
f 1 0x7ffff7b55c63 lsr_read_foreignObject+99
f 2 0x7ffff7b5abb0 lsr_read_scene_content_model+1248
f 3 0x7ffff7b5b62c lsr_read_group_content.part+316
f 4 0x7ffff7b60795 lsr_read_svg+885
f 5 0x7ffff7b575c7 lsr_read_command_list+759
f 6 0x7ffff7b59914 lsr_decode_laser_unit+708
f 7 0x7ffff7b6204d gf_laser_decode_command_list+333
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7b55c63 in lsr_read_foreignObject () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7b5abb0 in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7b60795 in lsr_read_svg () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff7b575c7 in lsr_read_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff7b59914 in lsr_decode_laser_unit () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff7b6204d in gf_laser_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff7aa1eb1 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00005555555844a8 in dump_isom_scene ()
#10 0x000055555557b42c in mp4boxMain ()
#11 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe218, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe208) at ../csu/libc-start.c:308
#12 0x000055555556c45e in _start ()
```
poc_18
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x0
RCX 0x0
RDX 0x0
RDI 0x5555555de970 ββΈ 0x5555555dee00 ββΈ 0x5555555dedb0 ββ 0x0
RSI 0x1
R8 0x1999999999999999
R9 0x0
R10 0x7ffff76daac0 (_nl_C_LC_CTYPE_toupper+512) ββ 0x100000000
R11 0x7ffff76db3c0 (_nl_C_LC_CTYPE_class+256) ββ 0x2000200020002
R12 0x5555555dee88 ββ 0x0
R13 0x2
R14 0x4
R15 0x1
RBP 0x5555555dcc30 ββΈ 0x5555555d26d0 ββ 0x0
RSP 0x7fffffff6d80 ββΈ 0x5555555df1f0 ββΈ 0x5555555df210 ββ 0x8000000300000415
RIP 0x7ffff7b508f8 (lsr_read_id.part+232) ββ cmp byte ptr [rax], 0x23
βββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7b508f8 <lsr_read_id.part+232> cmp byte ptr [rax], 0x23
0x7ffff7b508fb <lsr_read_id.part+235> sete dl
0x7ffff7b508fe <lsr_read_id.part+238> xor esi, esi
0x7ffff7b50900 <lsr_read_id.part+240> lea rdi, [rax + rdx + 1]
0x7ffff7b50905 <lsr_read_id.part+245> mov edx, 0xa
0x7ffff7b5090a <lsr_read_id.part+250> call strtol@plt <strtol@plt>
0x7ffff7b5090f <lsr_read_id.part+255> cmp r14d, eax
0x7ffff7b50912 <lsr_read_id.part+258> je lsr_read_id.part+608 <lsr_read_id.part+608>
0x7ffff7b50918 <lsr_read_id.part+264> add r15d, 1
0x7ffff7b5091c <lsr_read_id.part+268> cmp r15d, r13d
0x7ffff7b5091f <lsr_read_id.part+271> jb lsr_read_id.part+208 <lsr_read_id.part+208>
ββββββββββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6d80 ββΈ 0x5555555df1f0 ββΈ 0x5555555df210 ββ 0x8000000300000415
... β 2 skipped
03:0018β 0x7fffffff6d98 ββΈ 0x7ffff784961e (gf_node_setup+30) ββ mov qword ptr [rbx], rax
04:0020β 0x7fffffff6da0 ββ 0x415
... β 2 skipped
07:0038β 0x7fffffff6db8 ββ 0x812c333cc038400
ββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7b508f8 lsr_read_id.part+232
f 1 0x7ffff7b5d22e lsr_read_ellipse+78
f 2 0x7ffff7b5abc8 lsr_read_scene_content_model+1272
f 3 0x7ffff7b5b62c lsr_read_group_content.part+316
f 4 0x7ffff7b60795 lsr_read_svg+885
f 5 0x7ffff7b575c7 lsr_read_command_list+759
f 6 0x7ffff7b59914 lsr_decode_laser_unit+708
f 7 0x7ffff7b6204d gf_laser_decode_command_list+333
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7b508f8 in lsr_read_id.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7b5d22e in lsr_read_ellipse () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7b5abc8 in lsr_read_scene_content_model () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7b5b62c in lsr_read_group_content.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7b60795 in lsr_read_svg () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff7b575c7 in lsr_read_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff7b59914 in lsr_decode_laser_unit () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff7b6204d in gf_laser_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff7aa1eb1 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00005555555844a8 in dump_isom_scene ()
#10 0x000055555557b42c in mp4boxMain ()
#11 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe218, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe208) at ../csu/libc-start.c:308
#12 0x000055555556c45e in _start ()
```
| Null Pointer Dereference in lsr_read_id.part() | https://api.github.com/repos/gpac/gpac/issues/1977/comments | 0 | 2021-12-11T09:09:45Z | 2021-12-13T13:22:08Z | https://github.com/gpac/gpac/issues/1977 | 1,077,477,869 | 1,977 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in gf_node_get_field_count(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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_10
```
[poc_10.zip](https://github.com/gpac/gpac/files/7696161/poc_10.zip)
**Result**
```
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type traI in parent moov
[iso file] Box "stss" (start 9939) has 32 extra bytes
[iso file] extra box maxr found in hinf, deleting
[iso file] Track with no sample description box !
[iso file] Incomplete box mdat - start 11495 size 861261
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type traI in parent moov
[iso file] Box "stss" (start 9939) has 32 extra bytes
[iso file] extra box maxr found in hinf, deleting
[iso file] Track with no sample description box !
[iso file] Incomplete box mdat - start 11495 size 861261
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[1] 3708974 segmentation fault ./MP4Box -bt ./poc/poc_10
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff784a747 in gf_node_get_field_count () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x0
RCX 0x2
RDX 0x5555555da000 ββ 0x0
RDI 0x5555555da340 ββ 0x0
RSI 0x5555555da020 ββΈ 0x5555555da000 ββ 0x0
R8 0x1
R9 0x0
R10 0x7ffff775bac3 ββ 'gf_node_get_field_count'
R11 0x7ffff784a740 (gf_node_get_field_count) ββ endbr64
R12 0x5555555db570 ββΈ 0x5555555db5d0 ββ 0x800000010001002d /* '-' */
R13 0x5555555d9210 ββ 0x0
R14 0x5555555da340 ββ 0x0
R15 0x7fffffff6c20 ββ 0x0
RBP 0x5555555def40 ββ 0x0
RSP 0x7fffffff6bf8 ββΈ 0x7ffff784b5e5 (gf_sg_reset+661) ββ xor ecx, ecx
RIP 0x7ffff784a747 (gf_node_get_field_count+7) ββ movzx eax, word ptr [rax]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff784a747 <gf_node_get_field_count+7> movzx eax, word ptr [rax]
0x7ffff784a74a <gf_node_get_field_count+10> test ax, ax
0x7ffff784a74d <gf_node_get_field_count+13> je gf_node_get_field_count+27
<gf_node_get_field_count+27>
β
0x7ffff784a75b <gf_node_get_field_count+27> xor eax, eax
0x7ffff784a75d <gf_node_get_field_count+29> ret
0x7ffff784a75e <gf_node_get_field_count+30> nop
0x7ffff784a760 <gf_node_get_field_count+32> jmp gf_node_get_attribute_count
<gf_node_get_attribute_count>
β
0x7ffff78e1a80 <gf_node_get_attribute_count> endbr64
0x7ffff78e1a84 <gf_node_get_attribute_count+4> test rdi, rdi
0x7ffff78e1a87 <gf_node_get_attribute_count+7> je gf_node_get_attribute_count+48
<gf_node_get_attribute_count+48>
β
0x7ffff78e1ab0 <gf_node_get_attribute_count+48> xor r8d, r8d
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6bf8 ββΈ 0x7ffff784b5e5 (gf_sg_reset+661) ββ xor ecx, ecx
01:0008β 0x7fffffff6c00 ββΈ 0x5555555db570 ββΈ 0x5555555db5d0 ββ 0x800000010001002d /* '-' */
02:0010β 0x7fffffff6c08 ββ 0x3100000006
03:0018β 0x7fffffff6c10 ββΈ 0x5555555def10 ββ 0x0
04:0020β 0x7fffffff6c18 ββ 0x2d000000000000
05:0028β r15 0x7fffffff6c20 ββ 0x0
06:0030β 0x7fffffff6c28 ββ 0x770000007c /* '|' */
07:0038β 0x7fffffff6c30 ββ 0x5b0000006e /* 'n' */
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff784a747 gf_node_get_field_count+7
f 1 0x7ffff784b5e5 gf_sg_reset+661
f 2 0x7ffff784ba47 gf_sg_del+55
f 3 0x7ffff788b7f8 gf_sg_proto_del+424
f 4 0x7ffff7905f88 gf_bifs_dec_proto_list+680
f 5 0x7ffff7913a11 BM_ParseInsert+769
f 6 0x7ffff7914fe1 BM_ParseCommand+113
f 7 0x7ffff7915353 gf_bifs_decode_command_list+163
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff784a747 in gf_node_get_field_count () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff784b5e5 in gf_sg_reset () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff784ba47 in gf_sg_del () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff788b7f8 in gf_sg_proto_del () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7905f88 in gf_bifs_dec_proto_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff7913a11 in BM_ParseInsert () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff7914fe1 in BM_ParseCommand () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff7915353 in gf_bifs_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff7aa1d91 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00005555555844a8 in dump_isom_scene ()
#10 0x000055555557b42c in mp4boxMain ()
#11 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe218, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe208) at ../csu/libc-start.c:308
#12 0x000055555556c45e in _start ()
```
| Null Pointer Dereference in gf_node_get_field_count() | https://api.github.com/repos/gpac/gpac/issues/1976/comments | 1 | 2021-12-11T01:10:04Z | 2021-12-13T13:23:06Z | https://github.com/gpac/gpac/issues/1976 | 1,077,344,168 | 1,976 |
[
"gpac",
"gpac"
] | 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 free 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-revUNKNOWN_REV
(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:
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 -lsr ./poc/poc_12
```
[poc_12.zip](https://github.com/gpac/gpac/files/7696155/poc_12.zip)
**Result**
```
./MP4Box -lsr ./poc/poc_12
[iso file] Box "stco" (start 2057) has 6144 extra bytes
[iso file] Box "stco" is larger than container box
[iso file] Box "stbl" size 1814 (start 415) invalid (read 7894)
[iso file] Unknown box type 00040000 in parent dref
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Incomplete box mdat - start 11495 size 803523
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] Box "stco" (start 2057) has 6144 extra bytes
[iso file] Box "stco" is larger than container box
[iso file] Box "stbl" size 1814 (start 415) invalid (read 7894)
[iso file] Unknown box type 00040000 in parent dref
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Incomplete box mdat - start 11495 size 803523
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[MP4 Loading] Unable to fetch sample 1 from track ID 7 - aborting track import
[LASeR] sametext coded in bitstream but no text defined !
[LASeR] samerect coded in bitstream but no rect defined !
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[MP4 Loading] decoding sample 1 from track ID 8 failed
[1] 4148207 segmentation fault ./MP4Box -lsr ./poc/poc_12
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x4183400000000000) at malloc.c:3102
3102 malloc.c: No such file or directory.
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x1
RCX 0x0
RDX 0x7ffff7e0d800 ββ 0xffaba7feffaba850
RDI 0x4183400000000000
RSI 0x5555555dfce0 ββ 0x4183400000000000
R8 0x7
R9 0xfffffff6
R10 0x7ffff775ba72 ββ 'gf_node_unregister_children'
R11 0x7ffff784a6d0 (gf_node_unregister_children) ββ endbr64
R12 0x5555555d40d0 ββ 0x0
R13 0x2a
R14 0x8
R15 0x5555555dfcc0 ββΈ 0x5555555dfd00 ββΈ 0x5555555dfce0 ββ 0x4183400000000000
RBP 0x5555555dfce0 ββ 0x4183400000000000
RSP 0x7fffffff7040 ββ 0x0
RIP 0x7ffff75d9870 (free+32) ββ mov rax, qword ptr [rdi - 8]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff75d9870 <free+32> mov rax, qword ptr [rdi - 8]
0x7ffff75d9874 <free+36> lea rsi, [rdi - 0x10]
0x7ffff75d9878 <free+40> test al, 2
0x7ffff75d987a <free+42> jne free+96 <free+96>
β
0x7ffff75d98b0 <free+96> mov edx, dword ptr [rip + 0x14d9fe] <0x7ffff77272b4>
0x7ffff75d98b6 <free+102> test edx, edx
0x7ffff75d98b8 <free+104> jne free+123 <free+123>
β
0x7ffff75d98cb <free+123> mov rdi, rsi
0x7ffff75d98ce <free+126> add rsp, 0x18
0x7ffff75d98d2 <free+130> jmp munmap_chunk <munmap_chunk>
β
0x7ffff75d4630 <munmap_chunk> sub rsp, 8
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff7040 ββ 0x0
... β 2 skipped
03:0018β 0x7fffffff7058 ββΈ 0x7ffff78c805d (gf_svg_delete_attribute_value+173) ββ jmp 0x7ffff78c7ffe
04:0020β 0x7fffffff7060 ββ 0x0
05:0028β 0x7fffffff7068 ββ 0x1
06:0030β 0x7fffffff7070 ββΈ 0x5555555dfca0 ββ 0x101
07:0038β 0x7fffffff7078 ββΈ 0x5555555d40d0 ββ 0x0
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff75d9870 free+32
f 1 0x7ffff78c805d gf_svg_delete_attribute_value+173
f 2 0x7ffff78c815b gf_svg_delete_attribute_value+427
f 3 0x7ffff78e1b65 gf_node_delete_attributes+69
f 4 0x7ffff78c7c2a gf_svg_node_del+282
f 5 0x7ffff784a51d gf_node_unregister+349
f 6 0x7ffff784a6f4 gf_node_unregister_children+36
f 7 0x7ffff784a731 gf_sg_parent_reset+17
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 __GI___libc_free (mem=0x4183400000000000) at malloc.c:3102
#1 0x00007ffff78c805d in gf_svg_delete_attribute_value () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff78c815b in gf_svg_delete_attribute_value () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff78e1b65 in gf_node_delete_attributes () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff78c7c2a in gf_svg_node_del () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff784a51d in gf_node_unregister () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff784a6f4 in gf_node_unregister_children () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff784a731 in gf_sg_parent_reset () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff78c7c32 in gf_svg_node_del () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00007ffff784a51d in gf_node_unregister () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#10 0x00007ffff784a6f4 in gf_node_unregister_children () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#11 0x00007ffff784a731 in gf_sg_parent_reset () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#12 0x00007ffff78c7c32 in gf_svg_node_del () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#13 0x00007ffff784a51d in gf_node_unregister () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#14 0x00007ffff784f396 in gf_sg_command_del () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#15 0x00007ffff7a88203 in gf_sm_del () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#16 0x0000555555584423 in dump_isom_scene ()
#17 0x000055555557b42c in mp4boxMain ()
#18 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe218, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe208) at ../csu/libc-start.c:308
#19 0x000055555556c45e in _start ()
```
`break gf_svg_delete_attribute_value`
```
0x00007ffff78c8058 in gf_svg_delete_attribute_value () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x7ffff78c8050 (gf_svg_delete_attribute_value+160) ββ mov rdi, qword ptr [rsi]
RBX 0x1
RCX 0x0
RDX 0x7ffff7e0d800 ββ 0xffaba7feffaba850
RDI 0x4183400000000000
RSI 0x5555555dfce0 ββ 0x4183400000000000
R8 0x7
R9 0xfffffff6
R10 0x7ffff775ba72 ββ 'gf_node_unregister_children'
R11 0x7ffff784a6d0 (gf_node_unregister_children) ββ endbr64
R12 0x5555555d40d0 ββ 0x0
R13 0x2a
R14 0x8
R15 0x5555555dfcc0 ββΈ 0x5555555dfd00 ββΈ 0x5555555dfce0 ββ 0x4183400000000000
RBP 0x5555555dfce0 ββ 0x4183400000000000
RSP 0x7fffffff7060 ββ 0x0
*RIP 0x7ffff78c8058 (gf_svg_delete_attribute_value+168) ββ call 0x7ffff77e2cb0
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
0x7ffff78c7fda <gf_svg_delete_attribute_value+42> add rax, rdx
0x7ffff78c7fdd <gf_svg_delete_attribute_value+45> jmp rax
β
0x7ffff78c8050 <gf_svg_delete_attribute_value+160> mov rdi, qword ptr [rsi]
0x7ffff78c8053 <gf_svg_delete_attribute_value+163> test rdi, rdi
0x7ffff78c8056 <gf_svg_delete_attribute_value+166> je gf_svg_delete_attribute_value+78 <gf_svg_delete_attribute_value+78>
βΊ 0x7ffff78c8058 <gf_svg_delete_attribute_value+168> call gf_free@plt <gf_free@plt>
rdi: 0x4183400000000000
rsi: 0x5555555dfce0 ββ 0x4183400000000000
rdx: 0x7ffff7e0d800 ββ 0xffaba7feffaba850
rcx: 0x0
0x7ffff78c805d <gf_svg_delete_attribute_value+173> jmp gf_svg_delete_attribute_value+78 <gf_svg_delete_attribute_value+78>
0x7ffff78c805f <gf_svg_delete_attribute_value+175> nop
0x7ffff78c8060 <gf_svg_delete_attribute_value+176> mov r14, qword ptr [rsi]
0x7ffff78c8063 <gf_svg_delete_attribute_value+179> xor ebx, ebx
0x7ffff78c8065 <gf_svg_delete_attribute_value+181> mov rdi, r14
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff7060 ββ 0x0
01:0008β 0x7fffffff7068 ββ 0x1
02:0010β 0x7fffffff7070 ββΈ 0x5555555dfca0 ββ 0x101
03:0018β 0x7fffffff7078 ββΈ 0x5555555d40d0 ββ 0x0
04:0020β 0x7fffffff7080 ββ 0x2a /* '*' */
05:0028β 0x7fffffff7088 ββ 0x8
06:0030β 0x7fffffff7090 ββΈ 0x5555555dfcc0 ββΈ 0x5555555dfd00 ββΈ 0x5555555dfce0 ββ 0x4183400000000000
07:0038β 0x7fffffff7098 ββΈ 0x7ffff78c815b (gf_svg_delete_attribute_value+427) ββ cmp r14d, ebx
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff78c8058 gf_svg_delete_attribute_value+168
f 1 0x7ffff78c815b gf_svg_delete_attribute_value+427
f 2 0x7ffff78e1b65 gf_node_delete_attributes+69
f 3 0x7ffff78c7c2a gf_svg_node_del+282
f 4 0x7ffff784a51d gf_node_unregister+349
f 5 0x7ffff784a6f4 gf_node_unregister_children+36
f 6 0x7ffff784a731 gf_sg_parent_reset+17
f 7 0x7ffff78c7c32 gf_svg_node_del+290
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
__GI___libc_free (mem=0x4183400000000000) at malloc.c:3087
3087 malloc.c: No such file or directory.
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x7ffff78c8050 (gf_svg_delete_attribute_value+160) ββ mov rdi, qword ptr [rsi]
RBX 0x1
RCX 0x0
RDX 0x7ffff7e0d800 ββ 0xffaba7feffaba850
RDI 0x4183400000000000
RSI 0x5555555dfce0 ββ 0x4183400000000000
R8 0x7
R9 0xfffffff6
R10 0x7ffff775ba72 ββ 'gf_node_unregister_children'
R11 0x7ffff784a6d0 (gf_node_unregister_children) ββ endbr64
R12 0x5555555d40d0 ββ 0x0
R13 0x2a
R14 0x8
R15 0x5555555dfcc0 ββΈ 0x5555555dfd00 ββΈ 0x5555555dfce0 ββ 0x4183400000000000
RBP 0x5555555dfce0 ββ 0x4183400000000000
RSP 0x7fffffff7058 ββΈ 0x7ffff78c805d (gf_svg_delete_attribute_value+173) ββ jmp 0x7ffff78c7ffe
*RIP 0x7ffff75d9850 (free) ββ endbr64
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
0x7ffff77e2cb4 <gf_free@plt+4> bnd jmp qword ptr [rip + 0x7bc045] <gf_free>
β
0x7ffff77f9f30 <gf_free> endbr64
0x7ffff77f9f34 <gf_free+4> jmp free@plt <free@plt>
β
0x7ffff77e2840 <free@plt> endbr64
0x7ffff77e2844 <free@plt+4> bnd jmp qword ptr [rip + 0x7bc27d] <free>
β
βΊ 0x7ffff75d9850 <free> endbr64
0x7ffff75d9854 <free+4> sub rsp, 0x18
0x7ffff75d9858 <free+8> mov rax, qword ptr [rip + 0x14d699]
0x7ffff75d985f <free+15> mov rax, qword ptr [rax]
0x7ffff75d9862 <free+18> test rax, rax
0x7ffff75d9865 <free+21> jne free+152 <free+152>
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff7058 ββΈ 0x7ffff78c805d (gf_svg_delete_attribute_value+173) ββ jmp 0x7ffff78c7ffe
01:0008β 0x7fffffff7060 ββ 0x0
02:0010β 0x7fffffff7068 ββ 0x1
03:0018β 0x7fffffff7070 ββΈ 0x5555555dfca0 ββ 0x101
04:0020β 0x7fffffff7078 ββΈ 0x5555555d40d0 ββ 0x0
05:0028β 0x7fffffff7080 ββ 0x2a /* '*' */
06:0030β 0x7fffffff7088 ββ 0x8
07:0038β 0x7fffffff7090 ββΈ 0x5555555dfcc0 ββΈ 0x5555555dfd00 ββΈ 0x5555555dfce0 ββ 0x4183400000000000
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff75d9850 free
f 1 0x7ffff78c805d gf_svg_delete_attribute_value+173
f 2 0x7ffff78c815b gf_svg_delete_attribute_value+427
f 3 0x7ffff78e1b65 gf_node_delete_attributes+69
f 4 0x7ffff78c7c2a gf_svg_node_del+282
f 5 0x7ffff784a51d gf_node_unregister+349
f 6 0x7ffff784a6f4 gf_node_unregister_children+36
f 7 0x7ffff784a731 gf_sg_parent_reset+17
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x4183400000000000) at malloc.c:3102
3102 in malloc.c
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
*RAX 0x0
RBX 0x1
RCX 0x0
RDX 0x7ffff7e0d800 ββ 0xffaba7feffaba850
RDI 0x4183400000000000
RSI 0x5555555dfce0 ββ 0x4183400000000000
R8 0x7
R9 0xfffffff6
R10 0x7ffff775ba72 ββ 'gf_node_unregister_children'
R11 0x7ffff784a6d0 (gf_node_unregister_children) ββ endbr64
R12 0x5555555d40d0 ββ 0x0
R13 0x2a
R14 0x8
R15 0x5555555dfcc0 ββΈ 0x5555555dfd00 ββΈ 0x5555555dfce0 ββ 0x4183400000000000
RBP 0x5555555dfce0 ββ 0x4183400000000000
*RSP 0x7fffffff7040 ββ 0x0
*RIP 0x7ffff75d9870 (free+32) ββ mov rax, qword ptr [rdi - 8]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff75d9870 <free+32> mov rax, qword ptr [rdi - 8]
0x7ffff75d9874 <free+36> lea rsi, [rdi - 0x10]
0x7ffff75d9878 <free+40> test al, 2
0x7ffff75d987a <free+42> jne free+96 <free+96>
β
0x7ffff75d98b0 <free+96> mov edx, dword ptr [rip + 0x14d9fe] <0x7ffff77272b4>
0x7ffff75d98b6 <free+102> test edx, edx
0x7ffff75d98b8 <free+104> jne free+123 <free+123>
β
0x7ffff75d98cb <free+123> mov rdi, rsi
0x7ffff75d98ce <free+126> add rsp, 0x18
0x7ffff75d98d2 <free+130> jmp munmap_chunk <munmap_chunk>
β
0x7ffff75d4630 <munmap_chunk> sub rsp, 8
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff7040 ββ 0x0
... β 2 skipped
03:0018β 0x7fffffff7058 ββΈ 0x7ffff78c805d (gf_svg_delete_attribute_value+173) ββ jmp 0x7ffff78c7ffe
04:0020β 0x7fffffff7060 ββ 0x0
05:0028β 0x7fffffff7068 ββ 0x1
06:0030β 0x7fffffff7070 ββΈ 0x5555555dfca0 ββ 0x101
07:0038β 0x7fffffff7078 ββΈ 0x5555555d40d0 ββ 0x0
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff75d9870 free+32
f 1 0x7ffff78c805d gf_svg_delete_attribute_value+173
f 2 0x7ffff78c815b gf_svg_delete_attribute_value+427
f 3 0x7ffff78e1b65 gf_node_delete_attributes+69
f 4 0x7ffff78c7c2a gf_svg_node_del+282
f 5 0x7ffff784a51d gf_node_unregister+349
f 6 0x7ffff784a6f4 gf_node_unregister_children+36
f 7 0x7ffff784a731 gf_sg_parent_reset+17
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg>
```
| Invalid free in gf_svg_delete_attribute_value() | https://api.github.com/repos/gpac/gpac/issues/1975/comments | 0 | 2021-12-11T01:07:09Z | 2021-12-13T13:22:08Z | https://github.com/gpac/gpac/issues/1975 | 1,077,343,434 | 1,975 |
[
"gpac",
"gpac"
] | 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 call was discovered in gf_node_changed(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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/poc_11
```
[poc_11.zip](https://github.com/gpac/gpac/files/7696151/poc_11.zip)
**Result**
```
./MP4Box -bt ./poc/poc_10
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type traI in parent moov
[iso file] Box "stss" (start 9939) has 32 extra bytes
[iso file] extra box maxr found in hinf, deleting
[iso file] Track with no sample description box !
[iso file] Incomplete box mdat - start 11495 size 861261
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type traI in parent moov
[iso file] Box "stss" (start 9939) has 32 extra bytes
[iso file] extra box maxr found in hinf, deleting
[iso file] Track with no sample description box !
[iso file] Incomplete box mdat - start 11495 size 861261
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[1] 1142870 segmentation fault ./MP4Box -bt ./poc/poc_10
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000001 in ?? ()
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x1
RBX 0x7fffffff6bc0 ββ 0x0
RCX 0x7fffffff6bc0 ββ 0x0
RDX 0x5555555e6230 ββΈ 0x5555555e6270 ββ 0x0
RDI 0x0
RSI 0x1
R8 0x0
R9 0x0
R10 0x7ffff775ba62 ββ 'gf_node_changed'
R11 0x7ffff784a0f0 (gf_node_changed) ββ endbr64
R12 0x5555555c6010 ββ 0x200000002
R13 0x5555555e5100 ββ 0x0
R14 0x5555555e6230 ββΈ 0x5555555e6270 ββ 0x0
R15 0x7fffffff6bc0 ββ 0x0
RBP 0x5555555e6230 ββΈ 0x5555555e6270 ββ 0x0
RSP 0x7fffffff6a88 ββΈ 0x7ffff784a1ca (gf_node_changed+218) ββ test rbx, rbx
RIP 0x1
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
Invalid address 0x1
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6a88 ββΈ 0x7ffff784a1ca (gf_node_changed+218) ββ test rbx, rbx
01:0008β 0x7fffffff6a90 ββ 0x0
... β 3 skipped
05:0028β 0x7fffffff6ab0 ββ 0x7374636f /* 'octs' */
06:0030β 0x7fffffff6ab8 ββΈ 0x5555555e4fd0 ββ 0x7374636f /* 'octs' */
07:0038β 0x7fffffff6ac0 ββ 0x2
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x1
f 1 0x7ffff784a1ca gf_node_changed+218
f 2 0x7ffff784b675 gf_sg_reset+805
f 3 0x7ffff784ba47 gf_sg_del+55
f 4 0x7ffff788b7f8 gf_sg_proto_del+424
f 5 0x7ffff7905f88 gf_bifs_dec_proto_list+680
f 6 0x7ffff7913a11 BM_ParseInsert+769
f 7 0x7ffff7914fe1 BM_ParseCommand+113
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x0000000000000001 in ?? ()
#1 0x00007ffff784a1ca in gf_node_changed () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff784b675 in gf_sg_reset () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff784ba47 in gf_sg_del () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff788b7f8 in gf_sg_proto_del () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff7905f88 in gf_bifs_dec_proto_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff7913a11 in BM_ParseInsert () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff7914fe1 in BM_ParseCommand () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff7915353 in gf_bifs_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00007ffff7aa1d91 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#10 0x00005555555844a8 in dump_isom_scene ()
#11 0x000055555557b42c in mp4boxMain ()
#12 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe1b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe1a8) at ../csu/libc-start.c:308
#13 0x000055555556c45e in _start ()
```
`break gf_node_changed`
```
pwndbg>
0x00007ffff784a1c8 in gf_node_changed () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x1
RBX 0x7fffffff6bc0 ββ 0x0
RCX 0x7fffffff6bc0 ββ 0x0
RDX 0x5555555e6230 ββΈ 0x5555555e6270 ββ 0x0
RDI 0x0
*RSI 0x1
R8 0x0
R9 0x0
R10 0x7ffff775ba62 ββ 'gf_node_changed'
R11 0x7ffff784a0f0 (gf_node_changed) ββ endbr64
R12 0x5555555c6010 ββ 0x200000002
R13 0x5555555e5100 ββ 0x0
R14 0x5555555e6230 ββΈ 0x5555555e6270 ββ 0x0
R15 0x7fffffff6bc0 ββ 0x0
RBP 0x5555555e6230 ββΈ 0x5555555e6270 ββ 0x0
RSP 0x7fffffff6a90 ββ 0x0
*RIP 0x7ffff784a1c8 (gf_node_changed+216) ββ call rax
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
0x7ffff784a1b6 <gf_node_changed+198> je gf_node_changed+223 <gf_node_changed+223>
0x7ffff784a1b8 <gf_node_changed+200> mov rdi, qword ptr [r12 + 0x28]
0x7ffff784a1bd <gf_node_changed+205> mov rcx, rbx
0x7ffff784a1c0 <gf_node_changed+208> mov rdx, rbp
0x7ffff784a1c3 <gf_node_changed+211> mov esi, 1
βΊ 0x7ffff784a1c8 <gf_node_changed+216> call rax <1>
0x7ffff784a1ca <gf_node_changed+218> test rbx, rbx
0x7ffff784a1cd <gf_node_changed+221> je gf_node_changed+233 <gf_node_changed+233>
0x7ffff784a1cf <gf_node_changed+223> mov eax, dword ptr [rbx]
0x7ffff784a1d1 <gf_node_changed+225> sub eax, 0x63
0x7ffff784a1d4 <gf_node_changed+228> and eax, 0xfffffffd
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6a90 ββ 0x0
... β 3 skipped
04:0020β 0x7fffffff6ab0 ββ 0x7374636f /* 'octs' */
05:0028β 0x7fffffff6ab8 ββΈ 0x5555555e4fd0 ββ 0x7374636f /* 'octs' */
06:0030β 0x7fffffff6ac0 ββ 0x2
07:0038β 0x7fffffff6ac8 ββ 0x8000000000000006
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff784a1c8 gf_node_changed+216
f 1 0x7ffff784b675 gf_sg_reset+805
f 2 0x7ffff784ba47 gf_sg_del+55
f 3 0x7ffff788b7f8 gf_sg_proto_del+424
f 4 0x7ffff7905f88 gf_bifs_dec_proto_list+680
f 5 0x7ffff7913a11 BM_ParseInsert+769
f 6 0x7ffff7914fe1 BM_ParseCommand+113
f 7 0x7ffff7915353 gf_bifs_decode_command_list+163
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg>
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000001 in ?? ()
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x1
RBX 0x7fffffff6bc0 ββ 0x0
RCX 0x7fffffff6bc0 ββ 0x0
RDX 0x5555555e6230 ββΈ 0x5555555e6270 ββ 0x0
RDI 0x0
RSI 0x1
R8 0x0
R9 0x0
R10 0x7ffff775ba62 ββ 'gf_node_changed'
R11 0x7ffff784a0f0 (gf_node_changed) ββ endbr64
R12 0x5555555c6010 ββ 0x200000002
R13 0x5555555e5100 ββ 0x0
R14 0x5555555e6230 ββΈ 0x5555555e6270 ββ 0x0
R15 0x7fffffff6bc0 ββ 0x0
RBP 0x5555555e6230 ββΈ 0x5555555e6270 ββ 0x0
*RSP 0x7fffffff6a88 ββΈ 0x7ffff784a1ca (gf_node_changed+218) ββ test rbx, rbx
*RIP 0x1
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
Invalid address 0x1
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6a88 ββΈ 0x7ffff784a1ca (gf_node_changed+218) ββ test rbx, rbx
01:0008β 0x7fffffff6a90 ββ 0x0
... β 3 skipped
05:0028β 0x7fffffff6ab0 ββ 0x7374636f /* 'octs' */
06:0030β 0x7fffffff6ab8 ββΈ 0x5555555e4fd0 ββ 0x7374636f /* 'octs' */
07:0038β 0x7fffffff6ac0 ββ 0x2
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x1
f 1 0x7ffff784a1ca gf_node_changed+218
f 2 0x7ffff784b675 gf_sg_reset+805
f 3 0x7ffff784ba47 gf_sg_del+55
f 4 0x7ffff788b7f8 gf_sg_proto_del+424
f 5 0x7ffff7905f88 gf_bifs_dec_proto_list+680
f 6 0x7ffff7913a11 BM_ParseInsert+769
f 7 0x7ffff7914fe1 BM_ParseCommand+113
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg>
```
| Invalid call in gf_node_changed() | https://api.github.com/repos/gpac/gpac/issues/1974/comments | 0 | 2021-12-11T01:02:59Z | 2021-12-13T13:22:08Z | https://github.com/gpac/gpac/issues/1974 | 1,077,342,284 | 1,974 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [Yes ] I looked for a similar issue and couldn't find any.
- [ Yes] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ Yes] 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/
**Version:**
```
./MP4Box -version
MP4Box - GPAC version 1.1.0-DEV-rev1527-g6fcf9819e-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-mp4box --prefix=/home/zxq/CVE_testing/sourceproject/gpac/cmakebuild --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
```
**System information**
Ubuntu 20.04.1 LTS, gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
**command:**
```
./bin/gcc/MP4Box -hint POC
```
**Result**
```
...
```
**GDB information **
```
[----------------------------------registers-----------------------------------]
RAX: 0x20000
RBX: 0x80
RCX: 0xe9b05a71
RDX: 0x1
RSI: 0x6a6a6ab8
RDI: 0x6a6a6ab8
RBP: 0x5555555e1630 --> 0x1
RSP: 0x7fffffff8078 --> 0x7ffff7875506 (<gf_rtp_builder_init+2342>: mov ebx,DWORD PTR [rbp+0x90])
RIP: 0x7ffff7788927 (<gf_get_bit_size+23>: cmp eax,edi)
R8 : 0x0
R9 : 0x20 (' ')
R10: 0x7ffff76d955a ("gf_rtp_builder_init")
R11: 0x2
R12: 0x59e
R13: 0x60 ('`')
R14: 0x5555555e1750 --> 0x0
R15: 0x0
EFLAGS: 0x206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
0x7ffff7788920 <gf_get_bit_size+16>: add ecx,0x1
0x7ffff7788923 <gf_get_bit_size+19>: mov eax,edx
0x7ffff7788925 <gf_get_bit_size+21>: shl eax,cl
=> 0x7ffff7788927 <gf_get_bit_size+23>: cmp eax,edi
0x7ffff7788929 <gf_get_bit_size+25>: jle 0x7ffff7788920 <gf_get_bit_size+16>
0x7ffff778892b <gf_get_bit_size+27>: mov eax,ecx
0x7ffff778892d <gf_get_bit_size+29>: ret
0x7ffff778892e: xchg ax,ax
[------------------------------------stack-------------------------------------]
0000| 0x7fffffff8078 --> 0x7ffff7875506 (<gf_rtp_builder_init+2342>: mov ebx,DWORD PTR [rbp+0x90])
0008| 0x7fffffff8080 --> 0x24a
0016| 0x7fffffff8088 --> 0xfc7
0024| 0x7fffffff8090 --> 0x32ce10ac
0032| 0x7fffffff8098 --> 0x6a6a6ab800000020
0040| 0x7fffffff80a0 --> 0x2
0048| 0x7fffffff80a8 --> 0x62 ('b')
0056| 0x7fffffff80b0 --> 0x5555555dfb90 --> 0x5555555da930 --> 0x0
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGINT
0x00007ffff7788927 in gf_get_bit_size () from /home/zxq/CVE_testing/sourceproject/momey/gpac/bin/gcc/libgpac.so.10
gdb-peda$ bt
#0 0x00007ffff7788927 in gf_get_bit_size () from /home/zxq/CVE_testing/sourceproject/momey/gpac/bin/gcc/libgpac.so.10
#1 0x00007ffff7875506 in gf_rtp_builder_init () from /home/zxq/CVE_testing/sourceproject/momey/gpac/bin/gcc/libgpac.so.10
#2 0x00007ffff7a0ec5c in gf_hinter_track_new () from /home/zxq/CVE_testing/sourceproject/momey/gpac/bin/gcc/libgpac.so.10
#3 0x000055555557958b in HintFile ()
#4 0x000055555557d257 in mp4boxMain ()
#5 0x00007ffff74df0b3 in __libc_start_main (main=0x55555556d420 <main>, argc=0x3, argv=0x7fffffffe308, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe2f8)
at ../csu/libc-start.c:308
#6 0x000055555556d45e in _start ()
gdb-peda$
```
| infinite loop in gf_get_bit_sizeοΌοΌ | https://api.github.com/repos/gpac/gpac/issues/1973/comments | 2 | 2021-12-10T19:07:05Z | 2021-12-14T10:36:54Z | https://github.com/gpac/gpac/issues/1973 | 1,077,148,119 | 1,973 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [Yes ] I looked for a similar issue and couldn't find any.
- [ Yes] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ Yes] 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/
**Version:**
```
./MP4Box -version
MP4Box - GPAC version 1.1.0-DEV-rev1527-g6fcf9819e-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-mp4box --prefix=/home/zxq/CVE_testing/sourceproject/gpac/cmakebuild --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
```
**System information**
Ubuntu 20.04.1 LTS, gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
**command:**
```
./bin/gcc/MP4Box -diso -out /dev/null POC
```
[POC.zip](https://github.com/gpac/gpac/files/7694235/POC.zip)
**Result**
```
[iso file] Unknown box type gods in parent moov
[iso file] Box "avcC" (start 939) has 34 extra bytes
[iso file] Unknown box type 0000 in parent sinf
[iso file] Unknown box type u87l in parent dref
[iso file] Unknown box type 0001bl in parent minf
[iso file] Track with no sample table !
[iso file] Track with no sample description box !
[iso file] Unknown box type sbgd in parent traf
[5] 3129116 killed ./../../../../sourceproject/momey/gpac/bin/gcc/MP4Box -diso -out /dev/null
```
GDB Information
```gdb-peda$ r -diso POC
Starting program: /home/zxq/CVE_testing/sourceproject/momey/gpac/bin/gcc/MP4Box -diso id:000001,src:000022+000904,op:splice,rep:32
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[iso file] Unknown box type gods in parent moov
[iso file] Box "avcC" (start 939) has 34 extra bytes
[iso file] Unknown box type 0000 in parent sinf
[iso file] Unknown box type u87l in parent dref
[iso file] Unknown box type 0001bl in parent minf
[iso file] Track with no sample table !
[iso file] Track with no sample description box !
[iso file] Unknown box type sbgd in parent traf
Program terminated with signal SIGKILL, Killed.
The program no longer exists.
```
| Program terminated with signal SIGKILL | https://api.github.com/repos/gpac/gpac/issues/1972/comments | 0 | 2021-12-10T16:55:48Z | 2021-12-13T13:22:07Z | https://github.com/gpac/gpac/issues/1972 | 1,077,045,536 | 1,972 |
[
"gpac",
"gpac"
] | 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 shift_chunk_offsets.isra(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -hint poc_9
```
[poc_9.zip](https://github.com/gpac/gpac/files/7693929/poc_9.zip)
**Result**
```
[iso file] Unknown box type stbU in parent minf
[iso file] Track with no sample table !
[iso file] Track with no sample description box !
[iso file] Box "trak" is larger than container box
[iso file] Box "moov" size 256 (start 20) invalid (read 2209)
[iso file] Unknown top-level box type 079Fmd
Saving ./poc/poc_9: In-place rewrite
[1] 2265002 segmentation fault ./MP4Box -hint ./poc/poc_9
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7981ba3 in shift_chunk_offsets.isra () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
βββββββββββββββββββββββββββββββ[ REGISTERS ]ββββββββββββββββββββββββββββββββ RAX 0x5555555cc6e0 ββ 0x6d696e66 /* 'fnim' */
RBX 0x5555555ccfe0 ββ 0x7374626c /* 'lbts' */
RCX 0x0
RDX 0x5555555cf160 ββ 0x6d646961 /* 'aidm' */
RDI 0x28
RSI 0x34
R8 0x14
R9 0x0
R10 0x7ffff775d6fa ββ 'gf_isom_box_size'
R11 0x7ffff796bce0 (gf_isom_box_size) ββ endbr64
R12 0x5555555c72a0 ββ 0xffffffec
R13 0x14
R14 0x1
R15 0x7fffffff7e80 ββ 0x0
RBP 0x0
RSP 0x7fffffff7e00 ββ 0xf7747c68
RIP 0x7ffff7981ba3 (shift_chunk_offsets.isra+19) ββ mov esi, dword ptr [rsi]
βββββββββββββββββββββββββββββββββ[ DISASM ]βββββββββββββββββββββββββββββββββ βΊ 0x7ffff7981ba3 <shift_chunk_offsets.isra+19> mov esi, dword ptr [rsi]
0x7ffff7981ba5 <shift_chunk_offsets.isra+21> mov qword ptr [rsp + 8], rdi
0x7ffff7981baa <shift_chunk_offsets.isra+26> mov qword ptr [rsp + 0x10], rdx
0x7ffff7981baf <shift_chunk_offsets.isra+31> mov dword ptr [rsp + 0x2c], r9d
0x7ffff7981bb4 <shift_chunk_offsets.isra+36> test esi, esi
0x7ffff7981bb6 <shift_chunk_offsets.isra+38> je shift_chunk_offsets.isra+175 <shift_chunk_offsets.isra+175>
β
0x7ffff7981c3f <shift_chunk_offsets.isra+175> add rsp, 0x38
0x7ffff7981c43 <shift_chunk_offsets.isra+179> xor eax, eax
0x7ffff7981c45 <shift_chunk_offsets.isra+181> pop rbx
0x7ffff7981c46 <shift_chunk_offsets.isra+182> pop rbp
0x7ffff7981c47 <shift_chunk_offsets.isra+183> pop r12
βββββββββββββββββββββββββββββββββ[ STACK ]ββββββββββββββββββββββββββββββββββ00:0000β rsp 0x7fffffff7e00 ββ 0xf7747c68
01:0008β 0x7fffffff7e08 ββ 0x0
02:0010β 0x7fffffff7e10 ββ 0x999
03:0018β 0x7fffffff7e18 ββ 0x34 /* '4' */
04:0020β 0x7fffffff7e20 ββΈ 0x7ffff7fc7368 ββΈ 0x7ffff7ffe450 ββΈ 0x7ffff73131e0 ββΈ 0x7ffff7ffe190 ββ ...
05:0028β 0x7fffffff7e28 ββΈ 0x7fffffff7f68 ββΈ 0x7ffff7751b48 ββ 0xe0012000053a2
06:0030β 0x7fffffff7e30 ββΈ 0x7ffff775d6fa ββ 'gf_isom_box_size'
07:0038β 0x7fffffff7e38 ββΈ 0x5555555ccfe0 ββ 0x7374626c /* 'lbts' */
βββββββββββββββββββββββββββββββ[ BACKTRACE ]ββββββββββββββββββββββββββββββββ βΊ f 0 0x7ffff7981ba3 shift_chunk_offsets.isra+19
f 1 0x7ffff7981fd0 inplace_shift_moov_meta_offsets+224
f 2 0x7ffff7982a5c inplace_shift_mdat+732
f 3 0x7ffff7986c29 WriteToFile+2713
f 4 0x7ffff7978042 gf_isom_write+370
f 5 0x7ffff79780c8 gf_isom_close+24
f 6 0x55555557ad12 mp4boxMain+7410
f 7 0x7ffff75630b3 __libc_start_main+243
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββpwndbg> bt
#0 0x00007ffff7981ba3 in shift_chunk_offsets.isra () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7981fd0 in inplace_shift_moov_meta_offsets () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7982a5c in inplace_shift_mdat () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7986c29 in WriteToFile () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7978042 in gf_isom_write () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff79780c8 in gf_isom_close () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x000055555557ad12 in mp4boxMain ()
#7 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe218, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe208) at ../csu/libc-start.c:308
#8 0x000055555556c45e in _start ()
```
| Invalid memory address dereference in shift_chunk_offsets.isra() | https://api.github.com/repos/gpac/gpac/issues/1971/comments | 0 | 2021-12-10T15:59:06Z | 2021-12-13T13:22:07Z | https://github.com/gpac/gpac/issues/1971 | 1,076,993,672 | 1,971 |
[
"gpac",
"gpac"
] | 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/
A stack overflow was discovered in gf_bifs_dec_proto_list(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr poc_8
```
[poc_8.zip](https://github.com/gpac/gpac/files/7693778/poc_8.zip)
**Result**
```
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type stbk in parent minf
[iso file] extra box maxr found in hinf, deleting
[iso file] Track with no sample table !
[iso file] Track with no sample description box !
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 832544
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type stbk in parent minf
[iso file] extra box maxr found in hinf, deleting
[iso file] Track with no sample table !
[iso file] Track with no sample description box !
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 832544
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
*** stack smashing detected ***: terminated
[1] 3737450 abort ./MP4Box -lsr ./poc/poc_8
```
**gdb**
```
*** stack smashing detected ***: terminated
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
*RBX 0x7ffff72bf040 ββ 0x7ffff72bf040
*RCX 0x7ffff758218b (raise+203) ββ mov rax, qword ptr [rsp + 0x108]
RDX 0x0
*RDI 0x2
*RSI 0x7fffffff68a0 ββ 0x0
*R8 0x0
*R9 0x7fffffff68a0 ββ 0x0
*R10 0x8
*R11 0x246
*R12 0x7fffffff6b20 ββ 0x0
*R13 0x20
*R14 0x7ffff7ffb000 ββ 0x202a2a2a00001000
*R15 0x1
*RBP 0x7fffffff6c20 ββΈ 0x7ffff76f607c ββ '*** %s ***: terminated\n'
*RSP 0x7fffffff68a0 ββ 0x0
*RIP 0x7ffff758218b (raise+203) ββ mov rax, qword ptr [rsp + 0x108]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff758218b <raise+203> mov rax, qword ptr [rsp + 0x108]
0x7ffff7582193 <raise+211> xor rax, qword ptr fs:[0x28]
0x7ffff758219c <raise+220> jne raise+260 <raise+260>
β
0x7ffff75821c4 <raise+260> call __stack_chk_fail <__stack_chk_fail>
0x7ffff75821c9 nop dword ptr [rax]
0x7ffff75821d0 <killpg> endbr64
0x7ffff75821d4 <killpg+4> test edi, edi
0x7ffff75821d6 <killpg+6> js killpg+16 <killpg+16>
0x7ffff75821d8 <killpg+8> neg edi
0x7ffff75821da <killpg+10> jmp kill <kill>
0x7ffff75821df <killpg+15> nop
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsi r9 rsp 0x7fffffff68a0 ββ 0x0
01:0008β 0x7fffffff68a8 ββΈ 0x7ffff7546278 ββ 0x10001200005bb2
02:0010β 0x7fffffff68b0 ββΈ 0x7fffffff6c40 ββΈ 0x5555555df3b0 ββ 0x6b6
03:0018β 0x7fffffff68b8 ββΈ 0x7ffff7fe7c2e ββ mov r11, rax
04:0020β 0x7fffffff68c0 ββ 0xcd2709f17adf5bb6
05:0028β 0x7fffffff68c8 ββ 0x0
06:0030β 0x7fffffff68d0 ββ 0x7
07:0038β 0x7fffffff68d8 ββ 0x1
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff758218b raise+203
f 1 0x7ffff7561859 abort+299
f 2 0x7ffff75cc3ee __libc_message+670
f 3 0x7ffff766eb4a __fortify_fail+42
f 4 0x7ffff766eb16
f 5 0x7ffff79064bc gf_bifs_dec_proto_list+2012
f 6 0xb6b6b6b6b6b6b6b6
f 7 0xb6b6b6b6b6b6b6b6
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7561859 in __GI_abort () at abort.c:79
#2 0x00007ffff75cc3ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff76f607c "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:155
#3 0x00007ffff766eb4a in __GI___fortify_fail (msg=msg@entry=0x7ffff76f6064 "stack smashing detected") at fortify_fail.c:26
#4 0x00007ffff766eb16 in __stack_chk_fail () at stack_chk_fail.c:24
#5 0x00007ffff79064bc in gf_bifs_dec_proto_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0xb6b6b6b6b6b6b6b6 in ?? ()
#7 0xb6b6b6b6b6b6b6b6 in ?? ()
#8 0xb6b6b6b6b6b6b6b6 in ?? ()
#9 0xb6b6b6b6b6b6b6b6 in ?? ()
#10 0xb6b6b6b6b6b6b6b6 in ?? ()
#11 0xb6b6b6b6b6b6b6b6 in ?? ()
#12 0xb6b6b6b6b6b6b6b6 in ?? ()
#13 0xb6b6b6b6b6b6b6b6 in ?? ()
#14 0xb6b6b6b6b6b6b6b6 in ?? ()
#15 0xb6b6b6b6b6b6b6b6 in ?? ()
#16 0xb6b6b6b6b6b6b6b6 in ?? ()
#17 0xb6b6b6b6b6b6b6b6 in ?? ()
#18 0xb6b6b6b6b6b6b6b6 in ?? ()
#19 0xb6b6b6b6b6b6b6b6 in ?? ()
#20 0xb6b6b6b6b6b6b6b6 in ?? ()
#21 0xb6b6b6b6b6b6b6b6 in ?? ()
#22 0xb6b6b6b6b6b6b6b6 in ?? ()
#23 0xb6b6b6b6b6b6b6b6 in ?? ()
#24 0xb6b6b6b6b6b6b6b6 in ?? ()
#25 0xb6b6b6b6b6b6b6b6 in ?? ()
#26 0xb6b6b6b6b6b6b6b6 in ?? ()
#27 0xb6b6b6b6b6b6b6b6 in ?? ()
#28 0xb6b6b6b6b6b6b6b6 in ?? ()
#29 0xb6b6b6b6b6b6b6b6 in ?? ()
#30 0xb6b6b6b6b6b6b6b6 in ?? ()
#31 0xb6b6b6b6b6b6b6b6 in ?? ()
#32 0xb6b6b6b6b6b6b6b6 in ?? ()
#33 0xb6b6b6b6b6b6b6b6 in ?? ()
#34 0xb6b6b6b6b6b6b6b6 in ?? ()
#35 0xb6b6b6b6b6b6b6b6 in ?? ()
#36 0xb6b6b6b6b6b6b6b6 in ?? ()
#37 0xb6b6b6b6b6b6b6b6 in ?? ()
#38 0xb6b6b6b6b6b6b6b6 in ?? ()
#39 0xb6b6b6b6b6b6b6b6 in ?? ()
#40 0xb6b6b6b6b6b6b6b6 in ?? ()
#41 0xb6b6b6b6b6b6b6b6 in ?? ()
#42 0xb6b6b6b6b6b6b6b6 in ?? ()
#43 0xb6b6b6b6b6b6b6b6 in ?? ()
#44 0xb6b6b6b6b6b6b6b6 in ?? ()
#45 0xb6b6b6b6b6b6b6b6 in ?? ()
#46 0xb6b6b6b6b6b6b6b6 in ?? ()
#47 0xb6b6b6b6b6b6b6b6 in ?? ()
#48 0xb6b6b6b6b6b6b6b6 in ?? ()
#49 0xb6b6b6b6b6b6b6b6 in ?? ()
#50 0xb6b6b6b6b6b6b6b6 in ?? ()
#51 0xb6b6b6b6b6b6b6b6 in ?? ()
#52 0xb6b6b6b6b6b6b6b6 in ?? ()
#53 0xb6b6b6b6b6b6b6b6 in ?? ()
#54 0xb6b6b6b6b6b6b6b6 in ?? ()
#55 0xb6b6b6b6b6b6b6b6 in ?? ()
#56 0xb6b6b6b6b6b6b6b6 in ?? ()
#57 0xb6b6b6b6b6b6b6b6 in ?? ()
#58 0xb6b6b6b6b6b6b6b6 in ?? ()
#59 0xb6b6b6b6b6b6b6b6 in ?? ()
#60 0xb6b6b6b6b6b6b6b6 in ?? ()
#61 0xb6b6b6b6b6b6b6b6 in ?? ()
#62 0xb6b6b6b6b6b6b6b6 in ?? ()
#63 0xb6b6b6b6b6b6b6b6 in ?? ()
#64 0xb6b6b6b6b6b6b6b6 in ?? ()
#65 0xb6b6b6b6b6b6b6b6 in ?? ()
#66 0xb6b6b6b6b6b6b6b6 in ?? ()
#67 0xb6b6b6b6b6b6b6b6 in ?? ()
#68 0xb6b6b6b6b6b6b6b6 in ?? ()
#69 0xb6b6b6b6b6b6b6b6 in ?? ()
#70 0xb6b6b6b6b6b6b6b6 in ?? ()
#71 0xb6b6b6b6b6b6b6b6 in ?? ()
#72 0xb6b6b6b6b6b6b6b6 in ?? ()
#73 0xb6b6b6b6b6b6b6b6 in ?? ()
#74 0xb6b6b6b6b6b6b6b6 in ?? ()
#75 0xb6b6b6b6b6b6b6b6 in ?? ()
#76 0xb6b6b6b6b6b6b6b6 in ?? ()
#77 0xb6b6b6b6b6b6b6b6 in ?? ()
#78 0xb6b6b6b6b6b6b6b6 in ?? ()
#79 0xb6b6b6b6b6b6b6b6 in ?? ()
#80 0xb6b6b6b6b6b6b6b6 in ?? ()
#81 0xb6b6b6b6b6b6b6b6 in ?? ()
#82 0xb6b6b6b6b6b6b6b6 in ?? ()
#83 0xb6b6b6b6b6b6b6b6 in ?? ()
#84 0xb6b6b6b6b6b6b6b6 in ?? ()
#85 0xb6b6b6b6b6b6b6b6 in ?? ()
#86 0xb6b6b6b6b6b6b6b6 in ?? ()
#87 0xb6b6b6b6b6b6b6b6 in ?? ()
#88 0xb6b6b6b6b6b6b6b6 in ?? ()
#89 0xb6b6b6b6b6b6b6b6 in ?? ()
#90 0xb6b6b6b6b6b6b6b6 in ?? ()
#91 0xb6b6b6b6b6b6b6b6 in ?? ()
#92 0xb6b6b6b6b6b6b6b6 in ?? ()
#93 0xb6b6b6b6b6b6b6b6 in ?? ()
#94 0xb6b6b6b6b6b6b6b6 in ?? ()
#95 0xb6b6b6b6b6b6b6b6 in ?? ()
#96 0xb6b6b6b6b6b6b6b6 in ?? ()
#97 0xb6b6b6b6b6b6b6b6 in ?? ()
#98 0x000080b6b6b6b6b6 in ?? ()
#99 0x0000000000000002 in ?? ()
#100 0x0000000000000044 in ?? ()
#101 0x0000000000000008 in ?? ()
#102 0x00005555555c7e60 in ?? ()
#103 0x00005555555cf500 in ?? ()
#104 0x0000000000000000 in ?? ()
```
`break gf_bifs_dec_proto_list`
```
Breakpoint 1, 0x00007ffff7905ce0 in gf_bifs_dec_proto_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββ
RAX 0x1
RBX 0x5555555d23b0 ββ 0x0
RCX 0x710
RDX 0x5555555df2f0 ββ 0x0
RDI 0x5555555de660 ββ 0x0
RSI 0x5555555d23b0 ββ 0x0
R8 0x0
R9 0x0
R10 0x7ffff775bc80 ββ 'gf_sg_command_new'
R11 0x7ffff7727be0 (main_arena+96) ββΈ 0x5555555df320 ββ 0x0
R12 0x5555555df2f0 ββ 0x0
R13 0x5555555df1d0 ββ 0x0
R14 0x5555555d42a0 ββ 0x0
R15 0x0
RBP 0x5555555de660 ββ 0x0
RSP 0x7fffffff7168 ββΈ 0x7ffff7906559 (BD_DecSceneReplace+73) ββ mov r12d, eax
RIP 0x7ffff7905ce0 (gf_bifs_dec_proto_list) ββ endbr64
ββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7905ce0 <gf_bifs_dec_proto_list> endbr64
0x7ffff7905ce4 <gf_bifs_dec_proto_list+4> push r15
0x7ffff7905ce6 <gf_bifs_dec_proto_list+6> push r14
0x7ffff7905ce8 <gf_bifs_dec_proto_list+8> push r13
0x7ffff7905cea <gf_bifs_dec_proto_list+10> mov r13, rsi
0x7ffff7905ced <gf_bifs_dec_proto_list+13> mov esi, 1
0x7ffff7905cf2 <gf_bifs_dec_proto_list+18> push r12
0x7ffff7905cf4 <gf_bifs_dec_proto_list+20> push rbp
0x7ffff7905cf5 <gf_bifs_dec_proto_list+21> push rbx
0x7ffff7905cf6 <gf_bifs_dec_proto_list+22> sub rsp, 0x488
0x7ffff7905cfd <gf_bifs_dec_proto_list+29> mov rax, qword ptr [rdi + 0x50]
ββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff7168 ββΈ 0x7ffff7906559 (BD_DecSceneReplace+73) ββ mov r12d, eax
01:0008β 0x7fffffff7170 ββΈ 0x5555555de660 ββ 0x0
02:0010β 0x7fffffff7178 ββΈ 0x5555555df250 ββΈ 0x5555555d4030 ββ 0x0
03:0018β 0x7fffffff7180 ββΈ 0x5555555d23b0 ββ 0x0
04:0020β 0x7fffffff7188 ββΈ 0x5555555df1d0 ββ 0x0
05:0028β 0x7fffffff7190 ββΈ 0x5555555d42a0 ββ 0x0
06:0030β 0x7fffffff7198 ββΈ 0x7ffff7914e5e (BM_SceneReplace+110) ββ mov rsi,
rbp
07:0038β 0x7fffffff71a0 ββΈ 0x5555555dea00 ββΈ 0x5555555df1f0 ββΈ 0x5555555df1a0 ββ 0x0
ββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7905ce0 gf_bifs_dec_proto_list
f 1 0x7ffff7906559 BD_DecSceneReplace+73
f 2 0x7ffff7914e5e BM_SceneReplace+110
f 3 0x7ffff7915023 BM_ParseCommand+179
f 4 0x7ffff7915353 gf_bifs_decode_command_list+163
f 5 0x7ffff7aa1d91 gf_sm_load_run_isom+1217
f 6 0x5555555844a8 dump_isom_scene+760
f 7 0x55555557b42c mp4boxMain+9228
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> c
Continuing.
Breakpoint 1, 0x00007ffff7905ce0 in gf_bifs_dec_proto_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββ
*RAX 0x0
*RBX 0x5555555df330 ββ 0x6b6
*RCX 0x5555555dfdf0 ββ 0x0
*RDX 0x0
RDI 0x5555555de660 ββ 0xfffffffd
RSI 0x5555555d23b0 ββ 0x0
*R8 0x5555555dfda0 ββΈ 0x5555555df330 ββ 0x6b6
*R9 0x7c
*R10 0x7ffff775bf0a ββ 'gf_sg_proto_get_graph'
*R11 0x7ffff788b850 (gf_sg_proto_get_graph) ββ endbr64
*R12 0x5555555de660 ββ 0xfffffffd
*R13 0x5555555d23b0 ββ 0x0
R14 0x5555555d42a0 ββ 0x0
*R15 0x7fffffff6d40 ββ 0xb6b6b6b6b6b6b6b6
*RBP 0x6b6
*RSP 0x7fffffff6ca8 ββΈ 0x7ffff79062d7 (gf_bifs_dec_proto_list+1527) ββ mov dword ptr [rsp + 0x14], eax
RIP 0x7ffff7905ce0 (gf_bifs_dec_proto_list) ββ endbr64
ββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7905ce0 <gf_bifs_dec_proto_list> endbr64
0x7ffff7905ce4 <gf_bifs_dec_proto_list+4> push r15
0x7ffff7905ce6 <gf_bifs_dec_proto_list+6> push r14
0x7ffff7905ce8 <gf_bifs_dec_proto_list+8> push r13
0x7ffff7905cea <gf_bifs_dec_proto_list+10> mov r13, rsi
0x7ffff7905ced <gf_bifs_dec_proto_list+13> mov esi, 1
0x7ffff7905cf2 <gf_bifs_dec_proto_list+18> push r12
0x7ffff7905cf4 <gf_bifs_dec_proto_list+20> push rbp
0x7ffff7905cf5 <gf_bifs_dec_proto_list+21> push rbx
0x7ffff7905cf6 <gf_bifs_dec_proto_list+22> sub rsp, 0x488
0x7ffff7905cfd <gf_bifs_dec_proto_list+29> mov rax, qword ptr [rdi + 0x50]
ββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6ca8 ββΈ 0x7ffff79062d7 (gf_bifs_dec_proto_list+1527) ββ mov
dword ptr [rsp + 0x14], eax
01:0008β 0x7fffffff6cb0 ββΈ 0x7ffff775bc80 ββ 'gf_sg_command_new'
02:0010β 0x7fffffff6cb8 ββΈ 0x5555555df330 ββ 0x6b6
03:0018β 0x7fffffff6cc0 ββ 0xffff6d50
04:0020β 0x7fffffff6cc8 ββΈ 0x5555555de660 ββ 0xfffffffd
05:0028β 0x7fffffff6cd0 ββΈ 0x5555555df2f0 ββΈ 0x5555555dfda0 ββΈ 0x5555555df330 ββ 0x6b6
06:0030β 0x7fffffff6cd8 ββΈ 0x5555555d4030 ββ 0x0
07:0038β 0x7fffffff6ce0 ββ 0x0
ββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7905ce0 gf_bifs_dec_proto_list
f 1 0x7ffff79062d7 gf_bifs_dec_proto_list+1527
f 2 0xb6b6b6b6b6b6b6b6
f 3 0xb6b6b6b6b6b6b6b6
f 4 0xb6b6b6b6b6b6b6b6
f 5 0xb6b6b6b6b6b6b6b6
f 6 0xb6b6b6b6b6b6b6b6
f 7 0xb6b6b6b6b6b6b6b6
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> stack 200
00:0000β rsp 0x7fffffff6ca8 ββΈ 0x7ffff79062d7 (gf_bifs_dec_proto_list+1527) ββ mov
dword ptr [rsp + 0x14], eax
01:0008β 0x7fffffff6cb0 ββΈ 0x7ffff775bc80 ββ 'gf_sg_command_new'
02:0010β 0x7fffffff6cb8 ββΈ 0x5555555df330 ββ 0x6b6
03:0018β 0x7fffffff6cc0 ββ 0xffff6d50
04:0020β 0x7fffffff6cc8 ββΈ 0x5555555de660 ββ 0xfffffffd
05:0028β 0x7fffffff6cd0 ββΈ 0x5555555df2f0 ββΈ 0x5555555dfda0 ββΈ 0x5555555df330 ββ 0x6b6
06:0030β 0x7fffffff6cd8 ββΈ 0x5555555d4030 ββ 0x0
07:0038β 0x7fffffff6ce0 ββ 0x0
... β 2 skipped
0a:0050β 0x7fffffff6cf8 ββΈ 0x7ffff7fc7000 ββΈ 0x7ffff7743000 ββ 0x10102464c457f
0b:0058β 0x7fffffff6d00 ββΈ 0x7fffffff6d90 ββ 0xb6b6b6b6b6b6b6b6
0c:0060β 0x7fffffff6d08 ββ 0x0
0d:0068β 0x7fffffff6d10 ββΈ 0x7ffff7fc7000 ββΈ 0x7ffff7743000 ββ 0x10102464c457f
0e:0070β 0x7fffffff6d18 ββΈ 0x7ffff7fc7368 ββΈ 0x7ffff7ffe450 ββΈ 0x7ffff73131e0 ββΈ 0x7ffff7ffe190 ββ ...
0f:0078β 0x7fffffff6d20 ββ 0x0
10:0080β 0x7fffffff6d28 ββ 0x0
11:0088β 0x7fffffff6d30 ββ 0x1
12:0090β 0x7fffffff6d38 ββ 0x7fff00000001
13:0098β r15 0x7fffffff6d40 ββ 0xb6b6b6b6b6b6b6b6
... β 180 skipped
pwndbg>
```
| Stack Overflow in gf_bifs_dec_proto_list() | https://api.github.com/repos/gpac/gpac/issues/1970/comments | 0 | 2021-12-10T15:36:08Z | 2021-12-13T13:22:07Z | https://github.com/gpac/gpac/issues/1970 | 1,076,972,078 | 1,970 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in BD_CheckSFTimeOffset(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr poc_7
```
[poc_7.zip](https://github.com/gpac/gpac/files/7693705/poc_7.zip)
**Result**
```
[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 796203
[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 796203
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[1] 1900424 segmentation fault ./MP4Box -lsr ./poc/poc_7
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
__strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:199
199 ../sysdeps/x86_64/multiarch/strcmp-sse42.S: No such file or directory.
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x5555555decb0 ββ 0x0
*RCX 0x17
*RDX 0x7ffff77284a0 (_nl_global_locale) ββΈ 0x7ffff77246c0 (_nl_C_LC_CTYPE) ββΈ 0x7ffff76f4fc6 (_nl_C_name) ββ 0x636d656d5f5f0043 /* 'C' */
*RDI 0x0
*RSI 0x7ffff7dfd2d7 ββ 'startTime'
R8 0x0
R9 0x0
*R10 0x7ffff775b844 ββ 'gf_node_get_tag'
*R11 0x7ffff7849790 (gf_node_get_tag) ββ endbr64
*R12 0x0
R13 0x5555555dfe70 ββΈ 0x5555555dfed0 ββ 0x100000067 /* 'g' */
R14 0x5555555dff50 ββ 0x21e8e8512be35500
R15 0x0
*RBP 0x7fffffff6740 ββ 0x200000002
*RSP 0x7fffffff6688 ββΈ 0x7ffff790dc51 (BD_CheckSFTimeOffset+49) ββ test eax, eax
*RIP 0x7ffff76c4089 (__strcasecmp_l_avx+69) ββ vmovdqu xmm1, xmmword ptr [rdi]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
0x7ffff76c4077 <__strcasecmp_l_avx+51> vmovdqa xmm6, xmmword ptr [rip + 0x378f1]
0x7ffff76c407f <__strcasecmp_l_avx+59> cmp ecx, 0x30
0x7ffff76c4082 <__strcasecmp_l_avx+62> ja __strcasecmp_l_avx+172 <__strcasecmp_l_avx+172>
0x7ffff76c4084 <__strcasecmp_l_avx+64> cmp eax, 0x30
0x7ffff76c4087 <__strcasecmp_l_avx+67> ja __strcasecmp_l_avx+172 <__strcasecmp_l_avx+172>
βΊ 0x7ffff76c4089 <__strcasecmp_l_avx+69> vmovdqu xmm1, xmmword ptr [rdi]
0x7ffff76c408d <__strcasecmp_l_avx+73> vmovdqu xmm2, xmmword ptr [rsi]
0x7ffff76c4091 <__strcasecmp_l_avx+77> vpcmpgtb xmm7, xmm1, xmm4
0x7ffff76c4095 <__strcasecmp_l_avx+81> vpcmpgtb xmm8, xmm1, xmm5
0x7ffff76c4099 <__strcasecmp_l_avx+85> vpcmpgtb xmm9, xmm2, xmm4
0x7ffff76c409d <__strcasecmp_l_avx+89> vpcmpgtb xmm10, xmm2, xmm5
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6688 ββΈ 0x7ffff790dc51 (BD_CheckSFTimeOffset+49) ββ test eax, eax
01:0008β 0x7fffffff6690 ββΈ 0x5555555decb0 ββ 0x0
02:0010β 0x7fffffff6698 ββΈ 0x5555555d26d0 ββ 0x0
03:0018β 0x7fffffff66a0 ββΈ 0x7fffffff6740 ββ 0x200000002
04:0020β 0x7fffffff66a8 ββΈ 0x7ffff790ed35 (gf_bifs_dec_sf_field+2053) ββ mov eax, dword ptr [rbx]
05:0028β 0x7fffffff66b0 ββΈ 0x5555555dfe90 ββ 0x11cb
06:0030β 0x7fffffff66b8 ββ 0x22 /* '"' */
07:0038β 0x7fffffff66c0 ββ 0x11cb
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff76c4089 __strcasecmp_l_avx+69
f 1 0x7ffff790dc51 BD_CheckSFTimeOffset+49
f 2 0x7ffff790ed35 gf_bifs_dec_sf_field+2053
f 3 0x7ffff790f4c0 BD_DecMFFieldVec+656
f 4 0x7ffff790fa3f gf_bifs_dec_node_mask+287
f 5 0x7ffff790e158 gf_bifs_dec_node+936
f 6 0x7ffff79062f8 gf_bifs_dec_proto_list+1560
f 7 0x7ffff7906559 BD_DecSceneReplace+73
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 __strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:199
#1 0x00007ffff790dc51 in BD_CheckSFTimeOffset () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff790ed35 in gf_bifs_dec_sf_field () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff790f4c0 in BD_DecMFFieldVec () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff790fa3f in gf_bifs_dec_node_mask () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff790e158 in gf_bifs_dec_node () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff79062f8 in gf_bifs_dec_proto_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff7906559 in BD_DecSceneReplace () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00007ffff7914e5e in BM_SceneReplace () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#9 0x00007ffff7915023 in BM_ParseCommand () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#10 0x00007ffff7915353 in gf_bifs_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#11 0x00007ffff7aa1d91 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#12 0x00005555555844a8 in dump_isom_scene ()
#13 0x000055555557b42c in mp4boxMain ()
#14 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe188, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe178) at ../csu/libc-start.c:308
#15 0x000055555556c45e in _start ()
```
`break BD_CheckSFTimeOffset`
```
0x00007ffff790dc4c in BD_CheckSFTimeOffset () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x67
RBX 0x5555555decb0 ββ 0x0
RCX 0x0
RDX 0x7fffffff6740 ββ 0x200000002
*RDI 0x0
RSI 0x7ffff7dfd2d7 ββ 'startTime'
R8 0x0
R9 0x0
R10 0x7ffff775b844 ββ 'gf_node_get_tag'
R11 0x7ffff7849790 (gf_node_get_tag) ββ endbr64
R12 0x0
R13 0x5555555dfe70 ββΈ 0x5555555dfed0 ββ 0x100000067 /* 'g' */
R14 0x5555555dff50 ββ 0x21e8e8512be35500
R15 0x0
RBP 0x7fffffff6740 ββ 0x200000002
RSP 0x7fffffff6690 ββΈ 0x5555555decb0 ββ 0x0
*RIP 0x7ffff790dc4c (BD_CheckSFTimeOffset+44) ββ call 0x7ffff77e0db0
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
0x7ffff790dc39 <BD_CheckSFTimeOffset+25> cmp eax, 1
0x7ffff790dc3c <BD_CheckSFTimeOffset+28> je BD_CheckSFTimeOffset+144 <BD_CheckSFTimeOffset+144>
0x7ffff790dc3e <BD_CheckSFTimeOffset+30> mov r12, qword ptr [rbp + 0x10]
0x7ffff790dc42 <BD_CheckSFTimeOffset+34> lea rsi, [rip + 0x4ef68e]
0x7ffff790dc49 <BD_CheckSFTimeOffset+41> mov rdi, r12
βΊ 0x7ffff790dc4c <BD_CheckSFTimeOffset+44> call strcasecmp@plt <strcasecmp@plt>
s1: 0x0
s2: 0x7ffff7dfd2d7 ββ 'startTime'
0x7ffff790dc51 <BD_CheckSFTimeOffset+49> test eax, eax
0x7ffff790dc53 <BD_CheckSFTimeOffset+51> jne BD_CheckSFTimeOffset+112 <BD_CheckSFTimeOffset+112>
0x7ffff790dc55 <BD_CheckSFTimeOffset+53> mov edx, dword ptr [rbx + 0x6c]
0x7ffff790dc58 <BD_CheckSFTimeOffset+56> test edx, edx
0x7ffff790dc5a <BD_CheckSFTimeOffset+58> jne BD_CheckSFTimeOffset+80 <BD_CheckSFTimeOffset+80>
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6690 ββΈ 0x5555555decb0 ββ 0x0
01:0008β 0x7fffffff6698 ββΈ 0x5555555d26d0 ββ 0x0
02:0010β 0x7fffffff66a0 ββΈ 0x7fffffff6740 ββ 0x200000002
03:0018β 0x7fffffff66a8 ββΈ 0x7ffff790ed35 (gf_bifs_dec_sf_field+2053) ββ mov eax, dword ptr [rbx]
04:0020β 0x7fffffff66b0 ββΈ 0x5555555dfe90 ββ 0x11cb
05:0028β 0x7fffffff66b8 ββ 0x22 /* '"' */
06:0030β 0x7fffffff66c0 ββ 0x11cb
07:0038β 0x7fffffff66c8 ββΈ 0x7fffffff67d0 ββ 0x2200000002
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff790dc4c BD_CheckSFTimeOffset+44
f 1 0x7ffff790ed35 gf_bifs_dec_sf_field+2053
f 2 0x7ffff790f4c0 BD_DecMFFieldVec+656
f 3 0x7ffff790fa3f gf_bifs_dec_node_mask+287
f 4 0x7ffff790e158 gf_bifs_dec_node+936
f 5 0x7ffff79062f8 gf_bifs_dec_proto_list+1560
f 6 0x7ffff7906559 BD_DecSceneReplace+73
f 7 0x7ffff7914e5e BM_SceneReplace+110
```
```
Program received signal SIGSEGV, Segmentation fault.
__strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:199
199 in ../sysdeps/x86_64/multiarch/strcmp-sse42.S
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x5555555decb0 ββ 0x0
RCX 0x17
RDX 0x7ffff77284a0 (_nl_global_locale) ββΈ 0x7ffff77246c0 (_nl_C_LC_CTYPE) ββΈ 0x7ffff76f4fc6 (_nl_C_name) ββ 0x636d656d5f5f0043 /* 'C' */
RDI 0x0
RSI 0x7ffff7dfd2d7 ββ 'startTime'
R8 0x0
R9 0x0
R10 0x7ffff775b844 ββ 'gf_node_get_tag'
R11 0x7ffff7849790 (gf_node_get_tag) ββ endbr64
R12 0x0
R13 0x5555555dfe70 ββΈ 0x5555555dfed0 ββ 0x100000067 /* 'g' */
R14 0x5555555dff50 ββ 0x21e8e8512be35500
R15 0x0
RBP 0x7fffffff6740 ββ 0x200000002
RSP 0x7fffffff6688 ββΈ 0x7ffff790dc51 (BD_CheckSFTimeOffset+49) ββ test eax, eax
RIP 0x7ffff76c4089 (__strcasecmp_l_avx+69) ββ vmovdqu xmm1, xmmword ptr [rdi]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
0x7ffff76c4077 <__strcasecmp_l_avx+51> vmovdqa xmm6, xmmword ptr [rip + 0x378f1]
0x7ffff76c407f <__strcasecmp_l_avx+59> cmp ecx, 0x30
0x7ffff76c4082 <__strcasecmp_l_avx+62> ja __strcasecmp_l_avx+172 <__strcasecmp_l_avx+172>
0x7ffff76c4084 <__strcasecmp_l_avx+64> cmp eax, 0x30
0x7ffff76c4087 <__strcasecmp_l_avx+67> ja __strcasecmp_l_avx+172 <__strcasecmp_l_avx+172>
βΊ 0x7ffff76c4089 <__strcasecmp_l_avx+69> vmovdqu xmm1, xmmword ptr [rdi]
0x7ffff76c408d <__strcasecmp_l_avx+73> vmovdqu xmm2, xmmword ptr [rsi]
0x7ffff76c4091 <__strcasecmp_l_avx+77> vpcmpgtb xmm7, xmm1, xmm4
0x7ffff76c4095 <__strcasecmp_l_avx+81> vpcmpgtb xmm8, xmm1, xmm5
0x7ffff76c4099 <__strcasecmp_l_avx+85> vpcmpgtb xmm9, xmm2, xmm4
0x7ffff76c409d <__strcasecmp_l_avx+89> vpcmpgtb xmm10, xmm2, xmm5
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6688 ββΈ 0x7ffff790dc51 (BD_CheckSFTimeOffset+49) ββ test eax, eax
01:0008β 0x7fffffff6690 ββΈ 0x5555555decb0 ββ 0x0
02:0010β 0x7fffffff6698 ββΈ 0x5555555d26d0 ββ 0x0
03:0018β 0x7fffffff66a0 ββΈ 0x7fffffff6740 ββ 0x200000002
04:0020β 0x7fffffff66a8 ββΈ 0x7ffff790ed35 (gf_bifs_dec_sf_field+2053) ββ mov eax, dword ptr [rbx]
05:0028β 0x7fffffff66b0 ββΈ 0x5555555dfe90 ββ 0x11cb
06:0030β 0x7fffffff66b8 ββ 0x22 /* '"' */
07:0038β 0x7fffffff66c0 ββ 0x11cb
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff76c4089 __strcasecmp_l_avx+69
f 1 0x7ffff790dc51 BD_CheckSFTimeOffset+49
f 2 0x7ffff790ed35 gf_bifs_dec_sf_field+2053
f 3 0x7ffff790f4c0 BD_DecMFFieldVec+656
f 4 0x7ffff790fa3f gf_bifs_dec_node_mask+287
f 5 0x7ffff790e158 gf_bifs_dec_node+936
f 6 0x7ffff79062f8 gf_bifs_dec_proto_list+1560
f 7 0x7ffff7906559 BD_DecSceneReplace+73
```
| Null Pointer Dereference in BD_CheckSFTimeOffset() | https://api.github.com/repos/gpac/gpac/issues/1969/comments | 1 | 2021-12-10T15:21:14Z | 2021-12-13T13:23:49Z | https://github.com/gpac/gpac/issues/1969 | 1,076,957,223 | 1,969 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in gf_node_get_field(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr poc_5
./MP4Box -lsr poc_6
```
[poc.zip](https://github.com/gpac/gpac/files/7693524/poc.zip)
**Result**
poc_5
```
[iso file] Unknown box type dreFF in parent dinf
[iso file] Missing dref box in dinf
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type FFFFFF80 in parent hinf
[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 860062
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] Unknown box type dreFF in parent dinf
[iso file] Missing dref box in dinf
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type FFFFFF80 in parent hinf
[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 860062
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[1] 878696 segmentation fault ./MP4Box -lsr ./poc/poc_5
```
poc_6
```
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type pm00x in parent hinf
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 861258
[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 pm00x in parent hinf
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 861258
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
[LASeR] memory overread - corrupted decoding
...
Program received signal SIGSEGV, Segmentation fault.
```
**gdb**
poc_5
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff784acf0 in gf_node_get_field () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x4
RBX 0x5555555df130 ββΈ 0x5555555d4330 ββ 0x0
RCX 0x5555555df310 ββ 0x0
RDX 0x7fffffff7050 ββ 0x4
RDI 0x0
RSI 0x7fffffff7050 ββ 0x4
R8 0x4
R9 0x0
R10 0x7ffff775bb48 ββ 'gf_node_get_field'
R11 0x7ffff784acd0 (gf_node_get_field) ββ endbr64
R12 0xfffffffe
R13 0x5555555df290 ββ 0x4
R14 0x7fffffff7050 ββ 0x4
R15 0x5555555dcdc0 ββΈ 0x5555555d26b0 ββ 0x0
RBP 0x80
RSP 0x7fffffff6fa8 ββΈ 0x7ffff7b5784a (lsr_read_command_list+1402) ββ mov eax, dword ptr [rsp + 0xa4]
RIP 0x7ffff784acf0 (gf_node_get_field+32) ββ mov rax, qword ptr [rdi]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff784acf0 <gf_node_get_field+32> mov rax, qword ptr [rdi]
0x7ffff784acf3 <gf_node_get_field+35> movzx eax, word ptr [rax]
0x7ffff784acf6 <gf_node_get_field+38> test ax, ax
0x7ffff784acf9 <gf_node_get_field+41> je gf_node_get_field+144 <gf_node_get_field+144>
β
0x7ffff784ad60 <gf_node_get_field+144> mov eax, 0xffffffff
0x7ffff784ad65 <gf_node_get_field+149> ret
0x7ffff784ad66 nop word ptr cs:[rax + rax]
0x7ffff784ad70 <dirty_children> push r14
0x7ffff784ad72 <dirty_children+2> push r13
0x7ffff784ad74 <dirty_children+4> push r12
0x7ffff784ad76 <dirty_children+6> push rbp
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6fa8 ββΈ 0x7ffff7b5784a (lsr_read_command_list+1402) ββ mov eax, dword ptr [rsp + 0xa4]
01:0008β 0x7fffffff6fb0 ββ 0x0
02:0010β 0x7fffffff6fb8 ββ 0x300000000
03:0018β 0x7fffffff6fc0 ββ 0x0
04:0020β 0x7fffffff6fc8 ββΈ 0x5555555df0b0 ββΈ 0x5555555df1d0 ββΈ 0x5555555df130 ββΈ 0x5555555d4330 ββ ...
05:0028β 0x7fffffff6fd0 ββ 0x0
... β 2 skipped
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff784acf0 gf_node_get_field+32
f 1 0x7ffff7b5784a lsr_read_command_list+1402
f 2 0x7ffff7b59914 lsr_decode_laser_unit+708
f 3 0x7ffff7b6204d gf_laser_decode_command_list+333
f 4 0x7ffff7aa1eb1 gf_sm_load_run_isom+1505
f 5 0x5555555844a8 dump_isom_scene+760
f 6 0x55555557b42c mp4boxMain+9228
f 7 0x7ffff75630b3 __libc_start_main+243
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff784acf0 in gf_node_get_field () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7b5784a in lsr_read_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7b59914 in lsr_decode_laser_unit () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7b6204d in gf_laser_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7aa1eb1 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00005555555844a8 in dump_isom_scene ()
#6 0x000055555557b42c in mp4boxMain ()
#7 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe188, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe178) at ../csu/libc-start.c:308
#8 0x000055555556c45e in _start ()
```
poc_6
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff784acf0 in gf_node_get_field () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0xbb
RBX 0x5555555df0f0 ββΈ 0x5555555d4300 ββ 0x0
RCX 0x5555555df2d0 ββ 0x0
RDX 0x7fffffff7000 ββ 0xbb
RDI 0x0
RSI 0x7fffffff7000 ββ 0xbb
R8 0xbb
R9 0x0
R10 0x7ffff775bb48 ββ 'gf_node_get_field'
R11 0x7ffff784acd0 (gf_node_get_field) ββ endbr64
R12 0xfffffffe
R13 0x5555555df250 ββ 0xbb
R14 0x7fffffff7000 ββ 0xbb
R15 0x5555555dcd80 ββΈ 0x5555555d2680 ββ 0x0
RBP 0x40
RSP 0x7fffffff6f58 ββΈ 0x7ffff7b5784a (lsr_read_command_list+1402) ββ mov eax, dword ptr [rsp + 0xa4]
RIP 0x7ffff784acf0 (gf_node_get_field+32) ββ mov rax, qword ptr [rdi]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff784acf0 <gf_node_get_field+32> mov rax, qword ptr [rdi]
0x7ffff784acf3 <gf_node_get_field+35> movzx eax, word ptr [rax]
0x7ffff784acf6 <gf_node_get_field+38> test ax, ax
0x7ffff784acf9 <gf_node_get_field+41> je gf_node_get_field+144 <gf_node_get_field+144>
β
0x7ffff784ad60 <gf_node_get_field+144> mov eax, 0xffffffff
0x7ffff784ad65 <gf_node_get_field+149> ret
0x7ffff784ad66 nop word ptr cs:[rax + rax]
0x7ffff784ad70 <dirty_children> push r14
0x7ffff784ad72 <dirty_children+2> push r13
0x7ffff784ad74 <dirty_children+4> push r12
0x7ffff784ad76 <dirty_children+6> push rbp
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6f58 ββΈ 0x7ffff7b5784a (lsr_read_command_list+1402) ββ mov eax, dword ptr [rsp + 0xa4]
01:0008β 0x7fffffff6f60 ββ 0x6469005453414c00
02:0010β 0x7fffffff6f68 ββ 0x900000000
03:0018β 0x7fffffff6f70 ββ 0x0
04:0020β 0x7fffffff6f78 ββΈ 0x5555555df070 ββΈ 0x5555555df190 ββΈ 0x5555555df0f0 ββΈ 0x5555555d4300 ββ ...
05:0028β 0x7fffffff6f80 ββ 0x0
... β 2 skipped
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff784acf0 gf_node_get_field+32
f 1 0x7ffff7b5784a lsr_read_command_list+1402
f 2 0x7ffff7b59914 lsr_decode_laser_unit+708
f 3 0x7ffff7b6204d gf_laser_decode_command_list+333
f 4 0x7ffff7aa1eb1 gf_sm_load_run_isom+1505
f 5 0x5555555844a8 dump_isom_scene+760
f 6 0x55555557b42c mp4boxMain+9228
f 7 0x7ffff75630b3 __libc_start_main+243
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff784acf0 in gf_node_get_field () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7b5784a in lsr_read_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7b59914 in lsr_decode_laser_unit () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7b6204d in gf_laser_decode_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7aa1eb1 in gf_sm_load_run_isom () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00005555555844a8 in dump_isom_scene ()
#6 0x000055555557b42c in mp4boxMain ()
#7 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe138, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe128) at ../csu/libc-start.c:308
#8 0x000055555556c45e in _start ()
```
| Null Pointer Dereference in gf_node_get_field() | https://api.github.com/repos/gpac/gpac/issues/1968/comments | 0 | 2021-12-10T14:52:20Z | 2021-12-13T13:22:07Z | https://github.com/gpac/gpac/issues/1968 | 1,076,928,345 | 1,968 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in gf_svg_get_attribute_name(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr poc_4
```
[poc_4.zip](https://github.com/gpac/gpac/files/7693449/poc_4.zip)
**Result**
```
[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 796312
[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 796312
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 LASeR Scene Parsing
Scene loaded - dumping 1 systems streams
[1] 3570050 segmentation fault ./MP4Box -lsr ./poc/poc_4
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff78e16ac in gf_svg_get_attribute_name () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x5555555decb0 ββΈ 0x5555555d4350 ββ 0x0
RCX 0x0
RDX 0x7ffff7f7c428 (xml_elements+8) ββ 0x300000422
RDI 0x0
RSI 0x0
R8 0x0
R9 0xa
R10 0x7ffff7e45bd4 ββ 0x6e696f7020002022 /* '" ' */
R11 0x7fffffff6ee7 ββ 0xbffcbef5d8160036 /* '6' */
R12 0x5555555df180 ββΈ 0x5555555d4350 ββ 0x0
R13 0x0
R14 0x7ffff7e10cf4 ββ 'textContent'
R15 0x7ffff7df5e9b ββ 0x663325002f2e2e00
RBP 0x7fffffff7080 ββ 0x344e /* 'N4' */
RSP 0x7fffffff6fe0 ββ 0x25286574616c736e ('nslate(%')
RIP 0x7ffff78e16ac (gf_svg_get_attribute_name+28) ββ mov rax, qword ptr [rdi]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff78e16ac <gf_svg_get_attribute_name+28> mov rax, qword ptr [rdi]
0x7ffff78e16af <gf_svg_get_attribute_name+31> movzx ecx, word ptr [rax]
0x7ffff78e16b2 <gf_svg_get_attribute_name+34> xor eax, eax
0x7ffff78e16b4 <gf_svg_get_attribute_name+36> cmp cx, 0x408
0x7ffff78e16b9 <gf_svg_get_attribute_name+41> jne gf_svg_get_attribute_name+64
<gf_svg_get_attribute_name+64>
β
0x7ffff78e16d0 <gf_svg_get_attribute_name+64> cmp dword ptr [rdx], ecx
0x7ffff78e16d2 <gf_svg_get_attribute_name+66> jne gf_svg_get_attribute_name+48
<gf_svg_get_attribute_name+48>
β
0x7ffff78e16c0 <gf_svg_get_attribute_name+48> add eax, 1
0x7ffff78e16c3 <gf_svg_get_attribute_name+51> add rdx, 0x10
0x7ffff78e16c7 <gf_svg_get_attribute_name+55> cmp eax, 0x4e
0x7ffff78e16ca <gf_svg_get_attribute_name+58> je gf_svg_get_attribute_name+365
<gf_svg_get_attribute_name+365>
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6fe0 ββ 0x25286574616c736e ('nslate(%')
01:0008β 0x7fffffff6fe8 ββΈ 0x5555555decb0 ββΈ 0x5555555d4350 ββ 0x0
02:0010β 0x7fffffff6ff0 ββΈ 0x7fffffff7080 ββ 0x344e /* 'N4' */
03:0018β 0x7fffffff6ff8 ββΈ 0x5555555df180 ββΈ 0x5555555d4350 ββ 0x0
04:0020β 0x7fffffff7000 ββΈ 0x5555555df2e0 ββ 0x0
05:0028β 0x7fffffff7008 ββΈ 0x7ffff7e10cf4 ββ 'textContent'
06:0030β 0x7fffffff7010 ββΈ 0x7ffff7df5e9b ββ 0x663325002f2e2e00
07:0038β 0x7fffffff7018 ββΈ 0x7ffff7abae7a (DumpLSRAddReplaceInsert+938) ββ mov r14, rax
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff78e16ac gf_svg_get_attribute_name+28
f 1 0x7ffff7abae7a DumpLSRAddReplaceInsert+938
f 2 0x7ffff7abb12b gf_sm_dump_command_list+219
f 3 0x7ffff7ac254c gf_sm_dump+1116
f 4 0x555555584418 dump_isom_scene+616
f 5 0x55555557b42c mp4boxMain+9228
f 6 0x7ffff75630b3 __libc_start_main+243
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff78e16ac in gf_svg_get_attribute_name () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7abae7a in DumpLSRAddReplaceInsert () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7abb12b in gf_sm_dump_command_list () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff7ac254c in gf_sm_dump () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x0000555555584418 in dump_isom_scene ()
#5 0x000055555557b42c in mp4boxMain ()
#6 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe188, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe178) at ../csu/libc-start.c:308
#7 0x000055555556c45e in _start ()
```
| Null Pointer Dereference in gf_svg_get_attribute_name() | https://api.github.com/repos/gpac/gpac/issues/1967/comments | 0 | 2021-12-10T14:38:22Z | 2021-12-13T13:22:06Z | https://github.com/gpac/gpac/issues/1967 | 1,076,915,355 | 1,967 |
[
"gpac",
"gpac"
] | 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 dump_od_to_saf.isra(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr poc_3
```
[poc_3.zip](https://github.com/gpac/gpac/files/7692204/poc_3.zip)
**Result**
```
[ODF] Not enough bytes (38) to read descriptor (size=59)
[ODF] Error reading descriptor (tag 4 size 49): Invalid MPEG-4 Descriptor
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Incomplete box mdat - start 11495 size 861263
[iso file] Incomplete file while reading for dump - aborting parsing
[ODF] Not enough bytes (38) to read descriptor (size=59)
[ODF] Error reading descriptor (tag 4 size 49): Invalid MPEG-4 Descriptor
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Incomplete box mdat - start 11495 size 861263
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
Scene loaded - dumping 2 systems streams
[1] 1390552 segmentation fault ./MP4Box -lsr ./poc/poc_3
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ab7e3b in dump_od_to_saf.isra () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x5555555df630 ββΈ 0x5555555df601 ββ 0x2100000000000000
RCX 0x0
RDX 0x7ffff72bf040 ββ 0x7ffff72bf040
RDI 0x5555555e0400 ββ 0xfbad2c84
RSI 0x5555555df440 ββ 0x7
R8 0x0
R9 0x23
R10 0x7ffff7e4690b ββ 0x7473200000000022 /* '"' */
R11 0x7fffffff70c7 ββ 0x4d0552ab398a0031 /* '1' */
R12 0x0
R13 0x5555555df4d0 ββ 0x0
R14 0x5555555df070 ββΈ 0x5555555e0400 ββ 0xfbad2c84
R15 0x5555555dfcb0 ββ 0x700010003
RBP 0x1
RSP 0x7fffffff7200 ββΈ 0x5555555df8a0 ββ 0xc0
RIP 0x7ffff7ab7e3b (dump_od_to_saf.isra+299) ββ movzx edx, byte ptr [rax + 8]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7ab7e3b <dump_od_to_saf.isra+299> movzx edx, byte ptr [rax + 8]
0x7ffff7ab7e3f <dump_od_to_saf.isra+303> mov ecx, dword ptr [rax + 4]
0x7ffff7ab7e42 <dump_od_to_saf.isra+306> xor eax, eax
0x7ffff7ab7e44 <dump_od_to_saf.isra+308> mov r8d, dword ptr [rsi + 0x18]
0x7ffff7ab7e48 <dump_od_to_saf.isra+312> lea rsi, [rip + 0x38eac1]
0x7ffff7ab7e4f <dump_od_to_saf.isra+319> call gf_fprintf@plt <gf_fprintf@plt>
0x7ffff7ab7e54 <dump_od_to_saf.isra+324> mov rdx, qword ptr [r13]
0x7ffff7ab7e58 <dump_od_to_saf.isra+328> mov r9, qword ptr [rsp]
0x7ffff7ab7e5c <dump_od_to_saf.isra+332> test rdx, rdx
0x7ffff7ab7e5f <dump_od_to_saf.isra+335> jne dump_od_to_saf.isra+464 <dump_od_to_saf.isra+464>
0x7ffff7ab7e61 <dump_od_to_saf.isra+337> mov rdi, qword ptr [r14]
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff7200 ββΈ 0x5555555df8a0 ββ 0xc0
01:0008β 0x7fffffff7208 ββ 0x100000002
02:0010β 0x7fffffff7210 ββΈ 0x5555555dfa50 ββΈ 0x5555555dfde0 ββ 0x0
03:0018β 0x7fffffff7218 ββ 0x0
04:0020β 0x7fffffff7220 ββΈ 0x5555555dfa50 ββΈ 0x5555555dfde0 ββ 0x0
05:0028β 0x7fffffff7228 ββ 0x0
06:0030β 0x7fffffff7230 ββ 0x0
07:0038β 0x7fffffff7238 ββΈ 0x5555555df4d0 ββ 0x0
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7ab7e3b dump_od_to_saf.isra+299
f 1 0x7ffff7ac282d gf_sm_dump+1853
f 2 0x555555584418 dump_isom_scene+616
f 3 0x55555557b42c mp4boxMain+9228
f 4 0x7ffff75630b3 __libc_start_main+243
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7ab7e3b in dump_od_to_saf.isra () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7ac282d in gf_sm_dump () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x0000555555584418 in dump_isom_scene ()
#3 0x000055555557b42c in mp4boxMain ()
#4 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe188, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe178) at ../csu/libc-start.c:308
#5 0x000055555556c45e in _start ()
```
| Invalid memory address dereference in dump_od_to_saf.isra() | https://api.github.com/repos/gpac/gpac/issues/1966/comments | 0 | 2021-12-10T11:00:37Z | 2021-12-13T13:22:06Z | https://github.com/gpac/gpac/issues/1966 | 1,076,720,063 | 1,966 |
[
"gpac",
"gpac"
] | 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 svg_node_start(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr poc_2.xsr
```
[poc_2.zip](https://github.com/gpac/gpac/files/7692197/poc_2.zip)
**Result**
```
[Parser] LASeR Scene Parsing: ./poc/poc_2.xsr
[1] 75845 segmentation fault ./MP4Box -lsr ./poc/poc_2.xsr
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7aa5f97 in svg_node_start () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x5555555c7750 ββ 0x0
RCX 0x0
RDX 0x5555555ce2b0 ββΈ 0x5555555ce0e3 ββ 0x7572742200706172 /* 'rap' */
RDI 0x7ffff7e447c9 ββ 'Unable to parse chunk: %s'
RSI 0x5555555ce0e3 ββ 0x7572742200706172 /* 'rap' */
R8 0x7fffffff5c3c ββ 0x0
R9 0x5555555ce0e3 ββ 0x7572742200706172 /* 'rap' */
R10 0x0
R11 0x0
R12 0x5555555ce2b0 ββΈ 0x5555555ce0e3 ββ 0x7572742200706172 /* 'rap' */
R13 0x5555555ce0d5 ββ 0x6e65637300666173 /* 'saf' */
R14 0x1
R15 0x0
RBP 0x5555555cf390 ββΈ 0x7fffffff7310 ββ 0x7
RSP 0x7fffffff5bb0 ββ 0x0
RIP 0x7ffff7aa5f97 (svg_node_start+3095) ββ mov rdi, qword ptr [rax + 0x20]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7aa5f97 <svg_node_start+3095> mov rdi, qword ptr [rax + 0x20]
0x7ffff7aa5f9b <svg_node_start+3099> call gf_list_count@plt <gf_list_count@plt>
0x7ffff7aa5fa0 <svg_node_start+3104> test eax, eax
0x7ffff7aa5fa2 <svg_node_start+3106> sete r15b
0x7ffff7aa5fa6 <svg_node_start+3110> test r14d, r14d
0x7ffff7aa5fa9 <svg_node_start+3113> jne svg_node_start+6240 <svg_node_start+6240>
0x7ffff7aa5faf <svg_node_start+3119> xor esi, esi
0x7ffff7aa5fb1 <svg_node_start+3121> nop dword ptr [rax]
0x7ffff7aa5fb8 <svg_node_start+3128> mov rdi, qword ptr [rbp + 0x50]
0x7ffff7aa5fbc <svg_node_start+3132> mov edx, r15d
0x7ffff7aa5fbf <svg_node_start+3135> pxor xmm0, xmm0
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff5bb0 ββ 0x0
01:0008β 0x7fffffff5bb8 ββΈ 0x5555555ce0d9 ββ 'sceneUnit'
02:0010β 0x7fffffff5bc0 ββ 0x0
03:0018β 0x7fffffff5bc8 ββ 0x0
04:0020β 0x7fffffff5bd0 ββΈ 0x5555555ce0d5 ββ 0x6e65637300666173 /* 'saf' */
05:0028β 0x7fffffff5bd8 ββ 0x0
06:0030β 0x7fffffff5be0 ββ 0x0
07:0038β 0x7fffffff5be8 ββ 0x3000000020 /* ' ' */
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7aa5f97 svg_node_start+3095
f 1 0x7ffff781fbc5 xml_sax_node_start+453
f 2 0x7ffff7820e6c xml_sax_parse+3596
f 3 0x7ffff78213d6 gf_xml_sax_parse_intern+950
f 4 0x7ffff7821595 gf_xml_sax_parse+165
f 5 0x7ffff7821633 xml_sax_read_file.part+115
f 6 0x7ffff7821927 gf_xml_sax_parse_file+295
f 7 0x7ffff7aa42da load_svg_run+58
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7aa5f97 in svg_node_start () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff781fbc5 in xml_sax_node_start () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x00007ffff7820e6c in xml_sax_parse () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#3 0x00007ffff78213d6 in gf_xml_sax_parse_intern () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#4 0x00007ffff7821595 in gf_xml_sax_parse () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#5 0x00007ffff7821633 in xml_sax_read_file.part () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#6 0x00007ffff7821927 in gf_xml_sax_parse_file () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#7 0x00007ffff7aa42da in load_svg_run () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#8 0x00005555555844a8 in dump_isom_scene ()
#9 0x000055555557b42c in mp4boxMain ()
#10 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe188, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe178) at ../csu/libc-start.c:308
#11 0x000055555556c45e in _start ()
```
| Invalid memory address dereference in svg_node_start() | https://api.github.com/repos/gpac/gpac/issues/1965/comments | 0 | 2021-12-10T10:59:40Z | 2021-12-13T13:22:06Z | https://github.com/gpac/gpac/issues/1965 | 1,076,719,232 | 1,965 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in gf_isom_parse_movie_boxes_internal(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr poc_1
```
[poc_1.zip](https://github.com/gpac/gpac/files/7692191/poc_1.zip)
**Result**
```
[iso file] extra box maxr found in hinf, deleting
[iso file] Read Box type 00000000 (0x00000000) at position 4494 has size 0 but is not at root/file level, skipping
[iso file] Read Box "hinf" (start 4390) failed (End Of Stream / File) - skipping
[iso file] Read Box "udta" (start 4178) failed (End Of Stream / File) - skipping
[iso file] Read Box "trak" (start 2229) failed (End Of Stream / File) - skipping
[iso file] Read Box "moov" (start 20) failed (End Of Stream / File) - skipping
[1] 2155243 segmentation fault ./MP4Box -lsr ./poc/poc_1
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7973829 in gf_isom_parse_movie_boxes_internal () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x1
RBX 0x5555555c72a0 ββ 0x0
RCX 0x7ffff764d1e7 (write+23) ββ cmp rax, -0x1000 /* 'H=' */
RDX 0x0
RDI 0x5555555c62a0 ββ 0x0
RSI 0x0
R8 0x0
R9 0x0
R10 0x7ffff7e227df ββ ') - skipping\n'
R11 0x246
R12 0x0
R13 0x0
R14 0x5555555c72a0 ββ 0x0
R15 0x3
RBP 0x7fffffff83a0 ββ 0x0
RSP 0x7fffffff8310 ββΈ 0x7fffffff8350 ββ 0x0
RIP 0x7ffff7973829 (gf_isom_parse_movie_boxes_internal+249) ββ mov eax, dword ptr [rsi]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7973829 <gf_isom_parse_movie_boxes_internal+249> mov eax, dword ptr [rsi]
0x7ffff797382b <gf_isom_parse_movie_boxes_internal+251> cmp eax, 0x6d6f6f76
0x7ffff7973830 <gf_isom_parse_movie_boxes_internal+256> je gf_isom_parse_movie_boxes_internal+1688 <gf_isom_parse_movie_boxes_internal+1688>
β
0x7ffff7973dc8 <gf_isom_parse_movie_boxes_internal+1688> cmp qword ptr [r14 + 0x48], 0
0x7ffff7973dcd <gf_isom_parse_movie_boxes_internal+1693> jne gf_isom_parse_movie_boxes_internal+4630 <gf_isom_parse_movie_boxes_internal+4630>
β
0x7ffff7974946 <gf_isom_parse_movie_boxes_internal+4630> mov esi, 1
0x7ffff797494b <gf_isom_parse_movie_boxes_internal+4635> mov edi, 2
0x7ffff7974950 <gf_isom_parse_movie_boxes_internal+4640> call gf_log_tool_level_on@plt <gf_log_tool_level_on@plt>
0x7ffff7974955 <gf_isom_parse_movie_boxes_internal+4645> test eax, eax
0x7ffff7974957 <gf_isom_parse_movie_boxes_internal+4647> je gf_isom_parse_movie_boxes_internal+4540 <gf_isom_parse_movie_boxes_internal+4540>
0x7ffff7974959 <gf_isom_parse_movie_boxes_internal+4649> mov esi, 2
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff8310 ββΈ 0x7fffffff8350 ββ 0x0
01:0008β 0x7fffffff8318 ββ 0x0
... β 2 skipped
04:0020β 0x7fffffff8330 ββΈ 0x5555555c7500 ββ 0x6d703431 /* '14pm' */
05:0028β 0x7fffffff8338 ββ 0x0
06:0030β 0x7fffffff8340 ββ 0x0
07:0038β 0x7fffffff8348 ββ 0x4
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7973829 gf_isom_parse_movie_boxes_internal+249
f 1 0x7ffff7974f97 gf_isom_open_file+311
f 2 0x55555557dc14 mp4boxMain+19444
f 3 0x7ffff75630b3 __libc_start_main+243
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7973829 in gf_isom_parse_movie_boxes_internal () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#1 0x00007ffff7974f97 in gf_isom_open_file () from /root/fuckit/test/gpac1210/bin/gcc/libgpac.so.10
#2 0x000055555557dc14 in mp4boxMain ()
#3 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe188, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe178) at ../csu/libc-start.c:308
#4 0x000055555556c45e in _start ()
```
| Null Pointer Dereference in gf_isom_parse_movie_boxes_internal() | https://api.github.com/repos/gpac/gpac/issues/1964/comments | 0 | 2021-12-10T10:59:02Z | 2021-12-13T13:22:06Z | https://github.com/gpac/gpac/issues/1964 | 1,076,718,691 | 1,964 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in gf_sg_vrml_mf_alloc(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr ./poc5
```
[poc5.zip](https://github.com/gpac/gpac/files/7691789/poc5.zip)
**Result**
```
./MP4Box -lsr ./poc5
[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 861206
[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 861206
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[1] 1371476 segmentation fault ./MP4Box -lsr ./poc5
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff78a0f7d in gf_sg_vrml_mf_alloc () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x9f03c
RCX 0x10
RDX 0x7ffff7e078a0 (CSWTCH.120) ββ 0xc080c0804080404
RDI 0x32
RSI 0x32
R8 0x0
R9 0x0
R10 0x7ffff775bdeb ββ 'gf_sg_vrml_mf_alloc'
R11 0x7ffff78a0f30 (gf_sg_vrml_mf_alloc) ββ endbr64
R12 0x0
R13 0x8
R14 0x0
R15 0x7fffffff6d60 ββ 0x30646c6569665f /* '_field0' */
RBP 0x32
RSP 0x7fffffff6bf0 ββ 0x9f03c
RIP 0x7ffff78a0f7d (gf_sg_vrml_mf_alloc+77) ββ cmp dword ptr [r12], ebx
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff78a0f7d <gf_sg_vrml_mf_alloc+77> cmp dword ptr [r12], ebx
0x7ffff78a0f81 <gf_sg_vrml_mf_alloc+81> je gf_sg_vrml_mf_alloc+125 <gf_sg_vrml_mf_alloc+125>
β
0x7ffff78a0fad <gf_sg_vrml_mf_alloc+125> add rsp, 8
0x7ffff78a0fb1 <gf_sg_vrml_mf_alloc+129> pop rbx
0x7ffff78a0fb2 <gf_sg_vrml_mf_alloc+130> pop rbp
0x7ffff78a0fb3 <gf_sg_vrml_mf_alloc+131> pop r12
0x7ffff78a0fb5 <gf_sg_vrml_mf_alloc+133> pop r13
0x7ffff78a0fb7 <gf_sg_vrml_mf_alloc+135> ret
0x7ffff78a0fb8 <gf_sg_vrml_mf_alloc+136> nop dword ptr [rax + rax]
0x7ffff78a0fc0 <gf_sg_vrml_mf_alloc+144> mov edx, ebx
0x7ffff78a0fc2 <gf_sg_vrml_mf_alloc+146> imul r13, rdx
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6bf0 ββ 0x9f03c
01:0008β 0x7fffffff6bf8 ββΈ 0x7fffffff6d30 ββ 0x3200000000
02:0010β 0x7fffffff6c00 ββΈ 0x5555555ded70 ββ 0x0
03:0018β 0x7fffffff6c08 ββ 0x555df8c0
04:0020β 0x7fffffff6c10 ββΈ 0x5555555d2730 ββ 0x0
05:0028β 0x7fffffff6c18 ββΈ 0x7ffff790f44d (BD_DecMFFieldVec+589) ββ mov r14d, eax
06:0030β 0x7fffffff6c20 ββ 0x0
07:0038β 0x7fffffff6c28 ββ 0x0
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff78a0f7d gf_sg_vrml_mf_alloc+77
f 1 0x7ffff790f44d BD_DecMFFieldVec+589
f 2 0x7ffff7906205 gf_bifs_dec_proto_list+1333
f 3 0x7ffff7906549 BD_DecSceneReplace+73
f 4 0x7ffff7914e2e BM_SceneReplace+110
f 5 0x7ffff7914ff3 BM_ParseCommand+179
f 6 0x7ffff7915323 gf_bifs_decode_command_list+163
f 7 0x7ffff7aa1da2 gf_sm_load_run_isom+1218
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff78a0f7d in gf_sg_vrml_mf_alloc () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#1 0x00007ffff790f44d in BD_DecMFFieldVec () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#2 0x00007ffff7906205 in gf_bifs_dec_proto_list () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#3 0x00007ffff7906549 in BD_DecSceneReplace () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#4 0x00007ffff7914e2e in BM_SceneReplace () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#5 0x00007ffff7914ff3 in BM_ParseCommand () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#6 0x00007ffff7915323 in gf_bifs_decode_command_list () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#7 0x00007ffff7aa1da2 in gf_sm_load_run_isom () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#8 0x00005555555844a8 in dump_isom_scene ()
#9 0x000055555557b42c in mp4boxMain ()
#10 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe1a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe198) at ../csu/libc-start.c:308
#11 0x000055555556c45e in _start ()
```
| Null Pointer Dereference in gf_sg_vrml_mf_alloc() | https://api.github.com/repos/gpac/gpac/issues/1963/comments | 1 | 2021-12-10T09:54:17Z | 2021-12-10T10:17:26Z | https://github.com/gpac/gpac/issues/1963 | 1,076,656,843 | 1,963 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in gf_dump_vrml_dyn_field.isra(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr ./poc4
```
[poc4.zip](https://github.com/gpac/gpac/files/7691639/poc4.zip)
**Result**
```
[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 860238
[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 860238
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
Scene loaded - dumping 1 systems streams
[1] 414421 segmentation fault ./MP4Box -lsr ./poc4
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ac0797 in gf_dump_vrml_dyn_field.isra () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0xa
RBX 0x0
RCX 0x0
RDX 0x7ffff72bf040 ββ 0x7ffff72bf040
RDI 0x7fffffff6af0 ββΈ 0x7ffff75a21e0 (funlockfile) ββ endbr64
RSI 0x0
R8 0xffffffff
R9 0xa
R10 0x7ffff7e37a2a ββ 0x3e73252f3c00223d /* '="' */
R11 0x7ffff7df0c38 ββ 0x6e776f6e6b6e75 /* 'unknown' */
R12 0x0
R13 0x0
R14 0x5555555ded60 ββΈ 0x5555555d43b0 ββ 0x0
R15 0x1
RBP 0x3c
RSP 0x7fffffff7060 ββ 0x3000000010
RIP 0x7ffff7ac0797 (gf_dump_vrml_dyn_field.isra+631) ββ mov eax, dword ptr [r12]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7ac0797 <gf_dump_vrml_dyn_field.isra+631> mov eax, dword ptr [r12]
0x7ffff7ac079b <gf_dump_vrml_dyn_field.isra+635> test eax, eax
0x7ffff7ac079d <gf_dump_vrml_dyn_field.isra+637> je gf_dump_vrml_dyn_field.isra+720
<gf_dump_vrml_dyn_field.isra+720>
β
0x7ffff7ac07f0 <gf_dump_vrml_dyn_field.isra+720> mov eax, dword ptr [rsp + 0x70]
0x7ffff7ac07f4 <gf_dump_vrml_dyn_field.isra+724> mov rdi, qword ptr [r14 + 0x10]
0x7ffff7ac07f8 <gf_dump_vrml_dyn_field.isra+728> test eax, eax
0x7ffff7ac07fa <gf_dump_vrml_dyn_field.isra+730> jne gf_dump_vrml_dyn_field.isra+292
<gf_dump_vrml_dyn_field.isra+292>
β
0x7ffff7ac0644 <gf_dump_vrml_dyn_field.isra+292> lea rsi, [rip + 0x35ac0b]
0x7ffff7ac064b <gf_dump_vrml_dyn_field.isra+299> xor eax, eax
0x7ffff7ac064d <gf_dump_vrml_dyn_field.isra+301> call gf_fprintf@plt <gf_fprintf@plt>
0x7ffff7ac0652 <gf_dump_vrml_dyn_field.isra+306> jmp gf_dump_vrml_dyn_field.isra+391
<gf_dump_vrml_dyn_field.isra+391>
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff7060 ββ 0x3000000010
01:0008β 0x7fffffff7068 ββΈ 0x5555555df880 ββ 0x31646c6569665f /* '_field1' */
02:0010β 0x7fffffff7070 ββ 0x0
03:0018β 0x7fffffff7078 ββ 0x38b85a8f00
04:0020β 0x7fffffff7080 ββ 0x0
05:0028β 0x7fffffff7088 ββ 0x7aa5d2dbb85a8f00
06:0030β 0x7fffffff7090 ββ 0x1
07:0038β 0x7fffffff7098 ββΈ 0x7ffff7e27f46 ββ 0x65646f6d73006325 /* '%c' */
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7ac0797 gf_dump_vrml_dyn_field.isra+631
f 1 0x7ffff7ac15d1 DumpProtos+305
f 2 0x7ffff7abb389 gf_sm_dump_command_list+857
f 3 0x7ffff7ac24fc gf_sm_dump+1116
f 4 0x555555584418 dump_isom_scene+616
f 5 0x55555557b42c mp4boxMain+9228
f 6 0x7ffff75630b3 __libc_start_main+243
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7ac0797 in gf_dump_vrml_dyn_field.isra () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#1 0x00007ffff7ac15d1 in DumpProtos () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#2 0x00007ffff7abb389 in gf_sm_dump_command_list () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#3 0x00007ffff7ac24fc in gf_sm_dump () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#4 0x0000555555584418 in dump_isom_scene ()
#5 0x000055555557b42c in mp4boxMain ()
#6 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe1a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe198) at ../csu/libc-start.c:308
#7 0x000055555556c45e in _start ()
```
| Null Pointer Dereference in gf_dump_vrml_dyn_field.isra() | https://api.github.com/repos/gpac/gpac/issues/1962/comments | 0 | 2021-12-10T09:31:57Z | 2021-12-10T10:16:34Z | https://github.com/gpac/gpac/issues/1962 | 1,076,623,517 | 1,962 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in gf_node_get_tag(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr poc3
```
[poc3.zip](https://github.com/gpac/gpac/files/7691603/poc3.zip)
**Result**
```
[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 861218
[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 861218
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[1] 3453407 segmentation fault ./MP4Box -lsr
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7849794 in gf_node_get_tag () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x0
RCX 0x0
RDX 0x5555555d2730 ββ 0x0
RDI 0x0
RSI 0x5555555df860 ββ 0x0
R8 0x0
R9 0x7
R10 0x7ffff775b844 ββ 'gf_node_get_tag'
R11 0x7ffff7849790 (gf_node_get_tag) ββ endbr64
R12 0x5555555ded60 ββ 0x0
R13 0x5555555df860 ββ 0x0
R14 0x0
R15 0x7fffffff6d60 ββ 0x31646c6569665f /* '_field1' */
RBP 0x5555555d2730 ββ 0x0
RSP 0x7fffffff6be8 ββΈ 0x7ffff7919836 (SFScript_Parse+54) ββ cmp eax, 0x51
RIP 0x7ffff7849794 (gf_node_get_tag+4) ββ mov rax, qword ptr [rdi]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
0x7ffff7849790 <gf_node_get_tag> endbr64
βΊ 0x7ffff7849794 <gf_node_get_tag+4> mov rax, qword ptr [rdi]
0x7ffff7849797 <gf_node_get_tag+7> movzx eax, word ptr [rax]
0x7ffff784979a <gf_node_get_tag+10> ret
0x7ffff784979b nop dword ptr [rax + rax]
0x7ffff78497a0 <gf_node_get_id> endbr64
0x7ffff78497a4 <gf_node_get_id+4> mov rax, qword ptr [rdi]
0x7ffff78497a7 <gf_node_get_id+7> xor r8d, r8d
0x7ffff78497aa <gf_node_get_id+10> mov edx, dword ptr [rax + 4]
0x7ffff78497ad <gf_node_get_id+13> test edx, edx
0x7ffff78497af <gf_node_get_id+15> jns gf_node_get_id+66 <gf_node_get_id+66>
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6be8 ββΈ 0x7ffff7919836 (SFScript_Parse+54) ββ cmp eax, 0x51
01:0008β 0x7fffffff6bf0 ββ 0x0
... β 2 skipped
04:0020β 0x7fffffff6c08 ββ 0x770000007c /* '|' */
05:0028β 0x7fffffff6c10 ββ 0x5b0000006e /* 'n' */
06:0030β 0x7fffffff6c18 ββ 0x770000007c /* '|' */
07:0038β 0x7fffffff6c20 ββ 0x5b0000006e /* 'n' */
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7849794 gf_node_get_tag+4
f 1 0x7ffff7919836 SFScript_Parse+54
f 2 0x7ffff790e9cb gf_bifs_dec_sf_field+1195
f 3 0x7ffff7905f44 gf_bifs_dec_proto_list+628
f 4 0x7ffff7906549 BD_DecSceneReplace+73
f 5 0x7ffff7914e2e BM_SceneReplace+110
f 6 0x7ffff7914ff3 BM_ParseCommand+179
f 7 0x7ffff7915323 gf_bifs_decode_command_list+163
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7849794 in gf_node_get_tag () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#1 0x00007ffff7919836 in SFScript_Parse () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#2 0x00007ffff790e9cb in gf_bifs_dec_sf_field () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#3 0x00007ffff7905f44 in gf_bifs_dec_proto_list () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#4 0x00007ffff7906549 in BD_DecSceneReplace () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#5 0x00007ffff7914e2e in BM_SceneReplace () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#6 0x00007ffff7914ff3 in BM_ParseCommand () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#7 0x00007ffff7915323 in gf_bifs_decode_command_list () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#8 0x00007ffff7aa1da2 in gf_sm_load_run_isom () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#9 0x00005555555844a8 in dump_isom_scene ()
#10 0x000055555557b42c in mp4boxMain ()
#11 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe1a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe198) at ../csu/libc-start.c:308
#12 0x000055555556c45e in _start ()
```
| Null Pointer Dereference in gf_node_get_tag() | https://api.github.com/repos/gpac/gpac/issues/1961/comments | 0 | 2021-12-10T09:26:26Z | 2021-12-10T10:16:33Z | https://github.com/gpac/gpac/issues/1961 | 1,076,617,776 | 1,961 |
[
"gpac",
"gpac"
] | 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/
A null pointer dereference was discovered in gf_sg_vrml_mf_append().
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 ./poc2
```
[poc2.zip](https://github.com/gpac/gpac/files/7691265/poc2.zip)
**Result**
```
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type e`ds in parent mp4s
[iso file] Incomplete box mdat - start 11495 size 861283
[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 e`ds in parent mp4s
[iso file] Incomplete box mdat - start 11495 size 861283
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[1] 2696339 segmentation fault ./MP4Box -bt ./submit/poc2
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff78a1074 in gf_sg_vrml_mf_append () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x0
RBX 0x7fffffff6c10 ββ 0x3800000000
RCX 0x7fffffff6ce0 ββ 0x2c00000000
RDX 0x7fffffff6c18 ββ 0x0
RDI 0x0
RSI 0x2c
R8 0x5555555df8d0 ββΈ 0x5555555df840 ββ 0x2c00
R9 0x7
R10 0x7ffff775be46 ββ 'gf_sg_vrml_mf_append'
R11 0x7ffff78a1070 (gf_sg_vrml_mf_append) ββ endbr64
R12 0x7fffffff6ce0 ββ 0x2c00000000
R13 0x5555555d5f80 ββ 0x0
R14 0x0
R15 0x0
RBP 0x5555555ded90 ββ 0x0
RSP 0x7fffffff6bc8 ββΈ 0x7ffff790efa4 (BD_DecMFFieldList+212) ββ test eax, eax
RIP 0x7ffff78a1074 (gf_sg_vrml_mf_append+4) ββ mov eax, dword ptr [rdi]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
0x7ffff78a1070 <gf_sg_vrml_mf_append> endbr64
βΊ 0x7ffff78a1074 <gf_sg_vrml_mf_append+4> mov eax, dword ptr [rdi]
0x7ffff78a1076 <gf_sg_vrml_mf_append+6> lea ecx, [rax + 2]
0x7ffff78a1079 <gf_sg_vrml_mf_append+9> jmp gf_sg_vrml_mf_insert@plt <gf_sg_vrml_mf_insert@plt>
β
0x7ffff77e66a0 <gf_sg_vrml_mf_insert@plt> endbr64
0x7ffff77e66a4 <gf_sg_vrml_mf_insert@plt+4> bnd jmp qword ptr [rip + 0x7ba34d] <0x7ffff77dd3f0>
β
0x7ffff77dd3f0 endbr64
0x7ffff77dd3f4 push 0x73c
0x7ffff77dd3f9 bnd jmp 0x7ffff77d6020 <0x7ffff77d6020>
β
0x7ffff77d6020 push qword ptr [rip + 0x7c6fe2] <0x7ffff7f9d008>
0x7ffff77d6026 bnd jmp qword ptr [rip + 0x7c6fe3] <0x7ffff7fe7bb0>
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff6bc8 ββΈ 0x7ffff790efa4 (BD_DecMFFieldList+212) ββ test eax, eax
01:0008β 0x7fffffff6bd0 ββ 0x0
02:0010β 0x7fffffff6bd8 ββ 0x0
03:0018β 0x7fffffff6be0 ββ 0x50 /* 'P' */
04:0020β 0x7fffffff6be8 ββ 0x0
05:0028β 0x7fffffff6bf0 ββΈ 0x7fffffff6d10 ββ 0x30646c6569665f /* '_field0' */
06:0030β 0x7fffffff6bf8 ββΈ 0x7fffffff6c08 ββ 0x0
07:0038β 0x7fffffff6c00 ββΈ 0x7fffffff6d10 ββ 0x30646c6569665f /* '_field0' */
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff78a1074 gf_sg_vrml_mf_append+4
f 1 0x7ffff790efa4 BD_DecMFFieldList+212
f 2 0x7ffff7906006 gf_bifs_dec_proto_list+822
f 3 0x7ffff7906549 BD_DecSceneReplace+73
f 4 0x7ffff7914e2e BM_SceneReplace+110
f 5 0x7ffff7914ff3 BM_ParseCommand+179
f 6 0x7ffff7915323 gf_bifs_decode_command_list+163
f 7 0x7ffff7aa1da2 gf_sm_load_run_isom+1218
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff78a1074 in gf_sg_vrml_mf_append () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#1 0x00007ffff790efa4 in BD_DecMFFieldList () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#2 0x00007ffff7906006 in gf_bifs_dec_proto_list () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#3 0x00007ffff7906549 in BD_DecSceneReplace () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#4 0x00007ffff7914e2e in BM_SceneReplace () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#5 0x00007ffff7914ff3 in BM_ParseCommand () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#6 0x00007ffff7915323 in gf_bifs_decode_command_list () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#7 0x00007ffff7aa1da2 in gf_sm_load_run_isom () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#8 0x00005555555844a8 in dump_isom_scene ()
#9 0x000055555557b42c in mp4boxMain ()
#10 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe158, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe148) at ../csu/libc-start.c:308
#11 0x000055555556c45e in _start ()
```
| Null Pointer Dereference in gf_sg_vrml_mf_append() | https://api.github.com/repos/gpac/gpac/issues/1960/comments | 0 | 2021-12-10T08:38:06Z | 2021-12-10T10:01:23Z | https://github.com/gpac/gpac/issues/1960 | 1,076,577,157 | 1,960 |
[
"gpac",
"gpac"
] | 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 infinite loop was discovered in gf_log().
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG G
[poc_hang.zip](https://github.com/gpac/gpac/files/7691188/poc_hang.zip)
PAC_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 -info ./poc_hang
```
[poc_hang.zip](https://github.com/gpac/gpac/files/7691192/poc_hang.zip)
**Result**
```
...
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
...
```
**gdb**
```
bt
#0 0x00007ffff764d1e7 in __GI___libc_write (fd=2, buf=0x7ffffffebeb0, nbytes=62) at ../sysdeps/unix/sysv/linux/write.c:26
#1 0x00007ffff75ce00d in _IO_new_file_write (f=0x7ffff77285c0 <_IO_2_1_stderr_>, data=0x7ffffffebeb0, n=62) at fileops.c:1176
#2 0x00007ffff75ce928 in new_do_write (to_do=<optimized out>, data=0x7ffffffebeb0 "[Core] exp-golomb read failed, not enough bits in bitstream !\nn [0;31])\n", fp=0x7ffff77285c0 <_IO_2_1_stderr_>) at libioP.h:948
#3 _IO_new_file_xsputn (n=62, data=<optimized out>, f=<optimized out>) at fileops.c:1255
#4 _IO_new_file_xsputn (f=0x7ffff77285c0 <_IO_2_1_stderr_>, data=<optimized out>, n=62) at fileops.c:1197
#5 0x00007ffff75b90d3 in buffered_vfprintf (s=s@entry=0x7ffff77285c0 <_IO_2_1_stderr_>, format=format@entry=0x7ffff7e2cf98 "[Core] exp-golomb read failed, not enough bits in bitstream !\n", args=args@entry=0x7ffffffee4a0, mode_flags=mode_flags@entry=2) at ../libio/libioP.h:948
#6 0x00007ffff75b5ea4 in __vfprintf_internal (s=0x7ffff77285c0 <_IO_2_1_stderr_>, format=0x7ffff7e2cf98 "[Core] exp-golomb read failed, not enough bits in bitstream !\n", ap=0x7ffffffee4a0, mode_flags=2) at vfprintf-internal.c:1346
#7 0x00007ffff77f8a21 in default_log_callback_color () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#8 0x00007ffff77f8cc9 in gf_log () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#9 0x00007ffff79f4c95 in avc_parse_hrd_parameters () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#10 0x00007ffff79f7c09 in gf_avc_read_sps_bs_internal () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#11 0x00007ffff7a0b149 in gf_avc_read_sps () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#12 0x00007ffff792b724 in avcc_box_read () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#13 0x00007ffff796ac69 in gf_isom_box_parse_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#14 0x00007ffff796c531 in gf_isom_box_array_read_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#15 0x00007ffff793c2a3 in video_sample_entry_box_read () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#16 0x00007ffff796ac69 in gf_isom_box_parse_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#17 0x00007ffff796c531 in gf_isom_box_array_read_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#18 0x00007ffff796ac69 in gf_isom_box_parse_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#19 0x00007ffff796c531 in gf_isom_box_array_read_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#20 0x00007ffff793e083 in stbl_box_read () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#21 0x00007ffff796ac69 in gf_isom_box_parse_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#22 0x00007ffff796c531 in gf_isom_box_array_read_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#23 0x00007ffff793a3d0 in minf_box_read () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#24 0x00007ffff796ac69 in gf_isom_box_parse_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#25 0x00007ffff796c531 in gf_isom_box_array_read_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#26 0x00007ffff79394e9 in mdia_box_read () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#27 0x00007ffff796ac69 in gf_isom_box_parse_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#28 0x00007ffff796c531 in gf_isom_box_array_read_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#29 0x00007ffff794189a in trak_box_read () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#30 0x00007ffff796ac69 in gf_isom_box_parse_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#31 0x00007ffff796c531 in gf_isom_box_array_read_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#32 0x00007ffff796ac69 in gf_isom_box_parse_ex () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#33 0x00007ffff796b410 in gf_isom_parse_root_box () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#34 0x00007ffff79737ec in gf_isom_parse_movie_boxes_internal () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#35 0x00007ffff7974f67 in gf_isom_open_file () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#36 0x000055555557dc14 in mp4boxMain ()
#37 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe1f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe1e8) at ../csu/libc-start.c:308
#38 0x000055555556c45e in _start ()
```
| Infinite loop in gf_log() | https://api.github.com/repos/gpac/gpac/issues/1959/comments | 0 | 2021-12-10T08:26:37Z | 2021-12-10T10:01:22Z | https://github.com/gpac/gpac/issues/1959 | 1,076,568,297 | 1,959 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [Yes ] I looked for a similar issue and couldn't find any.
- [ Yes] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ Yes] 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/
**Version:**
```
./MP4Box -version
MP4Box - GPAC version 1.1.0-DEV-rev1527-g6fcf9819e-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-mp4box --prefix=/home/zxq/CVE_testing/sourceproject/gpac/cmakebuild --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
```
**System information**
Ubuntu 20.04.1 LTS, gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
**command:**
```
./bin/gcc/MP4Box -disox -ttxt -2 -dump-chap-ogg -dump-cover -drtp -bt -out /dev/null poc
```
[poc.zip](https://github.com/gpac/gpac/files/7691140/poc.zip)
**Result**
```
[9] 3114513 segmentation fault
```
**GDB information**
```
Program received signal SIGSEGV, Segmentation fault.
[----------------------------------registers-----------------------------------]
RAX: 0x0
RBX: 0x400788 --> 0x0
RCX: 0xcffd67 (<__libc_write+23>: cmp rax,0xfffffffffffff000)
RDX: 0x0
RSI: 0x0
RDI: 0x10f4580 --> 0x0
RBP: 0x7fffffff9340 --> 0x7fffffff9360 --> 0x7fffffff93c0 --> 0x7fffffff9450 --> 0x7fffffff98b0 --> 0x7fffffffe150 (--> ...)
RSP: 0x7fffffff9300 --> 0x10eb8f0 --> 0x0
RIP: 0x60afe1 (<gf_isom_hint_rtp_read+414>: mov rax,QWORD PTR [rax+0x8])
R8 : 0x0
R9 : 0x0
R10: 0x0
R11: 0x246
R12: 0xd07990 (<__libc_csu_fini>: endbr64)
R13: 0x0
R14: 0x10a3018 --> 0xd7e490 (<__memmove_avx_unaligned_erms>: endbr64)
R15: 0x0
EFLAGS: 0x10246 (carry PARITY adjust ZERO sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
0x60afd5 <gf_isom_hint_rtp_read+402>: mov rdi,rax
0x60afd8 <gf_isom_hint_rtp_read+405>: call 0x444624 <gf_list_add>
0x60afdd <gf_isom_hint_rtp_read+410>: mov rax,QWORD PTR [rbp-0x18]
=> 0x60afe1 <gf_isom_hint_rtp_read+414>: mov rax,QWORD PTR [rax+0x8]
0x60afe5 <gf_isom_hint_rtp_read+418>: add DWORD PTR [rbp-0x28],eax
0x60afe8 <gf_isom_hint_rtp_read+421>: mov eax,DWORD PTR [rbp-0x28]
0x60afeb <gf_isom_hint_rtp_read+424>: cmp eax,DWORD PTR [rbp-0x20]
0x60afee <gf_isom_hint_rtp_read+427>: jb 0x60afa2 <gf_isom_hint_rtp_read+351>
[------------------------------------stack-------------------------------------]
0000| 0x7fffffff9300 --> 0x10eb8f0 --> 0x0
0008| 0x7fffffff9308 --> 0x10e9510 --> 0xf872747020
0016| 0x7fffffff9310 --> 0x1000000010050
0024| 0x7fffffff9318 --> 0x4
0032| 0x7fffffff9320 --> 0x10001
0040| 0x7fffffff9328 --> 0x0
0048| 0x7fffffff9330 --> 0x7fffffff9360 --> 0x7fffffff93c0 --> 0x7fffffff9450 --> 0x7fffffff98b0 --> 0x7fffffffe150 (--> ...)
0056| 0x7fffffff9338 --> 0x5fb0ffd851107300
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
0x000000000060afe1 in gf_isom_hint_rtp_read (ptr=0x10e9510, bs=0x10eb8f0) at isomedia/hinting.c:682
682 tempSize += (u32) a->size;
gdb-peda$ bt
#0 0x000000000060afe1 in gf_isom_hint_rtp_read (ptr=0x10e9510, bs=0x10eb8f0) at isomedia/hinting.c:682
#1 0x000000000060a32f in gf_isom_hint_pck_read (ptr=0x10e9510, bs=0x10eb8f0) at isomedia/hinting.c:329
#2 0x0000000000609f4e in gf_isom_hint_sample_read (ptr=0x10efdc0, bs=0x10eb8f0, sampleSize=0x20) at isomedia/hinting.c:212
#3 0x000000000058e156 in gf_isom_dump_hint_sample (the_file=0x10dd6c0, trackNumber=0x2, SampleNum=0xf8, trace=0x10e9f30) at isomedia/box_dump.c:2844
#4 0x0000000000419dc3 in dump_isom_rtp (file=0x10dd6c0, inName=0x7fffffffe602 "/dev/null", is_final_name=GF_TRUE) at filedump.c:860
#5 0x00000000004156b0 in mp4boxMain (argc=0xb, argv=0x7fffffffe2a8) at main.c:6090
#6 0x000000000041719b in main (argc=0xb, argv=0x7fffffffe2a8) at main.c:6496
#7 0x0000000000d07120 in __libc_start_main ()
#8 0x000000000040211e in _start ()
```
| A segmentation fault in gf_isom_hint_rtp_read () , isomedia/hinting.c:682 | https://api.github.com/repos/gpac/gpac/issues/1958/comments | 0 | 2021-12-10T08:22:50Z | 2021-12-10T10:01:22Z | https://github.com/gpac/gpac/issues/1958 | 1,076,565,216 | 1,958 |
[
"gpac",
"gpac"
] | 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 dump_od_to_saf.isra(). The vulnerability causes a segmentation fault and application crash.
**Version:**
```
MP4Box - GPAC version 1.1.0-DEV-revUNKNOWN_REV
(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:
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 -lsr poc
```
[poc.zip](https://github.com/gpac/gpac/files/7691035/poc.zip)
**Result**
```
[iso file] Unknown box type stbU in parent minf
[iso file] Track with no sample table !
[iso file] Track with no sample description box !
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Box "lpod" (start 11062) has 1 extra bytes
[iso file] Box "REFT" is larger than container box
[iso file] Box "tref" size 28 (start 11054) invalid (read 261)
[iso file] Incomplete box mdat - start 11495 size 861261
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] Unknown box type stbU in parent minf
[iso file] Track with no sample table !
[iso file] Track with no sample description box !
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Box "lpod" (start 11062) has 1 extra bytes
[iso file] Box "REFT" is larger than container box
[iso file] Box "tref" size 28 (start 11054) invalid (read 261)
[iso file] Incomplete box mdat - start 11495 size 861261
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
Scene loaded - dumping 2 systems streams
[1] 3146070 segmentation fault ./MP4Box -lsr ./submit/poc1
```
**gdb**
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ab7dcc in dump_od_to_saf.isra () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
ββββββββββββββββββββββββββββββββββββββββββββ[ REGISTERS ]βββββββββββββββββββββββββββββββββββββββββββββ
RAX 0x61
RBX 0x5555555df200 ββ 0x1
RCX 0x5555555df330 ββ 0x8001000f
RDX 0x7ffff72bf040 ββ 0x7ffff72bf040
RDI 0x5555555dfe10 ββ 0xfbad2c84
RSI 0x7ffff7e46910 ββ ' streamType="%d" objectTypeIndication="%d" timeStampResolution="%d"'
R8 0x3e8
R9 0x27
R10 0x7ffff7e4690b ββ 0x7473200000000022 /* '"' */
R11 0x7fffffff70e3 ββ 0xcba6003936373233 /* '32769' */
R12 0x5555555decc0 ββΈ 0x5555555dfe10 ββ 0xfbad2c84
R13 0x0
R14 0x5555555df150 ββ 0x0
R15 0x0
RBP 0x0
RSP 0x7fffffff7220 ββΈ 0x5555555df330 ββ 0x8001000f
RIP 0x7ffff7ab7dcc (dump_od_to_saf.isra+204) ββ movzx edx, byte ptr [rax + 8]
ββββββββββββββββββββββββββββββββββββββββββββββ[ DISASM ]ββββββββββββββββββββββββββββββββββββββββββββββ
βΊ 0x7ffff7ab7dcc <dump_od_to_saf.isra+204> movzx edx, byte ptr [rax + 8]
0x7ffff7ab7dd0 <dump_od_to_saf.isra+208> mov ecx, dword ptr [rax + 4]
0x7ffff7ab7dd3 <dump_od_to_saf.isra+211> xor eax, eax
0x7ffff7ab7dd5 <dump_od_to_saf.isra+213> call gf_fprintf@plt <gf_fprintf@plt>
0x7ffff7ab7dda <dump_od_to_saf.isra+218> mov rdx, qword ptr [r14]
0x7ffff7ab7ddd <dump_od_to_saf.isra+221> test rdx, rdx
0x7ffff7ab7de0 <dump_od_to_saf.isra+224> jne dump_od_to_saf.isra+392 <dump_od_to_saf.isra+392>
0x7ffff7ab7de6 <dump_od_to_saf.isra+230> mov rdi, qword ptr [r12]
0x7ffff7ab7dea <dump_od_to_saf.isra+234> test r15, r15
0x7ffff7ab7ded <dump_od_to_saf.isra+237> je dump_od_to_saf.isra+266 <dump_od_to_saf.isra+266>
0x7ffff7ab7def <dump_od_to_saf.isra+239> mov rdx, qword ptr [r15 + 8]
ββββββββββββββββββββββββββββββββββββββββββββββ[ STACK ]βββββββββββββββββββββββββββββββββββββββββββββββ
00:0000β rsp 0x7fffffff7220 ββΈ 0x5555555df330 ββ 0x8001000f
01:0008β 0x7fffffff7228 ββ 0x100000002
02:0010β 0x7fffffff7230 ββΈ 0x5555555df030 ββΈ 0x5555555df580 ββ 0x0
03:0018β 0x7fffffff7238 ββ 0x0
04:0020β 0x7fffffff7240 ββΈ 0x5555555df030 ββΈ 0x5555555df580 ββ 0x0
05:0028β 0x7fffffff7248 ββ 0x0
06:0030β 0x7fffffff7250 ββ 0x0
07:0038β 0x7fffffff7258 ββΈ 0x5555555df150 ββ 0x0
ββββββββββββββββββββββββββββββββββββββββββββ[ BACKTRACE ]βββββββββββββββββββββββββββββββββββββββββββββ
βΊ f 0 0x7ffff7ab7dcc dump_od_to_saf.isra+204
f 1 0x7ffff7ac27dd gf_sm_dump+1853
f 2 0x555555584418 dump_isom_scene+616
f 3 0x55555557b42c mp4boxMain+9228
f 4 0x7ffff75630b3 __libc_start_main+243
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
pwndbg> bt
#0 0x00007ffff7ab7dcc in dump_od_to_saf.isra () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#1 0x00007ffff7ac27dd in gf_sm_dump () from /root/fuckit/test/gpac-master/bin/gcc/libgpac.so.10
#2 0x0000555555584418 in dump_isom_scene ()
#3 0x000055555557b42c in mp4boxMain ()
#4 0x00007ffff75630b3 in __libc_start_main (main=0x55555556c420 <main>, argc=3, argv=0x7fffffffe1a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe198) at ../csu/libc-start.c:308
#5 0x000055555556c45e in _start ()
```
| Invalid memory address dereference in dump_od_to_saf.isra() | https://api.github.com/repos/gpac/gpac/issues/1957/comments | 0 | 2021-12-10T08:00:30Z | 2021-12-10T10:01:22Z | https://github.com/gpac/gpac/issues/1957 | 1,076,547,293 | 1,957 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [Yes ] I looked for a similar issue and couldn't find any.
- [ Yes] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ Yes] 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/
**Version:**
```
./MP4Box -version
MP4Box - GPAC version 1.1.0-DEV-rev1527-g6fcf9819e-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-mp4box --prefix=/home/zxq/CVE_testing/sourceproject/gpac/cmakebuild --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
```
**System information**
Ubuntu 20.04.1 LTS, gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
**command:**
```
./bin/gcc/MP4Box -bt POC
```
[POC.zip](https://github.com/gpac/gpac/files/7690783/POC.zip)
**Result**
```
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[ODF] Not enough bytes (10) to read descriptor (size=127)
[ODF] Error reading descriptor (tag 4 size 21): Invalid MPEG-4 Descriptor
[iso file] Incomplete box mdat - start 11495 size 75
[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
[ODF] Not enough bytes (10) to read descriptor (size=127)
[ODF] Error reading descriptor (tag 4 size 21): Invalid MPEG-4 Descriptor
[iso file] Incomplete box mdat - start 11495 size 75
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[MP4 Loading] Unable to fetch sample 1 from track ID 7 - aborting track import
free(): double free detected in tcache 2
[3] 3698317 abort ./bin/gcc/MP4Box -bt
```
**gdb information:**
```
Program received signal SIGABRT, Aborted.
[----------------------------------registers-----------------------------------]
RAX: 0x0
RBX: 0x7ffff5654740 (0x00007ffff5654740)
RCX: 0x7ffff61d118b (<__GI_raise+203>: mov rax,QWORD PTR [rsp+0x108])
RDX: 0x0
RSI: 0x7fffffff6fd0 --> 0x0
RDI: 0x2
RBP: 0x7fffffff7320 --> 0x7ffff6376b80 --> 0x0
RSP: 0x7fffffff6fd0 --> 0x0
RIP: 0x7ffff61d118b (<__GI_raise+203>: mov rax,QWORD PTR [rsp+0x108])
R8 : 0x0
R9 : 0x7fffffff6fd0 --> 0x0
R10: 0x8
R11: 0x246
R12: 0x7fffffff7240 --> 0x0
R13: 0x10
R14: 0x7ffff7ffb000 --> 0x6565726600001000
R15: 0x1
EFLAGS: 0x246 (carry PARITY adjust ZERO sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
0x7ffff61d117f <__GI_raise+191>: mov edi,0x2
0x7ffff61d1184 <__GI_raise+196>: mov eax,0xe
0x7ffff61d1189 <__GI_raise+201>: syscall
=> 0x7ffff61d118b <__GI_raise+203>: mov rax,QWORD PTR [rsp+0x108]
0x7ffff61d1193 <__GI_raise+211>: xor rax,QWORD PTR fs:0x28
0x7ffff61d119c <__GI_raise+220>: jne 0x7ffff61d11c4 <__GI_raise+260>
0x7ffff61d119e <__GI_raise+222>: mov eax,r8d
0x7ffff61d11a1 <__GI_raise+225>: add rsp,0x118
[------------------------------------stack-------------------------------------]
0000| 0x7fffffff6fd0 --> 0x0
0008| 0x7fffffff6fd8 --> 0x0
0016| 0x7fffffff6fe0 --> 0x7ffff6b0ffca (<Media_GetESD+842>: mov rax,QWORD PTR [rsp+0x10])
0024| 0x7fffffff6fe8 --> 0x0
0032| 0x7fffffff6ff0 --> 0x1
0040| 0x7fffffff6ff8 --> 0x0
0048| 0x7fffffff7000 --> 0x5555556709a0 --> 0x80003
0056| 0x7fffffff7008 --> 0x0
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGABRT
__GI_raise (sig=sig@entry=0x6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
gdb-peda$ bt
#0 __GI_raise (sig=sig@entry=0x6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff61b0859 in __GI_abort () at abort.c:79
#2 0x00007ffff621b3ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff6345285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3 0x00007ffff622347c in malloc_printerr (str=str@entry=0x7ffff63475d0 "free(): double free detected in tcache 2") at malloc.c:5347
#4 0x00007ffff62250ed in _int_free (av=0x7ffff6376b80 <main_arena>, p=0x555555671790, have_lock=0x0) at malloc.c:4201
#5 0x00007ffff6bf30f5 in gf_odf_del_default () from /home/zxq/CVE_testing/project/gpac/bin/gcc/libgpac.so.10
#6 0x00007ffff6f56654 in gf_sm_load_run_isom () from /home/zxq/CVE_testing/project/gpac/bin/gcc/libgpac.so.10
#7 0x00005555555c3a18 in dump_isom_scene (file=<optimized out>, inName=0x555555644d20 <outfile> "../../result/gpac/afl-outbox-bt-d/crashes/id:000000,sig:06,src:000181,op:havoc,rep:64", is_final_name=GF_FALSE,
dump_mode=GF_SM_DUMP_BT, do_log=GF_FALSE, no_odf_conv=GF_FALSE) at filedump.c:199
#8 0x000055555559edd0 in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at main.c:6044
#9 0x00007ffff61b20b3 in __libc_start_main (main=0x55555556d540 <main>, argc=0x3, argv=0x7fffffffe318, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe308) at ../csu/libc-start.c:308
#10 0x000055555556d5be in _start () at main.c:6496
gdb-peda$
'''
| Double Free in filedump.c:199 | https://api.github.com/repos/gpac/gpac/issues/1956/comments | 0 | 2021-12-10T07:28:18Z | 2021-12-10T10:01:22Z | https://github.com/gpac/gpac/issues/1956 | 1,076,525,998 | 1,956 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [Yes ] I looked for a similar issue and couldn't find any.
- [ Yes] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ Yes] 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/
**Version:**
```
./MP4Box -version
MP4Box - GPAC version 1.1.0-DEV-rev1527-g6fcf9819e-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-mp4box --prefix=/home/zxq/CVE_testing/sourceproject/gpac/cmakebuild --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
```
**System information**
Ubuntu 20.04.1 LTS, gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
**command:**
```
./bin/gcc/MP4Box -lsr POC
```
[POC.zip](https://github.com/gpac/gpac/files/7690542/POC.zip)
**Result**
```
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[ODF] Error reading descriptor (tag 4 size 0): Invalid MPEG-4 Descriptor
[iso file] Incomplete box mdat - start 11495 size 128
[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
[ODF] Error reading descriptor (tag 4 size 0): Invalid MPEG-4 Descriptor
[iso file] Incomplete box mdat - start 11495 size 128
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[MP4 Loading] Unable to fetch sample 1 from track ID 8 - aborting track import
Scene loaded - dumping 1 systems streams
[1] 1233733 segmentation fault
```
**gdb information:**
```
[----------------------------------registers-----------------------------------]
RAX: 0x0
RBX: 0x400788 --> 0x0
RCX: 0x0
RDX: 0x0
RSI: 0x0
RDI: 0x10f40f0 --> 0x10f4590 --> 0x10f4460 --> 0x70003
RBP: 0x7fffffff87b0 --> 0x7fffffff8850 --> 0x7fffffff9950 --> 0x7fffffffe1f0 --> 0x7fffffffe210 --> 0xd078f0 (<__libc_csu_init>: endbr64)
RSP: 0x7fffffff8750 --> 0x10f4090 --> 0x10002
RIP: 0x6d9986 (<gf_dump_setup+365>: movzx eax,BYTE PTR [rax+0x8])
R8 : 0xe3d1d3 (" Scene Dump -->\n")
R9 : 0x12
R10: 0xfffffffb
R11: 0xe3d1c2 --> 0x565300526553414c ('LASeR')
R12: 0xd07990 (<__libc_csu_fini>: endbr64)
R13: 0x0
R14: 0x10a3018 --> 0xd7e490 (<__memmove_avx_unaligned_erms>: endbr64)
R15: 0x0
EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
0x6d997a <gf_dump_setup+353>: mov QWORD PTR [rbp-0x38],rax
0x6d997e <gf_dump_setup+357>: mov rax,QWORD PTR [rbp-0x38]
0x6d9982 <gf_dump_setup+361>: mov rax,QWORD PTR [rax+0x18]
=> 0x6d9986 <gf_dump_setup+365>: movzx eax,BYTE PTR [rax+0x8]
0x6d998a <gf_dump_setup+369>: cmp al,0x3
0x6d998c <gf_dump_setup+371>: jne 0x6d99ff <gf_dump_setup+486>
0x6d998e <gf_dump_setup+373>: mov rax,QWORD PTR [rbp-0x38]
0x6d9992 <gf_dump_setup+377>: mov rax,QWORD PTR [rax+0x18]
[------------------------------------stack-------------------------------------]
0000| 0x7fffffff8750 --> 0x10f4090 --> 0x10002
0008| 0x7fffffff8758 --> 0x10f47d0 --> 0x10e99f0 --> 0x0
0016| 0x7fffffff8760 --> 0x500400788
0024| 0x7fffffff8768 --> 0x200000000
0032| 0x7fffffff8770 --> 0x10f4090 --> 0x10002
0040| 0x7fffffff8778 --> 0x10f4460 --> 0x70003
0048| 0x7fffffff8780 --> 0x7fffffff87b0 --> 0x7fffffff8850 --> 0x7fffffff9950 --> 0x7fffffffe1f0 --> 0x7fffffffe210 (--> ...)
0056| 0x7fffffff8788 --> 0x444a92 (<gf_list_enum+61>: mov QWORD PTR [rbp-0x8],rax)
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
gf_dump_setup (sdump=0x10f47d0, root_od=0x10f4090) at scene_manager/scene_dump.c:243
243 if (esd->decoderConfig->streamType != GF_STREAM_SCENE) continue;
```
| A segmentation fault in gf_dump_setup() at scene_manager/scene_dump.c:243 | https://api.github.com/repos/gpac/gpac/issues/1955/comments | 0 | 2021-12-10T06:46:26Z | 2021-12-10T10:01:21Z | https://github.com/gpac/gpac/issues/1955 | 1,076,499,514 | 1,955 |
[
"gpac",
"gpac"
] | #### Description:
I want to merge 2 (or more) dash manifests into 1, each in a different period.
I understand this can be done using a playlist `gpac -i playlist.m3u -o manifest.mpd:sigfrag` and `sigfrag` for manifest generation only.
```
##begin pl.m3u
#props=#Period=1
asset1/manifest.mpd
#props=#Period=2
asset2/manifest.mpd
##end playlist
```
#### Expected:
All AdaptationSets & all Representations are in the new manifest.
#### Actual:
Only 1 video and 1 audio AdaptationSet/Representation is taken from the original manifests.
#### Environment:
- macOS Monterey 12.0.1 (Apple M1)
- GPAC version 1.1.0-DEV-rev1491-g5bed60917-master and 1.0.1 (released in September 2020) from the Downloads page | How to merge 2 (or more) existing DASH manifests | https://api.github.com/repos/gpac/gpac/issues/1954/comments | 1 | 2021-12-08T07:01:55Z | 2021-12-08T20:47:38Z | https://github.com/gpac/gpac/issues/1954 | 1,074,078,493 | 1,954 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [ yes] I looked for a similar issue and couldn't find any.
- [ yes] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ yes] 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/
issue:
when we generate m3u8 and mpd with following command, m3u8 plays well in safari
------------
MP4Box -dash 1000 file.mp4 -out live.mpd --dual
if I add " -profile onDemand ", m3u8 will stuck in safari when you try seeking several times
------------
MP4Box -dash 1000 file.mp4 -profile onDemand -out live.mpd --dual
| --dual -profile onDemand will get stuck in safari | https://api.github.com/repos/gpac/gpac/issues/1952/comments | 4 | 2021-12-02T08:29:58Z | 2021-12-07T06:44:09Z | https://github.com/gpac/gpac/issues/1952 | 1,069,266,302 | 1,952 |
[
"gpac",
"gpac"
] | Dasher - Add multiple subtitles, then do not create manifest file. - thank you!
- [*] I looked for a similar issue and couldn't find any.
- [*] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
> gpac -i video.mp4 -i subtitle1.vtt -o out.mpd
--> create manifest file.
> gpac -i video.mp4 -i subtitle1.vtt -i subtitle1.vtt -o out.mpd
--> DO NOT create manifest file. | Dasher - Add multiple subtitle, then do not create manifest file. | https://api.github.com/repos/gpac/gpac/issues/1951/comments | 4 | 2021-11-29T23:58:59Z | 2021-12-07T01:32:47Z | https://github.com/gpac/gpac/issues/1951 | 1,066,625,110 | 1,951 |
[
"gpac",
"gpac"
] | I am using the below command to create CMAF Dash segments of my mp4 file (as given in https://github.com/gpac/gpac/wiki/MP4Box)
`MP4Box -dash 1000 bbb_300.mp4 -out live.mpd --dual --cmaf`
However I got the error **"Option --dual unknown. Please check usage"**
I received a similar error when I removed --dual, but this time **"Option --cmaf unknown. Please check usage"**
(Running gpac and MP4Box on Ubuntu 20.01)
| Using MP4Box to prepare CMAF MPEG-DASH | https://api.github.com/repos/gpac/gpac/issues/1950/comments | 0 | 2021-11-29T19:48:31Z | 2021-11-29T21:17:52Z | https://github.com/gpac/gpac/issues/1950 | 1,066,431,026 | 1,950 |
[
"gpac",
"gpac"
] | Hello,\
I try to compile MP4Box under fedora 35. In the past I was able to compile it, but now I have this problem:
- Compiling with: `./configure --prefix="$LOCALDESTDIR" --static-bin --static-build --static-modules && make -j6` runs smoothly, but only when I install **glibc-static**.
- Stripping from MP4Box binary shows: `strip: bin/MP4Box[.gnu.build.attributes__libc_freeres_fn]: Warning: version note missing - assuming version 3`
- running `/usr/local/bin/MP4Box -h` show: `[1] 120297 segmentation fault (core dumped) /usr/local/bin/MP4Box -h`
But interestingly I can run inside the source code folder: `bin/gcc/MP4Box -h`. | Build on fedora 35 fails | https://api.github.com/repos/gpac/gpac/issues/1949/comments | 6 | 2021-11-28T10:35:27Z | 2021-11-29T11:33:17Z | https://github.com/gpac/gpac/issues/1949 | 1,065,295,652 | 1,949 |
[
"gpac",
"gpac"
] | 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/
I used command: MP4Box -dash 10000 -profile onDemand video.mp4
But the result sidx subsegment_duration is random, not same value, how can i set subsegment_duration in same value, like example pic
Thakns!
<img width="1440" alt="γΉγ―γͺγΌγ³γ·γ§γγ 2021-11-25 23 25 00" src="https://user-images.githubusercontent.com/38561128/143467732-0367c8ca-e983-49dd-b48c-e5d339a2d3ed.png">
<img width="1227" alt="γΉγ―γͺγΌγ³γ·γ§γγ 2021-11-25 23 24 13" src="https://user-images.githubusercontent.com/38561128/143467599-97e659cb-68ee-44eb-8749-e2483da7fcd8.png">
### example pic
<img width="1241" alt="γΉγ―γͺγΌγ³γ·γ§γγ 2021-11-26 1 06 20" src="https://user-images.githubusercontent.com/38561128/143480660-105830c8-b203-41d3-be49-1f9207ae6d42.png">
| Dsah use onDemand profile segment duration is random | https://api.github.com/repos/gpac/gpac/issues/1948/comments | 2 | 2021-11-25T15:26:40Z | 2021-12-05T15:15:00Z | https://github.com/gpac/gpac/issues/1948 | 1,063,716,935 | 1,948 |
[
"gpac",
"gpac"
] | 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/
Sorry for the question, but I just wanted to confirm something.
I'm trying to move an H.265 video from an MKV container to an MP4 container. When doing this with FFmpeg, it mangles the framerate (changing what was constant to a variable framerate). For integer framerates, I am able to use `-video_track_timescale 60` to work around this issue with FFmpeg, but it doesn't work with framerates like 59.94.
I am able to successfully do what I need with MP4Box after extracting the video with mkvextract, but, as I often work with files in the hundreds of gigabytes, I wonder if this is possible with one step. `:fps=x` works fine with the extracted H.265 file, but not with the original MKV. Just wanted to make sure I wasn't overlooking anything and that extracting the file first with mkvextract is my only option here.
Thanks. | MKV to MP4 Using MP4Box | https://api.github.com/repos/gpac/gpac/issues/1947/comments | 1 | 2021-11-25T03:00:20Z | 2021-11-29T10:46:59Z | https://github.com/gpac/gpac/issues/1947 | 1,063,107,445 | 1,947 |
[
"gpac",
"gpac"
] | 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/
| how to add kvazaar into gpac? | https://api.github.com/repos/gpac/gpac/issues/1946/comments | 1 | 2021-11-23T08:24:45Z | 2021-12-05T15:16:27Z | https://github.com/gpac/gpac/issues/1946 | 1,060,953,488 | 1,946 |
[
"gpac",
"gpac"
] | The latest version has been released for more than a yearοΌand the master branch has added many features and fixed many bugsγCan you release a new versionοΌso people can use these new features and test them extensively? | When to release a new version | https://api.github.com/repos/gpac/gpac/issues/1945/comments | 5 | 2021-11-22T15:26:37Z | 2021-11-23T08:29:54Z | https://github.com/gpac/gpac/issues/1945 | 1,060,289,435 | 1,945 |
[
"gpac",
"gpac"
] | ```
$ gpac -i input.mp4 @ -o output.mp4:frag
Unknown argument ":frag" set but not used by any filter - possible matches
- range in filters httpin fin
```
Here it proposes ```range``` but not ```frag``` which is available in ```mp4mx```. | gpac reporting unknown argument but unable to find match | https://api.github.com/repos/gpac/gpac/issues/1944/comments | 1 | 2021-11-18T14:50:31Z | 2021-11-18T16:18:51Z | https://github.com/gpac/gpac/issues/1944 | 1,057,445,964 | 1,944 |
[
"gpac",
"gpac"
] | We could make a pre-pass on users' options to deduce he explicitly needs the muxer. | gpac -i input.mp4 -o ouput.mp4:frag doesn't instanciate the muxer | https://api.github.com/repos/gpac/gpac/issues/1943/comments | 0 | 2021-11-18T14:48:39Z | 2021-11-18T20:31:05Z | https://github.com/gpac/gpac/issues/1943 | 1,057,443,992 | 1,943 |
[
"gpac",
"gpac"
] | **Info:**
MP4Box - GPAC version 0.5.2
Ubuntu 20.04
**Problem:**
I have .h264 video files which i need to convert to .mp4.
This works perfectly fine on test files that have no special characters in their names.
Working command: `MP4Box -add ./static/video/myfile.h264 ./static/video/test.mp4`
Now my production files have a different file name which contains the date and time of creation
separated by "-" "@" ":" and "/" characters. MP4Box can't work with them i guess because of the file name.
The files are fully intact and not corrupted or anything. If i change file name to something without the
special characters it works fine.
The following command does not work:
`MP4Box -add ./static/video/2021-05-10_11:20:03.h264 ./static/video/2021-05-10_11:20:03.mp4`
```
[Importer] Unknown input file type for "./static/video/2021-05-10_11:20"
Error importing ./static/video/2021-05-10_11:20:03.h264: Requested URL is not valid or cannot be found
```
I can tell that in the first line of the error message the file name gets cut off. I don't know if this could give a hint to the solution of the problem.
Using the same file names works perfectly with tools like FFmpeg etc. I can't really tell if my file names are too long for MP4Box or if MP4Box doesn't like special chars in file names.
Thanks | Unknown input file type; Special chars in file name | https://api.github.com/repos/gpac/gpac/issues/1942/comments | 7 | 2021-11-12T10:59:47Z | 2021-11-19T23:41:27Z | https://github.com/gpac/gpac/issues/1942 | 1,051,836,350 | 1,942 |
[
"gpac",
"gpac"
] | ubuntu `18.04.6 LTS`
by default installs
MP4Box - GPAC version 0.5.2-DEV-revVersion: 0.5.2-426-gc5ad4e4+dfsg5-3ubuntu0.1
MP4Box -splitx has audio drop issues
then I upgrade to Debian:bullseye
by default installs
`MP4Box - GPAC version 1.0.1-revrelease`
MP4Box -splitx & splitz has audio drop issues
`-splitg` option not available though document mentions it.
then I upgrade to nightly build
`gpac_1.1.0-DEV-latest-master_amd64.deb`
```
> MP4Box -splitz 1638:5311 1635881002.mp4 -out splitz.mp4
AVCC: invalid syntax for REXT profile, patching.
[MP4Mux] Error creating new tx3g sample description: Bad Parameter
Failed to connect filter reframer PID T3 to filter mp4mx: Bad Parameter
splitting: file 1 done
Split failed: Bad Parameter
```
while the file is correctly split as using `splitg` the output says that split failed. Why the error?
Also https://github.com/gpac/gpac/wiki/mp4box-dump-opts
mentions
`-splitz (string): extract the specified time range so that ranges A:B and B:C share exactly the same boundary B:`
it only takes `start_second:end_seconds`, why does document mention 3 points?
| Mp4Box Split has audio issues | https://api.github.com/repos/gpac/gpac/issues/1941/comments | 8 | 2021-11-10T18:33:51Z | 2022-02-07T19:31:24Z | https://github.com/gpac/gpac/issues/1941 | 1,050,172,102 | 1,941 |
[
"gpac",
"gpac"
] | While running `MP4Box -diso ...` xml dump on files in the ISOBMFF conformance suite, I noticed that MP4Box has issues with some of the files:
1. Two files produce invalid xml files ([09_text.mp4](https://conformance.mpeg.expert/ISOBMFF/published/isobmff/09_text.mp4), [22_tx3g.mp4](https://conformance.mpeg.expert/ISOBMFF/published/isobmff/22_tx3g.mp4))
The issue seems to come from the dump of the `DefaultBox` where the closing xml tag is missing.
It looks like `gf_isom_box_dump_done` call is missing in https://github.com/gpac/gpac/blob/54bce6b07332fabb016cf9a4ae9b80aa33bca3cd/src/isomedia/box_dump.c#L1929
2. Three files can not be opened at all.
- [compact-no-code-fec-1.iso3](https://conformance.mpeg.expert/ISOBMFF/published/isobmff/compact-no-code-fec-1.iso3)
- [compact-no-code-fec-2.iso3](https://conformance.mpeg.expert/ISOBMFF/published/isobmff/compact-no-code-fec-2.iso3)
- [mbms-fec.iso3](https://conformance.mpeg.expert/ISOBMFF/published/isobmff/mbms-fec.iso3)
```shell
MP4Box -diso compact-no-code-fec-1.iso3
[iso file] Media header timescale is 0 - defaulting to 90000
[iso file] Read Box "stbl" (start 381) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box "minf" (start 309) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box "mdia" (start 236) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box "trak" (start 136) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box "moov" (start 20) failed (Invalid IsoMedia File) - skipping
Error opening file compact-no-code-fec-1.iso3: Invalid IsoMedia File
``` | ISOBMFF conformance suite issues | https://api.github.com/repos/gpac/gpac/issues/1940/comments | 1 | 2021-11-03T18:17:58Z | 2021-11-04T13:20:03Z | https://github.com/gpac/gpac/issues/1940 | 1,043,925,873 | 1,940 |
[
"gpac",
"gpac"
] | Hi, I'm using GPAC in order to do DRM encryption with m4s chunks (from preiously generated dash), like in #924 and #1607
So I use commands:
MP4Box -stats -crypt gpac_drm_widevine.xml init_a.m4s -out init_a_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml init_v.m4s -out init_v_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_a.m4s seg1_a.m4s -out seg1_a_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_a.m4s seg2_a.m4s -out seg2_a_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_v.m4s seg1_v.m4s -out seg1_v_drm.m4s
MP4Box -stats -crypt gpac_drm_widevine.xml -init-seg init_v.m4s seg2_v.m4s -out seg2_v_drm.m4s
...
The problem is that I'm not sure how to use the values given by my content provider in the conf.xml file. It gives me this info:
"key_id_hex":"652B...4DB", (32 chars)
"content_key_hex":"E49F...907", (32 chars)
"iv_hex":"34323...3562", (32 chars)
"playready_pssh_data":"iAMA......", (very long pssh data)
"playready_system_id":"9a04f079-9840-4286-ab92-e65be0885f95",
"widevine_drm_specific_data":"Igtnb2...bBg==", (base64, but if i convert to HEX, 34 chars)
"widevine_drm_specific_data_with_key_id":"EhB...tTbIgtnb2...bBg==", (contains the widevine_drm_specific_data). Base64, 70 chars in hex (36 + 34)
"widevine_system_id":"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",
Here I have two keyIDs, the main one, and a widevine specific data one. How should i use this information. I've tried all combinations, here is one of them:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<GPACDRM type="CENC AES-CTR">
<!-- Widevine -->
<DRMInfo type="pssh" version="0">
<BS ID128="EDEF8BA979D64ACEA3C827DCD51D21ED"/>
<BS data="0x08011210"/>
<BS ID128="0x652B...4DB"/>
<BS data64="Igtnb2...bBg=="/>
</DRMInfo>
<CrypTrack trackID="1" IsEncrypted="1" first_IV="0x34323...3562" saiSavedBox="senc">
<key KID="0x652B...4DB" value="0xE49F...907"/>
</CrypTrack>
</GPACDRM>
```
The process works ok, but then I can't see the content in my provider player.
So I supose there is a problem with the encryption, because if I use other encription process (from unified streaming), the video plays fine.
Please, can you help me to know how should I use my encryption provided info in the conf.xml?
Thank you very much
The manifest.mpd I use is:
```xml
<?xml version="1.0"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500S" type="static" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" xmlns:cenc="urn:mpeg:cenc:2013">
<ProgramInformation moreInformationURL="http://gpac.io">
</ProgramInformation>
<Period duration="PT15S">
<AdaptationSet segmentAlignment="true" contentType="video" maxWidth="1920" maxHeight="1080" par="16:9" lang="und" startWithSAP="1">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="652B...4DB"/>
<ContentProtection schemeIdUri="urn:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" value="Widevine"></ContentProtection>
<Representation bandwidth="4096000" codecs="avc1.640029" frameRate="25/1" height="1080" id="0" mimeType="video/mp4" scanType="progresive" width="1920">
<SegmentTemplate media="seg$Number$_v_drm.m4s" initialization="init_v_drm.m4s" timescale="12800" presentationTimeOffset="1013056000" startNumber="1">
<SegmentTimeline>
<S d="64000" r="2" t="1013056000"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" lang="und" startWithSAP="1">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="652B...4DB"/>
<ContentProtection schemeIdUri="urn:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" value="Widevine"></ContentProtection>
<Representation audioSamplingRate="48000" bandwidth="196608" codecs="mp4a.40.2" id="3" mimeType="audio/mp4">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentTemplate initialization="init_a_drm.m4s" media="seg$Number$_a_drm.m4s" presentationTimeOffset="3798960128" startNumber="1" timescale="48000">
<SegmentTimeline>
<S d="240000" r="2" t="3798960128"/>
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
</Period>
</MPD>
``` | please, help with widevine (and also Playready) encryption | https://api.github.com/repos/gpac/gpac/issues/1939/comments | 5 | 2021-10-26T12:01:15Z | 2022-09-29T09:27:23Z | https://github.com/gpac/gpac/issues/1939 | 1,036,209,608 | 1,939 |
[
"gpac",
"gpac"
] | On my Debian Testing, the configure script recently started to not be able to execute ```source```. The only solution I found was be to replace ```#!/bin/sh``` by ```#!/bin/bash```.
The consequence of this is the display of the following messages:
```
$ xxx/bin/gpac
Unknown arch, cannot find executable path
Couldn't find GPAC binaries install directory
Unknown arch, cannot find executable path
Couldn't find GPAC binaries install directory
Unknown arch, cannot find executable path
Couldn't find GPAC binaries install directory
efreshing all options registry, this may take some time ... done
Nothing to do, check usage "gpac -h"
gpac - GPAC command line filter engine - version 1.1.0-DEV-revUNKNOWN-HEAD
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
``` | configure: 'source' cannot be found in some /bin/sh | https://api.github.com/repos/gpac/gpac/issues/1938/comments | 1 | 2021-10-22T14:42:55Z | 2021-10-24T13:40:18Z | https://github.com/gpac/gpac/issues/1938 | 1,033,659,674 | 1,938 |
[
"gpac",
"gpac"
] | hi, when i using the osmo4 to play 360 tiled video on vr headset such as [oculus quest2](https://www.oculus.com/), it can't work properly , but it can be played normally on my android phone. perhaps it is because lack of support of the underlying environment? thank you | can osmo4 support vr headset such as oculus quest2? | https://api.github.com/repos/gpac/gpac/issues/1937/comments | 5 | 2021-10-20T01:26:30Z | 2022-03-23T02:40:23Z | https://github.com/gpac/gpac/issues/1937 | 1,030,878,098 | 1,937 |
[
"gpac",
"gpac"
] | i want to use rtmp to hevc tile with mpeg dash
rtmp command:
gpac -i test.mp4 -o rtmp://127.0.0.1:1234/live:gpac:rtmp_listen=1:ffmt=flv
Encoding command:
gpac -i rtmp://localhost:1234/live ffsws:FID=S -+kvazaar-params=tiles=3x3,slices=tiles,mv-constraint=frametilemargin,rc-algorithm=lambda enc:SID=S:c=libkvazaar:b=1m:fintra=1:rc @ tilesplit:FID=1 enc:SID=S:c=libkvazaar:b=200k:fintra=1:rc @ tilesplit:FID=2 -o live.mpd:SID=1,2:dmode=dynamic
i have this problem

gpac -version
Nothing to do, check usage "gpac -h"
gpac - GPAC command line filter engine - version 1.1.0-DEV-rev1382-g08e1f404e-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
| living streaming have some problem | https://api.github.com/repos/gpac/gpac/issues/1936/comments | 7 | 2021-10-18T04:57:21Z | 2021-11-04T13:22:58Z | https://github.com/gpac/gpac/issues/1936 | 1,028,627,747 | 1,936 |
[
"gpac",
"gpac"
] | using "M4Box - GPAC version 1.1.0-DEV-rev1382-g08e1f404e-ab-suite":
with:
no_delay:
```
MP4Box -add "E:\Output\testing\video.m4v"#video:fps=25 -add "E:\Output\testing\audio.aac"#audio -mpeg4 -tmp "E:\Temp" -new "E:\Output\testing\no_delay.mp4"
```
https://ibb.co/SQYz0DQ
40ms_delay:
```
MP4Box -add "E:\Output\testing\video.m4v"#video:fps=25:delay=40 -add "E:\Output\testing\audio.aac"#audio -mpeg4 -tmp "E:\Temp" -new "E:\Output\testing\delay_40.mp4"
```
https://ibb.co/Xy3K0jg
80ms_delay:
```
MP4Box -add "E:\Output\testing\video.m4v"#video:fps=25:delay=80 -add "E:\Output\testing\audio.aac"#audio -mpeg4 -tmp "E:\Temp" -new "E:\Output\testing\delay_80.mp4"
```
https://ibb.co/Q89Pymn
Original:
https://ibb.co/hZw3bpx
-> setting "delay" does not change the audio delay when he-aac is used.
uploaded the files to: https://drive.google.com/drive/folders/1X4xxJ5h8I6Ed00yc8sTIfJmDG-DnSpXL | he-aac muxing broken,.. | https://api.github.com/repos/gpac/gpac/issues/1935/comments | 4 | 2021-10-16T05:06:07Z | 2021-10-25T10:08:37Z | https://github.com/gpac/gpac/issues/1935 | 1,027,955,281 | 1,935 |
[
"gpac",
"gpac"
] | Hi, so it looks like the compositor still has issues whilst trying to playback live tiled dash streams as it stops and displays:
`[Compositor] Could not detect end of stream(s) in the last second, aborting`
However, when just playing in normal mode (dashin->vout), the stream plays back smoothly.
Here are the commands used:
For the encoder:
```
#!/bin/bash
export ISIZE=6000x3000
export TILES=6x6
export OSIZE=1024x512
gpac -i test_30fps.mp4:FID=I reframer:rt=on:SID=I:FID=REGULATED\
ffsws:SID=REGULATED:FID=Y:osize=$OSIZE:ofmt=yuv420 -+kvazaar-params=preset=ultrafast,tiles=$TILES,slices=tiles,mv-constraint=frametilemargin,input-format=P420,qp=16,rc-algorithm=lambda,input-fps=30\
ffenc:SID=Y:FID=K1:c=libkvazaar:b=10M:size=$OSIZE:fintra=4:rc\
tilesplit:SID=K1:FID=1\
-o http://localhost:8080/live.mpd:gpac:dmode=dynamic:segdur=4:cdur=2:asto=2:llhls=off:profile=live:rdirs=outdir:template=seg_live_:SID=1 -stats -logs=all@info -lu -log-file=file_to_tiles.log
```
For the compositor playback:
```
#!/bin/bash
gpac -blacklist=nvdec --lowlat=no compositor:src=http://192.168.123.203:8080/live.mpd#VR vout:buffer=8000 -graph -logs=dash@info -lu -log-file=play_compositor_not_ok.log
```
For the regular playback (dashin->vout)
```
#!/bin/bash
gpac -i http://192.168.123.203:8080/live.mpd dashin:lowlat=no tileagg ohevcdec vout:buffer=8000 -graph -logs=dash@info -lu -log-file=play_equirect_ok.log
```
As you can see, the content is streamed and played back from 2 different machines, on the same gigabit local network. (this could have an effect)
Both machines run:
GPAC version 1.1.0-DEV-rev1382-g08e1f404e-master
Ubuntu 21.04
Log and file inputs can be found [here](https://www.mediafire.com/file/owyht08w399g7o3/unstable_compositor_playback.zip/file)
---------
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/
| Compositor unable to play live tiled dash stream | https://api.github.com/repos/gpac/gpac/issues/1934/comments | 4 | 2021-10-14T01:55:26Z | 2021-11-27T22:51:38Z | https://github.com/gpac/gpac/issues/1934 | 1,025,854,239 | 1,934 |
[
"gpac",
"gpac"
] | ```
./configure --extra-cflags="-w -fPIC" --verbose --disable-player --disable-ssl --disable-alsa --disable-jack --disable-oss-audio --disable-pulseaudio --use-png=no --use-jpeg=no --disable-3d --disable-atsc --disable-avi --disable-bifs --disable-bifs-enc --disable-crypt --disable-dvb4linux --disable-dvbx --disable-ipv6 --disable-laser --disable-loader-bt --disable-loader-isoff --disable-loader-xmt --disable-m2ps --disable-mcrypt --disable-od-dump --disable-odf --disable-ogg --disable-opt --disable-platinum --disable-qtvr --disable-saf --disable-scene-dump --disable-scene-encode --disable-scene-stats --disable-scenegraph --disable-seng --disable-sman --disable-streaming --disable-svg --disable-swf --disable-vobsub --disable-vrml --disable-wx --disable-x11 --disable-x11-shm --disable-x11-xv --disable-x3d --enable-export --enable-import --enable-parsers --enable-m2ts --enable-m2ts-mux --enable-ttxt --enable-hevc --enable-isoff --enable-isoff-frag --enable-isoff-hds --enable-isoff-hint --enable-isoff-write --enable-isom-dump && make -j && echo OK
...
x86_64-linux-gnu-gcc -o ../../bin/gcc/gpac main.o -lgpac -Wl,-rpath,'$ORIGIN' -Wl,-rpath-link,../../bin/gcc -s -static-libstdc++
/usr/bin/ld : ../../bin/gcc/libgpac.so : rΓ©fΓ©rence indΓ©finie vers Β« gf_sg_new Β»
/usr/bin/ld : ../../bin/gcc/libgpac.so : rΓ©fΓ©rence indΓ©finie vers Β« dom_js_load Β»
/usr/bin/ld : ../../bin/gcc/libgpac.so : rΓ©fΓ©rence indΓ©finie vers Β« dom_js_unload Β»
/usr/bin/ld : ../../bin/gcc/libgpac.so : rΓ©fΓ©rence indΓ©finie vers Β« qjs_module_init_scenejs Β»
/usr/bin/ld : ../../bin/gcc/libgpac.so : rΓ©fΓ©rence indΓ©finie vers Β« gf_sg_del Β»
/usr/bin/ld : ../../bin/gcc/libgpac.so : rΓ©fΓ©rence indΓ©finie vers Β« gf_dom_get_friendly_name Β»
collect2: error: ld returned 1 exit status
...``` | Symbols missing with modular build | https://api.github.com/repos/gpac/gpac/issues/1933/comments | 1 | 2021-10-12T15:47:02Z | 2021-10-24T13:39:34Z | https://github.com/gpac/gpac/issues/1933 | 1,023,975,311 | 1,933 |
[
"gpac",
"gpac"
] | solved by searching, thanks
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/
| Does mp4box support clearkey drm system, cbcs encryption method | https://api.github.com/repos/gpac/gpac/issues/1931/comments | 0 | 2021-10-09T13:46:15Z | 2021-10-11T05:42:37Z | https://github.com/gpac/gpac/issues/1931 | 1,021,713,115 | 1,931 |
[
"gpac",
"gpac"
] | HI,
i'm trying to download an mpd video-file just they appear in host.
now I'm using the command:
gpac -play link.mpd -o output.mp4
it's works but I need to see also when video is block because of buffer. How can I do?
| download video file with pause | https://api.github.com/repos/gpac/gpac/issues/1929/comments | 1 | 2021-10-05T15:18:54Z | 2021-10-07T16:04:22Z | https://github.com/gpac/gpac/issues/1929 | 1,016,458,586 | 1,929 |
[
"gpac",
"gpac"
] | Hi there,
So, when encoding a FFAVIN stream into a tiled dash, I have this warning message:
`[FFAVIn] Unknown frame rate, will use 25 fps - use `:#FPS=VAL` to force frame rate signaling`
However, when looking at the filters documentation either [here](https://github.com/gpac/gpac/wiki/ffavin) or `gpac -hx ffavin `, nothing seem to be corresponding to this warning message.
1. What is the relevant option?
2. Is there a way to make the warning message more explicit?
----
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/
| Unclear warning FFAVIN message | https://api.github.com/repos/gpac/gpac/issues/1928/comments | 2 | 2021-10-03T22:09:59Z | 2021-10-12T00:56:54Z | https://github.com/gpac/gpac/issues/1928 | 1,014,557,126 | 1,928 |
[
"gpac",
"gpac"
] | Hello,
I'm playing around with some sample files I found in Google's `CtsMediaTestCases`, but some of them seem to be unrecognized by GPAC.
I've uploaded the mp4 here: https://www.mediafire.com/file/wsyt42zw7mf5fxs/video_dovi_3840x2160_30fps_dav1_10.mp4/file
And a demuxed OBU file here: https://www.mediafire.com/file/ee16i6lsoaeug09/dav1_10.obu/file
(According to the template, that's how it should be done..)
The demuxed video was obtained with Dolby's tool: https://github.com/DolbyLaboratories/dlb_mp4demux
When probing with `gpac` I get this:
```
gpac probe -i video_dovi_3840x2160_30fps_dav1_10.mp4
[iso file] Read Box "sgpd" (start 1460337) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box "stbl" (start 1458670) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box "minf" (start 1458606) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box "mdia" (start 1458521) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box "trak" (start 1458385) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box "moov" (start 1458269) failed (Invalid IsoMedia File) - skipping
[IsoMedia] error while opening video_dovi_3840x2160_30fps_dav1_10.mp4, error=Invalid IsoMedia File
Failed to connect filter fin PID video_dovi_3840x2160_30fps_dav1_10.mp4 to filter mp4dmx: Invalid IsoMedia File
Blacklisting mp4dmx as output from fin and retrying connections
session last connect error Filter not found for the desired type
```
And when trying to remux:
```
MP4Box -add dav1_10.obu -new test.mp4
[AV1] parsing for metadata is not implemented. Forwarding.
[Importer] Error probing dav1_10.obu
Error importing dav1_10.obu: Bad Buffer size (too small)
```
Now I think this might be an experimental file, but I'm not sure at all.
The OBU file parses correctly using https://github.com/yohhoy/av1parser
But `aomdec` does say the frames are corrupted.
The file also does not seem to follow AV1's ITU-T T.35 specification for the Dolby Vision metadata, so it might just be bogus.
I am using GPAC on Arch Linux, 64 bits.
`gpac - GPAC command line filter engine - version 1.0.1-rev0-gd8538e8ae-makepkg` | Errors when probing/muxing dav1 video file | https://api.github.com/repos/gpac/gpac/issues/1925/comments | 6 | 2021-09-30T22:08:02Z | 2021-10-07T09:53:37Z | https://github.com/gpac/gpac/issues/1925 | 1,012,667,186 | 1,925 |
[
"gpac",
"gpac"
] | MP4Box 1.1.0-DEV compiled standalone from a recent download of master branch
Updating handler names for subtitle tracks
mp4box -name 3=SubtitleHandler -name 5=NewHandlerName input.mp4
The process works and data seems to be OK, the video plays, but there seems to be some corruption, and no further processing is possible
mp4box -info input.mp4
[iso file] Unknown top-level box type 9.2.
[iso file] Incomplete box 9.2. - start 577023550 size 1635149354
[iso file] Incomplete file while reading for dump - aborting parsing
The rest of the output is as expected
A previous attempt editing only one handler name referenced box type .100
ffmpeg doesn't appear bothered
| In place editing corrupts file | https://api.github.com/repos/gpac/gpac/issues/1924/comments | 8 | 2021-09-30T07:05:37Z | 2021-10-02T00:47:09Z | https://github.com/gpac/gpac/issues/1924 | 1,011,797,714 | 1,924 |
[
"gpac",
"gpac"
] | Hi,
I am trying to render the depth map stored within Cinematic Mode videos created with iPhone 13 Pro.
MP4Box info:
```
root@CH:/mnt/c# MP4Box -info test.mov
[iso file] Unknown box type dvvC in parent hvc1
[iso file] Unknown box type amve in parent hvc1
[iso file] Unknown box type dish in parent stsd
[iso file] Unknown box type csgm in parent stbl
[iso file] Unknown box type mebx in parent stsd
# Movie Info - 4 tracks - TimeScale 600
Duration 00:00:15.031
Fragmented: no
Major Brand qt - version 0 - compatible brands: qt
Created: GMT Mon Sep 27 09:16:26 2021
Modified: GMT Mon Sep 27 09:16:41 2021
# Movie Meta type: "mdta" - 0 resource item(s)
# Track 1 Info - ID 1 - TimeScale 600
Media Duration 00:00:15.031
Track has 1 edits: track duration is 00:00:15.031
Track composition offset shift (negative CTS offset): 40
Media Info: Language "Undetermined (und)" - Type "vide:hvc1" - 451 samples
Visual Sample Entry Info: width=1920 height=1080 (depth=24 bits)
Visual Track layout: x=0 y=0 width=1920 height=1080
HEVC Video - Visual Size 1920 x 1080
HEVC Info: Profile Main 10 @ Level 4 - Chroma Format YUV 4:2:0
NAL Unit length bits: 32 - general profile compatibility 0x20000000
Parameter Sets: 1 VPS 1 SPS 1 PPS
SPS resolution 1920x1080
Bit Depth luma 10 - Chroma 10 - 1 temporal layers
VPS#1 hash: 271327C0C9C7119F99247F2A35DD0D3FDB07C60C
SPS#1 hash: 87419EDCFC367B58A8271DFB20BDC9C3DAEFDC4D
PPS#1 hash: 98FC702FB6ACAB71B14A35E1DC3C9A851AC5423E
RFC6381 Codec Parameters: hvc1.2.4.L120.B0
Average GOP length: 32 samples
Max sample duration: 20 / 600
# Track 2 Info - ID 2 - TimeScale 600
Media Duration 00:00:15.031
Track has 1 edits: track duration is 00:00:15.031
Track composition offset shift (negative CTS offset): 40
Media Info: Language "Undetermined (und)" - Type "auxv:dish" - 451 samples
1 UDTA types:
tagc: com.apple.quicktime.video-map, com.apple.quicktime.video-map.depth, com.apple.quicktime.cinematic-video-map.depth
Visual Sample Entry Info: width=320 height=180 (depth=24 bits)
Visual Track layout: x=0 y=0 width=320 height=180
Auxiliary Video - Compressor "HEVC" - Resolution 320 x 180
RFC6381 Codec Parameters: dish
Average GOP length: 30 samples
Max sample duration: 20 / 600
# Track 3 Info - ID 3 - TimeScale 44100
Media Duration 00:00:15.116
Track has 1 edits: track duration is 00:00:15.030
Media Info: Language "Undetermined (und)" - Type "soun:mp4a" - 651 samples
MPEG-4 Audio AAC LC (AOT=2 implicit) - 2 Channel(s) - SampleRate 44100
RFC6381 Codec Parameters: mp4a.40.2
All samples are sync
Max sample duration: 1024 / 44100
# Track 4 Info - ID 4 - TimeScale 600
Media Duration 00:00:15.031
Track has 1 edits: track duration is 00:00:15.031
Media Info: Language "Undetermined (und)" - Type "meta:mebx" - 451 samples
Unknown Metadata Stream
RFC6381 Codec Parameters: mebx
All samples are sync
Max sample duration: 20 / 600
```
ffprobe:
```
root@CH:/mnt/c# ffprobe test.mov
ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2021-09-27T09:16:26.000000Z
com.apple.quicktime.location.accuracy.horizontal: 35.000000
com.apple.quicktime.cinematic-video:
com.apple.quicktime.location.ISO6709: +46.3674+007.5336+412.373/
com.apple.quicktime.make: Apple
com.apple.quicktime.model: iPhone 13 Pro
com.apple.quicktime.software: 15.0
com.apple.quicktime.creationdate: 2021-09-27T11:16:25+0200
Duration: 00:00:15.03, start: 0.000000, bitrate: 8670 kb/s
Stream #0:0(und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 1920x1080, 8115 kb/s, 30 fps, 30 tbr, 600 tbn, 600 tbc (default)
Metadata:
creation_time : 2021-09-27T09:16:26.000000Z
handler_name : Core Media Video
encoder : HEVC
Stream #0:1(und): Data: none (dish / 0x68736964), 242 kb/s (default)
Metadata:
creation_time : 2021-09-27T09:16:26.000000Z
handler_name : Core Media Auxiliary Picture
Stream #0:2(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 193 kb/s (default)
Metadata:
creation_time : 2021-09-27T09:16:26.000000Z
handler_name : Core Media Audio
Stream #0:3(und): Data: none (mebx / 0x7862656D), 92 kb/s (default)
Metadata:
creation_time : 2021-09-27T09:16:26.000000Z
handler_name : Core Media Metadata
Unsupported codec with id 0 for input stream 1
Unsupported codec with id 0 for input stream 3
```
MediaInfo report:
```
General
Complete name : xxx_bak.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 0000.00 (qt )
File size : 15.5 MiB
Duration : 15 s 32 ms
Overall bit rate mode : Variable
Overall bit rate : 8 670 kb/s
Encoded date : UTC 2021-09-27 09:16:26
Tagged date : UTC 2021-09-27 09:16:41
Writing library : Apple QuickTime
com.apple.quicktime.location.accuracy.ho : 35.000000
com.apple.quicktime.cinematic-video : (Binary)
com.apple.quicktime.location.ISO6709 : +46.3674+007.5336+412.373/
com.apple.quicktime.make : Apple
com.apple.quicktime.model : iPhone 13 Pro
com.apple.quicktime.software : 15.0
com.apple.quicktime.creationdate : 2021-09-27T11:16:25+0200
Video #1
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4@Main
HDR format : Dolby Vision, Version 1.0, dvhe.08.04, BL+RPU, HLG compatible
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 15 s 32 ms
Bit rate : 8 115 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 30.000 FPS
Minimum frame rate : 30.000 FPS
Maximum frame rate : 31.579 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.130
Stream size : 14.5 MiB (94%)
Title : Core Media Video
Encoded date : UTC 2021-09-27 09:16:26
Tagged date : UTC 2021-09-27 09:16:41
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : HLG
Matrix coefficients : BT.2020 non-constant
Metas : 4
Codec configuration box : hvcC+dvvC
Video #2
ID : 2
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Format Range@L2@Main
Codec ID : dish
Duration : 15 s 32 ms
Bit rate : 242 kb/s
Width : 320 pixels
Height : 180 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 30.000 FPS
Minimum frame rate : 30.000 FPS
Maximum frame rate : 31.579 FPS
Color space : YUV
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.140
Stream size : 444 KiB (3%)
Title : Core Media Auxiliary Picture
Encoded date : UTC 2021-09-27 09:16:26
Tagged date : UTC 2021-09-27 09:16:41
Color range : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.601
tagc : com.apple.quicktime.cinematic-video-map.depth
Codec configuration box : hvcC
Audio
ID : 3
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : 2 / 40 / mp4a-40-2
Duration : 15 s 30 ms
Source duration : 15 s 116 ms
Bit rate mode : Variable
Bit rate : 192 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 355 KiB (2%)
Source stream size : 356 KiB (2%)
Title : Core Media Audio
Encoded date : UTC 2021-09-27 09:16:26
Tagged date : UTC 2021-09-27 09:16:41
```
I was wondering if mp4box could be used to turn the depth map stream (Track No. 2) into the main video track. For example, how would one go about changing `Type "auxv:dish"` into `Type "vide:hvc1"` to see if any player would be able to render the depth map?
| iPhone Cinematic Mode track | https://api.github.com/repos/gpac/gpac/issues/1923/comments | 6 | 2021-09-28T15:19:57Z | 2021-09-29T19:53:13Z | https://github.com/gpac/gpac/issues/1923 | 1,009,891,818 | 1,923 |
[
"gpac",
"gpac"
] | Basically, the code looks like this (you can file the whole source in the included Mediafire link)
```
int main(int argc, char *argv[])
{
gf_sys_init(GF_MemTrackerSimple, NULL);
gf_log_set_tool_level(GF_LOG_ALL, GF_LOG_INFO);
FILE* logfile = gf_fopen("/home/rodolphe/api_compositor_no_mainthread.log", "wt");
gf_log_set_callback(logfile, on_atscd_log);
GF_FilterSession *fsess = gf_fs_new(0, GF_FS_SCHEDULER_LOCK_FREE, GF_FS_FLAG_NO_MAIN_THREAD, NULL);
// loadSource("/home/rodolphe/test_30fps.mp4", fsess); works OK
loadFilter("compositor:src=/home/rodolphe/test_30fps.mp4", fsess); // cracking sound
loadFilter("vout", fsess);
loadFilter("aout", fsess);
while(!gf_fs_is_last_task(fsess)) {
usleep(1000);
gf_fs_run_step(fsess);
}
gf_fclose(logfile);
}
```
When executing this file but using the loadSource version, it works perfectly, the video is smooth, the audio plays perfectly.
When the loadSource is replaced by a compositor filter with the file as source, the audio cracks.
[Files for this issue:](https://www.mediafire.com/file/296rlgfjuvpq7zi/compositor_api.zip/file)
- the source file
- the video
- the log file when executing with the compositor as source
OS: Ubuntu 21.04
GPAC: compiled in debug - version 1.1.0-DEV-rev1283-gc51f07f11-master
---
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/
| C Api - Audi cracking when running with compositor as source + no main thread | https://api.github.com/repos/gpac/gpac/issues/1922/comments | 2 | 2021-09-26T16:20:12Z | 2021-09-28T01:25:58Z | https://github.com/gpac/gpac/issues/1922 | 1,007,436,011 | 1,922 |
[
"gpac",
"gpac"
] | When playing back a live DASH with tiles using the compositor and a BIFS scene description, it looks like the playback stops after one segment. With this warning:
```
[Compositor] Could not detect end of stream(s) in 10001 render pass, aborting
```
Note: it also happens very often whilst using the compositor as a source like:
```
gpac compositor:src=http://localhost:8080/live.mpd vout:buffer=8000
```
Encoding command:
```
gpac\
-i test_30fps.mp4:FID=I reframer:rt=on:SID=I:FID=REGULATED\
ffsws:SID=REGULATED:FID=Y:osize=1024x512:ofmt=yuv420\
-+kvazaar-params=preset=ultrafast,tiles=4x4,slices=tiles,mv-constraint=frametilemargin,input-format=P420,qp=16,rc-algorithm=lambda\
ffenc:SID=Y:FID=K1:c=libkvazaar:b=10M:size=$SIZE:fintra=4:rc\
tilesplit:SID=K1:FID=1 -o http://localhost:8080/live.mpd:gpac:dmode\=dynamic:segdur\=4:cdur\=2:asto\=2:llhls\=off:profile\=live:rdirs\=outdir:template\=seg_live_:SID\=1 -stats
```
Playback command
```
gpac -blacklist=vtbdec,nvdec -i test.bt compositor:osize=512x256:vfr vout
```
[Here are the files related to this issue](https://www.mediafire.com/file/0z12jns5kxvomhk/compositor_bt.zip/file)
- the logs from the player when the mp4 file is used in the .bt file
- the logs from the player when a DASH input is used
- the video file itself
- both .bt files
Side questions:
- How can we influence upstream parameters from the compositor? (lowlat/tiledrop)
- The playback using live DASH sources seems very choppy too, maybe this is also related to this issue.
-----
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/
| Live Tiled DASH + Compositor using BIFs stops after one segment | https://api.github.com/repos/gpac/gpac/issues/1921/comments | 2 | 2021-09-26T15:44:32Z | 2021-09-28T01:50:19Z | https://github.com/gpac/gpac/issues/1921 | 1,007,426,967 | 1,921 |
[
"gpac",
"gpac"
] | using MP4Box - GPAC version 1.1.0-DEV-rev1248-g3e4a34873-ab-suite
I use:
```
MP4Box -add "E:\Output\test_2021-09-26@01_22_24_5910_03.264"#video:fps=24000/1001:name="":lang="" -brand avc1 -add "E:\Output\iId_10_aid_0_lang_fr_DELAY_957ms_2021-09-26@01_22_24_5910_02.aac"#audio:delay=957:name="":lang="fr" -mpeg4 -itags tool="Hybrid 2021.09.25.1" -tmp "E:\Output" -new "E:\Output\test.mp4"
```
to mux a file
```
Track Importing MPEG-4 AVC - Width 1920 Height 1080 FPS 24000/1001 SAR 1/1
AVC|H264 Import results: 2112 samples (4250 NALUs) - Slices: 57 I 680 P 1376 B - 2135 SEI - 22 IDR
AVC|H264 Stream uses forward prediction - stream CTS offset: 3 frames
The given code is not a valid one: , using 'und' as 3-letter code
Track Importing AAC - SampleRate 48000 Num Channels 6
Saving E:\Output\test.mp4: 0.500 secs Interleaving
```
everthing seems fine, but the output is async as if the specified delay was ignored.
First I thought the file was broken, or the delay would be wrong, but muxing the same files with mkvmerge:
```
mkvmerge --ui-language en -o "E:\Output\test.mkv" --global-tags "E:\Output\mkvtags_2021-09-26@01_22_24_5910__04.xml" -d 0 --default-track 0:yes --default-duration "0:24000/1001fps" --fourcc 0:MP4V --no-chapters --compression -1:none --forced-track 0:yes --no-audio --no-subtitles "E:\Output\test_2021-09-26@01_22_24_5910_03.264" --language 0:fr --default-track 0:yes --sync 0:957 --forced-track 0:no -a 0 --compression -1:none --no-video --no-subtitles --no-chapters "E:\Output\iId_10_aid_0_lang_fr_DELAY_957ms_2021-09-26@01_22_24_5910_02.aac"
```
produces a sync file.
Uploaded the files to my [url=https://drive.google.com/drive/folders/1X4xxJ5h8I6Ed00yc8sTIfJmDG-DnSpXL]GoogleDrive[/url].
I also reencode the audio file with different aac encoders, but that didn't change a thing. Muxing with mkvmerge works fine, muxing with MP4Box is async.
Cu Selur | Muxing avc und aac delay problem | https://api.github.com/repos/gpac/gpac/issues/1920/comments | 1 | 2021-09-26T00:01:11Z | 2021-09-27T07:39:29Z | https://github.com/gpac/gpac/issues/1920 | 1,007,226,057 | 1,920 |
[
"gpac",
"gpac"
] | Hi,
I am encountering frequent crashes while playing back tiled VR content using the compositor, you can find the way to reproduce it below.
Encoder command:
```
gpac\
-i test_30fps.mp4:FID=I reframer:rt=on:SID=I:FID=REGULATED\
ffsws:SID=REGULATED:FID=Y:osize=1024x512:ofmt=yuv420\
-+kvazaar-params=preset=ultrafast,tiles=4x4,slices=tiles,mv-constraint=frametilemargin,input-format=P420,qp=16,rc-algorithm=lambda\
ffenc:SID=Y:FID=K1:c=libkvazaar:b=10M:size=$SIZE:fintra=4:rc\
tilesplit:SID=K1:FID=1 -o http://localhost:8080/live.mpd:gpac:dmode\=dynamic:segdur\=4:cdur\=2:asto\=2:llhls\=off:profile\=live:rdirs\=outdir:template\=seg_live_:SID\=1 -stats -logs=all@info -log-file=file_to_tiles_server.log
```
Player command
```
gpac compositor:src=http://localhost:8080/live.mpd#VR vout:buffer=8000 -graph -logs=all@info -log-file=compositor_crash.log
```
[Link containing](https://www.mediafire.com/file/991b9w4ilkyo9ac/compositor_crash1.zip/file):
- player log
- encoder log
- screenshot of the stacktrace
The video file used https://github.com/gpac/gpac/issues/1849
OS: ubuntu 21.04
GPAC: version 1.1.0-DEV-rev1283-gc51f07f11-master
Compiled in debug
Ran using` _NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia` to make use of the nvidia GPU
-------
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/
| Playing with back tiled video in VR with compositor crashes | https://api.github.com/repos/gpac/gpac/issues/1919/comments | 6 | 2021-09-25T20:52:37Z | 2021-11-27T22:51:11Z | https://github.com/gpac/gpac/issues/1919 | 1,007,193,774 | 1,919 |
[
"gpac",
"gpac"
] |

## cause
the script to gererate libnghttp2 in directory /deps_android/build/android/nghttp2.sh inserts a command but you didn't install
`
autoreconf -i
`
## solution
first, install autoconf
`sudo apt-get install autoconf automake libtool
`
then, rerun the following commands:


| can't find -lnghttp2 | https://api.github.com/repos/gpac/gpac/issues/1916/comments | 1 | 2021-09-21T14:52:54Z | 2021-09-21T15:09:54Z | https://github.com/gpac/gpac/issues/1916 | 1,002,646,835 | 1,916 |
[
"gpac",
"gpac"
] | 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/
----
Hi,
I am having trouble packaging a VVC bitstream using the current master branch. The CTS timestamp for the encoded frames jumps, when a CRA or IDR frame with leading pictures is encountered. The problem lies somewhere in the parsing of the bitstream.
For example, given a bitstream with GOP size 16 and an intra period of 32 I get the following output, when inspecting the raw bitstream (`bin/gcc/gpac -i BasketballPass_QP37.266:fps=50 inspect:deep`):
```
PID 1 name BasketballPass_QP37.266 Configure - properties:
SourcePath: BasketballPass_QP37.266
URL: BasketballPass_QP37.266
Extension: 266
Cached: true
DownloadSize: 22062
StreamType: Visual
ID: 1
Width: 416
Height: 240
FPS: 50
Timescale: 50
CodecID: VVC Video
DecoderConfig: 176 bytes (CRC32 0xDF88D241)
PlaybackMode: forward
PID 1 PCK 1 - full frame dts 0 cts 0 dur 1 sap 1 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 6212 lp 0 depo 0 depf 0 red 0 CRC32 0x9B9BE30C
PID 1 PCK 2 - full frame dts 1 cts 16 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 1783 lp 0 depo 0 depf 0 red 0 CRC32 0x7F0D0484
PID 1 PCK 3 - full frame dts 2 cts 8 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 610 lp 0 depo 0 depf 0 red 0 CRC32 0x325B9AC5
PID 1 PCK 4 - full frame dts 3 cts 4 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 279 lp 0 depo 0 depf 0 red 0 CRC32 0xD1194AD1
PID 1 PCK 5 - full frame dts 4 cts 2 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 102 lp 0 depo 0 depf 0 red 0 CRC32 0x6F89BAE7
PID 1 PCK 6 - full frame dts 5 cts 1 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 35 lp 0 depo 0 depf 0 red 0 CRC32 0x8184B9C4
PID 1 PCK 7 - full frame dts 6 cts 3 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 36 lp 0 depo 0 depf 0 red 0 CRC32 0xBFED7106
PID 1 PCK 8 - full frame dts 7 cts 6 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 106 lp 0 depo 0 depf 0 red 0 CRC32 0xBC50BEEE
PID 1 PCK 9 - full frame dts 8 cts 5 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 40 lp 0 depo 0 depf 0 red 0 CRC32 0x240B7846
PID 1 PCK 10 - full frame dts 9 cts 7 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 41 lp 0 depo 0 depf 0 red 0 CRC32 0xD57B1A98
PID 1 PCK 11 - full frame dts 10 cts 12 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 296 lp 0 depo 0 depf 0 red 0 CRC32 0xAA26FBEB
PID 1 PCK 12 - full frame dts 11 cts 10 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 144 lp 0 depo 0 depf 0 red 0 CRC32 0x2FB60776
PID 1 PCK 13 - full frame dts 12 cts 9 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 51 lp 0 depo 0 depf 0 red 0 CRC32 0x72D4D111
PID 1 PCK 14 - full frame dts 13 cts 11 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 65 lp 0 depo 0 depf 0 red 0 CRC32 0x06CF9034
PID 1 PCK 15 - full frame dts 14 cts 14 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 104 lp 0 depo 0 depf 0 red 0 CRC32 0x978B7EE4
PID 1 PCK 16 - full frame dts 15 cts 13 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 38 lp 0 depo 0 depf 0 red 0 CRC32 0xA29DE949
PID 1 PCK 17 - full frame dts 16 cts 15 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 89 lp 0 depo 0 depf 0 red 0 CRC32 0x7AFC6D28
PID 1 PCK 18 - full frame dts 17 cts 17 dur 1 sap 1 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 5460 lp 0 depo 0 depf 0 red 0 CRC32 0xE150E68C
PID 1 PCK 19 - full frame dts 18 cts 41 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 678 lp 0 depo 0 depf 0 red 0 CRC32 0x64CCE266
PID 1 PCK 20 - full frame dts 19 cts 37 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 275 lp 0 depo 0 depf 0 red 0 CRC32 0x60A982D9
PID 1 PCK 21 - full frame dts 20 cts 35 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 94 lp 0 depo 0 depf 0 red 0 CRC32 0x94BCC1E7
PID 1 PCK 22 - full frame dts 21 cts 34 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 26 lp 0 depo 0 depf 0 red 0 CRC32 0xC1F484DB
PID 1 PCK 23 - full frame dts 22 cts 36 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 27 lp 0 depo 0 depf 0 red 0 CRC32 0xAAA3703B
PID 1 PCK 24 - full frame dts 23 cts 39 dur 1 sap 0 ilace 0 corr 0 seek 0 bo N/A roll 0 crypt 0 vers 0 size 95 lp 0 depo 0 depf 0 red 0 CRC32 0xD8A33983
...
```
The interesting part is around PCK 18. This is the CRA picture with POC 32, but it gets assigned CTS 17, although there are some leading pictures, which should come before it. Due to that error all following pictures in decoding order also get wrong a CTS (e.g. next PCK is a RASL with POC 24, but gets cts 41).
This is what the corresponding log file from the encoder looks like:
```
> vvencapp -i /data/YUV/ClassD/BasketballPass_416x240_50.yuv -s 416x240 -q 37 -o BasketballPass_QP37.266 --FrameRate=50 -f 50 -ip 32 -g 16
vvencapp: Fraunhofer VVC Encoder ver. 1.1.0 [Linux][GCC 9.3.0][64 bit][SIMD=AVX2]
CODING TOOL CFG: CTU128 QT44BTT21 IBD:1 CIP:0 SAO:1 ALF:1 (NonLinLuma:0 NonLinChr:0) CCALF:1 WPP:0 WPP-Substreams:1 TMVP:1 DQ:1 SDH:0 CST:1 BDOF:1 DMVR:1 MTSImplicit:1 SBT:0 JCbCr:1 CabacInitPresent:0 AMVR:5 SMVD:3 LMCS:2 (Signal:SDR Opt:0) CIIP:0 MIP:1 AFFINE:2 (PROF:1, Type:1) MMVD:3 DisFracMMVD:1 SbTMVP:1 GPM:3 LFNST:1 MTS:0 ISP:3 TS:2 TSLog2MaxSize:4 useChromaTS:0 BDPCM:2 IBC:2 BCW:0
ENC. ALG. CFG: QPA:1 HAD:1 RDQ:1 RDQTS:1 ASR:1 MinSearchWindow:96 RestrictMESampling:0 EDO:2 MCTF:2 [L:0, T:0]
FAST TOOL CFG: ECU:0 FEN:1 FDM:1 FastSearch:4 (SCC:2) LCTUFast:1 FastMrg:2 PBIntraFast:1 AMaxBT:0 FastQtBtEnc:1 ContentBasedFastQtbt:1 FastMIP:4 FastIntraTools:1 IntraEstDecBit:2 FastLocalDualTree:1 IntegerET:0 FastSubPel:1 QtbttExtraFast:2 IBCFastMethod:3 FIM:0 ALFSpeed:0 QuantThr: 4
RATE CONTROL CFG: RateControl:0
PARALLEL PROCESSING CFG: NumThreads:4 MaxParallelFrames:4 WppBitEqual:1 WF:0
started @ Wed Sep 15 17:15:22 2021
POC 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 30 ) 50744 bits [Y 38.2424 dB U 41.7080 dB V 41.7181 dB] [ET 2 ] [L0 ] [L1 ]
POC 16 TId: 0 ( TRAIL, B-SLICE, QP 34 ) 14368 bits [Y 36.5045 dB U 41.0824 dB V 40.2436 dB] [ET 0 ] [L0 0 ] [L1 0 ]
POC 8 TId: 1 ( STSA, B-SLICE, QP 37 ) 4880 bits [Y 35.2091 dB U 40.5534 dB V 39.2606 dB] [ET 0 ] [L0 0 16 ] [L1 16 0 ]
POC 4 TId: 2 ( STSA, B-SLICE, QP 41 ) 2232 bits [Y 34.2790 dB U 40.8874 dB V 39.6145 dB] [ET 0 ] [L0 0 8 ] [L1 8 16 ]
POC 2 TId: 3 ( STSA, B-SLICE, QP 42 ) 816 bits [Y 34.8076 dB U 41.2501 dB V 39.5914 dB] [ET 0 ] [L0 0 4 ] [L1 4 8 ]
POC 1 TId: 4 ( STSA, B-SLICE, QP 43 ) 280 bits [Y 35.5160 dB U 41.4140 dB V 40.1383 dB] [ET 0 ] [L0 0 2 ] [L1 2 4 ]
POC 3 TId: 4 ( STSA, B-SLICE, QP 43 ) 288 bits [Y 34.4201 dB U 41.1073 dB V 39.5340 dB] [ET 0 ] [L0 2 0 ] [L1 4 8 ]
POC 6 TId: 3 ( STSA, B-SLICE, QP 41 ) 848 bits [Y 33.8633 dB U 40.5629 dB V 38.9053 dB] [ET 0 ] [L0 4 0 ] [L1 8 16 ]
POC 5 TId: 4 ( STSA, B-SLICE, QP 43 ) 320 bits [Y 33.9121 dB U 40.6838 dB V 39.0848 dB] [ET 0 ] [L0 4 0 ] [L1 6 8 ]
POC 7 TId: 4 ( STSA, B-SLICE, QP 42 ) 328 bits [Y 34.1989 dB U 40.4534 dB V 39.0562 dB] [ET 0 ] [L0 6 4 ] [L1 8 16 ]
POC 12 TId: 2 ( STSA, B-SLICE, QP 40 ) 2368 bits [Y 34.1030 dB U 40.6971 dB V 38.8066 dB] [ET 0 ] [L0 8 0 ] [L1 16 8 ]
POC 10 TId: 3 ( STSA, B-SLICE, QP 41 ) 1152 bits [Y 34.1726 dB U 40.7882 dB V 39.2264 dB] [ET 0 ] [L0 8 0 ] [L1 12 16 ]
POC 9 TId: 4 ( STSA, B-SLICE, QP 42 ) 408 bits [Y 34.2840 dB U 40.7645 dB V 39.3247 dB] [ET 0 ] [L0 8 0 ] [L1 10 12 ]
POC 11 TId: 4 ( STSA, B-SLICE, QP 42 ) 520 bits [Y 33.8890 dB U 40.6229 dB V 38.9285 dB] [ET 0 ] [L0 10 8 ] [L1 12 16 ]
POC 14 TId: 3 ( STSA, B-SLICE, QP 41 ) 832 bits [Y 34.2899 dB U 40.9779 dB V 39.4646 dB] [ET 0 ] [L0 12 8 ] [L1 16 12 ]
POC 13 TId: 4 ( STSA, B-SLICE, QP 42 ) 304 bits [Y 33.8763 dB U 40.8069 dB V 38.9042 dB] [ET 0 ] [L0 12 8 ] [L1 14 16 ]
POC 15 TId: 4 ( STSA, B-SLICE, QP 42 ) 232 bits [Y 35.0917 dB U 41.0425 dB V 39.7239 dB] [ET 0 ] [L0 14 12 ] [L1 16 14 ]
POC 32 TId: 0 ( CRA, I-SLICE, QP 30 ) 45320 bits [Y 37.9969 dB U 42.1403 dB V 42.0836 dB] [ET 2 ] [L0 ] [L1 ]
POC 24 TId: 1 ( RASL, B-SLICE, QP 37 ) 5424 bits [Y 35.2248 dB U 41.4059 dB V 39.3861 dB] [ET 0 ] [L0 16 8 ] [L1 32 16 ]
POC 20 TId: 2 ( RASL, B-SLICE, QP 40 ) 2200 bits [Y 34.1652 dB U 41.2040 dB V 38.9507 dB] [ET 0 ] [L0 16 8 ] [L1 24 32 ]
POC 18 TId: 3 ( RASL, B-SLICE, QP 41 ) 752 bits [Y 34.2872 dB U 41.1225 dB V 39.1234 dB] [ET 0 ] [L0 16 8 ] [L1 20 24 ]
POC 17 TId: 4 ( RASL, B-SLICE, QP 42 ) 208 bits [Y 35.1261 dB U 41.1808 dB V 39.6151 dB] [ET 0 ] [L0 16 18 ] [L1 18 20 ]
POC 19 TId: 4 ( RASL, B-SLICE, QP 42 ) 216 bits [Y 34.0913 dB U 41.1901 dB V 39.0555 dB] [ET 0 ] [L0 18 16 ] [L1 20 24 ]
POC 22 TId: 3 ( RASL, B-SLICE, QP 41 ) 760 bits [Y 34.0190 dB U 41.3739 dB V 38.8600 dB] [ET 0 ] [L0 20 16 ] [L1 24 32 ]
POC 21 TId: 4 ( RASL, B-SLICE, QP 42 ) 216 bits [Y 33.8535 dB U 41.3347 dB V 38.9290 dB] [ET 0 ] [L0 20 16 ] [L1 22 24 ]
...
```
I used VVenC here, but the problem is basically the same when using VTM (13.2).
I can provide you with the sample bitstream if required. | Wrong CTS calculation for VVC bitstreams | https://api.github.com/repos/gpac/gpac/issues/1913/comments | 16 | 2021-09-15T15:40:40Z | 2021-10-07T10:53:20Z | https://github.com/gpac/gpac/issues/1913 | 997,235,226 | 1,913 |
[
"gpac",
"gpac"
] |
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 ...).
Step to reproduce:
1.get latest commit code (GPAC version 1.1.0-DEV-rev1221-gd626acad8-master)
2.compile with --enable-sanitizer
3.run MP4Box -add poc.nhml -new new.mp4
Env:
Ubunut 20.04 , clang 12.0.1
ASAN report
```
=================================================================
==345223==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffde4ab80f8 at pc 0x000000491bf8 bp 0x7ffde4ab6bb0 sp 0x7ffde4ab6370
WRITE of size 5081 at 0x7ffde4ab80f8 thread T0
#0 0x491bf7 in __interceptor_strcpy (/home/lly/pro/gpac_asan/bin/gcc/MP4Box+0x491bf7)
#1 0x7f446088e9c5 in nhmldmx_send_sample /home/lly/pro/gpac_asan/src/filters/dmx_nhml.c:1008:45
#2 0x7f446088e9c5 in nhmldmx_process /home/lly/pro/gpac_asan/src/filters/dmx_nhml.c:1341:7
#3 0x7f44607bb997 in gf_filter_process_task /home/lly/pro/gpac_asan/src/filter_core/filter.c:2441:7
#4 0x7f446079d965 in gf_fs_thread_proc /home/lly/pro/gpac_asan/src/filter_core/filter_session.c:1664:3
#5 0x7f446079ce60 in gf_fs_run /home/lly/pro/gpac_asan/src/filter_core/filter_session.c:1901:2
#6 0x7f44602be708 in gf_media_import /home/lly/pro/gpac_asan/src/media_tools/media_import.c:1486:2
#7 0x526ea9 in import_file /home/lly/pro/gpac_asan/applications/mp4box/fileimport.c:1289:7
#8 0x4eb996 in do_add_cat /home/lly/pro/gpac_asan/applications/mp4box/main.c:4257:10
#9 0x4e7d46 in mp4boxMain /home/lly/pro/gpac_asan/applications/mp4box/main.c:5746:13
#10 0x7f445f53f0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#11 0x429a4d in _start (/home/lly/pro/gpac_asan/bin/gcc/MP4Box+0x429a4d)
Address 0x7ffde4ab80f8 is located in stack of thread T0 at offset 5432 in frame
#0 0x7f446088d93f in nhmldmx_process /home/lly/pro/gpac_asan/src/filters/dmx_nhml.c:1314
```
Different from issue 1911, the overflow memory is related to szXmlFrom parameter. The szXmlTo para has the same problem, please fix them together.
Buggy code at dmx_nhml.c:1008:
```
static GF_Err nhmldmx_send_sample(GF_Filter *filter, GF_NHMLDmxCtx *ctx)
{
else if (!stricmp(att->name, "xmlFrom")) strcpy(szXmlFrom, att->value);
else if (!stricmp(att->name, "xmlTo")) strcpy(szXmlTo, att->value);
}
```
[poc.zip](https://github.com/gpac/gpac/files/7123042/poc.zip)
| Stack-buffer-overflow in MP4Box at src/filters/dmx_nhml.c:1008 in nhmldmx_send_sample | https://api.github.com/repos/gpac/gpac/issues/1912/comments | 0 | 2021-09-07T16:28:12Z | 2023-11-15T08:08:21Z | https://github.com/gpac/gpac/issues/1912 | 990,155,594 | 1,912 |
[
"gpac",
"gpac"
] | 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 ...).
Step to reproduce:
1.get latest commit code (GPAC version 1.1.0-DEV-rev1221-gd626acad8-master)
2.compile with --enable-sanitizer
3.run MP4Box -add poc.nhml -new new.mp4
Env:
Ubunut 20.04 , clang 12.0.1
ASAN report
```
==344946==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe54d816f0 at pc 0x000000491bf8 bp 0x7ffe54d80610 sp 0x7ffe54d7fdd0
WRITE of size 5081 at 0x7ffe54d816f0 thread T0
#0 0x491bf7 in __interceptor_strcpy (/home/lly/pro/gpac_asan/bin/gcc/MP4Box+0x491bf7)
#1 0x7fefcb5fca2d in nhmldmx_send_sample /home/lly/pro/gpac_asan/src/filters/dmx_nhml.c:1004:6
#2 0x7fefcb5fca2d in nhmldmx_process /home/lly/pro/gpac_asan/src/filters/dmx_nhml.c:1341:7
#3 0x7fefcb529997 in gf_filter_process_task /home/lly/pro/gpac_asan/src/filter_core/filter.c:2441:7
#4 0x7fefcb50b965 in gf_fs_thread_proc /home/lly/pro/gpac_asan/src/filter_core/filter_session.c:1664:3
#5 0x7fefcb50ae60 in gf_fs_run /home/lly/pro/gpac_asan/src/filter_core/filter_session.c:1901:2
#6 0x7fefcb02c708 in gf_media_import /home/lly/pro/gpac_asan/src/media_tools/media_import.c:1486:2
#7 0x526ea9 in import_file /home/lly/pro/gpac_asan/applications/mp4box/fileimport.c:1289:7
#8 0x4eb996 in do_add_cat /home/lly/pro/gpac_asan/applications/mp4box/main.c:4257:10
#9 0x4e7d46 in mp4boxMain /home/lly/pro/gpac_asan/applications/mp4box/main.c:5746:13
#10 0x7fefca2ad0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#11 0x429a4d in _start (/home/lly/pro/gpac_asan/bin/gcc/MP4Box+0x429a4d)
Address 0x7ffe54d816f0 is located in stack of thread T0 at offset 4304 in frame
#0 0x7fefcb5fb93f in nhmldmx_process /home/lly/pro/gpac_asan/src/filters/dmx_nhml.c:1314
```
[poc.zip](https://github.com/gpac/gpac/files/7122999/poc.zip)
| Stack-buffer-overflow in MP4Box at src/filters/dmx_nhml.c:1004 in nhmldmx_send_sample | https://api.github.com/repos/gpac/gpac/issues/1911/comments | 1 | 2021-09-07T16:21:54Z | 2021-09-09T13:04:57Z | https://github.com/gpac/gpac/issues/1911 | 990,150,575 | 1,911 |
[
"gpac",
"gpac"
] | 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 ...).
Step to reproduce:
1.get latest commit code (GPAC version 1.1.0-DEV-rev1216-gb39aa09c0-master)
2.compile with --enable-sanitizer
3.run MP4Box -add poc.nhml -new new.mp4
Env:
Ubunut 20.04 , clang 12.0.1
ASAN report
[poc.zip](https://github.com/gpac/gpac/files/7122969/poc.zip)
```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==344428==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7fcb7d118779 bp 0x7ffe1832c550 sp 0x7ffe1832c480 T0)
==344428==The signal is caused by a READ memory access.
==344428==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.
#0 0x7fcb7d118779 in gf_blob_get /home/lly/pro/gpac_asan/src/utils/error.c:1769:12
#1 0x7fcb7d0eb2ea in gf_fileio_from_blob /home/lly/pro/gpac_asan/src/utils/os_file.c:1287:13
#2 0x7fcb7d0eb2ea in gf_fopen_ex /home/lly/pro/gpac_asan/src/utils/os_file.c:1314:14
#3 0x7fcb7dc90328 in nhmldmx_send_sample /home/lly/pro/gpac_asan/src/filters/dmx_nhml.c:1101:9
#4 0x7fcb7dc90328 in nhmldmx_process /home/lly/pro/gpac_asan/src/filters/dmx_nhml.c:1341:7
#5 0x7fcb7dbbc997 in gf_filter_process_task /home/lly/pro/gpac_asan/src/filter_core/filter.c:2441:7
#6 0x7fcb7db9e965 in gf_fs_thread_proc /home/lly/pro/gpac_asan/src/filter_core/filter_session.c:1664:3
#7 0x7fcb7db9de60 in gf_fs_run /home/lly/pro/gpac_asan/src/filter_core/filter_session.c:1901:2
#8 0x7fcb7d6bf708 in gf_media_import /home/lly/pro/gpac_asan/src/media_tools/media_import.c:1486:2
#9 0x526ea9 in import_file /home/lly/pro/gpac_asan/applications/mp4box/fileimport.c:1289:7
#10 0x4eb996 in do_add_cat /home/lly/pro/gpac_asan/applications/mp4box/main.c:4257:10
#11 0x4e7d46 in mp4boxMain /home/lly/pro/gpac_asan/applications/mp4box/main.c:5746:13
#12 0x7fcb7c9400b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#13 0x429a4d in _start (/home/lly/pro/gpac_asan/bin/gcc/MP4Box+0x429a4d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/lly/pro/gpac_asan/src/utils/error.c:1769:12 in gf_blob_get
==344428==ABORTING
```
| SEGV on unknown address in MP4Box at src/utils/error.c:1769 in gf_blob_get | https://api.github.com/repos/gpac/gpac/issues/1910/comments | 0 | 2021-09-07T16:19:06Z | 2021-09-09T13:04:24Z | https://github.com/gpac/gpac/issues/1910 | 990,148,297 | 1,910 |
[
"gpac",
"gpac"
] | - [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 ...).
Step to reproduce:
1.get latest commit code (GPAC version 1.1.0-DEV-rev1221-gd626acad8-master)
2.compile with --enable-sanitizer
3.make 5 dirs which every of them has a large name(length=255), this makes the file's abs-path lengh larger than 1024, we called it large.nhml
4.run MP4Box -add {path to large.nhml} -new new.mp4
Env:
Ubunut 20.04 , clang 12.0.1
My cmd line an ASAN report
MP4Box -add ~/12341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341231234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123/12341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341231234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123/12341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341231234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123/12341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341231234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123/12341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341231234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123/large.nhml -new new.mp4
ASAN report:
```
=336368==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc4519e5a8 at pc 0x000000491bf8 bp 0x7ffc4519e030 sp 0x7ffc4519d7f0
WRITE of size 2564 at 0x7ffc4519e5a8 thread T0
#0 0x491bf7 in __interceptor_strcpy (/home/lly/pro/gpac_asan/bin/gcc/MP4Box+0x491bf7)
#1 0x7f4bfc71ad1b in nhmldmx_init_parsing dmx_nhml.c
#2 0x7f4bfc7161c1 in nhmldmx_process (/home/lly/pro/gpac_asan/bin/gcc/libgpac.so.10+0xfb91c1)
#3 0x7f4bfc6454f7 in gf_filter_process_task filter.c
#4 0x7f4bfc6275a5 in gf_fs_thread_proc filter_session.c
#5 0x7f4bfc626aa0 in gf_fs_run (/home/lly/pro/gpac_asan/bin/gcc/libgpac.so.10+0xec9aa0)
#6 0x7f4bfc150959 in gf_media_import (/home/lly/pro/gpac_asan/bin/gcc/libgpac.so.10+0x9f3959)
#7 0x526c94 in import_file (/home/lly/pro/gpac_asan/bin/gcc/MP4Box+0x526c94)
#8 0x4eb8b6 in do_add_cat main.c
#9 0x4e7c66 in mp4boxMain (/home/lly/pro/gpac_asan/bin/gcc/MP4Box+0x4e7c66)
#10 0x7f4bfb3d90b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#11 0x429a4d in _start (/home/lly/pro/gpac_asan/bin/gcc/MP4Box+0x429a4d)
Address 0x7ffc4519e5a8 is located in stack of thread T0 at offset 1384 in frame
#0 0x7f4bfc71a56f in nhmldmx_init_parsing dmx_nhml.c
This frame has 141 object(s):
```
Maybe fix for issue 1908 dose not consider this situation that there is a stack buffer overflow in nhmldmx_init_parsing
| Stack buffer overflow in MP4Box at src/filters/dmx_nhml.c in nhmldmx_init_parsing | https://api.github.com/repos/gpac/gpac/issues/1909/comments | 0 | 2021-09-07T15:26:17Z | 2021-09-09T13:04:24Z | https://github.com/gpac/gpac/issues/1909 | 990,103,636 | 1,909 |
[
"gpac",
"gpac"
] | 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 ...)
Step to reproduce:
```
1.get latest commit code (GPAC version 1.1.0-DEV-rev1216-gb39aa09c0-master)
2.compile with --enable-sanitizer
3.make 5 dirs which every of them has a large name(length=255), this makes the file's abs-path lengh larger than 1024, we called it large.nhml
4.run MP4Box -add {path to large.nhml} -new new.mp4
```
Env:
Ubunut 20.04 , clang 12.0.1
My cmd line an ASAN report
MP4Box -add ~/12341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341231234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123/12341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341231234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123/12341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341231234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123/12341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341231234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123/12341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341231234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123/large.nhml -new new.mp4
```
==2343764==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61a00000a7a1 at pc 0x7fb8ca3e675d bp 0x7ffd40a5e9d0 sp 0x7ffd40a5e9c8
WRITE of size 1 at 0x61a00000a7a1 thread T0
#0 0x7fb8ca3e675c in filter_parse_dyn_args /home/lly/pro/gpac_public/src/filter_core/filter.c:1454:13
#1 0x7fb8ca3cf6dc in gf_filter_parse_args /home/lly/pro/gpac_public/src/filter_core/filter.c:1726:2
#2 0x7fb8ca3cdbe0 in gf_filter_new_finalize /home/lly/pro/gpac_public/src/filter_core/filter.c:418:2
#3 0x7fb8ca3cc58a in gf_filter_new /home/lly/pro/gpac_public/src/filter_core/filter.c:382:7
#4 0x7fb8ca3c3d27 in gf_fs_load_source_dest_internal /home/lly/pro/gpac_public/src/filter_core/filter_session.c:2845:12
#5 0x7fb8ca3c47b0 in gf_fs_load_source /home/lly/pro/gpac_public/src/filter_core/filter_session.c:2885:9
#6 0x7fb8c9f97e29 in gf_media_import /home/lly/pro/gpac_public/src/media_tools/media_import.c:1469:11
#7 0x50522f in import_file /home/lly/pro/gpac_public/applications/mp4box/fileimport.c:1289:7
#8 0x4e1a09 in do_add_cat /home/lly/pro/gpac_public/applications/mp4box/main.c:4257:10
#9 0x4e79ca in mp4boxMain /home/lly/pro/gpac_public/applications/mp4box/main.c:5746:13
#10 0x4ea7ca in main /home/lly/pro/gpac_public/applications/mp4box/main.c:6456:1
#11 0x7fb8c92ba0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#12 0x429a8d in _start (/home/lly/pro/gpac_public/bin/gcc/MP4Box+0x429a8d)
0x61a00000a7a1 is located 0 bytes to the right of 1313-byte region [0x61a00000a280,0x61a00000a7a1)
allocated by thread T0 here:
#0 0x4a4c69 in realloc (/home/lly/pro/gpac_public/bin/gcc/MP4Box+0x4a4c69)
#1 0x7fb8ca3e529d in filter_parse_dyn_args /home/lly/pro/gpac_public/src/filter_core/filter.c:1451:12
#2 0x7fb8ca3cf6dc in gf_filter_parse_args /home/lly/pro/gpac_public/src/filter_core/filter.c:1726:2
#3 0x7fb8ca3cdbe0 in gf_filter_new_finalize /home/lly/pro/gpac_public/src/filter_core/filter.c:418:2
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/lly/pro/gpac_public/src/filter_core/filter.c:1454:13 in filter_parse_dyn_args
Shadow bytes around the buggy address:
0x0c347fff94a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c347fff94b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c347fff94c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c347fff94d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c347fff94e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c347fff94f0: 00 00 00 00[01]fa fa fa fa fa fa fa fa fa fa fa
0x0c347fff9500: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c347fff9510: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c347fff9520: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c347fff9530: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c347fff9540: 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
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
Shadow gap: cc
```
| heap-buffer-overflow in MP4Box at filter_core/filter.c:1454 | https://api.github.com/repos/gpac/gpac/issues/1908/comments | 1 | 2021-09-07T10:07:06Z | 2021-09-07T12:49:31Z | https://github.com/gpac/gpac/issues/1908 | 989,818,036 | 1,908 |
[
"gpac",
"gpac"
] | 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/
This is with gpac master 8d9ccb02e (`GPAC1.1.0-DEV-rev1210-g8d9ccb02e-master`). The issue is not dependent on the host operating system, but for your information, I am using Ubuntu Linux 20.04 LTS here.
As input we have a AV1 elementary stream, provided as a [input.ivf](https://live.unified-streaming.com/dimitry/gpac-av1-mux/input.ivf) file (~347 MiB). We then create a progressive MP4 file using MP4Box, e.g.:
```
MP4Box -add input.ivf output.mp4
```
The resulting MP4 file has more sample descriptions than necessary, because it repeats the first sample description, but leaves out the Sequence Header OBU. E.g., the first sample description contains the Sequence Header OBU, followed by two metadata OBUs (HDR_MDCV and HDR_CLL), while the second sample description contains *only* the same two identical metadata OBUs:
```xml
<SampleTableBox Size="30487" Type="stbl" Specification="p12" Container="minf">
<SampleDescriptionBox Size="359" Type="stsd" Version="0" Flags="0" Specification="p12" Container="stbl">
<AV1SampleEntryBox Size="190" Type="av01" Specification="av1" Container="stsd" DataReferenceIndex="1" Width="3840" Height="2160" XDPI="4718592" YDPI="4718592" BitDepth="24">
<AV1ConfigurationBox>
<AV1Config version="1" profile="0" level_idx0="12" tier="0" high_bitdepth="1" twelve_bit="0" monochrome="0" chroma_subsampling_x="1" chroma_subsampling_y="1" chroma_sample_position="0" initial_presentation_delay="1" OBUs_count="3">
<OBU type="1" name="seq_header" size="17" content="data:application/octet-string,0A0F00000062EFBFE1BDDBF9D091009140"/>
<OBU type="5" name="metadata" size="28" content="data:application/octet-string,2A1A02AE1451EC43D0B0A426660F5C500D54390003E8000000000280"/>
<OBU type="5" name="metadata" size="8" content="data:application/octet-string,2A060102DF011880"/>
</AV1Config>
</AV1ConfigurationBox>
<ColourInformationBox Size="19" Type="colr" Specification="iff" Container="video_sample_entry ipco encv resv" colour_type="nclx" colour_primaries="9" transfer_characteristics="16" matrix_coefficients="9" full_range_flag="0">
</ColourInformationBox>
<BitRateBox Size="20" Type="btrt" Specification="p12" Container="sample_entry" BufferSizeDB="1690167" avgBitRate="11054528" maxBitRate="48834496">
</BitRateBox>
</AV1SampleEntryBox>
<AV1SampleEntryBox Size="153" Type="av01" Specification="av1" Container="stsd" DataReferenceIndex="1" Width="3840" Height="2160" XDPI="4718592" YDPI="4718592" BitDepth="24">
<AV1ConfigurationBox>
<AV1Config version="1" profile="0" level_idx0="12" tier="0" high_bitdepth="1" twelve_bit="0" monochrome="0" chroma_subsampling_x="1" chroma_subsampling_y="1" chroma_sample_position="0" initial_presentation_delay="1" OBUs_count="2">
<OBU type="5" name="metadata" size="28" content="data:application/octet-string,2A1A02AE1451EC43D0B0A426660F5C500D54390003E8000000000280"/>
<OBU type="5" name="metadata" size="8" content="data:application/octet-string,2A060102DF011880"/>
</AV1Config>
</AV1ConfigurationBox>
<ColourInformationBox Size="19" Type="colr" Specification="iff" Container="video_sample_entry ipco encv resv" colour_type="nclx" colour_primaries="9" transfer_characteristics="16" matrix_coefficients="9" full_range_flag="0">
</ColourInformationBox>
</AV1SampleEntryBox>
</SampleDescriptionBox>
```
In the `SampleToChunkBox` you can see that it flips between these two sample descriptions:
```xml
<SampleToChunkBox Size="2176" Type="stsc" Version="0" Flags="0" Specification="p12" Container="stbl" EntryCount="180">
<SampleToChunkEntry FirstChunk="1" SamplesPerChunk="1" SampleDescriptionIndex="1"/>
<SampleToChunkEntry FirstChunk="2" SamplesPerChunk="11" SampleDescriptionIndex="2"/>
<SampleToChunkEntry FirstChunk="3" SamplesPerChunk="12" SampleDescriptionIndex="2"/>
<SampleToChunkEntry FirstChunk="12" SamplesPerChunk="1" SampleDescriptionIndex="1"/>
<SampleToChunkEntry FirstChunk="13" SamplesPerChunk="11" SampleDescriptionIndex="2"/>
<SampleToChunkEntry FirstChunk="14" SamplesPerChunk="12" SampleDescriptionIndex="2"/>
<SampleToChunkEntry FirstChunk="23" SamplesPerChunk="1" SampleDescriptionIndex="1"/>
<SampleToChunkEntry FirstChunk="24" SamplesPerChunk="11" SampleDescriptionIndex="2"/>
...
<SampleToChunkEntry FirstChunk="577" SamplesPerChunk="1" SampleDescriptionIndex="1"/>
<SampleToChunkEntry FirstChunk="578" SamplesPerChunk="7" SampleDescriptionIndex="2"/>
<SampleToChunkEntry FirstChunk="579" SamplesPerChunk="12" SampleDescriptionIndex="2"/>
<SampleToChunkEntry FirstChunk="588" SamplesPerChunk="4" SampleDescriptionIndex="2"/>
<SampleToChunkEntry FirstChunk="589" SamplesPerChunk="1" SampleDescriptionIndex="1"/>
<SampleToChunkEntry FirstChunk="590" SamplesPerChunk="7" SampleDescriptionIndex="2"/>
<SampleToChunkEntry FirstChunk="591" SamplesPerChunk="12" SampleDescriptionIndex="2"/>
<SampleToChunkEntry FirstChunk="600" SamplesPerChunk="2" SampleDescriptionIndex="2"/>
<!-- counted 6314 samples in STSC entries (could be less than sample count) -->
</SampleToChunkBox>
```
But it seems that having more than one sample description is not needed at all. You could have just the first sample description, and point all the samples to that first one, since the Metadata OBUs are exactly the same, and any valid sample description should really contain a Sequence Header OBU. At least, this is how I would interpret the [AV1 Codec ISO Media File Format Binding](https://cdn.rawgit.com/AOMediaCodec/av1-isobmff/v1.1.0/).
I did some debugging of the logic in `src/filters/mux_isom.c` and `src/filters/reframe_av1.c`, and it turns out that the `mp4_mux_setup_pid()` function (in `src/filters/mux_isom.c`) concludes every few samples that the decoder config changed. I.e. `needs_sample_entry` gets set to nonzero, because the CRC of the `GF_PROP_PID_DECODER_CONFIG` property changed. However, this change is only because `av1dmx_check_pid()` (in `src/filters/reframe_av1.c`) always throws away *all* OBUs and starts from scratch:
```c
} else if (ctx->is_av1) {
//first or config changed, compute dsi
while (gf_list_count(ctx->state.config->obu_array)) {
GF_AV1_OBUArrayEntry *a = (GF_AV1_OBUArrayEntry*) gf_list_pop_back(ctx->state.config->obu_array);
if (a->obu) gf_free(a->obu);
gf_free(a);
}
dsi = NULL;
dsi_size = 0;
while (gf_list_count(ctx->state.frame_state.header_obus)) {
GF_AV1_OBUArrayEntry *a = (GF_AV1_OBUArrayEntry*) gf_list_get(ctx->state.frame_state.header_obus, 0);
gf_list_add(ctx->state.config->obu_array, a);
gf_list_rem(ctx->state.frame_state.header_obus, 0);
}
gf_odf_av1_cfg_write(ctx->state.config, &dsi, &dsi_size);
if ((!ctx->fps.num || !ctx->fps.den) && ctx->state.tb_num && ctx->state.tb_den && ! ( (ctx->state.tb_num<=1) && (ctx->state.tb_den<=1) ) ) {
ctx->cur_fps.num = ctx->state.tb_num;
ctx->cur_fps.den = ctx->state.tb_den;
}
}
```
I think it should always keep at the last encountered Sequence Header OBU, and not throw it away. For example, in the first loop where it pops all the list items from `ctx->state.config->obu_array`, save the Sequence Header OBU separately, and if `ctx->state.frame_state.header_obus` does *not* start with a Sequence Header OBU, insert it again. But this could be done in several different ways.
In any case, if the resulting `ctx->state.config->obu_array` will then start with the same Sequence Header OBU, the decoder configuration (`dsi`) will come out as bit-identical, so its CRC won't change and the same sample description can be re-used for all samples in the stream.
| Muxing av1 in .ivf format to .mp4 adds more sample descriptions than necessary | https://api.github.com/repos/gpac/gpac/issues/1907/comments | 4 | 2021-09-02T12:56:23Z | 2021-09-07T15:02:55Z | https://github.com/gpac/gpac/issues/1907 | 986,687,801 | 1,907 |
[
"gpac",
"gpac"
] | 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 ...)
Step to reproduce:
```
1.get latest commit code (GPAC version 1.1.0-DEV-rev1170-g592ba2689-master)
2.compile with --enable-sanitizer
3.run ./gpac nhmlr:reframe=1:gpac:index=1.0:gpac:src=
```
**Im not sure if it's a correct usage of "nhmlr filter" , or by which way could i parse nhml file?**
Env:
Ubunut 20.04 , clang 12.0.1
ASAN report
```
==2311904==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fa16d0fb321 bp 0x7fff730acdb0 sp 0x7fff730acc20 T0)
==2311904==The signal is caused by a READ memory access.
==2311904==Hint: address points to the zero page.
#0 0x7fa16d0fb321 in gf_filter_pid_get_packet /home/lly/pro/gpac_public/src/filter_core/filter_pid.c:5394:6
#1 0x7fa16d22468a in nhmldmx_process /home/lly/pro/gpac_public/src/filters/dmx_nhml.c:1320:8
#2 0x7fa16d15a431 in gf_filter_process_task /home/lly/pro/gpac_public/src/filter_core/filter.c:2441:7
#3 0x7fa16d13d2a7 in gf_fs_thread_proc /home/lly/pro/gpac_public/src/filter_core/filter_session.c:1640:3
#4 0x7fa16d13c850 in gf_fs_run /home/lly/pro/gpac_public/src/filter_core/filter_session.c:1877:2
#5 0x4d12ed in gpac_main /home/lly/pro/gpac_public/applications/gpac/main.c:2254:7
#6 0x7fa16c0210b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#7 0x41fe0d in _start (/home/lly/pro/gpac_public/bin/gcc/gpac+0x41fe0d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/lly/pro/gpac_public/src/filter_core/filter_pid.c:5394:6 in gf_filter_pid_get_packet
```
| Null pointer reference in GPAC at src/filter_core/filter_pid.c:5394 | https://api.github.com/repos/gpac/gpac/issues/1906/comments | 4 | 2021-09-01T07:25:03Z | 2021-09-07T15:18:06Z | https://github.com/gpac/gpac/issues/1906 | 984,803,968 | 1,906 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by null pointer dereference in mpgviddmx_process, reframe_mpgvid.c:643 in commit d003a572d57. It seems to be an incomplete fix of issue #1887 and causes another problem.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1191-g55d6dbc-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7088610/mp4box-seg-npd-mpgviddmx_process643.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x000000000141a950 in memcpy (__len=0xffffffffffffffff, __src=0x24ada59, __dest=0x24a5770) at /usr/include/x86_64-linux-gnu/bits/string3.h:53
#1 mpgviddmx_process (filter=0x24a0bd0) at /mnt/data/playground/gpac/src/filters/reframe_mpgvid.c:643
#2 0x0000000000fe3e78 in gf_filter_process_task (task=0x2492f30) at /mnt/data/playground/gpac/src/filter_core/filter.c:2441
#3 0x0000000000f7ab69 in gf_fs_thread_proc (sess_thread=sess_thread@entry=0x248c2b0) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1640
#4 0x0000000000f927b8 in gf_fs_run (fsess=fsess@entry=0x248c220) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1877
#5 0x0000000000c17c8b in gf_media_import (importer=importer@entry=0x7fffffff5bf0) at /mnt/data/playground/gpac/src/media_tools/media_import.c:1178
#6 0x0000000000497345 in convert_file_info (inName=0x7fffffffe15b "tmp", trackID=0x0) at /mnt/data/playground/gpac/applications/mp4box/fileimport.c:128
#7 0x0000000000456aaa in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5925
#8 0x0000000001f06976 in generic_start_main ()
#9 0x0000000001f06f65 in __libc_start_main ()
#10 0x000000000041c4e9 in _start ()
~~~~
Here is the trace reported by ASAN:
~~~~
==29762==ERROR: AddressSanitizer: negative-size-param: (size=-1)
#0 0x7fdaf42ff813 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x79813)
#1 0x7fdaf2897f1c in memcpy /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#2 0x7fdaf2897f1c in mpgviddmx_process /playground/gpac/src/filters/reframe_mpgvid.c:643
#3 0x7fdaf254efa0 in gf_filter_process_task /playground/gpac/src/filter_core/filter.c:2441
#4 0x7fdaf250f0e2 in gf_fs_thread_proc /playground/gpac/src/filter_core/filter_session.c:1640
#5 0x7fdaf2519fb0 in gf_fs_run /playground/gpac/src/filter_core/filter_session.c:1877
#6 0x7fdaf1ff21f5 in gf_media_import /playground/gpac/src/media_tools/media_import.c:1178
#7 0x55ce40c3484f in convert_file_info /playground/gpac/applications/mp4box/fileimport.c:128
#8 0x55ce40c07635 in mp4boxMain /playground/gpac/applications/mp4box/main.c:5925
#9 0x7fdaef9a6bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#10 0x55ce40be83f9 in _start (/playground/gpac/build-a/bin/gcc/MP4Box+0x873f9)
0x622000007489 is located 0 bytes to the right of 5001-byte region [0x622000006100,0x622000007489)
allocated by thread T0 here:
#0 0x7fdaf4364b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fdaf26a0289 in filein_initialize /playground/gpac/src/filters/in_file.c:193
#2 0x7fdaf253b0f0 in gf_filter_new_finalize /playground/gpac/src/filter_core/filter.c:425
#3 0x7fdaf253f294 in gf_filter_new /playground/gpac/src/filter_core/filter.c:382
#4 0x7fdaf2519310 in gf_fs_load_source_dest_internal /playground/gpac/src/filter_core/filter_session.c:2833
#5 0x7fdaf2524a82 in gf_fs_load_source /playground/gpac/src/filter_core/filter_session.c:2873
#6 0x7fdaf1ff21a6 in gf_media_import /playground/gpac/src/media_tools/media_import.c:1165
#7 0x55ce40c3484f in convert_file_info /playground/gpac/applications/mp4box/fileimport.c:128
#8 0x55ce40c07635 in mp4boxMain /playground/gpac/applications/mp4box/main.c:5925
#9 0x7fdaef9a6bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
SUMMARY: AddressSanitizer: negative-size-param (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x79813)
==29762==ABORTING
~~~~ | Segmentation fault casued by null pointer dereference using mp4box in mpgviddmx_process, reframe_mpgvid.c:643 | https://api.github.com/repos/gpac/gpac/issues/1905/comments | 0 | 2021-09-01T06:02:21Z | 2021-09-01T12:04:16Z | https://github.com/gpac/gpac/issues/1905 | 984,701,234 | 1,905 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by null pointer dereference in gf_isom_get_payt_count, hint_track.c:990 in commit d003a572d57.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1191-g55d6dbc-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7083766/mp4box-seg-npd_gf_isom_get_payt_count990.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x0000000000ab4f30 in gf_isom_get_payt_count (the_file=the_file@entry=0x248c220, trackNumber=trackNumber@entry=0x4) at /mnt/data/playground/gpac/src/isomedia/hint_track.c:990
#1 0x0000000000490533 in DumpTrackInfo (file=file@entry=0x248c220, trackID=0x6, trackID@entry=0x4, full_dump=full_dump@entry=GF_FALSE, is_track_num=is_track_num@entry=GF_TRUE, dump_m4sys=dump_m4sys@entry=GF_TRUE) at /mnt/data/playground/gpac/applications/mp4box/filedump.c:3178
#2 0x0000000000491d78 in DumpMovieInfo (file=0x248c220, full_dump=GF_FALSE) at /mnt/data/playground/gpac/applications/mp4box/filedump.c:3789
#3 0x0000000000456587 in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:6023
#4 0x0000000001f06976 in generic_start_main ()
#5 0x0000000001f06f65 in __libc_start_main ()
#6 0x000000000041c4e9 in _start ()
~~~~
| Segmentation fault caused by null pointer dereference using mp4box in gf_isom_get_payt_count, hint_track.c:990 | https://api.github.com/repos/gpac/gpac/issues/1904/comments | 0 | 2021-08-31T12:13:57Z | 2021-09-01T12:04:15Z | https://github.com/gpac/gpac/issues/1904 | 983,792,109 | 1,904 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a buffer overflow in gf_media_nalu_add_emulation_bytes, av_parsers.c:5007 in commit 592ba2689a3 that results in system abort (core dumped).
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7072675/mp4box-abort-overflow_gf_media_nalu_add_emulation_bytes5007.zip)
(unzip first)
Program output:
~~~~
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
realloc(): invalid next size
Aborted (core dumped)
~~~~
Here is the trace reported by ASAN:
~~~~
==28070==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x629000004200 at pc 0x7f655bc2eccf bp 0x7ffedbcd3990 sp 0x7ffedbcd3980
WRITE of size 1 at 0x629000004200 thread T0
#0 0x7f655bc2ecce in gf_media_nalu_add_emulation_bytes /playground/gpac/src/media_tools/av_parsers.c:5007
#1 0x7f655bc2ecce in gf_media_avc_reformat_sei /playground/gpac/src/media_tools/av_parsers.c:6332
#2 0x7f655c5263c8 in naludmx_parse_nal_avc /playground/gpac/src/filters/reframe_nalu.c:2404
#3 0x7f655c5263c8 in naludmx_process /playground/gpac/src/filters/reframe_nalu.c:2874
#4 0x7f655c1bd920 in gf_filter_process_task /playground/gpac/src/filter_core/filter.c:2441
#5 0x7f655c17da62 in gf_fs_thread_proc /playground/gpac/src/filter_core/filter_session.c:1640
#6 0x7f655c188930 in gf_fs_run /playground/gpac/src/filter_core/filter_session.c:1877
#7 0x7f655bc60c15 in gf_media_import /playground/gpac/src/media_tools/media_import.c:1178
#8 0x555ccf3eb72f in convert_file_info /playground/gpac/applications/mp4box/fileimport.c:128
#9 0x555ccf3be515 in mp4boxMain /playground/gpac/applications/mp4box/main.c:5925
#10 0x7f6559613bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#11 0x555ccf39f2d9 in _start (/playground/gpac/build-a/bin/gcc/MP4Box+0x872d9)
0x629000004200 is located 0 bytes to the right of 16384-byte region [0x629000000200,0x629000004200)
allocated by thread T0 here:
#0 0x7f655dfd3f30 in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdef30)
#1 0x7f655b537a14 in BS_WriteByte /playground/gpac/src/utils/bitstream.c:730
#2 0x7f655b537a14 in gf_bs_write_u8 /playground/gpac/src/utils/bitstream.c:827
#3 0x7f655bc2dda9 in gf_media_avc_reformat_sei /playground/gpac/src/media_tools/av_parsers.c:6303
#4 0x7f655c5263c8 in naludmx_parse_nal_avc /playground/gpac/src/filters/reframe_nalu.c:2404
#5 0x7f655c5263c8 in naludmx_process /playground/gpac/src/filters/reframe_nalu.c:2874
#6 0x7f655c1bd920 in gf_filter_process_task /playground/gpac/src/filter_core/filter.c:2441
#7 0x7f655c17da62 in gf_fs_thread_proc /playground/gpac/src/filter_core/filter_session.c:1640
#8 0x7f655c188930 in gf_fs_run /playground/gpac/src/filter_core/filter_session.c:1877
#9 0x7f655bc60c15 in gf_media_import /playground/gpac/src/media_tools/media_import.c:1178
#10 0x555ccf3eb72f in convert_file_info /playground/gpac/applications/mp4box/fileimport.c:128
#11 0x555ccf3be515 in mp4boxMain /playground/gpac/applications/mp4box/main.c:5925
#12 0x7f6559613bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
SUMMARY: AddressSanitizer: heap-buffer-overflow /playground/gpac/src/media_tools/av_parsers.c:5007 in gf_media_nalu_add_emulation_bytes
Shadow bytes around the buggy address:
0x0c527fff87f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c527fff8800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c527fff8810: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c527fff8820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c527fff8830: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c527fff8840:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c527fff8850: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c527fff8860: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c527fff8870: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c527fff8880: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c527fff8890: 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
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
==28070==ABORTING
~~~~
| System abort (Core dumped) caused by buffer overflow using MP4Box in gf_media_nalu_add_emulation_bytes, av_parsers.c:5007 | https://api.github.com/repos/gpac/gpac/issues/1903/comments | 3 | 2021-08-29T14:23:38Z | 2021-09-01T11:42:29Z | https://github.com/gpac/gpac/issues/1903 | 982,112,750 | 1,903 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by nod in gf_avc_parse_nalu, av_parsers.c:6112 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7072659/mp4box-seg-npd_gf_avc_parse_nalu6112.zip)
(unzip first)
Program output:
~~~~
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
[Core] corrupted exp-golomb code, 32 leading zeros, max 31 allowed !
Segmentation fault (core dumped)
~~~~
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x0000000000bd0648 in gf_avc_parse_nalu (bs=<optimized out>, avc=0x24ae050) at /mnt/data/playground/gpac/src/media_tools/av_parsers.c:6112
#1 0x000000000144109d in naludmx_parse_nal_avc (is_islice=<synthetic pointer>, is_slice=<synthetic pointer>, skip_nal=<synthetic pointer>, nal_type=0x4, size=0x3b, data=0x2491e67 "$1", ctx=0x24ada70) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2348
#2 naludmx_process (filter=0x24a0bd0) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2874
#3 0x0000000000fe4c18 in gf_filter_process_task (task=0x248d520) at /mnt/data/playground/gpac/src/filter_core/filter.c:2441
#4 0x0000000000f7b909 in gf_fs_thread_proc (sess_thread=sess_thread@entry=0x248c2b0) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1640
#5 0x0000000000f93558 in gf_fs_run (fsess=fsess@entry=0x248c220) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1877
#6 0x0000000000c18b4b in gf_media_import (importer=importer@entry=0x7fffffff5bf0) at /mnt/data/playground/gpac/src/media_tools/media_import.c:1178
#7 0x0000000000497345 in convert_file_info (inName=0x7fffffffe159 "tmp", trackID=0x0) at /mnt/data/playground/gpac/applications/mp4box/fileimport.c:128
#8 0x0000000000456aaa in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5925
#9 0x0000000001f06bb6 in generic_start_main ()
#10 0x0000000001f071a5 in __libc_start_main ()
#11 0x000000000041c4e9 in _start ()
~~~~
| Segmentation fault caused by null pointer dereference using mp4box in gf_avc_parse_nalu, av_parsers.c:6112 | https://api.github.com/repos/gpac/gpac/issues/1902/comments | 0 | 2021-08-29T14:14:22Z | 2021-08-30T15:33:46Z | https://github.com/gpac/gpac/issues/1902 | 982,110,519 | 1,902 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by floating point exception in naludmx_enqueue_or_dispatch, reframe_nalu.c:675 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7072643/mp4box-seg-fpe_naludmx_enqueue_or_dispatch675.zip)
(unzip first)
Program output:
~~~~
[AVC|H264] Possible Variable Frame Rate: VUI "fixed_frame_rate_flag" absent
[AVC|H264] Warning: Error parsing NAL unit
[AVC|H264] Error parsing Sequence Param Set
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[AVC|H264] Possible Variable Frame Rate: VUI "fixed_frame_rate_flag" absent
[AVC|H264] Possible Variable Frame Rate: VUI "fixed_frame_rate_flag" absent
[AVC|H264] Possible Variable Frame Rate: VUI "fixed_frame_rate_flag" absent
[AVC|H264] Possible Variable Frame Rate: VUI "fixed_frame_rate_flag" absent
[AVC|H264] Possible Variable Frame Rate: VUI "fixed_frame_rate_flag" absent
Floating point exception (core dumped)
~~~~
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGFPE
gefβ€ bt
#0 0x000000000141ee30 in naludmx_enqueue_or_dispatch (ctx=0x24ada70, n_pck=0x0, flush_ref=<optimized out>) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:675
#1 0x0000000001449e53 in naludmx_process (filter=filter@entry=0x24a0bd0) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2630
#2 0x0000000001447f4a in naludmx_process (filter=0x24a0bd0) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:3340
#3 0x0000000000fe4c18 in gf_filter_process_task (task=0x2492ed0) at /mnt/data/playground/gpac/src/filter_core/filter.c:2441
#4 0x0000000000f7b909 in gf_fs_thread_proc (sess_thread=sess_thread@entry=0x248c2b0) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1640
#5 0x0000000000f93558 in gf_fs_run (fsess=fsess@entry=0x248c220) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1877
#6 0x0000000000c18b4b in gf_media_import (importer=importer@entry=0x7fffffff5bf0) at /mnt/data/playground/gpac/src/media_tools/media_import.c:1178
#7 0x0000000000497345 in convert_file_info (inName=0x7fffffffe159 "tmp", trackID=0x0) at /mnt/data/playground/gpac/applications/mp4box/fileimport.c:128
#8 0x0000000000456aaa in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5925
#9 0x0000000001f06bb6 in generic_start_main ()
#10 0x0000000001f071a5 in __libc_start_main ()
#11 0x000000000041c4e9 in _start ()
~~~~
| Segmentation fault caused by floating point exception using mp4box in naludmx_enqueue_or_dispatch, reframe_nalu.c:675 | https://api.github.com/repos/gpac/gpac/issues/1901/comments | 0 | 2021-08-29T14:05:34Z | 2021-08-30T15:33:46Z | https://github.com/gpac/gpac/issues/1901 | 982,108,403 | 1,901 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by buffer overflow (overwrite) in svc_parse_slice, av_parsers.c:5788 in commit 592ba2689a3.
This vulnerability is similar to the npd reported in #1898. However, this one is more serious since it allows memory manipulation.
<img width="777" alt="image" src="https://user-images.githubusercontent.com/7632714/131103671-25924388-bc11-4954-871c-34eb354c6521.png">
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7065690/mp4box-seg-overflow_svc_parse_slice5788.zip)
(unzip first)
Program output:
~~~~
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[AVC|H264] Warning: Error parsing NAL unit
[AVC|H264] Error parsing Sequence Param Set
[AVC|H264] Warning: Error parsing NAL unit
[AVC|H264] Error parsing Sequence Param Set
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[AVC|H264] Warning: Error parsing NAL unit
Segmentation fault (core dumped)
~~~~
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x0000000000bccc05 in svc_parse_slice (si=0x7fffffff5020, avc=0x24ae050, bs=0x2491de0) at /mnt/data/playground/gpac/src/media_tools/av_parsers.c:5788
#1 gf_avc_parse_nalu (bs=0x2491de0, avc=0x24ae050) at /mnt/data/playground/gpac/src/media_tools/av_parsers.c:6062
#2 0x000000000144109d in naludmx_parse_nal_avc (is_islice=<synthetic pointer>, is_slice=<synthetic pointer>, skip_nal=<synthetic pointer>, nal_type=0x14, size=0x2c, data=0x24b84a1 "trak", ctx=0x24ada70) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2348
#3 naludmx_process (filter=0x24a0bd0) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2874
#4 0x0000000000fe4c18 in gf_filter_process_task (task=0x248e770) at /mnt/data/playground/gpac/src/filter_core/filter.c:2441
#5 0x0000000000f7b909 in gf_fs_thread_proc (sess_thread=sess_thread@entry=0x248c2b0) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1640
#6 0x0000000000f93558 in gf_fs_run (fsess=fsess@entry=0x248c220) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1877
#7 0x0000000000c18b4b in gf_media_import (importer=importer@entry=0x7fffffff5bf0) at /mnt/data/playground/gpac/src/media_tools/media_import.c:1178
#8 0x0000000000497345 in convert_file_info (inName=0x7fffffffe159 "tmp", trackID=0x0) at /mnt/data/playground/gpac/applications/mp4box/fileimport.c:128
#9 0x0000000000456aaa in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5925
#10 0x0000000001f06bb6 in generic_start_main ()
#11 0x0000000001f071a5 in __libc_start_main ()
#12 0x000000000041c4e9 in _start ()
~~~~
| Segmentation fault caused by buffer overflow using mp4box in svc_parse_slice, av_parsers.c:5788 | https://api.github.com/repos/gpac/gpac/issues/1900/comments | 0 | 2021-08-27T09:14:32Z | 2021-08-30T15:33:45Z | https://github.com/gpac/gpac/issues/1900 | 981,044,009 | 1,900 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by buffer overflow in avc_compute_poc, av_parsers.c:5988 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7065639/mp4box-seg-overflow_avc_compute_poc5988.zip)
(unzip first)
Program output:
~~~~
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[avc-h264] offset_for_ref_frame overflow from poc_cycle_length
[AVC|H264] Warning: Error parsing NAL unit
[AVC|H264] Error parsing Sequence Param Set
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
[Core] exp-golomb read failed, not enough bits in bitstream !
Segmentation fault (core dumped)
~~~~
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x0000000000b82f00 in avc_compute_poc (si=si@entry=0x7fffffff5020) at /mnt/data/playground/gpac/src/media_tools/av_parsers.c:5988
#1 0x0000000000bce182 in gf_avc_parse_nalu (bs=<optimized out>, avc=0x24ae050) at /mnt/data/playground/gpac/src/media_tools/av_parsers.c:6191
#2 0x000000000144109d in naludmx_parse_nal_avc (is_islice=<synthetic pointer>, is_slice=<synthetic pointer>, skip_nal=<synthetic pointer>, nal_type=0x3, size=0xf, data=0x248dfba "Cd\234\316s", <incomplete sequence \350>, ctx=0x24ada70) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2348
#3 naludmx_process (filter=0x24a0bd0) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2874
#4 0x0000000000fe4c18 in gf_filter_process_task (task=0x2492ed0) at /mnt/data/playground/gpac/src/filter_core/filter.c:2441
#5 0x0000000000f7b909 in gf_fs_thread_proc (sess_thread=sess_thread@entry=0x248c2b0) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1640
#6 0x0000000000f93558 in gf_fs_run (fsess=fsess@entry=0x248c220) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1877
#7 0x0000000000c18b4b in gf_media_import (importer=importer@entry=0x7fffffff5bf0) at /mnt/data/playground/gpac/src/media_tools/media_import.c:1178
#8 0x0000000000497345 in convert_file_info (inName=0x7fffffffe159 "tmp", trackID=0x0) at /mnt/data/playground/gpac/applications/mp4box/fileimport.c:128
#9 0x0000000000456aaa in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5925
#10 0x0000000001f06bb6 in generic_start_main ()
#11 0x0000000001f071a5 in __libc_start_main ()
#12 0x000000000041c4e9 in _start ()
~~~~
The reason for this bug is that the program does not check whether the length of a buffer fit its actual size.
<img width="922" alt="image" src="https://user-images.githubusercontent.com/7632714/131101665-2c1728e7-19c6-48af-ba1c-832d2f2d6a2e.png">
| Segmentation fault caused by buffer overflow using mp4box in avc_compute_poc, av_parsers.c:5988 | https://api.github.com/repos/gpac/gpac/issues/1899/comments | 0 | 2021-08-27T09:02:37Z | 2021-08-30T15:33:45Z | https://github.com/gpac/gpac/issues/1899 | 981,033,321 | 1,899 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by null pointer dereference in avc_parse_slice, av_parsers.c:5678 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7059392/mp4box-seg-npd-avc_parse_slice5678.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x0000000000bcd59d in avc_parse_slice (svc_idr_flag=GF_FALSE, si=0x7fffffff5020, avc=0x24ae050, bs=0x248df40) at /mnt/data/playground/gpac/src/media_tools/av_parsers.c:5678
#1 gf_avc_parse_nalu (bs=0x248df40, avc=0x24ae050) at /mnt/data/playground/gpac/src/media_tools/av_parsers.c:6087
#2 0x000000000144109d in naludmx_parse_nal_avc (is_islice=<synthetic pointer>, is_slice=<synthetic pointer>, skip_nal=<synthetic pointer>, nal_type=0x4, size=0x4f, data=0x2491e5b "$1\200", ctx=0x24ada70) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2348
#3 naludmx_process (filter=0x24a0bd0) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2874
#4 0x0000000000fe4c18 in gf_filter_process_task (task=0x248d520) at /mnt/data/playground/gpac/src/filter_core/filter.c:2441
#5 0x0000000000f7b909 in gf_fs_thread_proc (sess_thread=sess_thread@entry=0x248c2b0) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1640
#6 0x0000000000f93558 in gf_fs_run (fsess=fsess@entry=0x248c220) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1877
#7 0x0000000000c18b4b in gf_media_import (importer=importer@entry=0x7fffffff5bf0) at /mnt/data/playground/gpac/src/media_tools/media_import.c:1178
#8 0x0000000000497345 in convert_file_info (inName=0x7fffffffe159 "tmp", trackID=0x0) at /mnt/data/playground/gpac/applications/mp4box/fileimport.c:128
#9 0x0000000000456aaa in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5925
#10 0x0000000001f06bb6 in generic_start_main ()
#11 0x0000000001f071a5 in __libc_start_main ()
#12 0x000000000041c4e9 in _start ()
~~~~
The reason for this bug is that the program does not check the nullity of the pointer.
<img width="655" alt="image" src="https://user-images.githubusercontent.com/7632714/130955606-eefd9dbd-049a-48b2-ab9f-fa46197e9d99.png">
| Segmentation fault caused by null pointer dereference using mp4box in avc_parse_slice, av_parsers.c:5678 | https://api.github.com/repos/gpac/gpac/issues/1898/comments | 0 | 2021-08-26T11:34:51Z | 2021-08-30T15:33:45Z | https://github.com/gpac/gpac/issues/1898 | 980,141,709 | 1,898 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a buffer overflow in gf_text_get_utf8_line, in commit 592ba2689a3 that results in system abort (core dumped).
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7058142/mp4box-seg-abrt-overflow_gf_text_get_utf8.zip)
(unzip first)
This is the output of the program:
~~~~
*** stack smashing detected ***: <unknown> terminated
Aborted (core dumped)
~~~~
Here is the trace reported by gdb (the stack is smashed):
~~~~
Stopped reason: SIGABRT
gefβ€ bt
#0 0x0000000001f15d08 in raise ()
#1 0x0000000001f15f3a in abort ()
#2 0x0000000001f24ed6 in __libc_message ()
#3 0x0000000001f70a92 in __fortify_fail ()
#4 0x0000000001f70a3e in __stack_chk_fail ()
#5 0x000000000127f3ad in gf_text_get_utf8_line (szLine=<optimized out>, lineSize=<optimized out>, txt_in=<optimized out>, unicode_type=0x0) at /mnt/data/playground/gpac/src/filters/load_text.c:337
#6 0xc2657485c3a5c37e in ?? ()
#7 0xbcc3739fc3314583 in ?? ()
#8 0x0748654e86c3aac3 in ?? ()
....
#14 0x609ec3a0c3a7c26e in ?? ()
#15 0x11bdcd643758a5c3 in ?? ()
#16 0x00000000009ac35e in gf_isom_load_extra_boxes (movie=0xc53f89c4114aacc2, moov_boxes=<optimized out>, moov_boxes_size=<optimized out>, udta_only=(unknown: 2747429506)) at /mnt/data/playground/gpac/src/isomedia/isom_write.c:615
#17 0x0000000000000000 in ?? ()
~~~~
| System abort (Core dumped) caused by buffer overflow using MP4Box in gf_text_get_utf8_line | https://api.github.com/repos/gpac/gpac/issues/1897/comments | 0 | 2021-08-26T11:19:33Z | 2021-08-30T15:33:45Z | https://github.com/gpac/gpac/issues/1897 | 980,128,523 | 1,897 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault in gf_list_count, list.c:642 in commit 592ba2689a3 caused by use after free issue.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -hint poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7056064/mp4box-seg-uaf_gf_list_count642.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 gf_list_count (ptr=0x91) at /mnt/data/playground/gpac/src/utils/list.c:642
#1 0x00000000019f3cf8 in iloc_entry_del (location=0x2745fe0) at /mnt/data/playground/gpac/src/isomedia/box_code_meta.c:239
#2 iloc_box_del (s=0x248f0f0) at /mnt/data/playground/gpac/src/isomedia/box_code_meta.c:256
#3 0x00000000008fa22f in gf_isom_box_del (a=0x248f0f0) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:1794
#4 0x000000000090e1d0 in gf_isom_box_parse_ex (is_root_box=GF_FALSE, parent_type=<optimized out>, bs=<optimized out>, outBox=<synthetic pointer>) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:303
#5 gf_isom_box_array_read_ex (parent=0x248ef80, bs=<optimized out>, parent_type=<optimized out>) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:1707
#6 0x00000000008ff1fa in gf_isom_box_read (bs=0x248c750, a=0x248ef80) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:1810
#7 gf_isom_box_parse_ex (outBox=outBox@entry=0x7fffffff9360, bs=bs@entry=0x248c750, is_root_box=is_root_box@entry=GF_TRUE, parent_type=0x0) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:263
#8 0x0000000000900cf2 in gf_isom_parse_root_box (outBox=outBox@entry=0x7fffffff9360, bs=0x248c750, box_type=box_type@entry=0x0, bytesExpected=bytesExpected@entry=0x7fffffff93b0, progressive_mode=progressive_mode@entry=GF_FALSE) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:38
#9 0x000000000093551f in gf_isom_parse_movie_boxes_internal (mov=mov@entry=0x248c220, boxType=boxType@entry=0x0, bytesMissing=bytesMissing@entry=0x7fffffff93b0, progressive_mode=progressive_mode@entry=GF_FALSE) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:320
#10 0x000000000093e251 in gf_isom_parse_movie_boxes (progressive_mode=GF_FALSE, bytesMissing=0x7fffffff93b0, boxType=0x0, mov=0x248c220) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:781
#11 gf_isom_open_file (fileName=0x7fffffffe159 "tmp", OpenMode=<optimized out>, tmp_dir=0x0) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:901
#12 0x0000000000454a80 in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5841
#13 0x0000000001f06bb6 in generic_start_main ()
#14 0x0000000001f071a5 in __libc_start_main ()
#15 0x000000000041c4e9 in _start ()
~~~~
| Segmentation fault caused by use after free using mp4box in gf_list_count, list.c:642 | https://api.github.com/repos/gpac/gpac/issues/1896/comments | 1 | 2021-08-26T10:01:50Z | 2021-08-30T15:35:34Z | https://github.com/gpac/gpac/issues/1896 | 980,061,803 | 1,896 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by null pointer dereference in ilst_box_read, box_code_apple.c:50 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -hint poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7056022/mp4box-seg-npd_ilst_box_read50.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x0000000001963358 in ilst_box_read (s=0x248f740, bs=0x248c750) at /mnt/data/playground/gpac/src/isomedia/box_code_apple.c:50
#1 0x00000000008ff1fa in gf_isom_box_read (bs=0x248c750, a=0x248f740) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:1810
#2 gf_isom_box_parse_ex (outBox=outBox@entry=0x7fffffff9360, bs=bs@entry=0x248c750, is_root_box=is_root_box@entry=GF_TRUE, parent_type=0x0) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:263
#3 0x0000000000900cf2 in gf_isom_parse_root_box (outBox=outBox@entry=0x7fffffff9360, bs=0x248c750, box_type=box_type@entry=0x0, bytesExpected=bytesExpected@entry=0x7fffffff93b0, progressive_mode=progressive_mode@entry=GF_FALSE) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:38
#4 0x000000000093551f in gf_isom_parse_movie_boxes_internal (mov=mov@entry=0x248c220, boxType=boxType@entry=0x0, bytesMissing=bytesMissing@entry=0x7fffffff93b0, progressive_mode=progressive_mode@entry=GF_FALSE) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:320
#5 0x000000000093e251 in gf_isom_parse_movie_boxes (progressive_mode=GF_FALSE, bytesMissing=0x7fffffff93b0, boxType=0x0, mov=0x248c220) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:781
#6 gf_isom_open_file (fileName=0x7fffffffe159 "tmp", OpenMode=<optimized out>, tmp_dir=0x0) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:901
#7 0x0000000000454a80 in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5841
#8 0x0000000001f06bb6 in generic_start_main ()
#9 0x0000000001f071a5 in __libc_start_main ()
#10 0x000000000041c4e9 in _start ()
~~~~
| Segmentation fault using mp4box in ilst_box_read, box_code_apple.c:50 | https://api.github.com/repos/gpac/gpac/issues/1895/comments | 0 | 2021-08-26T09:51:24Z | 2021-08-30T15:33:44Z | https://github.com/gpac/gpac/issues/1895 | 980,052,585 | 1,895 |
[
"gpac",
"gpac"
] |
- [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 ...).
It's a heap-buffer-overflow bug
Step to reproduce:
1.get latest commit code (GPAC version 1.1.0-DEV-rev1170-g592ba26-master)
2.compile with --enable-sanitizer
3.run ./MP4BOX info poc
Env:
Ubunut 20.04 , clang 12.0.1
ASAN report
```
==2275020==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x604000000638 at pc 0x7f1c17ca68a4 bp 0x7ffd52eab1d0 sp 0x7ffd52eab1c8
READ of size 4 at 0x604000000638 thread T0
#0 0x7f1c17ca68a3 in GetHintFormat /home/lly/pro/gpac_public/src/isomedia/hint_track.c:46:22
#1 0x7f1c17ca68a3 in CheckHintFormat /home/lly/pro/gpac_public/src/isomedia/hint_track.c:58:6
#2 0x7f1c17ca68a3 in gf_isom_get_payt_count /home/lly/pro/gpac_public/src/isomedia/hint_track.c:979:7
#3 0x5b52e5 in DumpTrackInfo /home/lly/pro/gpac_public/applications/mp4box/filedump.c:3178:14
#4 0x5e4af1 in DumpMovieInfo /home/lly/pro/gpac_public/applications/mp4box/filedump.c:3789:3
#5 0x52ea16 in mp4boxMain /home/lly/pro/gpac_public/applications/mp4box/main.c:6023:9
#6 0x7f1c15d710b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#7 0x429aad in _start (/home/lly/pro/gpac_public/bin/gcc/MP4Box+0x429aad)
0x604000000638 is located 0 bytes to the right of 40-byte region [0x604000000610,0x604000000638)
allocated by thread T0 here:
#0 0x4a496d in malloc (/home/lly/pro/gpac_public/bin/gcc/MP4Box+0x4a496d)
#1 0x7f1c17543a17 in nmhd_box_new /home/lly/pro/gpac_public/src/isomedia/box_code_base.c:4651:2
#2 0x7f1c1775de4f in gf_isom_box_new_ex /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:1673:6
#3 0x7f1c17756209 in gf_isom_box_parse_ex /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:239:12
#4 0x7f1c17760a0b in gf_isom_box_array_read_ex /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:1707:7
#5 0x7f1c1751e43a in minf_box_read /home/lly/pro/gpac_public/src/isomedia/box_code_base.c:3527:6
#6 0x7f1c17757fe8 in gf_isom_box_read /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:1810:9
#7 0x7f1c17757fe8 in gf_isom_box_parse_ex /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:263:14
#8 0x7f1c17760a0b in gf_isom_box_array_read_ex /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:1707:7
#9 0x7f1c17511b3d in mdia_box_read /home/lly/pro/gpac_public/src/isomedia/box_code_base.c:3078:6
#10 0x7f1c17757fe8 in gf_isom_box_read /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:1810:9
#11 0x7f1c17757fe8 in gf_isom_box_parse_ex /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:263:14
#12 0x7f1c17760a0b in gf_isom_box_array_read_ex /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:1707:7
#13 0x7f1c17582c10 in trak_box_read /home/lly/pro/gpac_public/src/isomedia/box_code_base.c:6734:6
#14 0x7f1c17757fe8 in gf_isom_box_read /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:1810:9
#15 0x7f1c17757fe8 in gf_isom_box_parse_ex /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:263:14
#16 0x7f1c17760a0b in gf_isom_box_array_read_ex /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:1707:7
#17 0x7f1c17757fe8 in gf_isom_box_read /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:1810:9
#18 0x7f1c17757fe8 in gf_isom_box_parse_ex /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:263:14
#19 0x7f1c177548b9 in gf_isom_parse_root_box /home/lly/pro/gpac_public/src/isomedia/box_funcs.c:38:8
#20 0x7f1c177e2347 in gf_isom_parse_movie_boxes_internal /home/lly/pro/gpac_public/src/isomedia/isom_intern.c:320:7
#21 0x7f1c177e2347 in gf_isom_parse_movie_boxes /home/lly/pro/gpac_public/src/isomedia/isom_intern.c:781:6
#22 0x7f1c177f84d3 in gf_isom_open_file /home/lly/pro/gpac_public/src/isomedia/isom_intern.c:901:19
#23 0x53c4b8 in mp4boxMain /home/lly/pro/gpac_public/applications/mp4box/main.c:5841:12
#24 0x7f1c15d710b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/lly/pro/gpac_public/src/isomedia/hint_track.c:46:22 in GetHintFormat
Shadow bytes around the buggy address:
0x0c087fff8070: fa fa 00 00 00 00 04 fa fa fa 00 00 00 00 00 00
0x0c087fff8080: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00
0x0c087fff8090: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 00
0x0c087fff80a0: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 00
0x0c087fff80b0: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 00
=>0x0c087fff80c0: fa fa 00 00 00 00 00[fa]fa fa 00 00 00 00 00 00
0x0c087fff80d0: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 00
0x0c087fff80e0: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 fa
0x0c087fff80f0: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 00
0x0c087fff8100: fa fa 00 00 00 00 00 fa fa fa 00 00 00 00 00 00
0x0c087fff8110: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00
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
Shadow gap: cc
```
[poc.zip](https://github.com/gpac/gpac/files/7051614/poc.zip)
| heap-buffer-overflow in MP4BOX at souce file src/isomedia/hint_track.c:46 | https://api.github.com/repos/gpac/gpac/issues/1894/comments | 0 | 2021-08-26T04:44:12Z | 2021-08-30T15:33:44Z | https://github.com/gpac/gpac/issues/1894 | 979,828,664 | 1,894 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault in av1dmx_finalize, reframe_av1.c:1075 in commit 592ba2689a3 caused by double free issue.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -hint poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7044542/mp4box-doublefree_av1dmx_finalize1075.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGABRT
gefβ€ bt
#0 0x0000000001f15d08 in raise ()
#1 0x0000000001f15f3a in abort ()
#2 0x0000000001f24ed6 in __libc_message ()
#3 0x0000000001f2da76 in _int_free ()
#4 0x0000000001f31af7 in free ()
#5 0x000000000053de4d in gf_free (ptr=<optimized out>) at /mnt/data/playground/gpac/src/utils/alloc.c:165
#6 0x00000000013e3d4d in av1dmx_finalize (filter=<optimized out>) at /mnt/data/playground/gpac/src/filters/reframe_av1.c:1075
#7 0x0000000000f9949c in gf_fs_del (fsess=fsess@entry=0x248c220) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:646
#8 0x0000000000c1a86a in gf_media_import (importer=importer@entry=0x7fffffff5bf0) at /mnt/data/playground/gpac/src/media_tools/media_import.c:1242
#9 0x0000000000497345 in convert_file_info (inName=0x7fffffffe159 "tmp", trackID=0x0) at /mnt/data/playground/gpac/applications/mp4box/fileimport.c:128
#10 0x0000000000456aaa in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5925
#11 0x0000000001f06bb6 in generic_start_main ()
#12 0x0000000001f071a5 in __libc_start_main ()
#13 0x000000000041c4e9 in _start ()
~~~~
| Segmentation fault caused by double free using mp4box in av1dmx_finalize, reframe_av1.c:1075 | https://api.github.com/repos/gpac/gpac/issues/1893/comments | 2 | 2021-08-25T07:18:42Z | 2021-09-01T10:06:57Z | https://github.com/gpac/gpac/issues/1893 | 978,804,732 | 1,893 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by null pointer dereference in naludmx_create_avc_decoder_config, reframe_nalu.c:1297 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7044482/mp4box-seg-npd_naludmx_create_avc_decoder_config1297.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x0000000001430251 in naludmx_create_avc_decoder_config (ctx=ctx@entry=0x24ada70, dsi=dsi@entry=0x7fffffff4d28, dsi_size=dsi_size@entry=0x7fffffff4d20, dsi_enh=dsi_enh@entry=0x7fffffff4d30, dsi_enh_size=dsi_enh_size@entry=0x7fffffff4d24, max_width=max_width@entry=0x7fffffff4d10, max_height=0x7fffffff4d14, max_enh_width=0x7fffffff4d18, max_enh_height=0x7fffffff4d1c, sar=0x7fffffff4d38) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:1297
#1 0x00000000014334ab in naludmx_check_pid (filter=filter@entry=0x24a0bd0, ctx=ctx@entry=0x24ada70) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:1462
#2 0x0000000001441315 in naludmx_process (filter=0x24a0bd0) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2895
#3 0x0000000000fe4c18 in gf_filter_process_task (task=0x2492ed0) at /mnt/data/playground/gpac/src/filter_core/filter.c:2441
#4 0x0000000000f7b909 in gf_fs_thread_proc (sess_thread=sess_thread@entry=0x248c2b0) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1640
#5 0x0000000000f93558 in gf_fs_run (fsess=fsess@entry=0x248c220) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1877
#6 0x0000000000c18b4b in gf_media_import (importer=importer@entry=0x7fffffff5bf0) at /mnt/data/playground/gpac/src/media_tools/media_import.c:1178
#7 0x0000000000497345 in convert_file_info (inName=0x7fffffffe159 "tmp", trackID=0x0) at /mnt/data/playground/gpac/applications/mp4box/fileimport.c:128
#8 0x0000000000456aaa in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5925
#9 0x0000000001f06bb6 in generic_start_main ()
#10 0x0000000001f071a5 in __libc_start_main ()
#11 0x000000000041c4e9 in _start ()
~~~~
The reason for this bug is that the program does not check the nullity of the pointer.
<img width="685" alt="image" src="https://user-images.githubusercontent.com/7632714/130743176-e3e41fdf-fdb9-45cf-b68f-d27657ab0a37.png">
| Segmentation fault casued by null pointer dereference using mp4box in naludmx_create_avc_decoder_config, reframe_nalu.c:1297 | https://api.github.com/repos/gpac/gpac/issues/1892/comments | 0 | 2021-08-25T07:12:15Z | 2021-08-30T15:33:44Z | https://github.com/gpac/gpac/issues/1892 | 978,799,447 | 1,892 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a system abort in gf_free, alloc.c:165 in commit 592ba2689a3 caused by double free issue, it is similar to issue #1890 but the scenario is different.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -hint poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7044249/mp4box-abrt-doublefree_alloc165.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGABRT
gefβ€ bt
#0 0x0000000001f15d08 in raise ()
#1 0x0000000001f15f3a in abort ()
#2 0x0000000001f24ed6 in __libc_message ()
#3 0x0000000001f2da76 in _int_free ()
#4 0x0000000001f31af7 in free ()
#5 0x000000000053de4d in gf_free (ptr=<optimized out>) at /mnt/data/playground/gpac/src/utils/alloc.c:165
#6 0x00000000004f8c14 in gf_list_del (ptr=0x482f2f0) at /mnt/data/playground/gpac/src/utils/list.c:614
#7 0x00000000019f4315 in iloc_entry_del (location=0x480b370) at /mnt/data/playground/gpac/src/isomedia/box_code_meta.c:244
#8 iloc_box_del (s=0x248f080) at /mnt/data/playground/gpac/src/isomedia/box_code_meta.c:256
#9 0x00000000008fa22f in gf_isom_box_del (a=0x248f080) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:1794
#10 0x0000000000900b5c in gf_isom_box_parse_ex (outBox=outBox@entry=0x7fffffff9360, bs=bs@entry=0x248c750, is_root_box=is_root_box@entry=GF_TRUE, parent_type=0x0) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:303
#11 0x0000000000900cf2 in gf_isom_parse_root_box (outBox=outBox@entry=0x7fffffff9360, bs=0x248c750, box_type=box_type@entry=0x0, bytesExpected=bytesExpected@entry=0x7fffffff93b0, progressive_mode=progressive_mode@entry=GF_FALSE) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:38
#12 0x000000000093551f in gf_isom_parse_movie_boxes_internal (mov=mov@entry=0x248c220, boxType=boxType@entry=0x0, bytesMissing=bytesMissing@entry=0x7fffffff93b0, progressive_mode=progressive_mode@entry=GF_FALSE) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:320
#13 0x000000000093e251 in gf_isom_parse_movie_boxes (progressive_mode=GF_FALSE, bytesMissing=0x7fffffff93b0, boxType=0x0, mov=0x248c220) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:781
#14 gf_isom_open_file (fileName=0x7fffffffe159 "tmp", OpenMode=<optimized out>, tmp_dir=0x0) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:901
#15 0x0000000000454a80 in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5841
#16 0x0000000001f06bb6 in generic_start_main ()
#17 0x0000000001f071a5 in __libc_start_main ()
#18 0x000000000041c4e9 in _start ()
~~~~
| System abort caused by double free using mp4box, gf_list_del, list.c:614 | https://api.github.com/repos/gpac/gpac/issues/1891/comments | 1 | 2021-08-25T06:44:03Z | 2021-08-30T15:35:16Z | https://github.com/gpac/gpac/issues/1891 | 978,778,065 | 1,891 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault in gf_free, alloc.c:165 in commit 592ba2689a3 caused by double free issue.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -hint poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7043899/mp4box-doublefree_alloc165.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x0000000001f31acf in free ()
#1 0x000000000053de4d in gf_free (ptr=<optimized out>) at /mnt/data/playground/gpac/src/utils/alloc.c:165
#2 0x00000000019f3d5d in iloc_entry_del (location=0x3dd8780) at /mnt/data/playground/gpac/src/isomedia/box_code_meta.c:242
#3 iloc_box_del (s=0x248f080) at /mnt/data/playground/gpac/src/isomedia/box_code_meta.c:256
#4 0x00000000008fa22f in gf_isom_box_del (a=0x248f080) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:1794
#5 0x0000000000900b5c in gf_isom_box_parse_ex (outBox=outBox@entry=0x7fffffff9360, bs=bs@entry=0x248c750, is_root_box=is_root_box@entry=GF_TRUE, parent_type=0x0) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:303
#6 0x0000000000900cf2 in gf_isom_parse_root_box (outBox=outBox@entry=0x7fffffff9360, bs=0x248c750, box_type=box_type@entry=0x0, bytesExpected=bytesExpected@entry=0x7fffffff93b0, progressive_mode=progressive_mode@entry=GF_FALSE) at /mnt/data/playground/gpac/src/isomedia/box_funcs.c:38
#7 0x000000000093551f in gf_isom_parse_movie_boxes_internal (mov=mov@entry=0x248c220, boxType=boxType@entry=0x0, bytesMissing=bytesMissing@entry=0x7fffffff93b0, progressive_mode=progressive_mode@entry=GF_FALSE) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:320
#8 0x000000000093e251 in gf_isom_parse_movie_boxes (progressive_mode=GF_FALSE, bytesMissing=0x7fffffff93b0, boxType=0x0, mov=0x248c220) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:781
#9 gf_isom_open_file (fileName=0x7fffffffe159 "tmp", OpenMode=<optimized out>, tmp_dir=0x0) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:901
#10 0x0000000000454a80 in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:5841
#11 0x0000000001f06bb6 in generic_start_main ()
#12 0x0000000001f071a5 in __libc_start_main ()
#13 0x000000000041c4e9 in _start ()
~~~~
It seems that the pointer has been free previously in configfile.c
<img width="615" alt="image" src="https://user-images.githubusercontent.com/7632714/130732366-c06e6fe8-f884-47e7-9bae-ca90891284e1.png">
| Segmentation fault caused by double free using mp4box in iloc_entry_del, box_code_meta.c:242 | https://api.github.com/repos/gpac/gpac/issues/1890/comments | 0 | 2021-08-25T05:36:34Z | 2021-08-30T15:33:43Z | https://github.com/gpac/gpac/issues/1890 | 978,737,969 | 1,890 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault in gf_odf_desc_copy, odf_codec.c:381 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -hint poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7038682/mp4box-gf_odf_size_descriptor380.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x0000000001a016e8 in gf_odf_size_descriptor (desc=0x3e8024746a0, outSize=outSize@entry=0x7fffffff6994) at /mnt/data/playground/gpac/src/odf/desc_private.c:380
#1 0x0000000000aeaaee in gf_odf_size_dcd (dcd=0x7fffffff6ae0, outSize=0x7fffffff69c4) at /mnt/data/playground/gpac/src/odf/odf_code.c:1211
#2 0x0000000001a01b15 in gf_odf_size_descriptor (desc=desc@entry=0x7fffffff6ae0, outSize=outSize@entry=0x7fffffff69c4) at /mnt/data/playground/gpac/src/odf/desc_private.c:386
#3 0x0000000000aeade9 in gf_odf_write_dcd (bs=0x249a960, dcd=0x7fffffff6ae0) at /mnt/data/playground/gpac/src/odf/odf_code.c:1235
#4 0x0000000001a020bd in gf_odf_write_descriptor (bs=bs@entry=0x249a960, desc=desc@entry=0x7fffffff6ae0) at /mnt/data/playground/gpac/src/odf/desc_private.c:487
#5 0x0000000000af1357 in gf_odf_desc_write_bs (desc=desc@entry=0x7fffffff6ae0, bs=bs@entry=0x249a960) at /mnt/data/playground/gpac/src/odf/odf_codec.c:325
#6 0x0000000000af14b7 in gf_odf_desc_write (desc=desc@entry=0x7fffffff6ae0, outEncDesc=outEncDesc@entry=0x7fffffff6a30, outSize=outSize@entry=0x7fffffff6a2c) at /mnt/data/playground/gpac/src/odf/odf_codec.c:343
#7 0x0000000000af17f6 in gf_odf_desc_copy (inDesc=inDesc@entry=0x7fffffff6ae0, outDesc=outDesc@entry=0x2497550) at /mnt/data/playground/gpac/src/odf/odf_codec.c:387
#8 0x00000000009d2a3f in gf_isom_set_extraction_slc (the_file=the_file@entry=0x248c220, trackNumber=trackNumber@entry=0x6, StreamDescriptionIndex=StreamDescriptionIndex@entry=0x1, slConfig=slConfig@entry=0x7fffffff6ae0) at /mnt/data/playground/gpac/src/isomedia/isom_write.c:5468
#9 0x0000000000ce75ff in gf_hinter_finalize (file=file@entry=0x248c220, IOD_Profile=<optimized out>, bandwidth=bandwidth@entry=0x8bdf) at /mnt/data/playground/gpac/src/media_tools/isom_hinter.c:1245
#10 0x000000000043c218 in HintFile (file=0x248c220, MTUSize=MTUSize@entry=0x59e, max_ptime=0x0, rtp_rate=0x0, base_flags=<optimized out>, copy_data=GF_FALSE, interleave=GF_FALSE, regular_iod=GF_FALSE, single_group=GF_FALSE, hint_no_offset=GF_FALSE) at /mnt/data/playground/gpac/applications/mp4box/main.c:3550
#11 0x000000000044bd42 in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:6329
#12 0x0000000001f06bb6 in generic_start_main ()
#13 0x0000000001f071a5 in __libc_start_main ()
#14 0x000000000041c4e9 in _start ()
~~~~
| Segmentation fault using mp4box in gf_odf_size_descriptor, desc_private.c:380 | https://api.github.com/repos/gpac/gpac/issues/1889/comments | 2 | 2021-08-24T11:14:59Z | 2021-08-30T15:34:45Z | https://github.com/gpac/gpac/issues/1889 | 977,985,666 | 1,889 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault in gf_odf_desc_copy, odf_codec.c:381 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -hint poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7038609/mp4box-uaf_gf_odf_desc_copy381.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 gf_odf_desc_copy (inDesc=inDesc@entry=0x7fffffff6ae0, outDesc=outDesc@entry=0x2497550) at /mnt/data/playground/gpac/src/odf/odf_codec.c:381
#1 0x00000000009d2a3f in gf_isom_set_extraction_slc (the_file=the_file@entry=0x248c220, trackNumber=trackNumber@entry=0x6, StreamDescriptionIndex=StreamDescriptionIndex@entry=0x1, slConfig=slConfig@entry=0x7fffffff6ae0) at /mnt/data/playground/gpac/src/isomedia/isom_write.c:5468
#2 0x0000000000ce75ff in gf_hinter_finalize (file=file@entry=0x248c220, IOD_Profile=<optimized out>, bandwidth=bandwidth@entry=0x231) at /mnt/data/playground/gpac/src/media_tools/isom_hinter.c:1245
#3 0x000000000043c218 in HintFile (file=0x248c220, MTUSize=MTUSize@entry=0x59e, max_ptime=0x0, rtp_rate=0x0, base_flags=<optimized out>, copy_data=GF_FALSE, interleave=GF_FALSE, regular_iod=GF_FALSE, single_group=GF_FALSE, hint_no_offset=GF_FALSE) at /mnt/data/playground/gpac/applications/mp4box/main.c:3550
#4 0x000000000044bd42 in mp4boxMain (argc=<optimized out>, argv=<optimized out>) at /mnt/data/playground/gpac/applications/mp4box/main.c:6329
#5 0x0000000001f06bb6 in generic_start_main ()
#6 0x0000000001f071a5 in __libc_start_main ()
#7 0x000000000041c4e9 in _start ()
~~~~
According to my observation, I think this may be caused by use after free issue. I also validate this bug with valgrind and get similar results.
~~~~
==22725== Use of uninitialised value of size 8
==22725== at 0xAEA2BE: free (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0x44DD29: gf_cfg_new (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0x457415: gf_cfg_init (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0x4575D8: gf_init_global_config (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0x43A6AB: gf_sys_init (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0x4109B7: mp4boxMain (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0xABC898: (below main) (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725==
==22725== Use of uninitialised value of size 8
==22725== at 0xAEA2CA: free (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0x44DD29: gf_cfg_new (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0x457415: gf_cfg_init (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0x4575D8: gf_init_global_config (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0x43A6AB: gf_sys_init (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0x4109B7: mp4boxMain (in /playground/gpac/build-o/bin/gcc/MP4Box)
==22725== by 0xABC898: (below main) (in /playground/gpac/build-o/bin/gcc/MP4Box)
==26998== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==26998== Access not within mapped region at address 0x3E800B9BB8B
==26998== at 0xB24FBE: __memcpy_avx_unaligned_erms (in /playground/gpac/build-o/bin/gcc/MP4Box)
==26998== by 0x441E31: gf_bs_write_data (in /playground/gpac/build-o/bin/gcc/MP4Box)
==26998== by 0x59FDE1: gf_odf_write_default (in /playground/gpac/build-o/bin/gcc/MP4Box)
==26998== by 0x5A1005: gf_odf_desc_write (in /playground/gpac/build-o/bin/gcc/MP4Box)
==26998== by 0x5A10E8: gf_odf_desc_copy (in /playground/gpac/build-o/bin/gcc/MP4Box)
==26998== by 0x566F22: gf_isom_set_extraction_slc (in /playground/gpac/build-o/bin/gcc/MP4Box)
==26998== by 0x62C2A7: gf_hinter_finalize (in /playground/gpac/build-o/bin/gcc/MP4Box)
==26998== by 0x40FDE7: HintFile (in /playground/gpac/build-o/bin/gcc/MP4Box)
==26998== by 0x4156E9: mp4boxMain (in /playground/gpac/build-o/bin/gcc/MP4Box)
==26998== by 0xABC898: (below main) (in /playground/gpac/build-o/bin/gcc/MP4Box)
~~~~ | Segmentation fault using mp4box in gf_odf_desc_copy, odf_codec.c:381 | https://api.github.com/repos/gpac/gpac/issues/1888/comments | 1 | 2021-08-24T11:02:00Z | 2021-08-30T15:34:34Z | https://github.com/gpac/gpac/issues/1888 | 977,975,107 | 1,888 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by null pointer dereference in mpgviddmx_process, reframe_mpgvid.c:851 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7037550/mp4box-npd_mpgviddmx_process851.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
Stopped reason: SIGSEGV
gefβ€ bt
#0 0x0000000000cf5a9b in memcpy ()
#1 0x00000000008a24a7 in mpgviddmx_process (filter=0x124cbd0) at /mnt/data/playground/gpac/src/filters/reframe_mpgvid.c:851
#2 0x00000000007480a0 in gf_filter_process_task (task=0x123a0e0) at /mnt/data/playground/gpac/src/filter_core/filter.c:2441
#3 0x000000000073798c in gf_fs_thread_proc (sess_thread=0x12382b0) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1640
#4 0x0000000000738305 in gf_fs_run (fsess=0x1238220) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1877
#5 0x00000000006571ea in gf_media_import (importer=0x7fffffff5c20) at /mnt/data/playground/gpac/src/media_tools/media_import.c:1178
#6 0x000000000042cdf9 in convert_file_info (inName=0x7fffffffe163 "tmp", trackID=0x0) at /mnt/data/playground/gpac/applications/mp4box/fileimport.c:128
#7 0x00000000004168c3 in mp4boxMain (argc=0x3, argv=0x7fffffffdde8) at /mnt/data/playground/gpac/applications/mp4box/main.c:5925
#8 0x0000000000418d6b in main (argc=0x3, argv=0x7fffffffdde8) at /mnt/data/playground/gpac/applications/mp4box/main.c:6455
#9 0x0000000000caaa06 in generic_start_main ()
#10 0x0000000000caaff5 in __libc_start_main ()
#11 0x0000000000403f39 in _start ()
~~~~
The reason for this bug is that the program does not check the nullity of the pointer before copy memory to it.
<img width="1324" alt="image" src="https://user-images.githubusercontent.com/7632714/130580112-09339006-e245-4ade-8697-da5e6fab037d.png">
| Segmentation fault casued by heap use after free using mp4box in mpgviddmx_process, reframe_mpgvid.c:851 | https://api.github.com/repos/gpac/gpac/issues/1887/comments | 2 | 2021-08-24T08:04:48Z | 2021-08-30T15:33:43Z | https://github.com/gpac/gpac/issues/1887 | 977,822,133 | 1,887 |
[
"gpac",
"gpac"
] | - [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 ...).
Hi, there.
There is a segmentation fault caused by null pointer dereference in naludmx_parse_nal_avc, reframe_nalu.c:2474 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[poc.zip](https://github.com/gpac/gpac/files/7037176/mp4box-npd_naludmx_parse_nal_avc2474.zip)
(unzip first)
Here is the trace reported by gdb:
~~~~
#0 0x00000000008ac435 in naludmx_parse_nal_avc (ctx=0x1259a80, data=0x1239f73 "tr\372!", size=0xe, nal_type=0x14, skip_nal=0x7fffffff4fc4, is_slice=0x7fffffff4fd0, is_islice=0x7fffffff4fd4) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2474
#1 0x00000000008ad7d3 in naludmx_process (filter=0x124cbe0) at /mnt/data/playground/gpac/src/filters/reframe_nalu.c:2874
#2 0x00000000007480a0 in gf_filter_process_task (task=0x123eee0) at /mnt/data/playground/gpac/src/filter_core/filter.c:2441
#3 0x000000000073798c in gf_fs_thread_proc (sess_thread=0x12382e0) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1640
#4 0x0000000000738305 in gf_fs_run (fsess=0x1238250) at /mnt/data/playground/gpac/src/filter_core/filter_session.c:1877
#5 0x00000000006571ea in gf_media_import (importer=0x7fffffff5bf0) at /mnt/data/playground/gpac/src/media_tools/media_import.c:1178
#6 0x000000000042cdf9 in convert_file_info (inName=0x7fffffffe163 "tmp", trackID=0x0) at /mnt/data/playground/gpac/applications/mp4box/fileimport.c:128
#7 0x00000000004168c3 in mp4boxMain (argc=0x7, argv=0x7fffffffddb8) at /mnt/data/playground/gpac/applications/mp4box/main.c:5925
#8 0x0000000000418d6b in main (argc=0x7, argv=0x7fffffffddb8) at /mnt/data/playground/gpac/applications/mp4box/main.c:6455
#9 0x0000000000caaa06 in generic_start_main ()
#10 0x0000000000caaff5 in __libc_start_main ()
#11 0x0000000000403f39 in _start ()
~~~~
| Segmentation fault casued by null pointer dereference using mp4box in naludmx_parse_nal_avc, reframe_nalu.c:2474 | https://api.github.com/repos/gpac/gpac/issues/1886/comments | 1 | 2021-08-24T07:11:15Z | 2021-08-24T16:27:29Z | https://github.com/gpac/gpac/issues/1886 | 977,781,016 | 1,886 |
[
"gpac",
"gpac"
] | - [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 ...).
It's a memcpy from unknown addrees bug.
Step to reproduce:
1.get latest commit code (GPAC version 1.1.0-DEV-rev1170-g592ba2689-master)
2.compile with --enable-sanitizer
3.run ./MP4BOX -hint poc_isom_hinter -out /dev/null
Env:
Ubunut 20.04 , clang 12.0.1
ASAN report
```
=================================================================
==194694==ERROR: AddressSanitizer: unknown-crash on address 0x03e8ef58ac20 at pc 0x0000004a3cd7 bp 0x7ffdef589370 sp 0x7ffdef588b38
READ of size 24912 at 0x03e8ef58ac20 thread T0
#0 0x4a3cd6 in __asan_memcpy (/home/lly/pro/gpac_public/bin/gcc/MP4Box+0x4a3cd6)
#1 0x7f35556d80ef in gf_bs_write_data /home/lly/pro/gpac_public/src/utils/bitstream.c:1028:4
#2 0x7f3555da5a1a in gf_odf_write_default /home/lly/pro/gpac_public/src/odf/odf_code.c:1320:3
#3 0x7f3555da92ec in gf_odf_desc_write_bs /home/lly/pro/gpac_public/src/odf/odf_codec.c:325:6
#4 0x7f3555da92ec in gf_odf_desc_write /home/lly/pro/gpac_public/src/odf/odf_codec.c:343:6
#5 0x7f3555da9661 in gf_odf_desc_copy /home/lly/pro/gpac_public/src/odf/odf_codec.c:387:6
#6 0x7f3555cb8760 in gf_isom_set_extraction_slc /home/lly/pro/gpac_public/src/isomedia/isom_write.c:5468:9
#7 0x7f3555fa467b in gf_hinter_finalize /home/lly/pro/gpac_public/src/media_tools/isom_hinter.c:1245:5
#8 0x4e8d21 in HintFile /home/lly/pro/gpac_public/applications/mp4box/main.c:3550:2
#9 0x4f5988 in mp4boxMain /home/lly/pro/gpac_public/applications/mp4box/main.c:6329:7
#10 0x7f355476d0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#11 0x429a6d in _start (/home/lly/pro/gpac_public/bin/gcc/MP4Box+0x429a6d)
Address 0x03e8ef58ac20 is located in the high shadow area.
```
Buggy code
in bitstream.c:
```
u32 gf_bs_write_data(GF_BitStream *bs, const u8 *data, u32 nbBytes)
{
...
memcpy(bs->original + bs->position - bs->bytes_out, data, nbBytes); <---data is not inited
...
}
```
[poc.zip](https://github.com/gpac/gpac/files/7036109/poc.zip)
| Bug: Memcpy from unknown addrees in MP4BOX at src/utils/bitstream.c:1028 | https://api.github.com/repos/gpac/gpac/issues/1885/comments | 0 | 2021-08-24T02:45:45Z | 2021-08-30T15:33:43Z | https://github.com/gpac/gpac/issues/1885 | 977,647,480 | 1,885 |
[
"gpac",
"gpac"
] | - [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
Hi, there.
There is a segmentation fault caused by null pointer dereference in gf_isom_parse_movie_boxes_internal, isom_intern.c:628 in commit 592ba2689a3.
Here is my environment, compiler info and gpac version:
~~~~
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
gcc: 5.4.0
MP4Box - GPAC version 1.1.0-DEV-rev1170-g592ba26-master
(c) 2000-2021 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
MINI build (encoders, decoders, audio and video output disabled)
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: --static-bin --enable-debug
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_DISABLE_3D
~~~~
To reproduce, run
~~~~
./MP4Box -info poc
~~~~
POC:
[link](https://www.mediafire.com/file/hscjpree353c8ai/mp4box-npd_gf_isom_parse_movie_boxes_internal628.zip/file) to dropbox
(unzip first)
Here is the trace reported by gdb:
~~~~
#0 0x00000000005a04ae in gf_isom_parse_movie_boxes_internal (mov=0x1238220, boxType=0x0, bytesMissing=0x7fffffff9318, progressive_mode=GF_FALSE) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:628
#1 0x00000000005a0c01 in gf_isom_parse_movie_boxes (mov=0x1238220, boxType=0x0, bytesMissing=0x7fffffff9318, progressive_mode=GF_FALSE) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:781
#2 0x00000000005a0f98 in gf_isom_open_file (fileName=0x7fffffffe0f0 "poc", OpenMode=GF_ISOM_OPEN_READ_DUMP, tmp_dir=0x0) at /mnt/data/playground/gpac/src/isomedia/isom_intern.c:901
#3 0x00000000005a3e83 in gf_isom_open (fileName=0x7fffffffe0f0 "poc", OpenMode=GF_ISOM_OPEN_READ_DUMP, tmp_dir=0x0) at /mnt/data/playground/gpac/src/isomedia/isom_read.c:509
#4 0x00000000004164d3 in mp4boxMain (argc=0x3, argv=0x7fffffffdd78) at /mnt/data/playground/gpac/applications/mp4box/main.c:5841
#5 0x0000000000418d6b in main (argc=0x3, argv=0x7fffffffdd78) at /mnt/data/playground/gpac/applications/mp4box/main.c:6455
#6 0x0000000000caaa06 in generic_start_main ()
#7 0x0000000000caaff5 in __libc_start_main ()
#8 0x0000000000403f39 in _start ()
~~~~
| Segmentation fault casued by null pointer dereference using mp4box in gf_isom_parse_movie_boxes_internal, isom_intern.c:628 | https://api.github.com/repos/gpac/gpac/issues/1884/comments | 0 | 2021-08-23T06:38:47Z | 2021-08-24T16:26:49Z | https://github.com/gpac/gpac/issues/1884 | 976,685,603 | 1,884 |
[
"gpac",
"gpac"
] | - [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 ...).
It's a pointer free on unknown addrees bug caused by freeing a uninitialized pointer.
Step to reproduce:
1.get latest commit code (GPAC version 1.1.0-DEV-rev1170-g592ba26-master)
2.compile with --enable-sanitizer
3.run ./MP4BOX -hint poc_isom_hinter -out /dev/null
Env:
Ubunut 20.04 , clang 10.0.0
ASAN report
```
==40495==ERROR: AddressSanitizer: SEGV on unknown address 0x7f0eebe5ccf8 (pc 0x7f0eef8765fc bp 0x7f0eebe5ccf8 sp 0x7ffecbe40880 T0)
#0 0x7f0eef8765fb (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x215fb)
#1 0x7f0eef8ed29d in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9829d)
#2 0x7f0eed579cb9 in gf_hinter_track_finalize media_tools/isom_hinter.c:956
#3 0x42842d in HintFile /home/lly/gpac_public/applications/mp4box/main.c:3533
#4 0x42e4e4 in mp4boxMain /home/lly/gpac_public/applications/mp4box/main.c:6329
#5 0x7f0eead8983f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f)
#6 0x413bc8 in _start (/home/lly/gpac_public/bin/gcc/MP4Box+0x413bc8)
```
Buggy code and reason:
in isom_hinter.c:950
```
for (i=0; i<gf_isom_get_sample_description_count(tkHint->file, tkHint->TrackNum); i++) {
u8 *tx3g; <---with out init
...
gf_isom_text_get_encoded_tx3g(..., &tx3g, &tx3g_len); <--- supposed to init tx3g
...
gf_free(tx3g); <--- free tx3g
...
}
```
It is supposed to init tx3g in gf_isom_text_get_encoded_tx3g, but in gf_isom_text_get_encoded_tx3g, it might forget that mission.
```
GF_Err gf_isom_text_get_encoded_tx3g(GF_ISOFile *file, u32 track, u32 sidx, u32 sidx_offset, u8 **tx3g, u32 *tx3g_size)
{
...
// it returns without init tx3g once a->type equals another value;
if ((a->type != GF_ISOM_BOX_TYPE_TX3G) && (a->type != GF_ISOM_BOX_TYPE_TEXT)) return GF_BAD_PARAM;
...
*tx3g = NULL; <--- real init here
*tx3g_size = 0;
gf_bs_get_content(bs, tx3g, tx3g_size);
gf_bs_del(bs);
return GF_OK;
}
```
[poc_isom_hinter.zip](https://github.com/gpac/gpac/files/7019247/poc_isom_hinter.zip)
| BUG : free on unknown addrees in MP4BOX at gf_hinter_track_finalize media_tools/isom_hinter.c:956 | https://api.github.com/repos/gpac/gpac/issues/1883/comments | 0 | 2021-08-20T05:15:45Z | 2021-08-30T15:33:43Z | https://github.com/gpac/gpac/issues/1883 | 975,274,297 | 1,883 |
[
"gpac",
"gpac"
] |
```
MP4Box -splits 20176 aa.mp4
```
aa_001.mp4
aa_002.mp4
how to output
aa001.mp4
aa002.mp4
| MP4Box Split video formatted output | https://api.github.com/repos/gpac/gpac/issues/1882/comments | 5 | 2021-08-19T11:35:11Z | 2021-09-07T07:36:52Z | https://github.com/gpac/gpac/issues/1882 | 974,568,996 | 1,882 |
[
"gpac",
"gpac"
] | It's a heap-buffer-overflow bug caused by missing '\0' check of the end of URI.
Step to reproduce:
```
1.get latest commit code (MP4Box - GPAC version 1.1.0-DEV-rev1169-gbbd741e-master)
2.compile with sanitizer
./configure --enable-sanitizer
make
3.run ./MP4BOX -hint poc -out /dev/null
```
Env:
Ubunut 20.04 , clang 10.0.0
ASAN report
```
==1622396==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61f00000601b at pc 0x7fedb9f66fbf bp 0x7fff337013a0 sp 0x7fff33701390
READ of size 1 at 0x61f00000601b thread T0
#0 0x7fedb9f66fbe in gp_rtp_builder_do_mpeg12_video ietf/rtp_pck_mpeg12.c:160
#1 0x7fedba84857b in gf_hinter_track_process media_tools/isom_hinter.c:808
#2 0x563ebe335eb7 in HintFile /home/lly/pro/gpac_public/applications/mp4box/main.c:3531
#3 0x563ebe341eec in mp4boxMain /home/lly/pro/gpac_public/applications/mp4box/main.c:6329
#4 0x7fedb94800b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
#5 0x563ebe308bdd in _start (/home/lly/pro/gpac_public/bin/gcc/MP4Box+0x4abdd)
0x61f00000601b is located 0 bytes to the right of 2971-byte region [0x61f000005480,0x61f00000601b)
allocated by thread T0 here:
#0 0x7fedbc59cbc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8)
#1 0x7fedba331c30 in Media_GetSample isomedia/media.c:617
SUMMARY: AddressSanitizer: heap-buffer-overflow ietf/rtp_pck_mpeg12.c:160 in gp_rtp_builder_do_mpeg12_video
Shadow bytes around the buggy address:
0x0c3e7fff8bb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3e7fff8bc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3e7fff8bd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3e7fff8be0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3e7fff8bf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c3e7fff8c00: 00 00 00[03]fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3e7fff8c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3e7fff8c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3e7fff8c30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3e7fff8c40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3e7fff8c50: 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
Freed heap region: fd
Stack left redzone: f1
```
[poc.zip](https://github.com/gpac/gpac/files/7012523/poc.zip)
| Bug: heap-buffer-overflow in gp_rtp_builder_do_mpeg12_video | https://api.github.com/repos/gpac/gpac/issues/1881/comments | 2 | 2021-08-19T07:29:43Z | 2021-08-20T01:45:24Z | https://github.com/gpac/gpac/issues/1881 | 974,361,039 | 1,881 |
[
"gpac",
"gpac"
] | 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/
Hi GPAC Devs,
I followed the official wiki guidance and setup a hevc tiling live streaming on a linux server, building latest gpac main branch code and ffmpeg with libkvazaar.
Everything works fine when the input stream res is 1920x960. But when I change the stream res to 3840x1920, I can not get the output dash stream to play. The gpac player (windows based) continues to pop error infos like this:
**[DASH] Error in downloading new segment http://192.168.1.213:8070/stream/liveTest4K/live_dash_track1_20.m4s: Requested URL is not valid or cannot be found**.
Would you guys kindly help me out of this?
Thank you very much.
**Hardware env:**
On-line CPU(s) list: 0-63
Intel Core Processor (Broadwell, no TSX, IBRS)
CPU MHzοΌ 2095.076
BogoMIPSοΌ 4190.15
KiB Mem : 65798908 total
**Command lines:**
gpac -i 'rtmp://192.168.1.171/live' \
ffsws:FID=S \
-+kvazaar-params=tiles=8x4,slices=tiles,preset=ultrafast,bipred=0,mv-constraint=frametilemargin,rc-algorithm=lambda \
enc:SID=S:c=libkvazaar:b=10m:rc @ tilesplit:FID=1 \
enc:SID=S:c=libkvazaar:b=1m:rc @ tilesplit:FID=2 \
-o /home/web/data/stream/liveTest4K/live.mpd:SID=1,2:dmode=dynamic
**And the output:**
No filter chain found for PID audio1 in filter ffdmx to any loaded filters - NOT CONNECTED
Disabling TMVP because tiles are used.
Disabling WPP because tiles were enabled.
Using preset ultrafast: --rd=0 --pu-depth-intra=2-3 --pu-depth-inter=1-2 --me=hexbs --gop=8 --ref=1 --bipred=1 --deblock=0:0 --signhide=0 --subme=0 --sao=off --rdoq=0 --rdoq-skip=0 --transform-skip=0 --mv-rdo=0 --full-intra-search=0 --smp=0 --amp=0 --cu-split-termination=zero --me-early-termination=sensitive --intra-rdo-et=0 --early-skip=1 --fast-residual-cost=28 --max-merge=5
Compiled: INTEL, flags: MMX SSE SSE2
Detected: INTEL, flags: MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX AVX2
Available: avx(11) avx2(54) sse2(2) sse41(4)
In use: avx(1) avx2(54)
--owf=auto value set to 2.
--threads=auto value set to 32.
Disabling TMVP because tiles are used.
Disabling WPP because tiles were enabled.
Using preset ultrafast: --rd=0 --pu-depth-intra=2-3 --pu-depth-inter=1-2 --me=hexbs --gop=8 --ref=1 --bipred=1 --deblock=0:0 --signhide=0 --subme=0 --sao=off --rdoq=0 --rdoq-skip=0 --transform-skip=0 --mv-rdo=0 --full-intra-search=0 --smp=0 --amp=0 --cu-split-termination=zero --me-early-termination=sensitive --intra-rdo-et=0 --early-skip=1 --fast-residual-cost=28 --max-merge=5
Compiled: INTEL, flags: MMX SSE SSE2
Detected: INTEL, flags: MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX AVX2
Available: avx(22) avx2(108) sse2(4) sse41(8)
In use: avx(2) avx2(108)
--owf=auto value set to 2.
--threads=auto value set to 32.
Disabling TMVP because tiles are used.
Disabling WPP because tiles were enabled.
Using preset ultrafast: --rd=0 --pu-depth-intra=2-3 --pu-depth-inter=1-2 --me=hexbs --gop=8 --ref=1 --bipred=1 --deblock=0:0 --signhide=0 --subme=0 --sao=off --rdoq=0 --rdoq-skip=0 --transform-skip=0 --mv-rdo=0 --full-intra-search=0 --smp=0 --amp=0 --cu-split-termination=zero --me-early-termination=sensitive --intra-rdo-et=0 --early-skip=1 --fast-residual-cost=28 --max-merge=5
Compiled: INTEL, flags: MMX SSE SSE2
Detected: INTEL, flags: MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX AVX2
Available: avx(33) avx2(162) sse2(6) sse41(12)
In use: avx(3) avx2(162)
--owf=auto value set to 2.
--threads=auto value set to 32.
Disabling TMVP because tiles are used.
Disabling WPP because tiles were enabled.
Using preset ultrafast: --rd=0 --pu-depth-intra=2-3 --pu-depth-inter=1-2 --me=hexbs --gop=8 --ref=1 --bipred=1 --deblock=0:0 --signhide=0 --subme=0 --sao=off --rdoq=0 --rdoq-skip=0 --transform-skip=0 --mv-rdo=0 --full-intra-search=0 --smp=0 --amp=0 --cu-split-termination=zero --me-early-termination=sensitive --intra-rdo-et=0 --early-skip=1 --fast-residual-cost=28 --max-merge=5
Compiled: INTEL, flags: MMX SSE SSE2
Detected: INTEL, flags: MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX AVX2
Available: avx(44) avx2(216) sse2(8) sse41(16)
In use: avx(4) avx2(216)
--owf=auto value set to 2.
--threads=auto value set to 32.
[Dasher] AS-1 Rep 1 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 3 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 35 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 4 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 36 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 5 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 37 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 6 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 38 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 7 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 39 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 8 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 40 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 9 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 41 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 10 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 42 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 11 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 43 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 12 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 44 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 13 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 45 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 14 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 46 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 15 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 47 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 16 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 48 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 17 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 49 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 18 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 50 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 19 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 51 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 20 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 52 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 21 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 53 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 22 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 54 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 23 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 55 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 24 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 56 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 25 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 57 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 26 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 58 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 27 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 59 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 28 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 60 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 29 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 61 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 30 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 62 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 31 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 63 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 32 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 64 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 33 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 65 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 34 segment 1 done TOO LATE by 907 ms
[Dasher] AS-1 Rep 66 segment 1 done TOO LATE by 907 ms
[MP4Mux] PID video1_tile1 ID 3 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile2 ID 4 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile3 ID 5 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile4 ID 6 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile5 ID 7 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile6 ID 8 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile7 ID 9 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile8 ID 10 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile9 ID 11 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile10 ID 12 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile11 ID 13 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile12 ID 14 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile13 ID 15 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile14 ID 16 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile15 ID 17 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile16 ID 18 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile17 ID 19 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile18 ID 20 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile19 ID 21 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile20 ID 22 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile21 ID 23 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile22 ID 24 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile23 ID 25 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile24 ID 26 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile25 ID 27 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile26 ID 28 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile27 ID 29 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile28 ID 30 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile29 ID 31 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile30 ID 32 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile31 ID 33 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile32 ID 34 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1 ID 2 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile1 ID 3 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile2 ID 4 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile3 ID 5 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile4 ID 6 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile5 ID 7 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile6 ID 8 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile7 ID 9 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile8 ID 10 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile9 ID 11 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile10 ID 12 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile11 ID 13 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile12 ID 14 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile13 ID 15 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile14 ID 16 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile15 ID 17 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile16 ID 18 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile17 ID 19 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile18 ID 20 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile19 ID 21 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile20 ID 22 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile21 ID 23 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile22 ID 24 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile23 ID 25 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile24 ID 26 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile25 ID 27 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile26 ID 28 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile27 ID 29 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile28 ID 30 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile29 ID 31 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile30 ID 32 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile31 ID 33 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration
[MP4Mux] PID video1_tile32 ID 34 Sample 31 with DTS 1000 less than previous sample DTS 1000, adjusting prev sample duration | GPAC hevc-tiling live streaming setup not support 4K or above | https://api.github.com/repos/gpac/gpac/issues/1880/comments | 3 | 2021-08-19T06:42:49Z | 2022-01-14T09:52:52Z | https://github.com/gpac/gpac/issues/1880 | 974,327,202 | 1,880 |
[
"gpac",
"gpac"
] | - [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 ...).
It's a heap-buffer-overflow bug caused by missing '\0' check of the end of URI.
**Step to reproduce:**
1.get latest commit code (MP4Box - GPAC version 1.1.0-DEV-rev1169-gbbd741e-master)
2.compile with --enable-sanitizer
3.run ./MP4BOX -hint poc -out /dev/null
**Env:**
Ubunut 20.04 , clang 10.0.0
**ASAN report**
```
==789683==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x604000000bb7 at pc 0x7f277ca50a6d bp 0x7ffd14f790b0 sp 0x7ffd14f78858
READ of size 40 at 0x604000000bb7 thread T0
#0 0x7f277ca50a6c (/lib/x86_64-linux-gnu/libasan.so.5+0x67a6c)
#1 0x7f277a6d0ece in schm_box_size isomedia/box_code_drm.c:179
#2 0x7f277a7569f1 in gf_isom_box_size_listing isomedia/box_funcs.c:1903
#3 0x7f277a7569f1 in gf_isom_box_size isomedia/box_funcs.c:1915
#4 0x7f277a805c14 in WriteInterleaved isomedia/isom_store.c:1870
#5 0x7f277a8086d3 in WriteToFile isomedia/isom_store.c:2527
#6 0x7f277a7a73d9 in gf_isom_write isomedia/isom_read.c:600
#7 0x7f277a7a778f in gf_isom_close isomedia/isom_read.c:624
#8 0x562161c082db in mp4boxMain /home/lly/pro/gpac_public/applications/mp4box/main.c:6401
#9 0x7f27799da0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
#10 0x562161bd2bdd in _start (/home/lly/pro/gpac_public/bin/gcc/MP4Box+0x4abdd)
0x604000000bb7 is located 0 bytes to the right of 39-byte region [0x604000000b90,0x604000000bb7)
allocated by thread T0 here:
#0 0x7f277caf6bc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8)
#1 0x7f277a6d08b7 in schm_box_read isomedia/box_code_drm.c:148
SUMMARY: AddressSanitizer: heap-buffer-overflow (/lib/x86_64-linux-gnu/libasan.so.5+0x67a6c)
Shadow bytes around the buggy address:
0x0c087fff8120: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff8130: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff8140: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 01
0x0c087fff8150: fa fa 00 00 00 00 04 fa fa fa 00 00 00 00 05 fa
0x0c087fff8160: fa fa 00 00 00 00 00 06 fa fa 00 00 00 00 02 fa
=>0x0c087fff8170: fa fa 00 00 00 00[07]fa fa fa 00 00 00 00 00 00
0x0c087fff8180: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00
0x0c087fff8190: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c087fff81a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c087fff81b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c087fff81c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
```
**Buggy code and reason:**
```
GF_Err schm_box_size(GF_Box *s)
{
GF_SchemeTypeBox *ptr = (GF_SchemeTypeBox *) s;
if (!s) return GF_BAD_PARAM;
ptr->size += 8;
if (ptr->flags & 0x000001) ptr->size += 1 + (ptr->URI ? strlen(ptr->URI) : 0); <---strlen overflow once URI does not end with '\0'
return GF_OK;
}
```
[poc.zip](https://github.com/gpac/gpac/files/7011391/poc.zip)
| BUG: heap-buffer-overflow in MP4Box at src/isomedia/schm_box_size:179 | https://api.github.com/repos/gpac/gpac/issues/1879/comments | 0 | 2021-08-19T02:52:37Z | 2021-08-30T15:33:42Z | https://github.com/gpac/gpac/issues/1879 | 974,213,413 | 1,879 |
[
"gpac",
"gpac"
] |
- [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 ...).
Trying to build **gpac** from source under Ubuntu 20.04 . Failed while installation:
```console
(Reading database ... 584705 files and directories currently installed.)
Preparing to unpack .../gpac/gpac_1.1.0-6_amd64.deb ...
Unpacking gpac (1.1.0-6) over (1.1.0-6) ...
dpkg: dependency problems prevent configuration of gpac:
gpac depends on sdl; however:
Package sdl is not installed.
dpkg: error processing package gpac (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
gpac
```
| SDL2 support instead of SDL ... | https://api.github.com/repos/gpac/gpac/issues/1877/comments | 2 | 2021-08-16T20:23:22Z | 2021-09-09T16:32:36Z | https://github.com/gpac/gpac/issues/1877 | 972,073,630 | 1,877 |
[
"gpac",
"gpac"
] | Hi. There is an infinite loop bug in MP4Box. to reproduce, follow the command below with the attachment file.
```
./MP4Box -nhnt 1 hang_file -out /dev/nul
```
[hang_file.zip](https://github.com/gpac/gpac/files/6991064/hang_file.zip)
Credit : ADLab of Venustech | Infinite Loop in MP4Box | https://api.github.com/repos/gpac/gpac/issues/1876/comments | 0 | 2021-08-16T09:08:59Z | 2021-08-30T15:33:42Z | https://github.com/gpac/gpac/issues/1876 | 971,526,752 | 1,876 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [ ] I looked for a similar issue and couldn't find any.
- [ ] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ ] 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/
Hello, I am using gpac with kvazaar to live stream. Although it seems like a problem from kvazaar. However, I would like to seek for support from you. I hope that you guys can collaborate.
https://github.com/ultravideo/kvazaar/issues/307#issue-970080319
Thank you very much. | Live streaming with kvazaar - Low quality | https://api.github.com/repos/gpac/gpac/issues/1875/comments | 21 | 2021-08-13T06:19:22Z | 2021-09-13T09:52:35Z | https://github.com/gpac/gpac/issues/1875 | 970,098,729 | 1,875 |
[
"gpac",
"gpac"
] | 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
We played the following video with GPAC Android official APK, and found some issue.
[https://drive.google.com/file/d/1tprzU_k0bMbkPfum7SkPsSaddnTlm1sp/view?usp=sharing](https://drive.google.com/file/d/1tprzU_k0bMbkPfum7SkPsSaddnTlm1sp/view?usp=sharing)
The video would get stuck at about 15s. But it worked fine with Windows exe. | There is a issue when playing this video | https://api.github.com/repos/gpac/gpac/issues/1874/comments | 2 | 2021-08-09T08:14:16Z | 2022-01-05T17:00:36Z | https://github.com/gpac/gpac/issues/1874 | 963,751,859 | 1,874 |
[
"gpac",
"gpac"
] | ### Files
Archive of the files used for this issue: https://www.mediafire.com/file/laq9u10c8jdgecx/tiled_playback_error.zip/file
It contains:
- cnpp.mp4, the video file used as input
- the logs of the player and the encoder sessions
### How to reproduce
Server Side:
```
gpac \
-+kvazaar-params=input-res=256x128,preset=ultrafast,tiles=2x2,slices=tiles,mv-constraint=frametilemargin,\
input-format=P420,qp=16,rc-algorithm=lambda,input-fps=30,gop=0\
erp-aqp=true \
-i cnpp.mp4:FID=I reframer:rt=on:SID=I:FID=R \
ffsws:SID=R:FID=Y:osize=256x128:ofmt=yuv420 \
enc:SID=Y:FID=K1:c=libkvazaar:b=20M:size=256x128:fintra=1:rc \
tilesplit:SID=K1:FID=1 \
-o http://localhost:8080/live.mpd:gpac:dmode\=dynamic:segdur\=4:cdur\=2:asto\=2:llhls\=br:profile\=live:sbound\="closest":rdirs\=outdir:template\=seg_live_:SID\=1 \
-graph -lu -stats -logs=all@info -log-file=file_to_tiles_server.log
```
Client Side:
`gpac -i http://localhost:8080/live.mpd dashin:tile_mode=center tileagg ohevcdec vout -graph -logs=all@info -lu --skip_lqt -log-file=file_to_tiles_player.log`
### Observed behaviour
The playback is choppy. Every N seconds, the playback stops, I see the segments being downloaded in the terminal, and starts again. This behaviour is only observed in tiled mode, when the tiling parameters are removed from the encoder (tilesplit acting then as a pass-through) and from the client, everything plays smoothly.
The encoder seems to run perfectly, however it displays warnings like this:
```
UTC 2021-08-08T19:15:12Z (TS 1628450112654) - [Dasher] AS-1 Rep 1 segment 3 done TOO LATE by 1000 ms
UTC 2021-08-08T19:15:12Z (TS 1628450112654) - [Dasher] AS-1 Rep 2 segment 3 done TOO LATE by 1000 ms
UTC 2021-08-08T19:15:12Z (TS 1628450112654) - [Dasher] AS-1 Rep 3 segment 3 done TOO LATE by 1000 ms
UTC 2021-08-08T19:15:12Z (TS 1628450112654) - [Dasher] AS-1 Rep 4 segment 3 done TOO LATE by 1000 ms
UTC 2021-08-08T19:15:12Z (TS 1628450112654) - [Dasher] AS-1 Rep 5 segment 3 done TOO LATE by 1000 ms
```
When the same configuration is ran with tiling disabled, the same warning appears (though only once since there is only one representation), though it seems to have no impact on the playback.
I have tried also by disabling the lowlatency mode on the player and encoder side, the playback is still choppy.
### Configuration
OS: Ubuntu 20.04
Version: f42841f7105433023fcbdace975713873474ac95 compiled in release
---
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/
| Choppy playback with live tiled DASH | https://api.github.com/repos/gpac/gpac/issues/1873/comments | 6 | 2021-08-08T19:28:03Z | 2021-09-07T14:09:50Z | https://github.com/gpac/gpac/issues/1873 | 963,499,394 | 1,873 |
[
"gpac",
"gpac"
] | How to DASH a mp4 video to HEVC tile-based dash Like this video:
[http://download.tsi.telecom-paristech.fr/gpac/SRD/srd_hevc/multi_rate_p60/](http://download.tsi.telecom-paristech.fr/gpac/SRD/srd_hevc/multi_rate_p60/)
The video we converted is different from this video. We need to stay the same with it absolutely, please tell me the command with the specific parameters, Thanks! | How to DASH to this video | https://api.github.com/repos/gpac/gpac/issues/1872/comments | 1 | 2021-08-05T12:36:40Z | 2021-08-05T13:18:16Z | https://github.com/gpac/gpac/issues/1872 | 961,780,535 | 1,872 |
[
"gpac",
"gpac"
] | 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/
Hi,
I'm trying to use GPAC with python.
The process is a little tidious as the `libasan.so.5` has to be preloaded, even though I'm using the sanitizer option upon configurating it:
### Configuration // Compilation
I'm doing :
```sh
./configure --use-ffmpeg=local --enable-debug --prefix=/folder --bindir=/folder/bin --extra-cflags=-I/usr/local/cuda/include -I/folder/include --extra-ldflags=-L/usr/lib -L/usr/local/cuda/lib64 -L/folder/lib --enable-sanitizer
#compile
make -j$(nproc)
sudo make install
```
### Usage
1) Edit `/etc/ld.so.conf` and add `/folder/lib` , then `sudo ldconfig`
2.1) Find libasan :
```sh
echo 'void foo() {}' | gcc -x c -fPIC -shared -fsanitize=address -
ldd a.out | grep libasan.so | awk '{print $3}'
```
gives me : `/lib/x86_64-linux-gnu/libasan.so.5`
2.2) Preload it :
```sh
LD_PRELOAD="/lib/x86_64-linux-gnu/libasan.so.5" python3 test.py
```
test.py :
```python
import sys
sys.path.append("/folder/share/gpac/python")
import libgpac as gpac
gpac.init()
fs = gpac.FilterSession()
f1 = fs.load_src("/home/pierre/Documents/test.mp4")
f2 = fs.load("vout")
f3 = fs.load("aout")
fs.run()
```
I'm on ubuntu 20.04, running GPAC `1.1.0-DEV-rev1165-gccba035a1-master` .
This seems rather convoluted to get it to work no?
If I'm removing the flag `--enable-sanitizer` then gpac throws the error about the sanitizer:
```sh
==20499==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
```
If I don't add 2), then the python command throws that same error, :/ .
Or am I missing something in my config?
Best,
P | GPAC in Python usage steps | https://api.github.com/repos/gpac/gpac/issues/1871/comments | 8 | 2021-08-04T14:37:13Z | 2021-08-04T15:56:00Z | https://github.com/gpac/gpac/issues/1871 | 960,556,490 | 1,871 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.