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 https://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: https://gpac.io/bug-reporting/
----
I am testing muxing text subtitles to .mp4. It seems that forced subtitles work only in tx3g format (and correctly display in MPC-HC, VLC). I use the following commands:
"Timed Text (tx3g)" 3 .srt files
```
mp4box.exe -add "video.264#video:name=" -add "audio.aac#audio:group=1:name=" -add "srt/SUB1.srt:hdlr=text:txtflags=0xC0000000:group=2:lang=eng:name=" -add "srt/SUB2.srt:hdlr=text:group=2:disable:lang=ger:name=" -add "srt/SUB3.srt:hdlr=text:group=2:disable:lang=fre:name=" -itags reset -tmp tmp -new tx3g_from_3_srt.mp4
```
"WebVTT (wvtt)" 3 .vtt files
```
mp4box.exe -add "video.264#video:name=" -add "audio.aac#audio:group=1:name=" -add "vtt/SUB1.vtt:hdlr=text:txtflags=0xC0000000:group=2:lang=eng:name=" -add "vtt/SUB2.vtt:hdlr=text:group=2:disable:lang=ger:name=" -add "vtt/SUB3.vtt:hdlr=text:group=2:disable:lang=fre:name=" -itags reset -tmp tmp -new wvtt_from_3_vtt.mp4
```
MediaInfo:
```
Complete name : tx3g_from_3_srt.mp4
...
Text #1
ID : 3
Format : Timed Text
Codec ID : tx3g
Duration : 1 min 29 s
Bit rate mode : Variable
Bit rate : 30 b/s
Frame rate : 0.212 FPS
Stream size : 333 Bytes (0%)
Language : English
Default : Yes
Forced : Yes
Alternate group : 2
```
```
Complete name : wvtt_from_3_vtt.mp4
...
Text #1
ID : 3
Format : wvtt
Codec ID : wvtt
Duration : 1 min 29 s
Bit rate mode : Variable
Bit rate : 55 b/s
Frame rate : 0.201 FPS
Stream size : 617 Bytes (0%)
Language : English
Default : Yes
Forced : No
Alternate group : 2
```
I have posted the [detailed steps and test files here](https://github.com/zablockil/srt_vtt_mp4). `mp4/wvtt_from_3_vtt.mp4` file.
tested:
```
MP4Box - GPAC version 2.3-DEV-rev942-g11c9f998-master
MP4Box - GPAC version 2.3-DEV-rev911-g13a18c3f-master
```
| Is it possible to set forced subtitles WebVTT (wvtt) in .mp4? | https://api.github.com/repos/gpac/gpac/issues/2770/comments | 2 | 2024-03-02T16:06:57Z | 2024-03-26T13:12:30Z | https://github.com/gpac/gpac/issues/2770 | 2,164,871,353 | 2,770 |
[
"gpac",
"gpac"
] | Is there any way to organize better the output files for an hls+dash packing?
The output by default is a little bit messy:

Wouldn't it better to have a folder per track, and inside each folder the m3u8 of that track, and the main index.m3u8 and index.mpd in the root folder? | Organize output files for hls+dash | https://api.github.com/repos/gpac/gpac/issues/2769/comments | 13 | 2024-02-29T14:09:04Z | 2024-03-13T12:29:57Z | https://github.com/gpac/gpac/issues/2769 | 2,161,356,284 | 2,769 |
[
"gpac",
"gpac"
] | I am trying to validate whether this drm spec file is correct or missing anything.
I want it to work with CENC, Widevine, and Fairplay. However, I am a bit lost as I can't find a proper place that specifies the correct format to support all of them.
Thanks.
```
<?xml version="1.0" encoding="UTF-8"?>
<GPACDRM type="cenc">
<DRMInfo type="pssh" version="0">
<BS ID128="edef8ba979d64acea3c827dcd51d21ed"/>
<BS data="0x08011210"/>
<BS ID128="65df74e0ffc3e67ca557c9a1fc1bdef4"/>
</DRMInfo>
<DRMInfo type="pssh" version="1">
<BS ID128="1077efecc0b24d02ace33c1e52e2fb4b"/>
<BS bits="32" value="1"/>
<BS ID128="65df74e0ffc3e67ca557c9a1fc1bdef4"/>
</DRMInfo>
<CrypTrack trackID="0" IsEncrypted="1" IV_size="16" first_IV="0xfc75643f822d0645806dc4e58457c042" saiSavedBox="senc">
<key KID="0x65df74e0ffc3e67ca557c9a1fc1bdef4" value="0x044c8826d32432a41586673cc1c05bcb"/>
</CrypTrack>
</GPACDRM>
``` | Trying to validate this drm spec file | https://api.github.com/repos/gpac/gpac/issues/2768/comments | 1 | 2024-02-28T19:32:13Z | 2024-07-23T10:28:10Z | https://github.com/gpac/gpac/issues/2768 | 2,159,696,864 | 2,768 |
[
"gpac",
"gpac"
] | Hello, I am a graduate student specializing in static analysis of programs. Recently, while using a static analysis tool to detect issues in open-source projects, I found several defects in the project. The description of the defects can be found at the following link:
https://github.com/yinluming13579/gpac_defects/blob/main/gpac_1.md
https://github.com/yinluming13579/gpac_defects/blob/main/gpac_2.md
https://github.com/yinluming13579/gpac_defects/blob/main/gpac_3.md | bug report | https://api.github.com/repos/gpac/gpac/issues/2767/comments | 1 | 2024-02-28T08:07:30Z | 2024-03-26T13:16:11Z | https://github.com/gpac/gpac/issues/2767 | 2,158,353,764 | 2,767 |
[
"gpac",
"gpac"
] | Hi, I got this error when trying to run `MP4Box -raws 3 output.3gp` to extract sample on track 3 of my video file.
```
Filters not connected:
fout (dst=output_track3_$num%03d$:dynext) (idx=1)
writegen (frame) (idx=2)
reframer (SID=1#PID=3:exporter) (idx=3)
```
The message makes no sense to me.
I build MP4Box myself on RHEL9 and I tried both master branch and latest release (tag v2.2.1). Both of them returned the same message.
The track 3 info of my video file.
```
# Track 3 Info - ID 3 - TimeScale 90000
Media Duration 00:00:15.041
Track is present in Root OD
Track flags: Enabled In Movie In Preview
Media Samples: 361 - CFR 24/sec
1 UDTA types:
hnti:
Media Type: hint:rtp
Streaming Hint Track for track ID 1
RFC6381 Codec Parameters: rtp
All samples are sync
Max sample duration: 3750 / 90000
```
| MP4Box -raws doesn't work on RTP track - "Filters not connected:" | https://api.github.com/repos/gpac/gpac/issues/2766/comments | 2 | 2024-02-28T02:55:00Z | 2024-02-29T13:47:58Z | https://github.com/gpac/gpac/issues/2766 | 2,157,984,108 | 2,766 |
[
"gpac",
"gpac"
] | # Description
```
Out of write in swf_get_string at scene_manager/swf_parse.c:325
```
# Version
```
git log
commit 422b78ecf79ceeee97104d219cc4f184b1348cec (HEAD -> master, origin/master, origin/HEAD)
Author: Aurelien David <aurelien.david@telecom-paristech.fr>
Date: Mon Feb 26 10:53:25 2024 +0100
./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev921-g422b78ecf-master
```
# Asan log
```
./MP4Box -info test2.dat
SWF Import - Scene Size -230376x-52424.6 - 56880 frames @ 145 FPS
[TXTIn] swf -> svg not fully migrated, using SWF flags 0 and no flatten angle. Patch welcome
[SWF Parsing] Tag UnknownTag (0x37b) not implemented - skipping (frame 1)
[SWF Parsing] Tag UnknownTag (0x94) not implemented - skipping (frame 1)
[SWF Parsing] Tag FreeCharacter (0x 3) not implemented - skipping (frame 1)
[SWF Parsing] Tag UnknownTag (0x35) not implemented - skipping (frame 1)
[SWF Parsing] Tag UnknownTag (0x1fc) not implemented - skipping (frame 1)
[SWF Parsing] Tag UnknownTag (0x137) not implemented - skipping (frame 1)
[SWF Parsing] Tag UnknownTag (0x68) not implemented - skipping (frame 1)
[SWF Parsing] Tag UnknownTag (0x3fc) not implemented - skipping (frame 1)
[SWF Parsing] Tag UnknownTag (0x5c) not implemented - skipping (frame 1)
[SWF Parsing] Tag UnknownTag (0x158) not implemented - skipping (frame 1)
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3594==ERROR: AddressSanitizer: SEGV on unknown address 0x7ffec244f28f (pc 0x7f8801ebe5ee bp 0x7ffdc244f760 sp 0x7ffdc244f230 T0)
==3594==The signal is caused by a WRITE memory access.
#0 0x7f8801ebe5ed in swf_get_string scene_manager/swf_parse.c:325
#1 0x7f8801ed40b0 in swf_def_edit_text scene_manager/swf_parse.c:1718
#2 0x7f8801ed40b0 in swf_process_tag scene_manager/swf_parse.c:2355
#3 0x7f8801ed40b0 in swf_parse_tag scene_manager/swf_parse.c:2417
#4 0x7f88025da329 in gf_text_process_swf filters/load_text.c:2554
#5 0x7f88025da329 in gf_text_process_swf filters/load_text.c:2531
#6 0x7f88025ef9d3 in txtin_process filters/load_text.c:4025
#7 0x7f88022da2b5 in gf_filter_process_task filter_core/filter.c:3025
#8 0x7f88022a73f1 in gf_fs_thread_proc filter_core/filter_session.c:2100
#9 0x7f88022ac1a6 in gf_fs_run filter_core/filter_session.c:2400
#10 0x7f8801ccd406 in gf_media_import media_tools/media_import.c:1239
#11 0x55b1a98da4b1 in convert_file_info /home/fuzz/gpac/applications/mp4box/fileimport.c:130
#12 0x55b1a98a4ff4 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6391
#13 0x7f87fee93082 in __libc_start_main ../csu/libc-start.c:308
#14 0x55b1a987c09d in _start (/home/fuzz/gpac/bin/gcc/MP4Box+0xa609d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV scene_manager/swf_parse.c:325 in swf_get_string
==3594==ABORTING
```
# poc download:
https://github.com/Janette88/test_pocs/blob/main/test2.dat
# impact
**Impact**
An OOB write on the heap can potentially cause a crash or information disclosure in some cases. Could be leveraged with other vulnerabilities for a more serious impact. | Out of write in swf_get_string at scene_manager/swf_parse.c:325 | https://api.github.com/repos/gpac/gpac/issues/2764/comments | 0 | 2024-02-27T07:59:08Z | 2024-02-27T13:59:41Z | https://github.com/gpac/gpac/issues/2764 | 2,155,912,726 | 2,764 |
[
"gpac",
"gpac"
] | # Description
```
Out of Read in gf_dash_setup_period media_tools/dash_client.c:6374
```
# Version
```
git log
commit 422b78ecf79ceeee97104d219cc4f184b1348cec (HEAD -> master, origin/master, origin/HEAD)
Author: Aurelien David <aurelien.david@telecom-paristech.fr>
Date: Mon Feb 26 10:53:25 2024 +0100
./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev921-g422b78ecf-master
```
```
./configure --enable-sanitizer
make
```
# ASAN log
```
./MP4Box -info ok2.dat
[DASH] Updated manifest:
P#1: start 0 - duration 0 - xlink none
[DASH] Manifest after update:
P#1: start 0 - duration 0 - xlink none
[DASH] Setting up period start 0 duration 0 xlink none ID DID1
AddressSanitizer:DEADLYSIGNAL
=================================================================
==112724==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f6994dc5a47 bp 0x7ffd323b6110 sp 0x7ffd323b60c8 T0)
==112724==The signal is caused by a READ memory access.
==112724==Hint: address points to the zero page.
#0 0x7f6994dc5a46 (/lib/x86_64-linux-gnu/libc.so.6+0x184a46)
#1 0x7f6994cd4db5 in _IO_str_init_static_internal /build/glibc-wuryBv/glibc-2.31/libio/strops.c:41
#2 0x7f6994ca4421 in _IO_strfile_read ../libio/strfile.h:95
#3 0x7f6994ca4421 in __GI___isoc99_vsscanf /build/glibc-wuryBv/glibc-2.31/stdio-common/isoc99_vsscanf.c:33
#4 0x7f699ac85854 in __interceptor___isoc99_vsscanf ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1474
#5 0x7f699ac8597e in __interceptor___isoc99_sscanf ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1497
#6 0x7f6997b5d12e in gf_dash_setup_period media_tools/dash_client.c:6374
#7 0x7f6997b5d12e in dash_setup_period_and_groups media_tools/dash_client.c:7736
#8 0x7f6997b5d12e in gf_dash_process_internal media_tools/dash_client.c:8068
#9 0x7f6997b5d12e in gf_dash_process media_tools/dash_client.c:8139
#10 0x7f69981f1f15 in dashdmx_process filters/dmx_dash.c:3194
#11 0x7f69980ac2b5 in gf_filter_process_task filter_core/filter.c:3025
#12 0x7f69980793f1 in gf_fs_thread_proc filter_core/filter_session.c:2100
#13 0x7f699807e1a6 in gf_fs_run filter_core/filter_session.c:2400
#14 0x7f6997a9f406 in gf_media_import media_tools/media_import.c:1239
#15 0x563a09e4b4b1 in convert_file_info /home/fuzz/gpac/applications/mp4box/fileimport.c:130
#16 0x563a09e15ff4 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6391
#17 0x7f6994c65082 in __libc_start_main ../csu/libc-start.c:308
#18 0x563a09ded09d in _start (/home/fuzz/gpac/bin/gcc/MP4Box+0xa609d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x184a46)
==112724==ABORTING
```
```
poc download: https://github.com/Janette88/test_pocs/blob/main/ok2.dat
```
```
**Impact**
An OOB read on the heap can potentially cause a crash or information disclosure in some cases. Could be leveraged with other vulnerabilities for a more serious impact.
```
Credit: Jq Wang
| Out of Read in gf_dash_setup_period media_tools/dash_client.c:6374 | https://api.github.com/repos/gpac/gpac/issues/2763/comments | 0 | 2024-02-27T02:31:15Z | 2024-02-27T13:59:40Z | https://github.com/gpac/gpac/issues/2763 | 2,155,523,042 | 2,763 |
[
"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 https://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: https://gpac.io/bug-reporting/
On Linux with gcc, my gpac build from master branch fails with
```
~/gpac/bin/gcc/gpac -gui tests/encode_rgba_version1.heif
Floating point exception (core dumped)
```
Running under GDB:
```
Thread 20 "gpac" received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fff611ff6c0 (LWP 47650)]
0x00007ffff7984e98 in uncvdec_configure_pid () from /home/bradh/gpac/bin/gcc/libgpac.so.12
(gdb) bt
#0 0x00007ffff7984e98 in uncvdec_configure_pid () at /home/bradh/gpac/bin/gcc/libgpac.so.12
#1 0x00007ffff790e9a9 in gf_filter_pid_configure () at /home/bradh/gpac/bin/gcc/libgpac.so.12
#2 0x00007ffff79104e6 in gf_filter_pid_connect_task () at /home/bradh/gpac/bin/gcc/libgpac.so.12
#3 0x00007ffff792897b in gf_fs_thread_proc () at /home/bradh/gpac/bin/gcc/libgpac.so.12
#4 0x00007ffff74f4775 in RunThread () at /home/bradh/gpac/bin/gcc/libgpac.so.12
#5 0x00007ffff7097b5a in start_thread (arg=<optimised out>) at ./nptl/pthread_create.c:444
#6 0x00007ffff71285fc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
```
The repro is provided in your dropbox at https://www.mediafire.com/view/qdy6a2zis7cq0s2/encode_rgba_version1.heif/file
It compresses well, so also attaching as zip.
[encode_rgba_version1.zip](https://github.com/gpac/gpac/files/14402358/encode_rgba_version1.zip)
I believe the test file is valid, and uses version 1 of the uncompressed configuration box.
This doesn't happen with my rgb3 equivalent test case - that renders correctly.
| uncvdec Arithmetic exception (SIGFPE) decoding version 1 rgba file | https://api.github.com/repos/gpac/gpac/issues/2762/comments | 4 | 2024-02-26T00:59:37Z | 2024-02-26T10:09:00Z | https://github.com/gpac/gpac/issues/2762 | 2,153,044,722 | 2,762 |
[
"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 https://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
Is it not possible to use timestamp from variable MKV framerate vid in mp4box.
If not, is it not possible to add this feature whereas anyone can include MKV timestamp.txt file in mp4box like Staxrip.
Presently i have to use mp4fpsmod.
| MKV timestamp | https://api.github.com/repos/gpac/gpac/issues/2761/comments | 2 | 2024-02-24T09:03:42Z | 2024-03-02T21:13:15Z | https://github.com/gpac/gpac/issues/2761 | 2,152,221,044 | 2,761 |
[
"gpac",
"gpac"
] | I'm trying to integrate `GF_FileIO` to my project and I've managed to read regular/static files but the same code fails for DASH input. It manages to get the manifest and then it tries to read the manifest again (then immediately closes it). Even if I force my code to recreate the request and feed a valid stream it fails immediately.
The error I'm getting:
```
[DASH] Error - cannot connect service: wrong file type gfio://0xf61b08
[DASHDmx] Error - cannot initialize DASH Client for gfio://0xf61b08: Requested URL is not valid or cannot be found
Filter dashin failed to setup: Requested URL is not valid or cannot be found
```
Actual test URL: https://livesim2.dashif.org/livesim2/mup_30/testpic_2s/Manifest.mpd
What I'm trying to understand is how does DASH/HLS is utilizing `GF_FileIO`. For regular files, it seems to be easy. Lifecycle seems to be like this `open->tell/eof->read->close`. However, I think for DASH this is a bit different, right? | GF_FileIO with DASH input | https://api.github.com/repos/gpac/gpac/issues/2760/comments | 0 | 2024-02-21T20:52:58Z | 2024-04-14T12:04:54Z | https://github.com/gpac/gpac/issues/2760 | 2,147,690,863 | 2,760 |
[
"gpac",
"gpac"
] | This is for both ```gf_m2ts_mux_table_update_mpeg4()``` and ```gf_m2ts_mux_table_update()```. Any reason why to not remove them? | m2ts_mux.c use_checksum param unused | https://api.github.com/repos/gpac/gpac/issues/2759/comments | 0 | 2024-02-15T15:20:21Z | 2024-02-29T13:59:20Z | https://github.com/gpac/gpac/issues/2759 | 2,136,801,825 | 2,759 |
[
"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 https://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: https://gpac.io/bug-reporting/
This is Gentoo downstream bug report [#911634](https://bugs.gentoo.org/911634).
I also hit the issue when building git-v2.21 on the ppc32 chroot on my Talos II:
```
# setarch ppc32 ./configure && setarch ppc32 make
make -C src all
make[1]: Entering directory '/root/builddir/gpac/src'
CC evg/stencil.c
evg/stencil.c: In function 'get_pix_yuyv_10':
evg/stencil.c:1863:43: error: subscripted value is neither array nor pointer nor vector
1863 | #define GET_LE_10BIT_LEFT_AS_8(_ptr) (_ptr[1] )
| ^
evg/stencil.c:2220:14: note: in expansion of macro 'GET_LE_10BIT_LEFT_AS_8'
2220 | vu = GET_LE_10BIT_LEFT_AS_8(p_src + _this->off_u);
| ^~~~~~~~~~~~~~~~~~~~~~
evg/stencil.c:1863:43: error: subscripted value is neither array nor pointer nor vector
1863 | #define GET_LE_10BIT_LEFT_AS_8(_ptr) (_ptr[1] )
| ^
evg/stencil.c:2222:22: note: in expansion of macro 'GET_LE_10BIT_LEFT_AS_8'
2222 | vy = GET_LE_10BIT_LEFT_AS_8(p_src + _this->off_y+4);
| ^~~~~~~~~~~~~~~~~~~~~~
evg/stencil.c:1863:43: error: subscripted value is neither array nor pointer nor vector
1863 | #define GET_LE_10BIT_LEFT_AS_8(_ptr) (_ptr[1] )
| ^
evg/stencil.c:2224:22: note: in expansion of macro 'GET_LE_10BIT_LEFT_AS_8'
2224 | vy = GET_LE_10BIT_LEFT_AS_8(p_src + _this->off_y);
| ^~~~~~~~~~~~~~~~~~~~~~
evg/stencil.c:1863:43: error: subscripted value is neither array nor pointer nor vector
1863 | #define GET_LE_10BIT_LEFT_AS_8(_ptr) (_ptr[1] )
| ^
evg/stencil.c:2225:14: note: in expansion of macro 'GET_LE_10BIT_LEFT_AS_8'
2225 | vv = GET_LE_10BIT_LEFT_AS_8(p_src + _this->off_v);
| ^~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [../config.mak:182: evg/stencil.o] Error 1
make[1]: Leaving directory '/root/builddir/gpac/src'
make: *** [Makefile:13: all] Error 2
```
As git-v2.0.0 builds ok I was able to do a bisect which revealed the following commit:
```
# git bisect bad
bf7e583bbac6930e3f47d5be37a717d307bb7102 is the first bad commit
commit bf7e583bbac6930e3f47d5be37a717d307bb7102
Author: jeanlf <jeanlf@gpac.io>
Date: Thu Mar 31 13:45:31 2022 +0200
added generic fallback in ffsws to evg
src/evg/rast_soft.h | 1 +
src/evg/stencil.c | 82 +++++++++++++++++++++++
src/evg/surface.c | 25 +++++++
src/filters/ff_avf.c | 4 +-
src/filters/ff_common.c | 6 +-
src/filters/ff_common.h | 2 +-
src/filters/ff_enc.c | 6 +-
src/filters/ff_mx.c | 2 +-
src/filters/ff_rescale.c | 163 ++++++++++++++++++++++++++++++++++++++++++----
src/filters/reframe_av1.c | 4 +-
src/jsmods/evg.c | 4 +-
11 files changed, 273 insertions(+), 26 deletions(-)
```
Some data about the build system:
```
Portage 3.0.59 (python 3.12.1-final-0, default/linux/ppc/17.0, gcc-11, glibc-2.38-r10, 6.7.4-gentoo-P9 ppc64)
=================================================================
System uname: Linux-6.7.4-gentoo-P9-ppc64-POWER9,_altivec_supported-with-glibc2.38
KiB Mem: 65662124 total, 49775716 free
KiB Swap: 16777212 total, 16777212 free
Timestamp of repository gentoo: Wed, 14 Feb 2024 08:00:01 +0000
Head commit of repository gentoo: df0756a3a68de415ebe1edd64ec5597c89765a20
sh dash 0.5.12
ld GNU ld (Gentoo 2.41 p4) 2.41.0
distcc 3.4 powerpc-unknown-linux-gnu [disabled]
app-misc/pax-utils: 1.3.7::gentoo
app-shells/bash: 5.1_p16-r6::gentoo
dev-build/autoconf: 2.13-r8::gentoo, 2.71-r6::gentoo
dev-build/automake: 1.16.5-r2::gentoo
dev-build/cmake: 3.27.9::gentoo
dev-build/libtool: 2.4.7-r1::gentoo
dev-build/make: 4.4.1-r1::gentoo
dev-build/meson: 1.3.0-r2::gentoo
dev-lang/perl: 5.38.2-r1::gentoo
dev-lang/python: 3.11.7::gentoo, 3.12.1_p1::gentoo
dev-lang/rust-bin: 1.74.1::gentoo
sys-apps/baselayout: 2.14-r2::gentoo
sys-apps/openrc: 0.53::gentoo
sys-apps/sandbox: 2.38::gentoo
sys-devel/binutils: 2.41-r3::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc: 11.4.1_p20240111::gentoo, 14.0.1_pre20240204-r1::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-devel/llvm: 17.0.6::gentoo
sys-kernel/linux-headers: 6.6::gentoo (virtual/os-headers)
sys-libs/glibc: 2.38-r10::gentoo
```
bisect.log attached. [bisect.log](https://github.com/gpac/gpac/files/14288901/bisect.log)
| [bisected] v2.2.1 fails to build on ppc32 BigEndian | https://api.github.com/repos/gpac/gpac/issues/2758/comments | 2 | 2024-02-14T21:53:41Z | 2024-02-26T09:06:39Z | https://github.com/gpac/gpac/issues/2758 | 2,135,264,005 | 2,758 |
[
"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 https://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: https://gpac.io/bug-reporting/
In memory-writing mode,
we use `gf_isom_open` using `"_gpac_isobmff_redirect"`
`gf_isom_set_write_callback`
after setting callback function
When exactly is the callback function called?
I think that `gf_isom_finalize` and `gf_isom_close_segment` call the callback function
And
If I want to call the callback function forcely, how to do that?
My plan is that
After making All segments, I calculate all duration of segments and allocate duration using
`gf_isom_set_movie_duration`
then I want to receive moov box data with a duration value assigned to it through callback function.
Can I use `on_last_block_start` to handle the above situation? | styp box is made twice | https://api.github.com/repos/gpac/gpac/issues/2757/comments | 2 | 2024-02-14T11:25:54Z | 2024-04-09T14:39:57Z | https://github.com/gpac/gpac/issues/2757 | 2,134,139,164 | 2,757 |
[
"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 https://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: https://gpac.io/bug-reporting/
Using `iloc` with `construction_method == 2` appears to work OK for the case where `data_reference_index == 0`.
It doesn't work for the case where `data_reference_index` is 1, irrespective of whether the `DataEntryUrlBox` uses the flags `0x000001` method to point to the same file, or whether it uses a file. Instead, it just produces an empty black image.

Sample files:
[rgb_component_external.zip](https://github.com/gpac/gpac/files/14237180/rgb_component_external.zip)
| Images with construction_method=2 not fully supported | https://api.github.com/repos/gpac/gpac/issues/2754/comments | 1 | 2024-02-12T10:11:53Z | 2024-02-29T17:13:25Z | https://github.com/gpac/gpac/issues/2754 | 2,129,802,452 | 2,754 |
[
"gpac",
"gpac"
] | Hey, I'm working on the build system and saw this doesn't seem to be used anywhere.
Any reason not to remove it? | configure/config.mak: remove SRC_LOCAL_PATH? | https://api.github.com/repos/gpac/gpac/issues/2753/comments | 0 | 2024-02-11T11:38:06Z | 2024-02-29T17:15:17Z | https://github.com/gpac/gpac/issues/2753 | 2,128,951,974 | 2,753 |
[
"gpac",
"gpac"
] | i am having trouble to push a dash session into an http server using dashin forward file mode.
The session can be played successfully by the player using the command :
```bash
gpac -i route://239.3.6.1:8092/media.mpd:ifce=docker0 aout vout
```
but when using the command:
```bash
gpac -i route://239.3.6.1:8092/media.mpd:ifce=docker0 dashin:forward=file -o http://localhost:8080/media.mpd:rdirs=gmem:reqlog='*':cors=auto -logs=all@warning --max_cache_segs=40
```
the client receives the manifest and the init segments but fails to get other segments, the server response is as follows
```bash
[Socket] Asked to set socket receive buffer size to 524288 but system used 425984
[HTTPOut] Server running on port 8080
[HTTPOut] REQ#1 127.0.0.1 GET media.mpd start
[HTTPOut] H2 REQ#1 GET done: reply 200 - 1859 bytes in 0 ms at 104.732 mbps
[HTTPOut] REQ#2 127.0.0.1 GET v11-init.mp4 start
[HTTPOut] H2 REQ#2 GET done: reply 200 - 738 bytes in 0 ms at 54.1651 mbps
[HTTPOut] REQ#3 127.0.0.1 GET a22-init.mp4 start
[HTTPOut] H2 REQ#3 GET done: reply 200 - 604 bytes in 0 ms at 48.8081 mbps
[HTTPOut] REQ#4 127.0.0.1 GET media.mpd start
[HTTPOut] H2 REQ#4 GET done: reply 200 - 1859 bytes in 0 ms at 154.917 mbps
[HTTPOut] REQ#5 127.0.0.1 GET v11-889214481.m4s error 404
[HTTPOut] H2 REQ#5 GET done: reply 404 - 1859 bytes in 904 ms at 16.4487 kbps
[HTTPOut] REQ#6 127.0.0.1 UNKNOWN error 501
[HTTPOut] H2 REQ#6 GET done: reply 501 - 1859 bytes in 904 ms at 16.4429 kbps
[HTTPOut] REQ#7 127.0.0.1 GET media.mpd start
[HTTPOut] H2 REQ#7 GET done: reply 200 - 1859 bytes in 0 ms at 109.353 mbps
[HTTPOut] REQ#8 127.0.0.1 GET v11-889214481.m4s error 404
[HTTPOut] H2 REQ#8 GET done: reply 404 - 1859 bytes in 409 ms at 36.3328 kbps
[HTTPOut] REQ#9 127.0.0.1 GET v11-889214481.m4s error 404
[HTTPOut] H2 REQ#9 GET done: reply 404 - 1859 bytes in 917 ms at 16.206 kbps
```
content of the manifest:
```bash
cat media.mpd.3
<?xml version="1.0" encoding="UTF-8"?>
<MPD availabilityStartTime="2023-11-30T08:02:24Z" maxSegmentDuration="PT1.92S" minBufferTime="PT1S" minimumUpdatePeriod="PT1S" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishTime="2023-11-30T08:03:33Z" timeShiftBufferDepth="PT11S" type="dynamic" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xmlns:dashif="https://dashif.org/" xmlns:scte35="http://www.scte.org/schemas/35/2016" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd http://dashif.org/guidelines/ContentProtection laurl.xsd">
<Period id="P0" start="PT0S">
<AdaptationSet contentType="video" id="0" maxFrameRate="50" maxHeight="576" maxWidth="720" mimeType="video/mp4" minFrameRate="50" minHeight="576" minWidth="720" par="5:4" segmentAlignment="true" startWithSAP="1">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
<SegmentTemplate duration="96" initialization="$RepresentationID$-init.mp4" media="$RepresentationID$-$Number$.m4s" startNumber="886110074" timescale="50" />
<Representation bandwidth="2000000" codecs="vvc.0.31.10" frameRate="50" height="576" id="v11" sar="64:45" scanType="progressive" width="720" />
</AdaptationSet>
<AdaptationSet contentType="audio" id="1" mimeType="audio/mp4" segmentAlignment="true" startWithSAP="1">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
<SegmentTemplate duration="92160" initialization="$RepresentationID$-init.mp4" media="$RepresentationID$-$Number$.m4s" startNumber="886110074" timescale="48000" />
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
<Representation audioSamplingRate="48000" bandwidth="128000" codecs="mp4a.40.2" id="a22" />
</AdaptationSet>
</Period>
</MPD>
``` | Problem using dashin forward file mode | https://api.github.com/repos/gpac/gpac/issues/2751/comments | 5 | 2024-02-07T08:08:34Z | 2024-02-20T10:13:03Z | https://github.com/gpac/gpac/issues/2751 | 2,122,428,094 | 2,751 |
[
"gpac",
"gpac"
] | As shown in the attached image , inspect sometimes generate duplicate attributes. | Duplicate XML attribute in NALU inspect | https://api.github.com/repos/gpac/gpac/issues/2750/comments | 1 | 2024-02-05T17:08:02Z | 2024-02-07T22:36:42Z | https://github.com/gpac/gpac/issues/2750 | 2,119,046,535 | 2,750 |
[
"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 https://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
I am trying to test a file that uses `imda`, which needs support for the `imdt` data reference. I see some work to add the `imda` container, but there does not appear to be `imdt` (under `dref`) support.
A couple of samples are attached as zip - the content should be the same in each, but the `_imda.heif` version is reported as invalid in gpac (and it could well be wrong as well).
[rgb_component.zip](https://github.com/gpac/gpac/files/14164077/rgb_component.zip)
| Feature request - imdt support | https://api.github.com/repos/gpac/gpac/issues/2749/comments | 4 | 2024-02-05T10:10:10Z | 2024-03-01T10:46:55Z | https://github.com/gpac/gpac/issues/2749 | 2,118,146,173 | 2,749 |
[
"gpac",
"gpac"
] | Hello,
I have a doubt, I think I remember reading how to do this in the past, but I can't remember if it was in gpac or the other known product (I'm not mentioning it here). The question is how to decrypt a specific segment, let's say, video_dash4.m4s if I have the xml I encrypted the full video with, and also (if needed) the dashinit.mp4 file
Then I want to encrypt it back (Only that segment)
Is that possible?
How?
Thanks! | How to decrypt a single segment (DRM) and how to encrypt it back | https://api.github.com/repos/gpac/gpac/issues/2747/comments | 10 | 2024-01-30T14:52:05Z | 2024-01-31T16:26:41Z | https://github.com/gpac/gpac/issues/2747 | 2,108,053,744 | 2,747 |
[
"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 https://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: https://gpac.io/bug-reporting/
After dozens of hours of googling and thoroughly reading every piece of info, I'm still unable to start dynamic MPD broadcasting.
I've installed GPAC version 2.3-DEV-rev832-g799d9e547-master.
My OS Ubuntu 22
My goal is simple:
I getting short videofiles from time to time, and I want to combine them to "pseudo-stream".
My files have length exactly 30s, and I want to append them dynamically
```
gpac -i pl.m3u:ka=2000 -o live.mpd:dmode=dynamic
```
The playlist is very simple
```
##begin pl,m3u
../segment_0000.mp4
../segment_0001.mp4
##end playlist
```
What I get -- is a bunch of m4s files and few mp4 files, along with live.mpd file.
When i'm trying to play it, i have errors.
FFplay:
hundreds of such:
```
[dash @ 0x7f2228000cc0] Failed to open fragment of playlist f=0/0
Last message repeated 2188 times
[dash @ 0x7f2228000cc0] Failed to open fragment of playlist f=0/0
```
mpv:
hundreds of such
```
[ffmpeg/demuxer] dash: Failed to open fragment of playlist
[ffmpeg/demuxer] dash: Failed to open fragment of playlist
```
MPD file not containing any relative paths:
```
<?xml version="1.0"?>
<!-- MPD file Generated with GPAC version 2.3-DEV-rev832-g799d9e547-master at 2024-01-29T19:47:00.512Z -->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.000S" type="dynamic" availabilityStartTime="2024-01-29T19:47:00.510Z" publishTime="2024-01-29T19:47:00.512Z" minimumUpdatePeriod="PT0H0M1.000S" timeShiftBufferDepth="PT0H0M30.000S" profiles="urn:mpeg:dash:profile:full:2011">
<ProgramInformation moreInformationURL="https://gpac.io">
<Title>live.mpd generated by GPAC</Title>
</ProgramInformation>
<Period id="DID1" start="PT0H0M0.000S">
<AdaptationSet segmentAlignment="true" maxWidth="1280" maxHeight="720" maxFrameRate="25" par="16:9" startWithSAP="1">
<SegmentTemplate media="segment_0000_dash_track1_$Number$.m4s" initialization="segment_0000_dash_track1_init.mp4" timescale="12800" startNumber="1" duration="12800"/>
<Representation id="1" mimeType="video/mp4" codecs="avc1.64001F" width="1280" height="720" frameRate="25" sar="1:1" bandwidth="1812813">
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" startWithSAP="1">
<SegmentTemplate media="segment_0000_dash_track2_$Number$.m4s" initialization="segment_0000_dash_track2_init.mp4" timescale="44100" startNumber="1" duration="44100"/>
<Representation id="2" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="44100" bandwidth="1407">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
</Representation>
</AdaptationSet>
</Period>
</MPD>
```
Any help is really appreciated. | Can't start GPAC in live playlist mode | https://api.github.com/repos/gpac/gpac/issues/2746/comments | 1 | 2024-01-29T19:51:20Z | 2024-01-31T14:02:31Z | https://github.com/gpac/gpac/issues/2746 | 2,106,295,970 | 2,746 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
### Description:
I spot a potential buffer overflow in command_line_parsing() function in broacaster.c:
https://github.com/gpac/gpac/blob/master/applications/testapps/broadcaster/broadcaster.c
### Details
```
static int command_line_parsing(int argc, const char** argv, unsigned short * tcp_port,
char *config_file, int *config_flag, unsigned short * mtu_size,
int * debug, u32 * socketType_for_updates)
{
int counter = 1;
if (argc < 2 || argc%2 != 1) {
fprintf(stderr, "Incorrect number of arguments, must be multiple of 2 (Please specify at least -f or -p arguments) !\n");
return -5;
}
for(counter = 1; counter < (argc - 1); counter+=2)
{
const char * a = argv[counter];
if (!strcmp("-p", a) || !strcmp("--port", a))
{
if (*config_flag)
{
printIncompatibleOptions();
return -2;
}
(*tcp_port) = port_from_string( argv[counter + 1] );
if (!(*tcp_port)) return -3;
}
else if (!strcmp("-f", a) || !strcmp("--file", a))
{
if (*tcp_port) {
printIncompatibleOptions();
return -2;
}
strcpy(config_file, argv[counter+1]); // Buffer overflow VULN
(*config_flag) = 1;
}
```
The function didn't check the length of **argv[counter+1]** and just copy into the **config_file** leading to buffer overflow.
### POC
I haven't reproduce this vulnerability.
### Impact
This vulnerability could lead to denial of service.
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at https://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: https://gpac.io/bug-reporting/
| Buffer overflow in broadcaster module | https://api.github.com/repos/gpac/gpac/issues/2744/comments | 1 | 2024-01-29T15:46:29Z | 2024-01-31T14:35:10Z | https://github.com/gpac/gpac/issues/2744 | 2,105,795,595 | 2,744 |
[
"gpac",
"gpac"
] | Link for streams: https://developer.apple.com/streaming/examples/
The stream plays but I got these logs:
```
$ gpac -play https://devstreaming-cdn.apple.com/videos/streaming/examples/historic_planet_content_2023-10-26-3d-video/main.m3u8
Refreshing all options registry, this may take some time ... done
Type 'h' in window for command list
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:448
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:384
[M3U8] Unsupported directive #EXT-X-BITRATE:27804
[M3U8] Unsupported directive #EXT-X-BITRATE:47184
[M3U8] Unsupported directive #EXT-X-BITRATE:46119
[M3U8] Unsupported directive #EXT-X-BITRATE:38771
[M3U8] Unsupported directive #EXT-X-BITRATE:20811
[M3U8] Unsupported directive #EXT-X-BITRATE:35728
[M3U8] Unsupported directive #EXT-X-BITRATE:36800
[M3U8] Unsupported directive #EXT-X-BITRATE:42140
[M3U8] Unsupported directive #EXT-X-BITRATE:47575
[M3U8] Unsupported directive #EXT-X-BITRATE:34890
[M3U8] Unsupported directive #EXT-X-BITRATE:17321
[M3U8] Unsupported directive #EXT-X-BITRATE:34049
[M3U8] Unsupported directive #EXT-X-BITRATE:18391
No filter chain found for PID AS_1 in filter dashin to any loaded filters
[hevc] sps_multilayer_extension_flag not yet implemented
[hevc] RPU validation failed: 0 <= el_bit_depth_minus8 = 32 <= 8
[hevc] Error parsing DOVI NAL unit.
[hevc] RPU validation failed: 0 <= el_bit_depth_minus8 = 32 <= 8
[hevc] Error parsing DOVI NAL unit.
[hevc] RPU validation failed: 0 <= el_bit_depth_minus8 = 32 <= 8
[hevc] Error parsing DOVI NAL unit.
[hevc] RPU validation failed: 0 <= el_bit_depth_minus8 = 32 <= 8
[hevc] Error parsing DOVI NAL unit.
[hevc] RPU validation failed: 0 <= el_bit_depth_minus8 = 32 <= 8
[hevc] Error parsing DOVI NAL unit.
[hevc] RPU validation failed: 0 <= el_bit_depth_minus8 = 32 <= 8
...
```
| Playback of Apple VisionPro streams report | https://api.github.com/repos/gpac/gpac/issues/2742/comments | 1 | 2024-01-27T10:36:31Z | 2024-01-29T12:31:05Z | https://github.com/gpac/gpac/issues/2742 | 2,103,498,256 | 2,742 |
[
"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 https://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: https://gpac.io/bug-reporting/
I want to generate (convert to) an m4a file with `major_brand` `mp42`, `minor_brand` `0`, and `compatible_brands` `M4A mp42isom`. I tried this:
```cmd
mp4box -brand "mp42 :0" file.m4a
```
but got `compatible_brands` `mp4aisomiso2`
Is it possible to change `compatible_brands`? Does `compatible_brands` matter?
| Can I set compatible_versions via mp4box? | https://api.github.com/repos/gpac/gpac/issues/2741/comments | 3 | 2024-01-27T10:33:58Z | 2024-02-01T10:07:35Z | https://github.com/gpac/gpac/issues/2741 | 2,103,497,528 | 2,741 |
[
"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 https://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: https://gpac.io/bug-reporting/
If I make isomedia file with
```
file_ptr = gf_isom_open("_gpac_isobmff_redirect", GF_ISOM_OPEN_WRITE, NULL);
gf_isom_set_write_callback
gf_isom_open_segment
gf_isom_close_segment
```
All segment files managed by callback function
If I make 10 segments,
Is it possible to combine 10 segments to one progressive mp4 using gpac API ??
| Do I making all segment files to one progressive mp4 ?? | https://api.github.com/repos/gpac/gpac/issues/2737/comments | 1 | 2024-01-23T02:24:29Z | 2024-01-23T10:48:58Z | https://github.com/gpac/gpac/issues/2737 | 2,095,116,508 | 2,737 |
[
"gpac",
"gpac"
] | I, am trying to stream DASH using gpac client 2.3-DEV-rev version. However, I get consecutive error in downloading the DASH segments. I am not sure, if its the issue is with the latest version. Because, I worked with 2.0 gpac version and it worked fine a year ago.
**Error -**
`[Core] system failure for file opening of "/tmp/gpac_cache/gpaccache.test" in mode "wb": 13
[Core] system failure for file opening of "/tmp/gpac_cache/gpaccache.test" in mode "wb": 13
[Cache] Cannot write to /tmp/gpac_cache/ directory, using system temp cache
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream0-00001.m4s: Connection to server closed
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream1-00001.m4s: Connection to server closed
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream0-00002.m4s: Connection to server closed
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream1-00002.m4s: Connection to server closed
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream1-00003.m4s: Connection to server closed
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream1-00004.m4s: Connection to server closed
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream1-00005.m4s: Connection to server closed
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream1-00006.m4s: Connection to server closed
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream1-00007.m4s: Connection to server closed
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream1-00008.m4s: Connection to server closed
[DASH] Error in downloading new segment http://localhost:8000/chunk-stream1-00009.m4s: Connection to server closed
[DASH] Too many consecutive segments not found (broken source, sync or signal lost...) - entering end of stream detection mode
`
- [ x] I looked for a similar issue and couldn't find any.
- [ x] I tried with the latest version of GPAC. Installers available at https://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: https://gpac.io/bug-reporting/
| Error in downloading DASH segments with master (gpac-2.3-DEV) | https://api.github.com/repos/gpac/gpac/issues/2736/comments | 2 | 2024-01-20T00:03:37Z | 2024-01-24T11:31:17Z | https://github.com/gpac/gpac/issues/2736 | 2,091,728,030 | 2,736 |
[
"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 https://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: https://gpac.io/bug-reporting/
The build was going well, but suddenly the error message below appeared, so I would like to inquire.
```
./lib/libgpac_static.a(downloader.o): In function `gf_ssl_check_cert':
downloader.c:(.text+0x5b4e): undefined reference to `SSL_get_peer_certificate'
```
All logs
```
[100%] Linking CXX executable mediastreamingserver
/usr/bin/cmake -E cmake_link_script CMakeFiles/mediastreamingserver.dir/link.txt --verbose=1
/usr/bin/c++ -O2 -g -rdynamic CMakeFiles/mediastreamingserver.dir/src/util/src/buffer.cpp.o CMakeFiles/mediastreamingserver.dir/src/util/src/ip.cpp.o CMakeFiles/mediastreamingserver.dir/src/util/src/log.cpp.o CMakeFiles/mediastreamingserver.dir/src/util/src/time.cpp.o CMakeFiles/mediastreamingserver.dir/src/module/isobmff/muxer/src/muxer.cpp.o CMakeFiles/mediastreamingserver.dir/src/protocol/bus.pb.cc.o CMakeFiles/mediastreamingserver.dir/src/server/src/transcoder.cpp.o CMakeFiles/mediastreamingserver.dir/src/server/src/broadcast.cpp.o "CMakeFiles/mediastreamingserver.dir/src/server/src/channel-map.cpp.o" CMakeFiles/mediastreamingserver.dir/src/server/src/channel.cpp.o CMakeFiles/mediastreamingserver.dir/src/server/src/client.cpp.o CMakeFiles/mediastreamingserver.dir/src/server/src/resource.cpp.o CMakeFiles/mediastreamingserver.dir/src/module/nats/util/src/string.cpp.o CMakeFiles/mediastreamingserver.dir/src/main.cpp.o -o mediastreamingserver -L/home/jwoh/mediastreamingserver/./lib -L/usr/local/lib -L/home/jwoh/mediastreamingserver/./pkg/vcpkg/installed/x64-linux/lib -L/opt/boost/lib -Wl,-rpath,/home/jwoh/mediastreamingserver/./lib:/usr/local/lib:/home/jwoh/mediastreamingserver/./pkg/vcpkg/installed/x64-linux/lib:/opt/boost/lib -ldl -lboost_date_time -lpthread -lboost_system -lboost_filesystem -lboost_chrono -lboost_thread -lgpac_static -ldl -lpng /usr/lib64/liblzma.so /usr/lib64/libz.so -lssl -lcrypto -lcurl -lyaml-cpp -lnats_static -lprotobuf -lsodium -lboost_date_time -lpthread -lboost_system -lboost_filesystem -lboost_chrono -lboost_thread -lgpac_static -lpng -lssl -lcrypto -lcurl -lyaml-cpp -lnats_static -lprotobuf -lsodium -lpthread
/home/jwoh/mediastreamingserver/./lib/libgpac_static.a(downloader.o): In function `gf_ssl_check_cert':
downloader.c:(.text+0x5b4e): undefined reference to `SSL_get_peer_certificate'
```
The environment is as follows
```
NAME="Rocky Linux"
VERSION="8.9 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.9"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.9 (Green Obsidian)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2029-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
ROCKY_SUPPORT_PRODUCT_VERSION="8.9"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.9"
```
```
target_link_libraries(
${tname}
${CMAKE_DL_LIBS}
boost_date_time
pthread
boost_system
boost_filesystem
boost_chrono
boost_thread
gpac_static dl # gpac
png # gpac
Threads::Threads # gpac
LibLZMA::LibLZMA # gpac
ZLIB::ZLIB # gpac + ...
ssl
crypto
curl # using libcurl
yaml-cpp
nats_static
protobuf
sodium
)
```
Special features include `ssl crypto curl yaml-cpp nats_static, etc.,` which are used through vcpkg.
| Build Error, undefined reference to `SSL_get_peer_certificate' | https://api.github.com/repos/gpac/gpac/issues/2734/comments | 5 | 2024-01-18T08:40:31Z | 2024-01-21T01:25:29Z | https://github.com/gpac/gpac/issues/2734 | 2,087,787,870 | 2,734 |
[
"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 https://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: https://gpac.io/bug-reporting/
I make daisy-chain like below picture

```
// Setting subsegs_per_sidx = 2 , Bool daisy_chain_sidx = GF_TRUE
err = gf_isom_close_segment(file_ptr, 2, track_id, (TIMESCALE/FPS)*box_offset, 0, 0, GF_TRUE, GF_FALSE, GF_FALSE, GF_FALSE, 0, 0, 0, NULL);
```
refer to `ISO_IEC_14496_12_2022 | J.2.3 Daisy-chain `
I want to share Pictures but, Because of copyright, I will explain in writing.
After close the segment
Result of `referenced_size` value :
`referenced_size` of sidx 0 : 1016806 (mdat size : 1016706 moof size : 100) --> correct
<img width="956" alt="1111_sidx" src="https://github.com/gpac/gpac/assets/80387186/b58d542d-defa-451c-b084-543806a6a35e">
but `referenced_size` of sidx 1 : 983529 (mdat size : 983385 moof size : 100 sidx size :44) --> wrong
Expected result of `referenced_size` of sidx 1 value : 44 (According to ISO_IEC_14496_12_2022
J.2.3 Daisy-chain)
<img width="956" alt="2222_sidx" src="https://github.com/gpac/gpac/assets/80387186/949e33e9-8798-4ce6-ac14-2001e9e7f98b">
Do I use wrong Or Is the library itself doing the calculation wrong??? | daisy-chain in sidx box, reference_size value | https://api.github.com/repos/gpac/gpac/issues/2733/comments | 5 | 2024-01-18T06:45:12Z | 2024-01-24T10:45:57Z | https://github.com/gpac/gpac/issues/2733 | 2,087,627,037 | 2,733 |
[
"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 https://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: https://gpac.io/bug-reporting/
I tried to find a solution by following the code flow, but failed.
I am making segment files now.
and I want to allocate sample_duration value in trun box.
refer to below picture
<img width="1840" alt="trun----whatpng" src="https://github.com/gpac/gpac/assets/80387186/14c9f4cf-4cb5-4c9c-acd7-a4b7a8056c8a">
I tried below code
```
// First, I do not use default value using force_traf_flags – if GF_TRUE, will ignore these default in each traf but will still write them in moov
if ((err = gf_isom_setup_track_fragment(file_ptr, track_id, sample_description_index, 0, 0, 0, 0, 0 , GF_TRUE)) != GF_OK)
{
fprintf(stderr, "Err Raised : gf_isom_setup_track_fragment: %d\n", err);
return -1;
}
// Second , add sample_duration in this function. I think that 1024 is trun sample_duration value
if ((err = gf_isom_fragment_add_sample(file_ptr, track_id, &iso_sample, sample_description_index, 1024, 0, 0, GF_FALSE)) != GF_OK)
{
fprintf(stderr, "Err raised : gf_isom_fragment_add_smple :%d\n", err);
return -1;
}
```
In result, If every sample has same sample_duration, tfdt default_sample_duration is added.
But when I use `gf_isom_fragment_add_sample` this function using different Duration argument (not fixed 1024)
sample_duration of trun box is added.
https://github.com/gpac/gpac/blob/50c5c207595bb22f7f120572680971f0aae3c5fc/src/isomedia/movie_fragments.c#L638C7-L638C7
Result of looking at the code above
If first trun sample_duration and second sample_duration values are diffrent,
The code below works
```
if (!RunDur) trun->flags |= GF_ISOM_TRUN_DURATION;
```
https://github.com/gpac/gpac/blob/50c5c207595bb22f7f120572680971f0aae3c5fc/src/isomedia/movie_fragments.c#L678
I am curious as to why the trun sample_duration flag does not work when the trun sample_duration is the same.
| How to allocate sample_duration value in trun box ?? | https://api.github.com/repos/gpac/gpac/issues/2731/comments | 4 | 2024-01-17T01:24:38Z | 2024-01-18T07:53:10Z | https://github.com/gpac/gpac/issues/2731 | 2,085,224,704 | 2,731 |
[
"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 https://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: https://gpac.io/bug-reporting/
--------------------
Hi all.
I'm working with 24/7 live streams, and trying to create a fMP4 segment from _another_ segment in _another_ format. The most common case would be to just encapsulate an existing webvtt file inside a non-yet-existing m4s/mp4 container file, but could actually be other formats as well (TTML maybe, or even TS). And that part works great by simply doing something like this:
`gpac -i segment_12345.vtt -o segment_12345.m4s`
However, I understand that file is actually not fMP4 but a full MP4 container for the original content. fMP4 requires also the init file with splitted data from the full container. And I didn't found a way to create it with the docs, neither for the command line tools or the Python bindings (which I would like to use).
I understand `dasher` filter allows me to create fMP4 output, but I was unable to do it with a single webvtt file as input. And the `mp4mx` filter (which I understand is the one instanced from that example command before) doesn't seem to have any fMP4 option. Of course I've tried other options I could find in the docs, but all without success so far.
So, I decided to just ask you people: *is there a way to create single-segment fMP4 output, init file included, from mp4-compatible input, using gpac?*
Thanks in advance. | Question: how to create single-segment fMP4 container output. | https://api.github.com/repos/gpac/gpac/issues/2730/comments | 1 | 2024-01-16T23:48:33Z | 2024-01-17T15:58:56Z | https://github.com/gpac/gpac/issues/2730 | 2,085,148,434 | 2,730 |
[
"gpac",
"gpac"
] | I'm using the example video in the attachments and try to inspect it using the following command. The resulting CRC32 for `TrackTemplate` changes every time I run the command.
```bash
gpac -i video.mp4 inspect:xml
```
https://github.com/gpac/gpac/assets/7467169/d59ba289-9705-4463-bdd0-e10a0f22d4be | CRC32 is not consistent for TrackTemplate | https://api.github.com/repos/gpac/gpac/issues/2727/comments | 2 | 2024-01-14T03:28:41Z | 2024-03-27T23:29:45Z | https://github.com/gpac/gpac/issues/2727 | 2,080,564,157 | 2,727 |
[
"gpac",
"gpac"
] | In case of reused_template_idx, the default is ```sprintf(szExName, "_r%d_", reused_template_idx);```.
Any reason for having a trailing "_" ?
Akamai is not happy about these filenames. | dasher will insert trailing "_" on the segment filenames with reused template | https://api.github.com/repos/gpac/gpac/issues/2726/comments | 0 | 2024-01-12T10:29:51Z | 2024-01-19T10:11:41Z | https://github.com/gpac/gpac/issues/2726 | 2,078,529,974 | 2,726 |
[
"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 https://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: https://gpac.io/bug-reporting/
Hello, Thank you for your hard work. Sorry for asking a lot of questions recently.
I want to get earliest_presentation_time value in sidx box.
I tried to use below function
```
GF_EXPORT
GF_Err gf_isom_get_sidx_duration(GF_ISOFile *movie, u64 *sidx_dur, u32 *sidx_timescale)
{
u64 dur=0;
u32 i;
if (!movie || !movie->moov || !sidx_timescale || !sidx_dur)
return GF_BAD_PARAM;
if (!movie->main_sidx) return GF_NOT_SUPPORTED;
*sidx_timescale = movie->main_sidx->timescale;
for (i=0; i<movie->main_sidx->nb_refs; i++) {
dur += movie->main_sidx->refs[i].subsegment_duration;
}
*sidx_dur = dur;
return GF_OK;
}
```
My thought about this function,
this function only return GF_NOT_SUPPORTED
because movie->main_sidx never allocated.
I search main_sidx ,
I could not find using of main_sidx

how to get earliest_presentation_time value in sidx box ??
I am file open with callback mode using "_gpac_isobmff_redirect" and
making sidx box using ```gf`_isom_close_segment``` now.
| Inquiry about gf_isom_get_sidx_duration function | https://api.github.com/repos/gpac/gpac/issues/2725/comments | 4 | 2024-01-12T01:22:53Z | 2024-01-15T12:26:05Z | https://github.com/gpac/gpac/issues/2725 | 2,077,887,557 | 2,725 |
[
"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 https://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: https://gpac.io/bug-reporting/
When I write the segment files using callback function (```gf_isom_set_write_callback```)
First segment is made in the direction I want.
(```sidx styp moof mdat```)
Second segment, I want to make like below boxes
```styp moof mdat```. (without sidx)
but mdat comes separately when I close the segemnt ```gf_isom_close_segment```
comes first styp, moof, and next seperatly comes mdat box
Can’t we all make the box together? (styp, moof, mdat)
the only different thing is
I set the second argument to sidx to -1,
because I do not want to make sidx box
```
gf_isom_close_segment(file_ptr, -1, track_id, ref_track_decode_time, 0, 0, GF_FALSE, GF_FALSE, GF_FALSE, GF_FALSE, 0, 0, 0, NULL)
```
| Making segment using Module API, mdat box comes separately. | https://api.github.com/repos/gpac/gpac/issues/2721/comments | 2 | 2024-01-10T08:42:14Z | 2024-01-19T01:58:12Z | https://github.com/gpac/gpac/issues/2721 | 2,073,869,367 | 2,721 |
[
"gpac",
"gpac"
] | https://github.com/gpac/gpac/blob/7aef8038c6bdd310e65000704e39afaa0e721048/src/media_tools/route_dmx.c#L1454
In this `else` block, the variable `payload`, which is involved in the `while` condition, is not updated. Consequently, we are stuck in an infinite while loop.
### Reproduction Scenario
1. The file used in this test:
https://github.com/gpac/gpac/assets/27826148/87c1287b-04a2-4bdb-8023-2256ff9d221d
2. Generating dash session:
```
gpac -i short.mp4 -o dash_session/live.mpd
```
3. Sending segments via ROUTE
```
gpac -i dash_session/live.mpd dashin:forward=mani -o route://234.1.1.1:1234/live.mpd -netcap=dst=route.gpc
```
4. Receiving the segments while patching the 13th byte of the first packet.
```
gpac -i route://234.1.1.1:1234/live.mpd -netcap=src=route.gpc,nrt,[s=1,o=12,v=0] inspect
```
### Result:

| Endless While Loop Due to Unupdated Variable in `else` Block | https://api.github.com/repos/gpac/gpac/issues/2717/comments | 1 | 2024-01-08T15:42:20Z | 2024-01-10T16:57:48Z | https://github.com/gpac/gpac/issues/2717 | 2,070,717,442 | 2,717 |
[
"gpac",
"gpac"
] | I came across another issue with the CTS calculation for VVC bitstreams, where the IDR frames don't have POC 0.
Here you can find a sample bitstream: https://hege.cc/test_idr.vvc, which is created by VVenC v1.10.0 using more or less the default settings:
`vvencapp -q 28 --preset faster -rs 1 -rt idr -c yuv420 -t 12 --sdr sdr_709 -i /data/YUV/foreman_352x288.yuv --size 352x288 --fps 25 -o test_idr.vvc`
The POCs for the bitstream look like this:
```
POC 23 LId: 0 TId: 0 ( IDR_W_RADL, I-SLICE, QP 19 ) [DT 0.019] [L0] [L1] [:,(unk)]
POC 15 LId: 0 TId: 1 ( RADL, B-SLICE, QP 24 ) [DT 0.007] [L0 23] [L1 23c] [:,(unk)]
POC 7 LId: 0 TId: 2 ( RADL, B-SLICE, QP 25 ) [DT 0.007] [L0 15] [L1 15c] [:,(unk)]
POC 3 LId: 0 TId: 3 ( RADL, B-SLICE, QP 29 ) [DT 0.004] [L0 7] [L1 7c] [:,(unk)]
POC 1 LId: 0 TId: 4 ( RADL, B-SLICE, QP 30 ) [DT 0.004] [L0 3] [L1 3c] [:,(unk)]
POC 0 LId: 0 TId: 5 ( RADL, B-SLICE, QP 30 ) [DT 0.003] [L0 1] [L1 1c] [:,(unk)]
POC 2 LId: 0 TId: 5 ( RADL, B-SLICE, QP 32 ) [DT 0.002] [L0 1c] [L1 3] [:,(unk)]
POC 5 LId: 0 TId: 4 ( RADL, B-SLICE, QP 30 ) [DT 0.003] [L0 3c] [L1 7] [:,(unk)]
...
```
Muxing that file using latest master MP4Box `MP4Box -new test.mp4 -add test_idr.vvc:fps=25` gives the following CompositionOffsets:
```
> MP4Box -diso test.mp4 && grep CompositionOffsetEntry test_info.xml
<CompositionOffsetEntry CompositionOffset="7" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="10" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="5" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="2" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="0" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="1" SampleCount="1"/>
<CompositionOffsetEntry CompositionOffset="3" SampleCount="1"/>
...
```
The offsets should correctly be 28, 19, 10, 5, 2, 0, 1, 3.
There are more miscalculated CTSs later in the bit stream, when the POC wraps around.
I implemented a quick fix for this issue using a heuristic to probe for the minimum POC after an IDR. I will post it in a separate PR. With my fix MP4Box muxes the streams created by VVenC correctly, but a proper fix would probably involve parsing a significant portion of the SPS and then using the `dpb_max_num_reorder_pics` syntax element from the `dpb_parameters` structure to delay dispatching the packets instead of my heuristic. | Wrong CTS offset for non POC 0 IDR frames | https://api.github.com/repos/gpac/gpac/issues/2716/comments | 5 | 2024-01-08T15:35:39Z | 2024-01-29T16:05:42Z | https://github.com/gpac/gpac/issues/2716 | 2,070,701,977 | 2,716 |
[
"gpac",
"gpac"
] | What would be a to-go command to output dash + hls from several .mp4 files (each mp4 file represents one quality, with its own video and audio track configurations).
In fact, video codecs depend from one quality to another sometimes.
Is there a way to do this using GPAC?
And if it is, how to perform DRM with different keys per each video track (quality) ?
Thanks,
| How to output multiquality dash + hls from multiple mp4 files | https://api.github.com/repos/gpac/gpac/issues/2715/comments | 12 | 2024-01-08T12:50:31Z | 2024-02-28T19:29:17Z | https://github.com/gpac/gpac/issues/2715 | 2,070,394,950 | 2,715 |
[
"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 https://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: https://gpac.io/bug-reporting/
I am gonna try making video fragment mp4.
I think that CTS_Offset is using for getting timestamp difference of decoding order.
PTS : 1 4 2 3
DTS : 1 2 3 4
IPBB
when I muxing the video data using gpac, does gpac automatically input CTS_Offset?
or
do I input myself?
something like below,
```
iso_sample.IsRAP= RAP;
iso_sample.data = &buf[index];
iso_sample.dataLength = (frame_size - ADTS_HEADER_SIZE);
iso_sample.DTS = xxx;
iso_sample.CTS_Offset = xxx;
iso_sample.nb_pack = 0;
gf_isom_fragment_add_sample();
```
| when i mux the video data using gpac, does gpac automatically input cts pts dts value? | https://api.github.com/repos/gpac/gpac/issues/2714/comments | 1 | 2024-01-08T09:00:53Z | 2024-01-08T16:23:40Z | https://github.com/gpac/gpac/issues/2714 | 2,070,003,205 | 2,714 |
[
"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 https://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: https://gpac.io/bug-reporting/
### Description
GPAC v2.3 8684dfb was detected to contain a buffer overflow via the function gf_isom_new_generic_sample_description function in the isomedia/isom_write.c:4577
### The affect version
```
MP4Box - GPAC version 2.3-DEV-revrelease
(c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - https://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
```
### Test environment
```
$ uname -a
Linux ubuntu 5.4.0-152-generic #169~18.04.1-Ubuntu SMP Wed Jun 7 22:22:24 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
```
### Compiler with asan
```
$ ./configure --enable-sanitizer
$ make
```
### Reproduce
./bin/gcc/MP4Box -dash 10000 ./poc
poc link:https://github.com/hanxuer/crashes/raw/main/gapc/01/poc.zip
### Report
GDB backtrace: *** buffer overflow detected ***: ../../gpac-asan/bin/gcc/MP4Box terminated
#0 __GI_raise (sig=sig@entry=0x6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff20a27f1 in __GI_abort () at abort.c:79
#2 0x00007ffff20eb837 in __libc_message (action=action@entry=(do_abort | do_backtrace), fmt=fmt@entry=0x7ffff2218869 "*** %s ***: %s terminated\n") at ../sysdeps/posix/libc_fatal.c:181
#3 0x00007ffff2196b5f in __GI___fortify_fail_abort (need_backtrace=need_backtrace@entry=0x1, msg=msg@entry=0x7ffff22187e6 "buffer overflow detected") at fortify_fail.c:33
#4 0x00007ffff2196b81 in __GI___fortify_fail (msg=msg@entry=0x7ffff22187e6 "buffer overflow detected") at fortify_fail.c:44
#5 0x00007ffff2194870 in __GI___chk_fail () at chk_fail.c:28
#6 0x00007ffff2193b02 in __strcpy_chk (dest=dest@entry=0x612000001426 "", src=src@entry=0x7ffffffe2f94 " MPEG-4 AVC|H264 Multiview Video ", destlen=destlen@entry=0x21) at strcpy_chk.c:30
#7 0x00007ffff4682517 in strcpy (__src=0x7ffffffe2f94 " MPEG-4 AVC|H264 Multiview Video ", __dest=0x612000001426 "") at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:90
#8 gf_isom_new_generic_sample_description (movie=<optimized out>, trackNumber=<optimized out>, URLname=URLname@entry=0x0, URNname=URNname@entry=0x0, udesc=udesc@entry=0x7ffffffe2f60, outDescriptionIndex=outDescriptionIndex@entry=0x617000011564) at isomedia/isom_write.c:4577
#9 0x00007ffff51556ad in mp4_mux_setup_pid (filter=<optimized out>, pid=0x613000001000, is_true_pid=<optimized out>) at filters/mux_isom.c:3218
#10 0x00007ffff4da6a44 in gf_filter_pid_configure (filter=filter@entry=0x619000014a80, pid=<optimized out>, ctype=ctype@entry=GF_PID_CONF_CONNECT) at filter_core/filter_pid.c:881
#11 0x00007ffff4dadedf in gf_filter_pid_connect_task (task=0x607000000f70) at filter_core/filter_pid.c:1241
#12 0x00007ffff4de4ea1 in gf_fs_thread_proc (sess_thread=sess_thread@entry=0x616000001c10) at filter_core/filter_session.c:2100
#13 0x00007ffff4de8e94 in gf_fs_run (fsess=0x616000001b80) at filter_core/filter_session.c:2400
#14 0x00007ffff47dfe76 in gf_dasher_process (dasher=<optimized out>) at media_tools/dash_segmenter.c:1255
#15 0x00005555555d7622 in do_dash () at mp4box.c:4832
#16 0x00005555555f5bb7 in mp4box_main (argc=<optimized out>, argv=<optimized out>) at mp4box.c:6256
#17 0x00007ffff2083c87 in __libc_start_main (main=0x5555555db180 <main>, argc=0x4, argv=0x7fffffffdae8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdad8) at ../csu/libc-start.c:310
#18 0x00005555555db23a in _start ()
### Vul in source code:
isom_write.c
entry->Height = udesc->height;
strcpy(entry->compressor_name, udesc->compressor_name); // this
entry->color_table_index = -1;
Thank you very much for your attention and consideration. | buffer-overflow in gf_isom_new_generic_sample_description function at isomedia/isom_write.c:4577 | https://api.github.com/repos/gpac/gpac/issues/2713/comments | 1 | 2024-01-06T06:07:11Z | 2024-01-08T10:22:24Z | https://github.com/gpac/gpac/issues/2713 | 2,068,418,306 | 2,713 |
[
"gpac",
"gpac"
] | I've been trying to use:
https://github.com/gpac/gpac/wiki/thumbs
So my command was:
```gpac -i "input.mp4" reframer:saps=1 thumbs:snap=30:grid=6x30 -o dump/$num$.png```
But I get:
```
No filter chain found for PID V1 in filter reframer to any loaded filters - NOT CONNECTED
No filter chain found for PID A2 in filter reframer to any loaded filters - NOT CONNECTED
Filters not connected:
"thumbs" (js=/usr/local/share/gpac/scripts/jsf/thumbs/init.js:snap=30:grid=6x30) (idx=3)
fout (dst=dump/$.png) (idx=4)
```
| How to dump thumbs? | https://api.github.com/repos/gpac/gpac/issues/2712/comments | 6 | 2024-01-04T19:01:08Z | 2024-01-07T22:33:33Z | https://github.com/gpac/gpac/issues/2712 | 2,066,184,076 | 2,712 |
[
"gpac",
"gpac"
] | I have a TS streamed as a TCP source that I want to raw-dump.
The one-liner from the wiki remuxes: ```gpac -i tcp://xxx -o dump.ts```.
I tried to link the source to ```fout``` to no avail: ```gpac -i tcp://xxx @ fout:dst=dump.ts```
What should I do? | how to dump raw ts | https://api.github.com/repos/gpac/gpac/issues/2711/comments | 2 | 2024-01-04T12:20:46Z | 2024-01-18T17:57:54Z | https://github.com/gpac/gpac/issues/2711 | 2,065,561,928 | 2,711 |
[
"gpac",
"gpac"
] | Hello,
I have a Dolby Vision profile 5 MKV that I am trying to conver to MP4 for playback on my apple tv as it only supports P5 in an MP4 container. What would be the proper workflow if the MKV has one video stream, one audio stream, and multiple subtitles?
i thought a simple `MP4Box -add file.mkv -new new_file.mp4` would work but it looks like only the audio stream got muxed over.
Thanks in advance for any help. | Workflow for P5 MKV to MP4 | https://api.github.com/repos/gpac/gpac/issues/2710/comments | 1 | 2023-12-31T14:00:50Z | 2024-01-08T13:01:25Z | https://github.com/gpac/gpac/issues/2710 | 2,061,069,104 | 2,710 |
[
"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 https://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: https://gpac.io/bug-reporting/
```
/*
opens an isoMedia File. If fileName is NULL data will be written in memory ;
write with gf_isom_write() ; use gf_isom_get_bs() to get the data ;
use gf_isom_delete() to delete the internal data.
*/
file_ptr = gf_isom_open(NULL, GF_ISOM_OPEN_WRITE, NULL);
```
I make NULL filename with GF_ISOFile for data writing in memory.
when I try make video progressive mp4, ```gf_isom_add_sample``` Segmentation Fault Raised.
```
GF_ISOFile *file_ptr = NULL;
// First Arg = NULL data willbe written in memory;
file_ptr = gf_isom_open(NULL, GF_ISOM_OPEN_WRITE, NULL);
gf_isom_set_brand_info
gf_isom_set_timescale
gf_isom_new_track
gf_isom_set_track_enabled
gf_odf_avc_cfg_new
gf_isom_avc_config_new
gf_isom_set_visual_info
gf_isom_avc_config_update
gf_isom_add_sample
```
If there is File name like ```file_ptr = gf_isom_open("output.mp4", GF_ISOM_OPEN_WRITE, NULL);```
There is no error.
What's the difference?
Error is Raised in ```FlushCaptureMode``` in ```gf_isom_add_sample``` Function.
Error Point
https://github.com/gpac/gpac/blob/8684dfbcca4163494017e38f8e132751f12bde26/src/isomedia/isom_write.c#L67
If first argument of strcmp is NULL
```strcmp``` raise Segmantation Fault
| Question About making Progressive mp4 | https://api.github.com/repos/gpac/gpac/issues/2708/comments | 6 | 2023-12-26T04:45:47Z | 2024-01-19T14:17:58Z | https://github.com/gpac/gpac/issues/2708 | 2,056,023,542 | 2,708 |
[
"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 https://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: https://gpac.io/bug-reporting/
Running uncvg with block does not produce the expected padding bits.
In my testing with:
`uncvg:sq=1:vsize=30x20:tiles=1x1:c=R8,G8,B8:sampling=none:interleave=pix:block_size=4:pixel_size=0:row_align=0:tile_align=0:fps=0`
I see the resulting file contains:
```
0000500 83 84 00 00 07 38 6d 64 61 74 ff 00 00 ff 00 00 >.....8mdat......<
0000520 ff 00 00 ff 00 00 00 80 00 00 80 00 00 80 00 00 >................<
0000540 80 00 00 00 ff 00 00 ff 00 00 ff 00 00 ff ff ff >................<
```
Those `0xff` after the start of `mdat` correspond to red values, and they occur every three bytes. Comparing that to Figure 12 (or Figure 13 for the storage view) in the FDIS, I would expect every four bytes.
Possibly related: When I view the resulting file in `gpac -gui`, I see corruption on the right pixels:

The effect is more visible if using tiles, as in:
`uncvg:sq=1:vsize=30x20:tiles=2x4:c=R8,G8,B8:sampling=none:interleave=pix:block_size=4:pixel_size=0:row_align=0:tile_align=0:fps=0`
where the first tile looks OK, but then its corrupted:

I don't see that visual corruption with `block_size=0`. | uncvg: block size appears to be ignored for pixel data | https://api.github.com/repos/gpac/gpac/issues/2707/comments | 1 | 2023-12-24T02:32:11Z | 2024-06-05T08:12:11Z | https://github.com/gpac/gpac/issues/2707 | 2,054,963,889 | 2,707 |
[
"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 https://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: https://gpac.io/bug-reporting/
## OverView
I am trying to write m4a, m4v files like below

How to write only moof and mdat using Gpac Module API?
I am trying like below. but it failed to wrtie.
```
file_ptr = gf_isom_open("output.mp4", GF_ISOM_OPEN_WRITE, NULL);
gf_isom_set_brand_info(file_ptr, GF_ISOM_BRAND_MP42, 0);
gf_isom_setup_track_fragment
gf_isom_start_fragment
gf_isom_fragment_add_sample
fwrite((void*)&file_ptr->moof, 1, sizeof(GF_MovieFragmentBox), wfp);
```
It is right to find it myself, but time is urgent so please understand that I am asking questions. | How to Write Only Moof and Mdat Boxes? | https://api.github.com/repos/gpac/gpac/issues/2706/comments | 4 | 2023-12-21T02:12:48Z | 2023-12-23T13:09:51Z | https://github.com/gpac/gpac/issues/2706 | 2,051,569,088 | 2,706 |
[
"gpac",
"gpac"
] | The behaviour of assert() is inconsistent. It depends on compilers e.g. assert()s may be ignored by msvc in Release mode.
This is an issue if we plan to use assert() as a way to stop when something go wrong.
At the same time some assert()s were inserted by developers. They are deemed useful when developing or unit testing.
We need to check the assert() calls and make sure we don't use it in the first case. | Review the use of assert() in the GPAC codebase | https://api.github.com/repos/gpac/gpac/issues/2705/comments | 1 | 2023-12-20T09:16:38Z | 2023-12-21T16:05:58Z | https://github.com/gpac/gpac/issues/2705 | 2,050,153,084 | 2,705 |
[
"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 https://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: https://gpac.io/bug-reporting/
## Overview
Generating single channel files (e.g. palette or mono) results in corrupted results in gpac -gui for row and tile interleave mode.
## Test cases:
```
gpac uncvg:sq=1:vsize=30x20:tiles=2x4:c=M:sampling=none:interleave=row:block_size=0:row_align=0:tile_align=0:fps=0 -o test1.heif
gpac uncvg:sq=1:vsize=30x20:tiles=2x4:c=M:sampling=none:interleave=tile:block_size=0:row_align=0:tile_align=0:fps=0 -o test2.heif
gpac uncvg:sq=1:vsize=30x20:tiles=2x4:c=p:sampling=none:interleave=row:block_size=0:row_align=0:tile_align=0:fps=0 -o test3.heif
gpac uncvg:sq=1:vsize=30x20:tiles=2x4:c=p:sampling=none:interleave=tile:block_size=0:row_align=0:tile_align=0:fps=0 -o test4.heif
gpac uncvg:sq=1:vsize=30x20:c=M:sampling=none:interleave=row:block_size=0:row_align=0:tile_align=0:fps=0 -o test5.heif
gpac uncvg:sq=1:vsize=30x20:c=p:sampling=none:interleave=row:block_size=0:row_align=0:tile_align=0:fps=0 -o test6.heif
gpac uncvg:sq=1:vsize=30x20:c=x,M:sampling=none:interleave=row:block_size=0:row_align=0:tile_align=0:fps=0 -o test7.heif
```
## Results
Test 1

Test 2

Test 3

Test 4

Test 5

Test 6

Test 7

(note: this is the expected result, but differs from Test 5 example only in that there is a pad channel.) | uncompressed generation / decode of single channel images produces corrupted results in row and tile interleave modes | https://api.github.com/repos/gpac/gpac/issues/2704/comments | 2 | 2023-12-15T06:25:13Z | 2023-12-20T15:56:38Z | https://github.com/gpac/gpac/issues/2704 | 2,042,981,612 | 2,704 |
[
"gpac",
"gpac"
] | combinaison on README.md should be combination. Also I am looking for a mp4 writing example? We appreciate this great lib | README typo | https://api.github.com/repos/gpac/gpac/issues/2703/comments | 1 | 2023-12-14T00:29:22Z | 2023-12-20T15:55:49Z | https://github.com/gpac/gpac/issues/2703 | 2,040,669,199 | 2,703 |
[
"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 https://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: https://gpac.io/bug-reporting/
https://github.com/gpac/gpac/assets/26531945/27cb2f13-cf40-49b8-9e51-917c461d2dae
Reproduce scenario:
1- i took the beepbop.mp4 (file attached to this issue) and generated a dash_session using following command:
```bash
gpac -i beepbop.mp4 -o dash_session/live.mpd
```
this generates the following files:
```bash
dash_session:
total 92
drwxrwxr-x 2 4096 nov. 16 12:06 .
drwxrwxr-x 5 4096 nov. 16 12:13 ..
-rw-rw-r-- 1 2221 nov. 16 12:06 beepbop_dash_track1_1.m4s
-rw-rw-r-- 1 2335 nov. 16 12:06 beepbop_dash_track1_2.m4s
-rw-rw-r-- 1 2365 nov. 16 12:06 beepbop_dash_track1_3.m4s
-rw-rw-r-- 1 2417 nov. 16 12:06 beepbop_dash_track1_4.m4s
-rw-rw-r-- 1 2507 nov. 16 12:06 beepbop_dash_track1_5.m4s
-rw-rw-r-- 1 861 nov. 16 12:06 beepbop_dash_track1_init.mp4
-rw-rw-r-- 1 7560 nov. 16 12:06 beepbop_dash_track2_1.m4s
-rw-rw-r-- 1 7774 nov. 16 12:06 beepbop_dash_track2_2.m4s
-rw-rw-r-- 1 8394 nov. 16 12:06 beepbop_dash_track2_3.m4s
-rw-rw-r-- 1 8871 nov. 16 12:06 beepbop_dash_track2_4.m4s
-rw-rw-r-- 1 8975 nov. 16 12:06 beepbop_dash_track2_5.m4s
-rw-rw-r-- 1 965 nov. 16 12:06 beepbop_dash_track2_init.mp4
-rw-rw-r-- 1 1445 nov. 16 12:06 live.mpd
```
2- i saved a route session to route.gpc using the command:
```bash
gpac -i dash_session/live.mpd dashin:forward=mani -o route://234.1.1.1:1234/live.mpd -netcap-dst=route.gpc
```
3- i examined the content of the route.gpc by dumping the route_session using two methods , direcely dumping files with in_route module and using fout.
commands used:
```bash
gpac -i route://234.1.1.1:1234/live.mpd:gcache=false -netcap-src=route.gpc -o dash_session_via_route_fout/'$File$':dynext
```
```
gpac -i route://234.1.1.1:1234/live.mpd:odir=dash_session_via_route_in_dump/ -netcap-src=route.gpc
```
results :
```bash
dash_session_via_route_fout:
total 88
drwxrwxr-x 2 4096 nov. 16 12:12 .
drwxrwxr-x 5 4096 nov. 16 12:13 ..
-rw-rw-r-- 1 2335 nov. 16 12:12 beepbop_dash_track1_2.m4s
-rw-rw-r-- 1 2365 nov. 16 12:12 beepbop_dash_track1_3.m4s
-rw-rw-r-- 1 2417 nov. 16 12:12 beepbop_dash_track1_4.m4s
-rw-rw-r-- 1 2507 nov. 16 12:12 beepbop_dash_track1_5.m4s
-rw-rw-r-- 1 861 nov. 16 12:12 beepbop_dash_track1_init.mp4
-rw-rw-r-- 1 7560 nov. 16 12:12 beepbop_dash_track2_1.m4s
-rw-rw-r-- 1 7774 nov. 16 12:12 beepbop_dash_track2_2.m4s
-rw-rw-r-- 1 8394 nov. 16 12:12 beepbop_dash_track2_3.m4s
-rw-rw-r-- 1 8871 nov. 16 12:12 beepbop_dash_track2_4.m4s
-rw-rw-r-- 1 8975 nov. 16 12:12 beepbop_dash_track2_5.m4s
-rw-rw-r-- 1 981 nov. 16 12:12 beepbop_dash_track2_init.mp4
-rw-rw-r-- 1 1447 nov. 16 12:12 live.mpd
```
```bash
-rw-rw-r-- 1 2335 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_2.m4s
-rw-rw-r-- 1 2365 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_3.m4s
-rw-rw-r-- 1 2417 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_4.m4s
-rw-rw-r-- 1 2507 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_5.m4s
-rw-rw-r-- 1 861 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_init.mp4
-rw-rw-r-- 1 7560 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_1.m4s
-rw-rw-r-- 1 7774 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_2.m4s
-rw-rw-r-- 1 8394 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_3.m4s
-rw-rw-r-- 1 8871 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_4.m4s
-rw-rw-r-- 1 8975 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_5.m4s
-rw-rw-r-- 1 965 nov. 16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_init.mp4
-rw-rw-r-- 1 1447 nov. 16 12:18 dash_session_via_route_in_dump/service1/live.mp
```
we can see clearly that we systimatically drop the first segment of the track1 ( beepbop_dash_track1_1.m4s)
when I play the route session here is what i got:
1- i am omitting the verbose logs and only displaying what i think is relevant:
we receive the manifest file normally
[ROUTE] Service 1 got TSI 0 config package:
[ROUTE] Service 1 received MPD file live.mpd
we receive the first segment for track_2 normally
[ROUTE] Service 1 got file beepbop_dash_track2_1.m4s (TSI 20 TOI 1) size 7560 in 0 ms (320 bytes in 1 fragments)
[ROUTE] Pushing file beepbop_dash_track2_1.m4s to cache
[ROUTE] Service 1 got file beepbop_dash_track2_init.mp4 (TSI 20 TOI 4294967295) size 981 in 1 ms
[ROUTE] Pushing file beepbop_dash_track2_init.mp4 to cache
then we receive a bench of downloader fail to create service error for beepbop_dash_track1_init (more than two , i’m just omitting )
[Downloader] failed to create session for http://groute/service1/beepbop_dash_track1_init.mp4: Bad Parameter
[Downloader] failed to create session for http://groute/service1/beepbop_dash_track1_init.mp4: Bad Parameter
than we receive the second segments for the track1 beepbop_dash_track1_2.m4s.
[ROUTE] Pushing fragment from file beepbop_dash_track1_2.m4s to cache
[ROUTE] Service 1 got file beepbop_dash_track1_2.m4s (TSI 10 TOI 2) size 2335 in 620 ms
[ROUTE] Pushing file beepbop_dash_track1_2.m4s to cache
And the Dasher drop the first segment of track1:
[DASH] Error in downloading new segment http://groute/service1/beepbop_dash_track1_1.m4s: Bad Parameter
from now on all segments are received normally and the session is error free.
So to sum up when we create the route session from the dash session using netcap the route session isn’t able to correctly transport the first segment of the track1.
| Segment lost when replaying route session from capture file | https://api.github.com/repos/gpac/gpac/issues/2702/comments | 1 | 2023-12-13T09:48:15Z | 2023-12-15T13:54:47Z | https://github.com/gpac/gpac/issues/2702 | 2,039,334,429 | 2,702 |
[
"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 https://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
## Describe the bug
There is a heap-use-after-free bug in gf_isom_box_del , src/isomedia/box_funcs.c:1998, can be triggered via MP4Box+ ASan
## Step to reproduce
```
./configure --enable-sanitizer && make -j$(nproc)
./MP4Box -dash 2411 -add $POC -diso -new /dev/null
```
## Sanitizer output
```
root@ee78492fc0eb:/# /gpac/bin/gcc/MP4Box -dash 2411 -add /mp4box_poc -diso -new /dev/null
[iso file] Unknown box type 0000 in parent minf
[iso file] Unknown box type 0000 in parent minf
[iso file] Unknown box type 0000 in parent vvc1
[iso file] Box "stsz" (start 1119) has 48 extra bytes
[iso file] Box "stco" (start 1187) has 20 extra bytes
[iso file] Missing DataInformationBox
[iso file] Unknown box type 0000 in parent vvc1
[iso file] Unknown box type 0000 in parent minf
[iso file] Unknown box type 0000 in parent minf
IsoMedia import mp4box_poc - track ID 808464432 - Video (size 12336 x 12336)
[iso file] Unknown box type 0000 in parent vvc1
[iso file] Unknown box type 0000 in parent minf
[iso file] Unknown box type 0000 in parent minf
[IsoMedia] Track 1 is disabled but single track in file, considering it enabled
[Dasher] No template assigned, using $File$_dash$FS$$Number$
[RFC6381] Cannot find VVC config, using default vvc1
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 0/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 808464432/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 1616928864/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 2425393296/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 3233857728/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 4042322160/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 4850786592/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 5659251024/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 6467715456/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 7276179888/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 8084644320/808464432
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 8893108752/808464432
[MPD] Generating MPD at time 2023-12-08T08:24:56.689Z
[Dasher] End of Period
[Dasher] End of MPD (no more active streams)
=================================================================
==5522==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000006338 at pc 0x7efdd07b97f8 bp 0x7ffdb4fedf90 sp 0x7ffdb4fedf80
READ of size 8 at 0x606000006338 thread T0
#0 0x7efdd07b97f7 in gf_isom_box_del isomedia/box_funcs.c:1998
#1 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:404
#2 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:397
#3 0x7efdd07b974f in gf_isom_box_array_del isomedia/box_funcs.c:410
#4 0x7efdd07b974f in gf_isom_box_del isomedia/box_funcs.c:2009
#5 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:404
#6 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:397
#7 0x7efdd07b974f in gf_isom_box_array_del isomedia/box_funcs.c:410
#8 0x7efdd07b974f in gf_isom_box_del isomedia/box_funcs.c:2009
#9 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:404
#10 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:397
#11 0x7efdd07b974f in gf_isom_box_array_del isomedia/box_funcs.c:410
#12 0x7efdd07b974f in gf_isom_box_del isomedia/box_funcs.c:2009
#13 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:404
#14 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:397
#15 0x7efdd07b974f in gf_isom_box_array_del isomedia/box_funcs.c:410
#16 0x7efdd07b974f in gf_isom_box_del isomedia/box_funcs.c:2009
#17 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:404
#18 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:397
#19 0x7efdd07b974f in gf_isom_box_array_del isomedia/box_funcs.c:410
#20 0x7efdd07b974f in gf_isom_box_del isomedia/box_funcs.c:2009
#21 0x7efdd07bbd66 in gf_isom_box_array_reset isomedia/box_funcs.c:404
#22 0x7efdd07bbd66 in gf_isom_box_array_reset isomedia/box_funcs.c:397
#23 0x7efdd07bbd66 in gf_isom_box_array_del isomedia/box_funcs.c:410
#24 0x7efdd07eae73 in gf_isom_delete_movie isomedia/isom_intern.c:1092
#25 0x7efdd1537fc2 in mp4_mux_finalize filters/mux_isom.c:8097
#26 0x7efdd11c1e1d in gf_fs_del filter_core/filter_session.c:773
#27 0x7efdd0a061a6 in gf_dasher_clean_inputs media_tools/dash_segmenter.c:164
#28 0x7efdd0a06264 in gf_dasher_del media_tools/dash_segmenter.c:173
#29 0x55c0c57ac04e in do_dash /gpac/applications/mp4box/mp4box.c:4894
#30 0x55c0c57ac04e in mp4box_main /gpac/applications/mp4box/mp4box.c:6245
#31 0x7efdcdad5082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082)
#32 0x55c0c578405d in _start (/gpac/bin/gcc/MP4Box+0xa605d)
0x606000006338 is located 24 bytes inside of 64-byte region [0x606000006320,0x606000006360)
freed by thread T0 here:
#0 0x7efdd406e40f in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:122
#1 0x7efdd07b971c in gf_isom_box_del isomedia/box_funcs.c:2005
#2 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:404
#3 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:397
#4 0x7efdd07b974f in gf_isom_box_array_del isomedia/box_funcs.c:410
#5 0x7efdd07b974f in gf_isom_box_del isomedia/box_funcs.c:2009
#6 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:404
#7 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:397
#8 0x7efdd07b974f in gf_isom_box_array_del isomedia/box_funcs.c:410
#9 0x7efdd07b974f in gf_isom_box_del isomedia/box_funcs.c:2009
#10 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:404
#11 0x7efdd07b974f in gf_isom_box_array_reset isomedia/box_funcs.c:397
#12 0x7efdd07b974f in gf_isom_box_array_del isomedia/box_funcs.c:410
#13 0x7efdd07b974f in gf_isom_box_del isomedia/box_funcs.c:2009
#14 0x7efdd07bbd66 in gf_isom_box_array_reset isomedia/box_funcs.c:404
#15 0x7efdd07bbd66 in gf_isom_box_array_reset isomedia/box_funcs.c:397
#16 0x7efdd07bbd66 in gf_isom_box_array_del isomedia/box_funcs.c:410
#17 0x7efdd07eae73 in gf_isom_delete_movie isomedia/isom_intern.c:1092
#18 0x7efdd1537fc2 in mp4_mux_finalize filters/mux_isom.c:8097
#19 0x7efdd11c1e1d in gf_fs_del filter_core/filter_session.c:773
#20 0x7efdd0a061a6 in gf_dasher_clean_inputs media_tools/dash_segmenter.c:164
#21 0x7efdd0a06264 in gf_dasher_del media_tools/dash_segmenter.c:173
#22 0x55c0c57ac04e in do_dash /gpac/applications/mp4box/mp4box.c:4894
#23 0x55c0c57ac04e in mp4box_main /gpac/applications/mp4box/mp4box.c:6245
#24 0x7efdcdad5082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082)
previously allocated by thread T0 here:
#0 0x7efdd406e808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x7efdd06fe2e1 in cslg_box_new isomedia/box_code_base.c:494
#2 0x7efdd07b902e in gf_isom_box_new_ex isomedia/box_funcs.c:1873
#3 0x7efdd07b9aa8 in gf_isom_box_parse_ex isomedia/box_funcs.c:287
#4 0x7efdd07bedad in gf_isom_box_array_read isomedia/box_funcs.c:1911
#5 0x7efdd07201af in stbl_box_read isomedia/box_code_base.c:5261
#6 0x7efdd07b9d20 in gf_isom_box_read isomedia/box_funcs.c:2021
#7 0x7efdd07b9d20 in gf_isom_box_parse_ex isomedia/box_funcs.c:311
#8 0x7efdd07bedad in gf_isom_box_array_read isomedia/box_funcs.c:1911
#9 0x7efdd071133c in minf_box_read isomedia/box_code_base.c:3726
#10 0x7efdd07b9d20 in gf_isom_box_read isomedia/box_funcs.c:2021
#11 0x7efdd07b9d20 in gf_isom_box_parse_ex isomedia/box_funcs.c:311
#12 0x7efdd07bedad in gf_isom_box_array_read isomedia/box_funcs.c:1911
#13 0x7efdd070df4a in mdia_box_read isomedia/box_code_base.c:3277
#14 0x7efdd07b9d20 in gf_isom_box_read isomedia/box_funcs.c:2021
#15 0x7efdd07b9d20 in gf_isom_box_parse_ex isomedia/box_funcs.c:311
#16 0x7efdd07bedad in gf_isom_box_array_read isomedia/box_funcs.c:1911
#17 0x7efdd072e2fc in trak_box_read isomedia/box_code_base.c:7055
#18 0x7efdd07b9d20 in gf_isom_box_read isomedia/box_funcs.c:2021
#19 0x7efdd07b9d20 in gf_isom_box_parse_ex isomedia/box_funcs.c:311
#20 0x7efdd0851159 in gf_isom_new_track_from_template isomedia/isom_write.c:689
#21 0x7efdd155c106 in mp4_mux_setup_pid filters/mux_isom.c:1465
#22 0x7efdd117ac3d in gf_filter_pid_configure filter_core/filter_pid.c:876
#23 0x7efdd11836ce in gf_filter_pid_connect_task filter_core/filter_pid.c:1237
#24 0x7efdd11bbb1a in gf_fs_thread_proc filter_core/filter_session.c:2105
#25 0x7efdd11c0796 in gf_fs_run filter_core/filter_session.c:2405
#26 0x7efdd0a0864d in gf_dasher_process media_tools/dash_segmenter.c:1236
#27 0x55c0c57abd26 in do_dash /gpac/applications/mp4box/mp4box.c:4831
#28 0x55c0c57abd26 in mp4box_main /gpac/applications/mp4box/mp4box.c:6245
#29 0x7efdcdad5082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082)
SUMMARY: AddressSanitizer: heap-use-after-free isomedia/box_funcs.c:1998 in gf_isom_box_del
Shadow bytes around the buggy address:
0x0c0c7fff8c10: fd fd fd fd fd fd fd fd fa fa fa fa fd fd fd fd
0x0c0c7fff8c20: fd fd fd fd fa fa fa fa fd fd fd fd fd fd fd fa
0x0c0c7fff8c30: fa fa fa fa 00 00 00 00 00 00 00 fa fa fa fa fa
0x0c0c7fff8c40: 00 00 00 00 00 00 00 00 fa fa fa fa 00 00 00 00
0x0c0c7fff8c50: 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 00 00
=>0x0c0c7fff8c60: fa fa fa fa fd fd fd[fd]fd fd fd fd fa fa fa fa
0x0c0c7fff8c70: fd fd fd fd fd fd fd fa fa fa fa fa 00 00 00 00
0x0c0c7fff8c80: 00 00 00 fa fa fa fa fa 00 00 00 00 00 00 00 fa
0x0c0c7fff8c90: fa fa fa fa fd fd fd fd fd fd fd fa fa fa fa fa
0x0c0c7fff8ca0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c0c7fff8cb0: 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
==5522==ABORTING
```
## version
system: ubuntu 20.04.6 LTS
compiler: gcc 9.4.0
gpac version: latest commit https://github.com/gpac/gpac/commit/9bae04565cfcc9dc423cab0dcee0a3aae50b773d
## POC
[PoC.zip](https://github.com/gpac/gpac/files/13611434/PoC.zip)
Please unzip it first. | [BUG] heap-use-after-free in gf_isom_box_del , src/isomedia/box_funcs.c:1998 | https://api.github.com/repos/gpac/gpac/issues/2701/comments | 0 | 2023-12-08T08:33:50Z | 2023-12-11T14:40:00Z | https://github.com/gpac/gpac/issues/2701 | 2,032,202,994 | 2,701 |
[
"gpac",
"gpac"
] | We are trying to stream LL-HLS content with gpac following the guidelines at gpac's [wiki](https://github.com/gpac/gpac/wiki/LL-HLS).
Our gpac build is a recent commit 6493680a0f9763149f467240b4eeafbe83ccb504 in the master branch. The content produced from gpac is served over an H2/3 web server ([h20](https://github.com/h2o/h2o)). We have used the following command to produce the HLS files:
```bash
segment_duration="3" #seconds
chunk_duration="2" #seconds - 0.56 -> 14 frames for 25 fps video
publish_mode="br" #br: byte range, sf: seperate file
gpac flist:srcs=$source:floop=-1 reframer:rt=on \
-o $manifest_file:rdirs=$output_dir:segdur=$segment_duration:cdur=$chunk_duration:profile=live:dmode=dynamic:llhls=br \
-logs=dash@inf
```
We are testing our stream using HLS.js's demo [page](https://hlsjs.video-dev.org/demo/).
We observed in our experiments that the playlist fetching interval is calculated as follows:
```c
interval = max(segment_duration/2, chunk_duration)
```
For instance, let the segment duration be 10 seconds, then the manifest file is fetched every five seconds. So, even if the part duration is one second and the target latency is three seconds, the latency cannot be lower than five seconds.
The playlist should be refetched for every part, right? Otherwise, the player will keep stalling.
Any comments? Are we missing something in our setup? | LL-HLS: Playlist fetching might be too slow | https://api.github.com/repos/gpac/gpac/issues/2700/comments | 15 | 2023-12-07T17:45:01Z | 2024-01-17T15:37:33Z | https://github.com/gpac/gpac/issues/2700 | 2,031,241,611 | 2,700 |
[
"gpac",
"gpac"
] | Is there any way of using gpac to input a video file and output different qualities, such as, 480p, 720p, 1080p, and forcing some of them to be always generated, such as 480p, and the others only if the video size is at least that size?
What I mean would be, if the input video is 720p, then only 480p and 720p should be generated, but not upscaling to 1080p.
Then, if a video is 240p, then upscale to 480p to have that size at least, and the rest should not be generated.
Among this, also do DRM accordingly
| Best flow for performing selective multi-quality | https://api.github.com/repos/gpac/gpac/issues/2699/comments | 2 | 2023-12-04T16:35:53Z | 2023-12-05T12:41:16Z | https://github.com/gpac/gpac/issues/2699 | 2,024,270,799 | 2,699 |
[
"gpac",
"gpac"
] | 1.Version
MP4Box - GPAC version 2.3-DEV-rev636-gfbd7e13aa-master
(c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - https://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: --static-bin --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
2.Program Output
[iso file] Parsing a top-level box at position 0
[iso file] Read Box type ftyp size 32 start 0
[iso file] Parsing a top-level box at position 32
[iso file] Read Box type mv@d size 108 start 32
[iso file] Unknown top-level box type mv@d
[iso file] Parsing a top-level box at position 140
[iso file] Read Box type av1C size 363 start 140
[AV1] parsed AV1 OBU type=7 size=99 at position 152.
[AV1] AV1 unexpected OBU type=152 size=0 found at position 140056310360544. Forwarding.
[AV1] parsed AV1 OBU type=1 size=12 at position 251.
[AV1] parsed AV1 OBU type=1 size=12 at position 263.
[AV1] parsed AV1 OBU type=1 size=12 at position 275.
[AV1] parsed AV1 OBU type=1 size=12 at position 287.
[AV1] parsed AV1 OBU type=2 size=25 at position 299.
[AV1] AV1 unexpected OBU type=299 size=0 found at position 140056310360544. Forwarding.
[AV1] parsed AV1 OBU type=2 size=52 at position 324.
[AV1] AV1 unexpected OBU type=324 size=0 found at position 140056310360544. Forwarding.
[AV1] parsed AV1 OBU type=1 size=12 at position 376.
[AV1] parsed AV1 OBU type=1 size=12 at position 388.
[AV1] parsed AV1 OBU type=1 size=12 at position 400.
[AV1] parsed AV1 OBU type=1 size=12 at position 412.
[AV1] parsed AV1 OBU type=1 size=12 at position 424.
[AV1] parsed AV1 OBU type=1 size=12 at position 436.
[AV1] parsed AV1 OBU type=1 size=12 at position 448.
[AV1] parsed AV1 OBU type=1 size=12 at position 460.
[AV1] parsed AV1 OBU type=1 size=12 at position 472.
[AV1] parsed AV1 OBU type=1 size=12 at position 484.
[BS] Attempt to overread bitstream
3.Reproduction
./MP4Box -v $poc
4.PoC
https://www.mediafire.com/file/fspsarzrcbfceha/hangPoC/file
5.Impact
This vulnerability can result in an infinite loop or lead to a denial-of-service (DoS) condition.
6.Env
Linux ubuntu 5.4.0-84-generic #94~18.04.1-Ubuntu SMP Thu Aug 26 23:17:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
7.Credit
hu1y40 | Infinite loop in av1_uvlc media_tools/av_parsers.c:1664 | https://api.github.com/repos/gpac/gpac/issues/2698/comments | 1 | 2023-12-01T04:51:55Z | 2023-12-01T10:00:42Z | https://github.com/gpac/gpac/issues/2698 | 2,020,058,777 | 2,698 |
[
"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. Although #2695 also reports a seg fault in the latest gpac version.
- [x] I tried with the latest version of GPAC. Installers available at https://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: https://gpac.io/bug-reporting/
MP4Box dxml is producing a segmentation fault. Seems to be related to commit `271e7e2` as versions before (e.g. `gpac-2.3-DEV-rev626-ge4d8e658-master` do not lead to the error).
Version tested: `MP4Box - GPAC version 2.3-DEV-rev635-gc81887c5-master`
Command to reproduce:
`MP4Box -dxml Chimera_2560x1440_30fps_1min_hevc_main10.mp4`
File can be downloaded from https://drive.google.com/drive/folders/15p-M-CPsAjaV1SFjt2tIzpYUndze71dr?usp=drive_link | MP4Box -dxml seg fault | https://api.github.com/repos/gpac/gpac/issues/2697/comments | 1 | 2023-11-29T00:45:35Z | 2023-11-29T01:15:57Z | https://github.com/gpac/gpac/issues/2697 | 2,015,588,907 | 2,697 |
[
"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 https://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: https://gpac.io/bug-reporting/
---
Using `httpout` (via dash/hls output) results in Segmentation Fault on the first request. [master c81887](https://github.com/gpac/gpac/commit/c81887c5d4e56b32efc3b6d81dff3c787dc41de4) seems to have this problem, but 2.2.1 does not
```
ffmpeg \
-re -f lavfi -i testsrc=size=1280x720:rate=30:decimals=3 \
-vf "drawtext=text='%{localtime\:%H.%M.%S}': x=0: y=0: fontsize=64 : fontcolor=white" \
-force_key_frames 'expr:gte(t,n_forced*0.5)' -r:v 30 -keyint_min 30 -g 30 -c:v libx264 -b:v 1M -preset:v ultrafast -tune zerolatency \
-movflags '+dash+delay_moov+skip_sidx+skip_trailer+frag_custom' \
-f mpegts - | gpac \
-i stdin \
-logs=all@info \
-log-utc \
--reqlog=GET \
--rdirs=. \
-o 'http://127.0.0.1:8000/public-ll.m3u8:profile=live:dmode=dynamic'
curl 'http://127.0.0.1:8000/public-ll.m3u8'
```
* Version `2.2.1` will receive `200` response with proper content
* `master` will `Segmentation fault`
```
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [HTTPOut] Accepting new connection from 192.168.65.1
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Internal clock reference packet filtered - PID manifest_m3u8 clock ref 351000/90000 - type 1
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher PID manifest_m3u8 unblocked (filter has 1 blocking pids)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher has only 1 / 2 blocked pids, requesting process task (0 queued)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher added to scheduler
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 Posted task 0xaaaae13b4270 Filter dasher::process (1 (1) pending, 1 process tasks) on secondary task list
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 posting filter task, scheduled_for_next_task 0
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter httpout PID manifest_m3u8 (dasher) drop packet CTS 351000 SAP 0 Seek 0 - 0 packets remaining buffer 0 us
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher PID manifest_m3u8 destroying packet CTS 351000
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher PID manifest_m3u8 has 0 shared packets out
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Internal clock reference packet filtered - PID P1V2 clock ref 3900/1000 - type 1
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filtermp4mxTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter mp4mx PID P1V2 unblocked (filter has 0 blocking pids)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter mp4mx has only 0 / 1 blocked pids, requesting process task (0 queued)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter mp4mx added to scheduler
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 Posted task 0xaaaae1335de0 Filter mp4mx::process (2 (1) pending, 1 process tasks) on secondary task list
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 posting filter task, scheduled_for_next_task 0
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filtermp4mxTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter httpout PID P1V2 (mp4mx) drop packet CTS 3900 SAP 0 Seek 0 - 0 packets remaining buffer 0 us
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter mp4mx PID P1V2 destroying packet CTS 3900
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter mp4mx PID P1V2 has 0 shared packets out
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter httpout real-time reschedule in 2000 us (at 3415919 sys clock)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter httpout process done
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterhttpoutTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterhttpoutTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 re-posted task Filter httpout::process in secondary tasks (3 pending)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 Waiting scheduler main semaphore
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 task#949 0xaaaae13b4270 executing Filter dasher::process (3 tasks pending, 1(1) process task queued)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher PID P1V2 has 4 shared packets out
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher PID P1V2 sent packet DTS 405000 CTS 405000 SAP 0 seek 0 duration 3000 S/E 1/1 size 1366
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Dispatching packet from filter dasher to filter mp4mx - 1 packet in PID P1V2 buffer (33333 us buffer)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filtermp4mxTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter mp4mx skip post process task
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filtermp4mxTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterrfnaluTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter rfnalu PID P1V2 unblocked (filter has 0 blocking pids)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter rfnalu has only 0 / 1 blocked pids, requesting process task (0 queued)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter rfnalu added to scheduler
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 Posted task 0xaaaae133b4d0 Filter rfnalu::process (3 (1) pending, 1 process tasks) on secondary task list
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 posting filter task, scheduled_for_next_task 0
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterrfnaluTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher PID P1V2 (rfnalu) drop packet DTS 405000 CTS 405000 SAP 0 Seek 0 - 0 packets remaining buffer 0 us
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher process done
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Filter] dasher removed from scheduler - blocking 1
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 task#949 0xaaaae13b4270 pushed to reservoir
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 Waiting scheduler main semaphore
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 task#950 0xaaaae1335de0 executing Filter mp4mx::process (3 tasks pending, 2(1) process task queued)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter mp4mx process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterpinTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterpinTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterhttpoutTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterhttpoutTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filterm2tsdmxTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filterm2tsdmxTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterrfnaluTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterrfnaluTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterhttpoutTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterhttpoutTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filtermp4mxTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filtermp4mxTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [MP4Mux] added sample DTS 276000 - prev DTS 273000 - prev size 993
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter mp4mx PID P1V2 (dasher) drop packet DTS 402000 CTS 402000 SAP 0 Seek 0 - 1 packets remaining buffer 33333 us
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [MP4Mux] added sample DTS 279000 - prev DTS 276000 - prev size 1278
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher PID P1V2 unblocked (filter has 0 blocking pids)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher has only 0 / 2 blocked pids, requesting process task (0 queued)
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter dasher added to scheduler
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 Posted task 0xaaaae13477c0 Filter dasher::process (3 (1) pending, 1 process tasks) on secondary task list
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 posting filter task, scheduled_for_next_task 0
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex FilterdasherTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter mp4mx PID P1V2 (dasher) drop packet DTS 405000 CTS 405000 SAP 0 Seek 0 - 0 packets remaining buffer 0 us
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Filter mp4mx process done
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filtermp4mxTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Filter] mp4mx kept in scheduler blocking 0
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filtermp4mxTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filtermp4mxTasks] At 3414 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - [Mutex Filtermp4mxTasks] At 3414 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815161) - Thread 2695991328 re-posted task Filter mp4mx::process in secondary tasks (4 pending)
UTC 2023-11-27T05:43:35Z (TS 1701063815162) - Thread 2695991328 Waiting scheduler main semaphore
UTC 2023-11-27T05:43:35Z (TS 1701063815162) - [Mutex FilterhttpoutTasks] At 3415 Grabbed by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815162) - [Mutex FilterhttpoutTasks] At 3415 Released by thread Main Process
UTC 2023-11-27T05:43:35Z (TS 1701063815162) - Thread 2695991328: task httpout:process postponed for 5 ms (scheduled time 3415919 us, next task schedule 0 us)
UTC 2023-11-27T05:43:35Z (TS 1701063815167) - Thread 2695991328: task httpout:process schedule time 3415919 us reached (diff -3511 ms)
UTC 2023-11-27T05:43:35Z (TS 1701063815167) - Thread 2695991328 task#951 0xaaaae135f670 executing Filter httpout::process (4 tasks pending, 165(1) process task queued)
UTC 2023-11-27T05:43:35Z (TS 1701063815167) - Filter httpout process
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
frame= 103 fps= 30 q=15.0 Lsize= 344kB time=00:00:03.40 bitrate= 829.0kbits/s speed=0.995x
video:313kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.779824%
[libx264 @ 0xaaaaf5f201c0] frame I:7 Avg QP:21.43 size: 25498
[libx264 @ 0xaaaaf5f201c0] frame P:96 Avg QP:20.46 size: 1484
[libx264 @ 0xaaaaf5f201c0] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0xaaaaf5f201c0] mb P I16..4: 3.0% 0.0% 0.0% P16..4: 6.9% 0.0% 0.0% 0.0% 0.0% skip:90.0%
[libx264 @ 0xaaaaf5f201c0] final ratefactor: 21.34
[libx264 @ 0xaaaaf5f201c0] coded y,u,v intra: 2.8% 1.9% 1.7% inter: 0.5% 0.4% 0.3%
[libx264 @ 0xaaaaf5f201c0] i16 v,h,dc,p: 77% 9% 12% 2%
[libx264 @ 0xaaaaf5f201c0] kb/s:747.79
Conversion failed!
Segmentation fault
``` | `httpout` segfaults when processing requests | https://api.github.com/repos/gpac/gpac/issues/2695/comments | 3 | 2023-11-27T05:45:01Z | 2024-01-18T17:14:42Z | https://github.com/gpac/gpac/issues/2695 | 2,011,527,634 | 2,695 |
[
"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/bug-reporting/
I'm struggling with muxing dolby vision mkv's into mp4. Usual suspect is an LG tv (B9).
What I'v ran into is that for files that have multiple audio tracks the tv will only recognize dolby vision when playing with the first audio track for other tracks it falls back to HDR10. I'm completely puzzled by this as I don't see how the audio tracks relate to dolby vision. This behaviour is regardless of which track is actually used, if I add the audio streams in reversed order then still the first audio stream works correclty (originally last).
This issue doesn't seem to be specific to one file, all sources I tried (though limited, only 4 files) behaved the same. If I drop the second audio track then the file plays correctly, again regardless of which track is left.
I went through all the issues I found about dolby vision here and tried the varios options from there to avail.
The process I followed:
1. Extract HEVC and audio streams using ffmpeg
`ffmpeg -y -i /media/movie.mkv -map 0:1 -c:a:0 copy /media/audio_streams/Hungarian/0.hun.0.eac3 -map 0:2 -c:a:0 copy /media/audio_streams/English/1.eng.0.eac3 -map 0:0 -c:v:0 copy -bsf:v hevc_mp4toannexb /media/movie.hevc`
2. Extract DV RPU with [dovi_tool](https://github.com/quietvoid/dovi_tool)
`dovi_tool -c -m 2 extract-rpu /media/movie.hevc -o /media/movie.rpu.bin`
3. Downscale HEVC stream to 1080p with ffmpeg
`ffmpeg -y -hwaccel qsv -i /media/movie.hevc -map 0:0 -c:0 hevc_qsv -qp 25 -preset fast -pix_fmt + -x265-params hdr-opt=1:repeat-headers=1:colorprim=bt2020:range=limited:transfer=smpte2084:colormatrix=bt2020nc:range=limited:master-display='G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,0)':dolby-vision-profile=8.1:dolby-vision-rpu='/media/movie.rpu.bin' -vf scale_qsv=w=1920:h=1080 /media/movie-1080p.hevc`
4. Inject DV RPU to the downscaled stream with dovi_tool
`dovi_tool inject-rpu -i /media/movie-1080p.hevc --rpu-in /media/movie.rpu.bin -o /media/movie.rpu.hevc`
5. Package all streams into mp4 with MP4Box
`MP4Box -new -add /media/movie.rpu.hevc:dvp=f8.1.hdr10 -add /media/audio_streams/Hungarian/0.hun.0.eac3 -lang 2=hun -name 2=Hungarian -delay 2=0 -add /media/audio_streams/English/1.eng.0.eac3 -lang 3=eng -name 3=English -delay 3=0 -brand mp42 -ab isom -ab dby1 --force_dv /media/movie.mp4`
Altough I'm resizing the streams, it doesn't seem be the cause of this, if I skip that step the behaviour is still the same.
I'm using the following versions:
- MP4Box - 2.2.1-rev0-gb34e3851-release-2.2
- ffmpeg - 6.0-Jellyfin
- dovi_tool - 1.4.6 | Dolby Vision with multiple audio tracks | https://api.github.com/repos/gpac/gpac/issues/2694/comments | 10 | 2023-11-24T09:40:38Z | 2024-03-13T20:31:57Z | https://github.com/gpac/gpac/issues/2694 | 2,009,409,289 | 2,694 |
[
"gpac",
"gpac"
] | I hope to add a reference within an MP4/ISOBMFF file to a CTA-608/708 caption track contained in the video SEI side data, in accordance with ISO/IEC 14496-30:2018/Amendment 1:2022, [Part 30: Timed text and other visual overlays in ISOBMFF](https://www.iso.org/standard/82615.html).
- While the most recent version of ISO/IEC 14496-30 Amendment 1 is behind a paywall, the older version of the spec is public at [ISO/IEC 14496-30 PDAM1:2016 Support for CTA-708 captioning in SEI messages](https://mpeg.chiariglione.org/standards/mpeg-4/timed-text-and-other-visual-overlays-iso-base-media-file-format/text-isoiec-14496-0)
- ISOBMFF ISO/IEC 14496-30 Amendment 1 requires the use of the `csei` tag.
- CMAF ISO/IEC 23000-19:2020, Annex A.4/5, Table 11 [uses file brand](https://github.com/w3c/media-capabilities/issues/157#issuecomment-666600111) `ccea`, for CEA-608 and CEA-708 where "CEA-608 and CEA-708". Due to paywall, and older public version is available [here](https://mpeg.chiariglione.org/standards/mpeg-a/common-media-application-format/text-isoiec-cd-23000-19-common-media-application).
- The ISOBMFF `csei` data is analogous to the `caption_service_descriptor()` in ATSC A/65 MPEG-2 Transport Streams.
- This requirement is unrelated to the `clcp:c608` box in an Apple Quicktime MOV
CMAF ISO/IEC 23000-19 states that ISOBMFF ISO/IEC 14496-30 Amendment 1 is required.
> Signaling the presence of CEA-608/708 in SEI messages. The presence of CEA-608/708 data in SEI messages in a video track SHOULD be signaled as specified by MPEG-4 Part 30 Amendment 1.
ISO/IEC 14496-30 Amendment 1 states that referencing 608/708 data contained within the SEI data of a video track requires:
> #### Signalling the presence of CTA-708 in SEI messages
> The presence of CTA-708 data in SEI messages in a video track SHOULD be signaled by the presence of one or more Track boxes with Media Type `sbtl` with a Sample Entry codingname of `csei` and a track reference of type `csei` to the video track. This track SHALL NOT reference any media samples.
>
> Each track declares the language of one of the streams in the caption data by using an Extended Language Box (`elng`) in the Media Data Information Box (`mdia`).
>
> The `CEAServiceNumberBox` in the sample entry of each track identifies which service carries that language, and shall be present if more than one `csei` track is present. If this box is absent, `service_number` takes the default value of 1. The `csei` sample entry is derived from the PlainTextSampleEntry, with codingname equal `csei`. In the `CEAServiceNumberBox` there are two values from section 4.5 of the CEA708 specification: `is_708` reflects the TYPE OF SERVICE and is 1 for 708 and 0 for 608; `is_easy_reader` reflects the EASY READER value and is 1 for easy reader streams and 0 otherwise.
>
> The track header width and height give the display area for the stream; normally these are equal to the referenced video stream's width and height.
Most of the excellent MP4Box examples at https://github.com/gpac/gpac/wiki/Subtitling-with-GPAC relate to importing a subtitle track from an external file, rather than cross-referencing existing CTA-608/708 data contained in a video track's SEI messages. I have tried MP4Box's builtin `-add 'self':hdlr='sbtl':lang='eng'` options, but it looks like the standard command line tool does not support ISO/IEC 14496-30:2018/Amendment 1:2022.
I assume that since it is not directly supported through command-line options, I need to use a boxpatch/patch file. Assuming an MP4 containing a single video track, how can I use boxpatch/patch to add the following to the structure?
```
altBrand 'ccea' # For compatibility with CMAF, Appendix A.4/5, Table 11. (use alternate brand -ab ?)
'sbtl' > codingName 'csei' > trackReferenceType `csei`
'tkhd' > 'width'=720 'height'=480 # tkhd width/height for 608 data in NTSC
'mdia' > 'elng'='eng' # Extended Language Box
'CEAServiceNumberBox'
if 'is_708'=0 # analogous to ATSC A/65 digital_cc=0
# ATSC A/65 Line21 field number does not map to an ISOBMFF equivalent field.
if 'is_708'=1 # analogous to ATSC A/65 digital_cc=1
'service_number'=1 # analogous to ATSC A/65 caption_service_number
'is_easy_reader'=0 # analogous to ATSC A/65 easy_reader
# ATSC A/65 wide_screen does not map to an ISOBMFF equivalent field
```
In my case, I would like to add CTA-708, service number 1, easy_reader false.
As someone inexperienced with MP4Box patch files, I hope someone more familiar with box structures can point me in the right direction to how the above quotation from ISO/IEC 14496-30:2018/Amendment 1:2022 can be mapped within an MP4Box Patch File, for compliance with both ISO/IEC 14496-30:2018/Amendment 1:2022 and CMAF Appendix A.5 Table 11.
Unfortunately, I do not have the experience to understand which of the above boxes map to which nodes in a patch file in order to produce a compliant file. I hope that readers will appreciate that I have researched and cross-referenced the standards, however I am suffering from lack of experience with MP4Box patch file structure.
``` xml
$ cat "./patch.xml"
<GPACBOXES>
<box type="hdlr" action="add">
<!-- <box type="stbl" action="add"> -->
</box>
<box type="trak">
<box type="tkhd" action="add">
<!-- Track header fields go here -->
</box>
<box type="mdia">
<box type="mdhd" action="add">
<!-- Media header fields go here -->
</box>
<box type="minf">
<box type="stbl">
<box type="stsd" action="add">
<!-- Sample description fields go here -->
</box>
</box>
</box>
</box>
</box>
</GPACBOXES>
```
```
$ MP4Box -add "./infile.mp4" -patch "./patch.xml" -new "./outfile.mp4"
```
It seems that only a few ISOBMFF implementations utilize the standards-compliant boxes defined by ISOBMFF ISO/IEC 14496-30 Amendment 1 and CMAF ISO/IEC 23000-19:2020, Annex A.4/5, Table 11. Of course, in DASH/WAVE, it would be expected that the manifest would declare this same data to the player through the `<Accessibility schemeIdUri="urn:scte:dash:cc:cea-608:2015">` tag, but the Box data should still be accurate for unsegmented ISOBMFFs and standalone media segments where no manifest is guaranteed to be present.
It seems that an MP4Box Patch File would be the appropriate tool to set these boxes in the ISOBMFF.
Can the above be achieved with a MP4Box patch file? And if so, could someone point me in the right direction to at least get some of the boxes accurate. My experience is more in the MPEG-2 TS / HLS domain.
Many thanks in advance.
---
- [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 ...).
- [x] I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
---
#### System Information
``` text
# MP4Box installed with brew install mp4box
# Operating System macOS 12.7.1
$ MP4Box -version
MP4Box - GPAC version 2.2.1-revrelease
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --disable-wx --disable-pulseaudio --prefix=/usr/local/Cellar/gpac/2.2.1_1 --mandir=/usr/local/Cellar/gpac/2.2.1_1/share/man --disable-x11
Features: GPAC_CONFIG_DARWIN GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS
``` | [Q] Support for CTA-608/708 captioning in SEI messages | https://api.github.com/repos/gpac/gpac/issues/2693/comments | 1 | 2023-11-20T01:24:27Z | 2024-06-04T15:00:38Z | https://github.com/gpac/gpac/issues/2693 | 2,001,193,198 | 2,693 |
[
"gpac",
"gpac"
] | When doing ```gpac -h bench``` for #2682, I got this output:
```
-bench: check decoding speed of source. Syntax: `gpac -bench source.mp4`
session error: Filter not found for the desired type
```
I don't think we should return an error in this case. Is there a good reason to do so?
For the record the error comes from:
```
if (print_filters(argc, argv, argmode)==GF_FALSE)
e = GF_FILTER_NOT_FOUND
``` | Error returned while using -h | https://api.github.com/repos/gpac/gpac/issues/2691/comments | 0 | 2023-11-17T13:42:38Z | 2023-12-04T18:06:44Z | https://github.com/gpac/gpac/issues/2691 | 1,999,165,301 | 2,691 |
[
"gpac",
"gpac"
] | I'm a fan of your GPAC - MP4Box and I'm reaching out to suggest creating a dedicated API for Flutter. Here's why it would be beneficial:
1. **Wider Developer Adoption:** Supporting Flutter would attract more developers to use and integrate your platform.
2. **Simplified Integration:** A Flutter API would streamline the integration process, making it easier for developers to use your platform in their Flutter projects.
3. **Community Engagement:** Embracing Flutter shows your commitment to an active and growing developer community.
4. **Increased Versatility:** Integrating with Flutter would expand your platform's accessibility and usability across multiple platforms.
Your consideration of this request would mean a lot. Looking forward to the possibilities this collaboration could bring.
Best regards,
Brian Tum | Flutter API request | https://api.github.com/repos/gpac/gpac/issues/2690/comments | 1 | 2023-11-16T14:53:41Z | 2024-05-23T10:50:25Z | https://github.com/gpac/gpac/issues/2690 | 1,997,049,364 | 2,690 |
[
"gpac",
"gpac"
] | 1、Version
./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev617-g671976fcc-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
2、ASAN Log
[DASH] Updated manifest:
P#1: start 0 - duration 0 - xlink none
[DASH] Manifest after update:
P#1: start 0 - duration 0 - xlink none
[DASH] Setting up period start 0 duration 0 xlink none ID DID1
[DASH] Cannot compute default segment duration
[DASH] AS#1 changed quality to bitrate 10 kbps - Width 1280 Height 720 FPS 30/1 (playback speed 1)
[DASH] AS#2 changed quality to bitrate 120 kbps - Width 384 Height 256 FPS 30/1 (playback speed 1)
[DASH] AS#3 changed quality to bitrate 120 kbps - Width 384 Height 256 FPS 30/1 (playback speed 1)
[DASH] AS#4 changed quality to bitrate 120 kbps - Width 448 Height 256 FPS 30/1 (playback speed 1)
[DASH] AS#5 changed quality to bitrate 120 kbps - Width 448 Height 256 FPS 30/1 (playback speed 1)
[DASH] AS#6 changed quality to bitrate 120 kbps - Width 384 Height 208 FPS 30/1 (playback speed 1)
[DASH] AS#7 changed quality to bitrate 120 kbps - Width 448 Height 208 FPS 30/1 (playback speed 1)
[DASH] AS#8 changed quality to bitrate 120 kbps - Width 448 Height 208 FPS 30/1 (playback speed 1)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78824071088 ms: Initializing Timeline: startNumber=1 segmentNumber=78824071 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.88241e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] Segment duration unknown - cannot estimate current startNumber
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78824071088 ms: Initializing Timeline: startNumber=1 segmentNumber=78824071 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.88241e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78824071088 ms: Initializing Timeline: startNumber=1 segmentNumber=78824071 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.88241e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78824071088 ms: Initializing Timeline: startNumber=1 segmentNumber=78824071 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.88241e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78824071088 ms: Initializing Timeline: startNumber=1 segmentNumber=78824071 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.88241e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78824071088 ms: Initializing Timeline: startNumber=1 segmentNumber=78824071 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.88241e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78824071088 ms: Initializing Timeline: startNumber=1 segmentNumber=78824071 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.88241e+07)
[DASH] Unable to resolve initialization URL: Bad Parameter
Filter dashin failed to setup: Bad Parameter
Filters not connected:
fout (dst=crash24_dash.mpd:gpac:segdur=10000/1000:profile=full:!sap:buf=1500:!check_dur:pssh=v:subs_sidx=0) (idx=1)
Arg segdur set but not used
Arg profile set but not used
Arg !sap set but not used
Arg buf set but not used
Arg !check_dur set but not used
Arg pssh set but not used
Arg subs_sidx set but not used
Error DASHing file: Bad Parameter
=================================================================
==3766==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 50 byte(s) in 1 object(s) allocated from:
#0 0x7f8f1245b9a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
#1 0x7f8f112d489f in gf_mpd_resolve_url media_tools/mpd.c:4589
#2 0x7f8f11303e24 in gf_dash_resolve_url media_tools/dash_client.c:3447
SUMMARY: AddressSanitizer: 50 byte(s) leaked in 1 allocation(s).
3、Reproduction
./MP4Box -dash 10000 $poc
4、poc
[crash24.zip](https://www.mediafire.com/file/1sbsks4tzvzf1r3/crash24.zip/file)
5、Impact
This vulnerability is capable of causing crashes, or lead to dos.
6、 Env
Linux dr0v-virtual-machine 6.2.0-36-generic https://github.com/gpac/gpac/issues/37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
AFL++ 4.09a
7、Credit
dr0v | LeakSanitizer: detected memory leaks in in gf_mpd_resolve_url media_tools/mpd.c:4589 | https://api.github.com/repos/gpac/gpac/issues/2689/comments | 0 | 2023-11-16T01:53:56Z | 2023-11-16T10:21:02Z | https://github.com/gpac/gpac/issues/2689 | 1,995,888,449 | 2,689 |
[
"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/bug-reporting/
The package `libgpac-dev` isn't available for the Ubuntu 23.10 Mantic release. [Package search returns no results](https://packages.ubuntu.com/search?suite=mantic&searchon=names&keywords=libgpac), It compiled just fine when building on 23.10 then why is it unavailable? Are there any other issues with gpac on Ubuntu 23.10?
| libgpac-dev unavaible on Ubuntu 23.10 | https://api.github.com/repos/gpac/gpac/issues/2688/comments | 3 | 2023-11-15T18:40:38Z | 2023-11-15T19:51:44Z | https://github.com/gpac/gpac/issues/2688 | 1,995,325,176 | 2,688 |
[
"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/bug-reporting/
1.get latest commit code (gpac - GPAC command line filter engine - version 2.3-DEV-rev621-g3edb48d2b-master)
2.compile with --enable-sanitizer
3.run MP4Box -bt any.swf (not exists)
Env:
Ubunut 20.04 , clang 16.0.1
AddressSanitizer:DEADLYSIGNAL
=================================================================
==89492==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fbbadd763c2 bp 0x7ffcfda28a20 sp 0x7ffcfda27900 T0)
==89492==The signal is caused by a WRITE memory access.
==89492==Hint: address points to the zero page.
#0 0x7fbbadd763c2 in gf_sm_load_init_swf scene_manager/swf_parse.c:2655
#1 0x7fbbadd0fa0f in gf_sm_load_init scene_manager/scene_manager.c:692
#2 0x56046142d484 in dump_isom_scene /home/lly/pro/gpac/applications/mp4box/filedump.c:208
#3 0x56046141d810 in mp4box_main /home/lly/pro/gpac/applications/mp4box/mp4box.c:6467
#4 0x56046141fb4f in main /home/lly/pro/gpac/applications/mp4box/mp4box.c:6939
#5 0x7fbbad1c3082 in __libc_start_main ../csu/libc-start.c:308
#6 0x5604613f7ddd in _start (/home/lly/pro/gpac/bin/gcc/MP4Box+0x4fddd)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV scene_manager/swf_parse.c:2655 in gf_sm_load_init_swf
==89492==ABORTING
Seems mp4box did not check the swf file exist. | Null pointer at gf_sm_load_init_swf scene_manager/swf_parse.c:2655 with noexist swf file | https://api.github.com/repos/gpac/gpac/issues/2687/comments | 0 | 2023-11-15T08:49:48Z | 2023-11-15T12:49:23Z | https://github.com/gpac/gpac/issues/2687 | 1,994,320,321 | 2,687 |
[
"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/bug-reporting/
1.get latest commit code (gpac - GPAC command line filter engine - version 2.3-DEV-rev621-g3edb48d2b-master)
2.compile with --enable-sanitizer
3.run MP4Box -bt poc.swf
Env:
Ubunut 20.04 , clang 16.0.1
`
>==88804==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61b000000630 at pc 0x7f8354a0bc5a bp 0x7ffc283dee40 sp 0x7ffc283de5e8
READ of size 1457 at 0x61b000000630 thread T0
#0 0x7f8354a0bc59 in __interceptor_strlen ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:387
#1 0x7f8353dd7d6a in swf_get_string scene_manager/swf_parse.c:332
#2 0x7f8353de0624 in swf_actions scene_manager/swf_parse.c:1152
#3 0x7f8353de929b in swf_process_tag scene_manager/swf_parse.c:2363
#4 0x7f8353de9524 in swf_parse_tag scene_manager/swf_parse.c:2405
#5 0x7f8353de97e7 in swf_parse_sprite scene_manager/swf_parse.c:2435
#6 0x7f8353df3a3f in swf_bifs_define_sprite scene_manager/swf_bifs.c:1319
#7 0x7f8353de561d in swf_def_sprite scene_manager/swf_parse.c:1756
#8 0x7f8353de9210 in swf_process_tag scene_manager/swf_parse.c:2345
#9 0x7f8353de9524 in swf_parse_tag scene_manager/swf_parse.c:2405
#10 0x7f8353debb1f in gf_sm_load_init_swf scene_manager/swf_parse.c:2703
#11 0x7f8353d84a7f in gf_sm_load_init scene_manager/scene_manager.c:692
#12 0x56164633c424 in dump_isom_scene /home/lly/pro/gpac/applications/mp4box/filedump.c:208
#13 0x561646328f1d in mp4box_main /home/lly/pro/gpac/applications/mp4box/mp4box.c:6467
#14 0x7f8353238082 in __libc_start_main ../csu/libc-start.c:308
#15 0x56164630cdbd in _start (/home/lly/pro/gpac/bin/gcc/MP4Box+0x4edbd)
0x61b000000630 is located 0 bytes to the right of 1456-byte region [0x61b000000080,0x61b000000630)
allocated by thread T0 here:
#0 0x7f8354a7e157 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7f8353dd7ba5 in swf_get_string scene_manager/swf_parse.c:318
#2 0x7f8353de0624 in swf_actions scene_manager/swf_parse.c:1152
#3 0x7f8353de929b in swf_process_tag scene_manager/swf_parse.c:2363
#4 0x7f8353de9524 in swf_parse_tag scene_manager/swf_parse.c:2405
#5 0x7f8353de97e7 in swf_parse_sprite scene_manager/swf_parse.c:2435
#6 0x7f8353df3a3f in swf_bifs_define_sprite scene_manager/swf_bifs.c:1319
#7 0x7f8353de561d in swf_def_sprite scene_manager/swf_parse.c:1756
#8 0x7f8353de9210 in swf_process_tag scene_manager/swf_parse.c:2345
#9 0x7f8353de9524 in swf_parse_tag scene_manager/swf_parse.c:2405
#10 0x7f8353debb1f in gf_sm_load_init_swf scene_manager/swf_parse.c:2703
#11 0x7f8353d84a7f in gf_sm_load_init scene_manager/scene_manager.c:692
#12 0x56164633c424 in dump_isom_scene /home/lly/pro/gpac/applications/mp4box/filedump.c:208
#13 0x561646328f1d in mp4box_main /home/lly/pro/gpac/applications/mp4box/mp4box.c:6467
#14 0x7f8353238082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:387 in __interceptor_strlen
Shadow bytes around the buggy address:
0x0c367fff8070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c367fff8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c367fff8090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c367fff80a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c367fff80b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c367fff80c0: 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa
0x0c367fff80d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c367fff80e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c367fff80f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c367fff8100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c367fff8110: 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
==88804==ABORTING
`
Did not end str with '\00' ,which makes strlen visit the extra memory.
[poc.swf.zip](https://github.com/gpac/gpac/files/13362282/poc.swf.zip)
| heap-buffer-overflow on swf_get_string scene_manager/swf_parse.c:332 | https://api.github.com/repos/gpac/gpac/issues/2686/comments | 0 | 2023-11-15T08:44:45Z | 2023-11-15T12:49:22Z | https://github.com/gpac/gpac/issues/2686 | 1,994,312,088 | 2,686 |
[
"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/bug-reporting/
Step to reproduce:
1.get latest commit code (gpac - GPAC command line filter engine - version 2.3-DEV-rev621-g3edb48d2b-master)
2.compile with --enable-sanitizer
3.run MP4Box -bt a.swf
Env:
Ubunut 20.04 , clang 16.0.1
`=================================================================
==88571==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x63200001555c at pc 0x7f817b49f69a bp 0x7ffd8439aae0 sp 0x7ffd8439a288
READ of size 32768 at 0x63200001555c thread T0
#0 0x7f817b49f699 in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:823
#1 0x7f8179b097bf in updatewindow (/usr/local/lib/libz.so.1+0xb7bf)
#2 0x7f8179b0a2f3 in inflate (/usr/local/lib/libz.so.1+0xc2f3)
#3 0x7f8179b1034b in uncompress2 (/usr/local/lib/libz.so.1+0x1234b)
#4 0x7f8179b10426 in uncompress (/usr/local/lib/libz.so.1+0x12426)
#5 0x7f817a87f7c8 in swf_def_bits_jpeg scene_manager/swf_parse.c:2156
#6 0x7f817a880305 in swf_process_tag scene_manager/swf_parse.c:2378
#7 0x7f817a880524 in swf_parse_tag scene_manager/swf_parse.c:2405
#8 0x7f817a880c17 in gf_sm_load_run_swf scene_manager/swf_parse.c:2476
#9 0x55ac96ea078f in dump_isom_scene /home/lly/pro/gpac/applications/mp4box/filedump.c:209
#10 0x55ac96e8cf1d in mp4box_main /home/lly/pro/gpac/applications/mp4box/mp4box.c:6467
#11 0x7f8179ccf082 in __libc_start_main ../csu/libc-start.c:308
#12 0x55ac96e70dbd in _start (/home/lly/pro/gpac/bin/gcc/MP4Box+0x4edbd)
0x63200001555c is located 0 bytes to the right of 85340-byte region [0x632000000800,0x63200001555c)
allocated by thread T0 here:
#0 0x7f817b515157 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7f817a87f79e in swf_def_bits_jpeg scene_manager/swf_parse.c:2155
#2 0x7f817a880305 in swf_process_tag scene_manager/swf_parse.c:2378
#3 0x7f817a880524 in swf_parse_tag scene_manager/swf_parse.c:2405
#4 0x7f817a880c17 in gf_sm_load_run_swf scene_manager/swf_parse.c:2476
#5 0x55ac96ea078f in dump_isom_scene /home/lly/pro/gpac/applications/mp4box/filedump.c:209
#6 0x55ac96e8cf1d in mp4box_main /home/lly/pro/gpac/applications/mp4box/mp4box.c:6467
#7 0x7f8179ccf082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:823 in __interceptor_memcpy
Shadow bytes around the buggy address:
0x0c647fffaa50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c647fffaa60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c647fffaa70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c647fffaa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c647fffaa90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c647fffaaa0: 00 00 00 00 00 00 00 00 00 00 00[04]fa fa fa fa
0x0c647fffaab0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c647fffaac0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c647fffaad0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c647fffaae0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c647fffaaf0: 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
==88571==ABORTING
`
reason:
in swf_def_bits_jpeg, the type of para destLen to uncompress is uLongf * and can not passed it within a (uLongf *) &osize while type of osize is u32.
swf_def_bits_jpeg:
u32 osize
uncompress((Bytef *) dst, (uLongf *) &osize, buf, AlphaPlaneSize);
Or it will make the destLen much larger than dest buffer len.
[poc.swf.zip](https://github.com/gpac/gpac/files/13362187/poc.swf.zip)
| heap-buffer-overflow in swf_def_bits_jpeg scene_manager/swf_parse.c:2156 | https://api.github.com/repos/gpac/gpac/issues/2685/comments | 3 | 2023-11-15T08:36:56Z | 2023-11-16T10:23:49Z | https://github.com/gpac/gpac/issues/2685 | 1,994,300,300 | 2,685 |
[
"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/bug-reporting/
Step to reproduce:
1.get latest commit code (gpac - GPAC command line filter engine - version 2.3-DEV-rev621-g3edb48d2b-master)
2.compile with --enable-sanitizer
3.run MP4Box -bt poc.swf
Env:
Ubunut 20.04 , clang 16.0.1
ASAN report
==86785==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f72652deea0 at pc 0x7f7269cf869a bp 0x7ffc978dbe90 sp 0x7ffc978db638
READ of size 1400 at 0x7f72652deea0 thread T0
#0 0x7f7269cf8699 in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:823
#1 0x7f72682bd2da in png_write_row (/lib/x86_64-linux-gnu/libpng16.so.16+0x232da)
#2 0x7f72682bd6af in png_write_image (/lib/x86_64-linux-gnu/libpng16.so.16+0x236af)
#3 0x7f7268f507ce in [poc.swf.zip](https://github.com/gpac/gpac/files/13362023/poc.swf.zip) media_tools/img.c:700
#4 0x7f72690d8e61 in swf_def_bits_jpeg scene_manager/swf_parse.c:2175
#5 0x7f72690d96b4 in swf_process_tag scene_manager/swf_parse.c:2381
#6 0x7f72690d98d3 in swf_parse_tag scene_manager/swf_parse.c:2408
#7 0x7f72690d9fc6 in gf_sm_load_run_swf scene_manager/swf_parse.c:2479
#8 0x5555cc7f078f in dump_isom_scene /home/lly/pro/gpac/applications/mp4box/filedump.c:209
#9 0x5555cc7dcf1d in mp4box_main /home/lly/pro/gpac/applications/mp4box/mp4box.c:6467
#10 0x7f7268528082 in __libc_start_main ../csu/libc-start.c:308
#11 0x5555cc7c0dbd in _start (/home/lly/pro/gpac/bin/gcc/MP4Box+0x4edbd)
0x7f72652deea0 is located 0 bytes to the right of 509600-byte region [0x7f7265262800,0x7f72652deea0)
allocated by thread T0 here:
#0 0x7f7269d6e157 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7f72690d8763 in swf_def_bits_jpeg scene_manager/swf_parse.c:2139
#2 0x7f72690d96b4 in swf_process_tag scene_manager/swf_parse.c:2381
#3 0x7f72690d98d3 in swf_parse_tag scene_manager/swf_parse.c:2408
#4 0x7f72690d9fc6 in gf_sm_load_run_swf scene_manager/swf_parse.c:2479
#5 0x5555cc7f078f in dump_isom_scene /home/lly/pro/gpac/applications/mp4box/filedump.c:209
#6 0x5555cc7dcf1d in mp4box_main /home/lly/pro/gpac/applications/mp4box/mp4box.c:6467
#7 0x7f7268528082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:823 in __interceptor_memcpy
Shadow bytes around the buggy address:
0x0feecca53d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0feecca53d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0feecca53da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0feecca53db0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0feecca53dc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0feecca53dd0: 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa
0x0feecca53de0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0feecca53df0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0feecca53e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0feecca53e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0feecca53e20: 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
seems that para stride to gf_img_png_enc error, makes libpng write out of scope memory.
2173:
gf_img_png_enc(raw, w, h, h*4, GF_PIXEL_RGBA, (char *)buf, &osize);
should it be h*4 or w*4?
Here's some debug info i print: width = 350,heigth = 364,
and i've print the 4*stride value : 1456(4*364) while the step in libpng is 1400(4*350).
May it help.
[poc.swf.zip](https://github.com/gpac/gpac/files/13362027/poc.swf.zip)
| heap-buffer-overflow in gf_img_png_enc at media_tools/img.c | https://api.github.com/repos/gpac/gpac/issues/2684/comments | 1 | 2023-11-15T08:21:13Z | 2023-11-15T12:54:25Z | https://github.com/gpac/gpac/issues/2684 | 1,994,277,186 | 2,684 |
[
"gpac",
"gpac"
] | Hello I'm trying to run dasher in dual mode and specify both hls and dash's manifest path explicitly (different manifest destination directory). Similar to the following:
<img width="148" alt="image" src="https://github.com/gpac/gpac/assets/29557802/828f7232-fcd4-4c8e-ad64-54792801b0fd">
Reading the documentation here, this seems possible: https://github.com/gpac/gpac/wiki/dasher#output-redirecting. Specifically the following verbiage:
"This will create a single dasher whose outputs (manifests and segments) will be redirected to the given URLs.
When explicitly loading the filter, the [dual](https://github.com/gpac/gpac/wiki/dasher#dual) option will be disabled unless [mname](https://github.com/gpac/gpac/wiki/dasher#mname) is set to the alternate output name."
Running the gpac command:
```gpac -i someFile.mp4 dasher:dual:mname=/out/dash/dash_live.mpd --segdur=10 --cdur=2 --asto=8 --dmode=dynamic --llhls=br --profile=live --tsb=60 --template='../common/$File$_$Number$' -o /out/hls/hls_live.m3u8 -o /out/dash/dash_live.mpd```
Results in both fout destinations containing a dash manifest (the fout names/paths are correct but the content is dash for both).
Here is the resulting filter graph (paths are simplified above):
```
Filters connected:
fin (src=/Users/ekram/Desktop/ott_assets/Sintel/sintel.mp4) (idx=1)
-(PID sintel.mp4) mp4dmx (dyn_idx=5)
--(PID V1)\
--(PID A2)-> dasher (dual:mname=/Users/ekram/Desktop/test-gpac-multi-out/dash/dash_live.mpd) (idx=2)
---(PID manifest_mpd) fout (dst=/Users/ekram/Desktop/test-gpac-multi-out/hls/hls_live.m3u8:mname=/Users/ekram/Desktop/test-gpac-multi-out/hls/hls_live.m3u8) (idx=3)
---(PID manifest_mpd) fout (dst=/Users/ekram/Desktop/test-gpac-multi-out/dash/dash_live.mpd) (idx=4)
---(PID V1) mp4mx (dyn_idx=8)
----(PID V1) fout (dst=/Users/ekram/Desktop/test-gpac-multi-out/common/sintel_init_track1_.mp4:gfopt:frag:xps_inband=no:psshs=moov:mime=video/mp4) (idx=6)
---(PID A2) mp4mx (dyn_idx=9)
----(PID A2) fout (dst=/Users/ekram/Desktop/test-gpac-multi-out/common/sintel_init_track2_.mp4:gfopt:frag:xps_inband=no:psshs=moov:mime=audio/mp4) (idx=7)
```
Note the `PID manifest_mpd` for both dasher manifest outputs.
I have tried multiple variants of the above gpac command in hopes of getting a working solution. Switching the `fout` / `output`
around (2nd output is m3u8 and mname is m3u8 file path) results in:
<img width="218" alt="image" src="https://github.com/gpac/gpac/assets/29557802/00fa80c0-3e6e-4a48-93df-185aa96d4c9c">
Where the `dash_live.mpd` file has cloned contents of the hls manifest file and the sub-playlist hls files are relative to the first fout destination path (dash location, not the hls location).
(cmd for reference):
```
gpac -graph -i /Users/ekram/Desktop/ott_assets/Sintel/sintel.mp4 dasher:dual:mname=/Users/ekram/Desktop/test-gpac-multi-out/hls/hls_live.m3u8 --segdur=10 --cdur=2 --asto=8 --dmode=dynamic --llhls=br --profile=live --tsb=60 --template='../common/$File$_$Number$' -o /Users/ekram/Desktop/test-gpac-multi-out/dash/dash_live.mpd -o /Users/ekram/Desktop/test-gpac-multi-out/hls/hls_live.m3u8
```
I know running two separate dashers will solve the destination paths detailed above -- but my understanding is that the resulting segment duplication will be a huge performance cost and that is not worth trying to achieve the desired file output structure.
TLDR: Is there a way to specify independent destination paths for hls and dash manifests (and bonus -- dash and top master hls manifest names) when running dasher in `dual` mode? | Is there a way to specify independent destination paths for hls and dash manifests? | https://api.github.com/repos/gpac/gpac/issues/2683/comments | 0 | 2023-11-13T18:48:22Z | 2023-11-28T15:29:17Z | https://github.com/gpac/gpac/issues/2683 | 1,991,252,655 | 2,683 |
[
"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/bug-reporting/
ubuntu 22.04
gpac 2.3-DEV-rev621-g3edb48d2b-master
I use ```MP4Box -add '/home/moebear/Downloads/DASH-SVC-Toolchain/demultiplex/a.264':svcmode=split a.mp4```
https://drive.google.com/file/d/1A06aGdBOQqQnBlwZbkkKmfaF8LwSbwOS/view?usp=sharing
link to a.264
https://github.com/gpac/gpac/wiki/SVC%20Support%20in%20MP4Box#svc-and-l-hevc-playback
Then I use ```gpac -play a.mp4``` . It pop 3 windows and then occurs many errors, and I cannot use the shortcut ctrl+h, ctrl+l to switch the layer. | Cannot switch svc layer | https://api.github.com/repos/gpac/gpac/issues/2682/comments | 4 | 2023-11-10T07:51:04Z | 2023-12-05T15:28:04Z | https://github.com/gpac/gpac/issues/2682 | 1,987,100,442 | 2,682 |
[
"gpac",
"gpac"
] | The following command line is not working:
```
gpac -i source.obu rfav1:temporal_delim -o td.mp4
```
The Temporal Delimiter of the first Temporal Unit is dropped and for consecutive TUs, the TD of the next TU is added at the end of the previous MP4 sample, so the last sample does not have any at all, as reported by:
```
gpac -i td.mp4 inspect:deep:analyze=on:log=log.xml
``` | AV1 Temporal Delimiters misplaced | https://api.github.com/repos/gpac/gpac/issues/2681/comments | 6 | 2023-11-09T21:32:14Z | 2024-04-15T13:30:01Z | https://github.com/gpac/gpac/issues/2681 | 1,986,434,766 | 2,681 |
[
"gpac",
"gpac"
] | 1.Version
./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev617-g671976fcc-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
2.ASAN
[M3U8] Unsupported directive #EXT-X-VERSION:
[M3U8] Attribute SEQUENCE:1 not supported
[M3U8] Invalid #EXT-X-MEDIA: TYPE is missing. Ignoring the line.
[M3U8] Invalid URI (URI=") in EXT-X-MAP
[M3U8] Failed to parse root playlist './crashes/crash4', error = BitStream Not Compliant
[DASH] Error - cannot connect service: MPD creation problem BitStream Not Compliant
[DASHDmx] Error - cannot initialize DASH Client for ./crashes/crash4: BitStream Not Compliant
Failed to connect filter fin PID crash4 to filter dashin: BitStream Not Compliant
Blacklisting dashin as output from fin and retrying connections
Failed to find any filter for URL ./crashes/crash4, disabling destination filter fout
Filter fin failed to setup: Filter not found for the desired type
Filters not connected:
fout (dst=crash4_dash.mpd:gpac:segdur=500000/1000:profile=full:!sap:buf=1500:!check_dur:pssh=v:subs_sidx=0) (idx=1)
Arg segdur set but not used
Arg profile set but not used
Arg !sap set but not used
Arg buf set but not used
Arg !check_dur set but not used
Arg pssh set but not used
Arg subs_sidx set but not used
Error DASHing file: Filter not found for the desired type
=================================================================
==150880==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 120 byte(s) in 1 object(s) allocated from:
#0 0x7f7fcaf3ca57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7f7fc9d73286 in extract_attributes media_tools/m3u8.c:329
Indirect leak of 11 byte(s) in 1 object(s) allocated from:
#0 0x7f7fcaf3ca57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7f7fc9d7385b in extract_attributes media_tools/m3u8.c:345
SUMMARY: AddressSanitizer: 131 byte(s) leaked in 2 allocation(s)..
3.Reproduction
./MP4Box -dash 500000 $poc
4.POC file
[crash.00.zip](https://github.com/gpac/gpac/files/13276778/crash.00.zip)
5.Impact
Memory leaks can cause program performance degradation, system crashes, or unpredictable behavior
6. Credit
jarront | memory leaks in extract_attributes media_tools/m3u8.c:329 | https://api.github.com/repos/gpac/gpac/issues/2680/comments | 0 | 2023-11-07T07:24:45Z | 2023-12-04T10:07:50Z | https://github.com/gpac/gpac/issues/2680 | 1,980,712,658 | 2,680 |
[
"gpac",
"gpac"
] | 1.Version
./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev617-g671976fcc-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
2.ASAN
[DASH] Updated manifest:
P#1: start 0 - duration 0 - xlink none
[DASH] Manifest after update:
P#1: start 0 - duration 0 - xlink none
[DASH] Setting up period start 0 duration 0 xlink none ID DID1
[DASH] AS#1 changed quality to bitrate 10 kbps - Width 1280 Height 720 FPS 30/1 (playback speed 1)
[DASH] AS#2 changed quality to bitrate 120 kbps - Width 384 Height 256 FPS 30/1 (playback speed 1)
[DASH] No ROUTE entity on HTTP request
[DASH] Segment duration unknown - cannot estimate current startNumber
[DASH] Cannot try to download (null)... out of memory ?
[DASH] AS#3 changed quality to bitrate 120 kbps - Width 448 Height 256 FPS 30/1 (playback speed 1)
[DASH] AS#4 changed quality to bitrate 120 kbps - Width 448 Height 256 FPS 30/1 (playback speed 1)
[DASH] AS#5 changed quality to bitrate 120 kbps - Width 384 Height 256 FPS 30/1 (playback speed 1)
[DASH] Adaptation 16: non-video in a video group - disabling it
[DASH] AS#6 changed quality to bitrate 31 kbps (playback speed 1)
[DASH] AS#6 changed quality to bitrate 120 kbps - Width 448 Height 256 FPS 30/1 (playback speed 1)
[DASH] AS#7 changed quality to bitrate 120 kbps - Width 448 Height 256 FPS 30/1 (playback speed 1)
[DASH] AS#8 changed quality to bitrate 120 kbps - Width 384 Height 208 FPS 30/1 (playback speed 1)
[DASH] AS#9 changed quality to bitrate 120 kbps - Width 448 Height 208 FPS 30/1 (playback speed 1)
[DASH] AS#10 changed quality to bitrate 120 kbps - Width 448 Height 208 FPS 30/1 (playback speed 1)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78047975763 ms: Initializing Timeline: startNumber=1 segmentNumber=78047975 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.8048e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78047975763 ms: Initializing Timeline: startNumber=1 segmentNumber=78047975 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.8048e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] Segment duration unknown - cannot estimate current startNumber
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78047975763 ms: Initializing Timeline: startNumber=1 segmentNumber=78047975 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.8048e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78047975763 ms: Initializing Timeline: startNumber=1 segmentNumber=78047975 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.8048e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78047975763 ms: Initializing Timeline: startNumber=1 segmentNumber=78047975 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.8048e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78047975763 ms: Initializing Timeline: startNumber=1 segmentNumber=78047975 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.8048e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78047975763 ms: Initializing Timeline: startNumber=1 segmentNumber=78047975 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.8048e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78047975763 ms: Initializing Timeline: startNumber=1 segmentNumber=78047975 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.8048e+07)
[DASH] No ROUTE entity on HTTP request
[DASH] AST at init 1621274304781
[DASH] At current time 78047975763 ms: Initializing Timeline: startNumber=1 segmentNumber=78047975 segmentDuration=1.000000 - 0.000 seconds in segment (start range 7.8048e+07)
[DASHDmx] group 0 error locating plugin for segment - mime type video/mp4 name crashes/live_dash_track1_init.mp4: Requested URL is not valid or cannot be found
Filters not connected:
fout (dst=id_000070,sig_06,src_000600,time_26661155,execs_144902,op_havoc,rep_1_dash.mpd:gpac:segdur=10000/1000:profile=full:!sap:buf=1500:!check_dur:pssh=v:subs_sidx=0) (idx=1)
Arg segdur set but not used
Arg profile set but not used
Arg !sap set but not used
Arg buf set but not used
Arg !check_dur set but not used
Arg pssh set but not used
Arg subs_sidx set but not used
=================================================================
==2943152==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 20 byte(s) in 2 object(s) allocated from:
#0 0x7fb5f41339a7 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:454
#1 0x7fb5f2fd4bbc in gf_mpd_parse_string media_tools/mpd.c:75
#2 0x7fb5f2fd4bbc in gf_mpd_parse_common_representation_attr media_tools/mpd.c:665
SUMMARY: AddressSanitizer: 20 byte(s) leaked in 2 allocation(s).
3.Reproduction
./MP4Box -dash 10000 $poc
4.POC file
[crash.zip](https://github.com/gpac/gpac/files/13274821/crash.zip)
5.Impact
Malicious files that are opened may cause a crash
6.Credit
LOVERJIE
| memory leaks in gf_mpd_parse_string media_tools/mpd.c:75 | https://api.github.com/repos/gpac/gpac/issues/2679/comments | 0 | 2023-11-07T02:35:25Z | 2023-12-04T10:07:49Z | https://github.com/gpac/gpac/issues/2679 | 1,980,426,267 | 2,679 |
[
"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/bug-reporting/
I've identified an issue with Gpac concerning the generation of Low-Latency HLS (LL HLS) playlists when using the x264 encoding profile at level 4.2. Broadcasting a UDP stream containing video and audio, encoded via FFMPEG, fails to produce the correct LL HLS playlists. The stream is broadcast with the following configuration:
```bash
ffmpeg -i "$URI" \
-vf "scale=1280:720,fps=24,drawtext=text='%{localtime} ${FILTER}':x=10:y=10:fontsize=24:fontcolor=white:box=1:boxcolor=black@0.5" \
-map 0:0 -c:v h264_videotoolbox -profile:v high -level:v 4.2 -g 24 -keyint_min 24 -sc_threshold 0 -b:v 3000k -maxrate 4000k -bufsize 6000k -f mpegts "udp://239.0.0.1:$VIDEO_PORT" \
-map 0:1 -c:a aac -ac 2 -b:a 128k -f mpegts "udp://239.0.0.1:$AUDIO_PORT"
```
Attempting to generate an LL HLS playlist with Gpac using the command below only results in a master playlist that contains the audio track, without the video or proper HLS tags:
```bash
gpac \
-i udp://239.0.0.1:5000:gpac:#Representation=normal:#HLSGroup=normal:#HLSMExt=AUDIO=\"normal\" \
-i udp://239.0.0.1:5001:gpac:#Representation=normal-audio:#HLSGroup=normal:#HLSMExt=DEFAULT=YES \
-o test_gpac/playlist.m3u8:segdur=2.0:cdur=0.5:llhls=sf:dmode=dynamic:pssh=mv:template=segment:hlsc \
-threads=-1
```
The generated playlist is as follows:
```
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=2296,CODECS="mp4a.40.2",DEFAULT=YES
playlist_1.m3u8
```
However, if I change the level to 3.1, it functions correctly and generates the appropriate playlist:
```
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=1432283,CODECS="avc1.64001F,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=24,AUDIO="normal",AUDIO="normal"
playlist_1.m3u8
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="normal",DEFAULT=YES,NAME="normal-audio",URI="playlist_2.m3u8",CHANNELS="2"
```
It's important to note that the HLS tags are also missing when using x264 level 4.2.
This issue suggests a compatibility problem or a bug within Gpac when handling streams encoded at x264 level 4.2, specifically affecting the creation of LL HLS playlists. Any assistance in resolving this would be highly appreciated, as high resolution and frame rates enabled by level 4.2 are essential for our broadcasts.
Note: the command to generate the video :
```
ffmpeg -stream_loop 1000000 -re -i 1080.mp4 \
-filter_complex "fps=30,drawtext=:text='normal %{localtime}:box=1:fontcolor=black:boxcolor=white:fontsize=100':x=40:y=720'" \
-c:v h264_videotoolbox -c:a aac -f mpegts udp://239.0.0.1:8001
``` | Gpac Incompatibility with x264 Level 4.x for HLS Playlist Generation | https://api.github.com/repos/gpac/gpac/issues/2677/comments | 3 | 2023-11-02T15:46:09Z | 2024-05-23T10:49:00Z | https://github.com/gpac/gpac/issues/2677 | 1,974,539,128 | 2,677 |
[
"gpac",
"gpac"
] | Looking through https://github.com/gpac/gpac/wiki/GPAC-Build-Guide-for-Linux
And seeing lines like `$ sudo apt install build-essential pkg-config g++ git cmake yasm`
Means that copying them with the quick-copy symbol on the right, copies the leading $-symbol too
Example of a wiki without $ in commands where copied lines could be put into the terminal straight-away: https://github.com/gpac/gpac/wiki/GPAC-build-MP4Box-only-all-platforms
| Remove $ from command-line scripts in the wiki | https://api.github.com/repos/gpac/gpac/issues/2676/comments | 1 | 2023-11-02T14:02:31Z | 2023-11-03T20:36:57Z | https://github.com/gpac/gpac/issues/2676 | 1,974,329,406 | 2,676 |
[
"gpac",
"gpac"
] | [Y] I looked for a similar issue and couldn't find any.
[Y] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
[Y] I give enough information for contributors to reproduce my issue
Description
There is a UndefinedBehaviorSanitizer in function gf_odf_hevc_cfg_write_bs
System info
Ubuntu 22.04.2 LTS
GPAC-2.2.1
Build command
CC=afl-clang-fast CXX=afl-clang-fast++ CFLAGS="-gdwarf-2 -g3 -O0 -fsanitize=undefined -fno-omit-frame-pointer" CXXFLAGS="-gdwarf-2 -g3 -O0 -fsanitize=undefined -fno-omit-frame-pointer" LDFLAGS="-fsanitize=undefined" ./configure && make
crash command
/usr/local/bin/MP4Box -dxml poc_file
poc_file:
[poc_file.zip](https://github.com/gpac/gpac/files/13238378/poc_file.zip)
Crash output:
UndefinedBehaviorSanitizer:DEADLYSIGNAL00)
==12508==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000028 (pc 0x7fe115bc94c1 bp 0x556747ed1c50 sp 0x7ffc46ea8e80 T12508)
==12508==The signal is caused by a READ memory access.
==12508==Hint: address points to the zero page.
#0 0x7fe115bc94c1 in gf_odf_hevc_cfg_write_bs (/usr/local/lib/libgpac.so.12+0x42a4c1) (BuildId: 6764f1c09e32020a66ba9eec9ce2e9686aa2bba1)
#1 0x7fe115bc9a08 in gf_odf_hevc_cfg_write (/usr/local/lib/libgpac.so.12+0x42aa08) (BuildId: 6764f1c09e32020a66ba9eec9ce2e9686aa2bba1)
#2 0x7fe1160c9f31 in isor_reader_check_config (/usr/local/lib/libgpac.so.12+0x92af31) (BuildId: 6764f1c09e32020a66ba9eec9ce2e9686aa2bba1)
#3 0x7fe1160c34d8 in isoffin_process (/usr/local/lib/libgpac.so.12+0x9244d8) (BuildId: 6764f1c09e32020a66ba9eec9ce2e9686aa2bba1)
#4 0x7fe115f8bb53 in gf_filter_process_task (/usr/local/lib/libgpac.so.12+0x7ecb53) (BuildId: 6764f1c09e32020a66ba9eec9ce2e9686aa2bba1)
#5 0x7fe115f71a82 in gf_fs_thread_proc (/usr/local/lib/libgpac.so.12+0x7d2a82) (BuildId: 6764f1c09e32020a66ba9eec9ce2e9686aa2bba1)
#6 0x7fe115f707f0 in gf_fs_run (/usr/local/lib/libgpac.so.12+0x7d17f0) (BuildId: 6764f1c09e32020a66ba9eec9ce2e9686aa2bba1)
#7 0x7fe115ce4483 in gf_media_export (/usr/local/lib/libgpac.so.12+0x545483) (BuildId: 6764f1c09e32020a66ba9eec9ce2e9686aa2bba1)
#8 0x55674751aaa2 in dump_isom_xml /root/fuzz/fuzz_gpac/gpac/applications/mp4box/filedump.c:2163:9
#9 0x5567474ffd18 in mp4box_main /root/fuzz/fuzz_gpac/gpac/applications/mp4box/mp4box.c:6495:7
#10 0x7fe115499d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#11 0x7fe115499e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#12 0x5567474c40f4 in _start (/usr/local/bin/MP4Box+0x1c0f4) (BuildId: 9b673f7d2fbc44cd30bc731fd2cbb5d4e49ad9ca)
UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV (/usr/local/lib/libgpac.so.12+0x42a4c1) (BuildId: 6764f1c09e32020a66ba9eec9ce2e9686aa2bba1) in gf_odf_hevc_cfg_write_bs
==12508==ABORTING
| UndefinedBehaviorSanitizer in function gf_odf_hevc_cfg_write_bs | https://api.github.com/repos/gpac/gpac/issues/2674/comments | 0 | 2023-11-02T11:43:40Z | 2023-12-04T10:07:49Z | https://github.com/gpac/gpac/issues/2674 | 1,974,070,799 | 2,674 |
[
"gpac",
"gpac"
] | I tested building GPAC on the previous version of MacOS, and it worked.
Apparently, Apple changed something in the new version of Clang, and it's not working in Sonoma
set -e; for i in gpac mp4box ; do make -C $i all; done
ld: warning: ignoring duplicate libraries: '-lbz2', '-lcaca', '-lfreetype', '-lnghttp2', '-lpng16', '-lpthread', '-lz'
ld: Undefined symbols:
_memrchr, referenced from:
_gf_props_parse_value in libgpac_static.a[234](filter_props.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Mac M1 chips
MacOS Sonoma 14.0 (23A344)
related to https://github.com/gpac/gpac/issues/2640 | build fail on mac | https://api.github.com/repos/gpac/gpac/issues/2673/comments | 5 | 2023-11-02T05:41:04Z | 2024-01-10T14:49:08Z | https://github.com/gpac/gpac/issues/2673 | 1,973,546,422 | 2,673 |
[
"gpac",
"gpac"
] | 1、Version
./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev617-g671976fcc-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
2、ASAN Log
[Dasher] No template assigned, using $File$_dash$FS$$Number$
[IsoMedia] Failed to fetch initial sample 1 for track 1
[IsoMedia] Failed to fetch initial sample 1 for track 1
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3416==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7f340d3b22bc bp 0x7fff33ecd7f0 sp 0x7fff33eccf78 T0)
==3416==The signal is caused by a READ memory access.
==3416==Hint: this fault was caused by a dereference of a high value address (see register values below). Dissassemble the provided pc to learn which register was used.
#0 0x7f340d3b22bc (/lib/x86_64-linux-gnu/libc.so.6+0x1b22bc)
#1 0x7f340f85b8ce in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:450
#2 0x7f340e473095 in gf_isom_add_chapter isomedia/isom_write.c:3182
#3 0x7f340ee901db in mp4_mux_setup_pid filters/mux_isom.c:3763
#4 0x7f340eb04d02 in gf_filter_pid_configure filter_core/filter_pid.c:876
#5 0x7f340eb09a3c in gf_filter_pid_connect_task filter_core/filter_pid.c:1230
#6 0x7f340eb4642f in gf_fs_thread_proc filter_core/filter_session.c:2105
#7 0x7f340eb4d74e in gf_fs_run filter_core/filter_session.c:2405
#8 0x7f340e5b8626 in gf_dasher_process media_tools/dash_segmenter.c:1236
#9 0x560c71d604d9 in do_dash /home/returnzero/gpac/applications/mp4box/mp4box.c:4831
#10 0x560c71d604d9 in mp4box_main /home/returnzero/gpac/applications/mp4box/mp4box.c:6245
#11 0x7f340d229d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#12 0x7f340d229e3f in __libc_start_main_impl ../csu/libc-start.c:392
#13 0x560c71cf6214 in _start (/home/returnzero/gpac/bin/gcc/MP4Box+0x4e214)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x1b22bc)
==3416==ABORTING
3、Reproduction
./MP4Box -dash 10000 $poc
4、poc
[crash65.zip](https://github.com/gpac/gpac/files/13225281/crash65.zip)
5、Impact
This vulnerability is capable of causing crashes, or lead to dos.
6、 Env
Linux returnzero-virtual-machine 6.2.0-36-generic #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
AFL++ 4.09a
7、Credit
ReturnZero
| Memory Leak in gf_isom_add_chapter isomedia/isom_write.c:3182 | https://api.github.com/repos/gpac/gpac/issues/2672/comments | 0 | 2023-11-01T09:16:33Z | 2023-12-04T10:07:48Z | https://github.com/gpac/gpac/issues/2672 | 1,971,994,862 | 2,672 |
[
"gpac",
"gpac"
] | I am trying to use ffmpeg, kvazaar, GPAC to split a mp4 file into tiles.
Following the"HEVC Tile based adaptation guide", here is the command line and results:
```
ffmpeg -i 008.mp4 -s:v 3840x1920 -r 30 -vf scale=3840x1920 -c:v rawvideo -pix_fmt yuv420p 008.yuv
kvazaar -i 008.yuv --input-res 3840x1920 -o 008.hvc --tiles 3x3 --slices tiles --mv-constraint frametilemargin
MP4Box -add 008.hvc:split_tiles -fps 30 -new video_tiled.mp4
MP4Box -rem 3 video_tiled.mp4 -out test_tile_lost.mp4
gpac -i test_tile_lost.mp4 hevcmerge vout
```


What did I miss?
Any help is appreciated!
| Unexpected error at Reproduce HEVC Tile based adaptation guide | https://api.github.com/repos/gpac/gpac/issues/2671/comments | 1 | 2023-10-31T07:02:54Z | 2023-12-13T15:48:26Z | https://github.com/gpac/gpac/issues/2671 | 1,969,779,821 | 2,671 |
[
"gpac",
"gpac"
] | I am trying to use GPAC to stream a mp4 file via DASH to an Enensys MediaCast gateway. Here is the gpac command line:
```
gpac -graph -log-file=gpac.log -i video/playlist.m3u reframer:rt=on -o 'http://10.21.15.82:8082/uploads/161/manifest.mpd:gpac:segdur=10:cdur=1:asto=9:cmaf=cmfc:profile=live:dmode=dynamic:hmode=push:template=$RepresentationID$-$Number%03d$$init=init$'
```
For an unknown reason, the MediaCast gateway is not seeing the DASH init segments. Unfortunately, there isn't a lot of debugging available on the MediaCast gateway, other than a vague error message of "No DASH init segment received". The minimal documentation on the MEdiaCast gateway says it is looking for init segments with the name format of "$RepresentationID$-init.mp4", which is what gpac appears to be producing.
There are no errors in the gpac log file initially, but after a short while, the following starts appearing in the gpac log file:
```
[HTTP] Failure - body: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /uploads/161/2-001.m4s
on this server.</p>
</body></html>
[HTTP] Error parsing reply for URL http://10.21.15.82:8082/uploads/161/2-init.mp4: Authentication failure (code 403)
[HTTPOut] Failed to close output /uploads/161/2-001.m4s: Authentication failure
```
The error repeats with the segment number incrementing.
Any help is appreciated! | GPAC to Enensys MediaCast | https://api.github.com/repos/gpac/gpac/issues/2670/comments | 5 | 2023-10-27T22:22:25Z | 2024-04-08T07:13:51Z | https://github.com/gpac/gpac/issues/2670 | 1,966,258,748 | 2,670 |
[
"gpac",
"gpac"
] | # heap-buffer-overflow in str2ulong src/media_tools/avilib.c:137:16 in gpac/MP4Box
### Description
Heap-buffer-overflow in MP4Box.
#0 0x7ffff694c441 in str2ulong /afltest/gpac2/src/media_tools/avilib.c:137:16
### Version
```shell
MP4Box - GPAC version 2.3-DEV-rev617-g671976fcc-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_FFMPEG GPAC_HAS_VORBIS GPAC_HAS_LINUX_DVB
```
### ASAN Log
./MP4Box -dash 500 -check-xml -dm2ts -bin -out /dev/null poc6gpac
```shell
=================================================================
==1173259==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62100001a330 at pc 0x7ffff694c442 bp 0x7ffffffeea70 sp 0x7ffffffeea68
READ of size 1 at 0x62100001a330 thread T0
#0 0x7ffff694c441 in str2ulong /afltest/gpac2/src/media_tools/avilib.c:137:16
#1 0x7ffff694c441 in avi_parse_input_file /afltest/gpac2/src/media_tools/avilib.c:2004:9
#2 0x7ffff694220a in AVI_open_input_file /afltest/gpac2/src/media_tools/avilib.c:1840:2
#3 0x7ffff6f9d3f3 in avidmx_process /afltest/gpac2/src/filters/dmx_avi.c:492:14
#4 0x7ffff6e8f502 in gf_filter_process_task /afltest/gpac2/src/filter_core/filter.c:2971:7
#5 0x7ffff6e62ee9 in gf_fs_thread_proc /afltest/gpac2/src/filter_core/filter_session.c:2105:3
#6 0x7ffff6e6193d in gf_fs_run /afltest/gpac2/src/filter_core/filter_session.c:2405:3
#7 0x7ffff67a625c in gf_dasher_process /afltest/gpac2/src/media_tools/dash_segmenter.c:1236:6
#8 0x50dfc7 in do_dash /afltest/gpac2/applications/mp4box/mp4box.c:4831:15
#9 0x50dfc7 in mp4box_main /afltest/gpac2/applications/mp4box/mp4box.c:6245:7
#10 0x7ffff58cb082 in __libc_start_main /build/glibc-BHL3KM/glibc-2.31/csu/../csu/libc-start.c:308:16
#11 0x42adad in _start (/afltest/gpac2/bin/gcc/MP4Box+0x42adad)
0x62100001a330 is located 0 bytes to the right of 4656-byte region [0x621000019100,0x62100001a330)
allocated by thread T0 here:
#0 0x4a34ed in malloc (/afltest/gpac2/bin/gcc/MP4Box+0x4a34ed)
#1 0x7ffff6942aae in avi_parse_input_file /afltest/gpac2/src/media_tools/avilib.c:1944:35
#2 0x7ffff694220a in AVI_open_input_file /afltest/gpac2/src/media_tools/avilib.c:1840:2
SUMMARY: AddressSanitizer: heap-buffer-overflow /afltest/gpac2/src/media_tools/avilib.c:137:16 in str2ulong
Shadow bytes around the buggy address:
0x0c427fffb410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c427fffb420: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c427fffb430: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c427fffb440: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c427fffb450: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c427fffb460: 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa
0x0c427fffb470: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c427fffb480: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c427fffb490: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c427fffb4a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c427fffb4b0: 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
==1173259==ABORTING
```
### Reproduction
```shell
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j24
./bin/gcc/MP4Box -dash 500 -check-xml -dm2ts -bin -out /dev/null poc6gpac
```
*Thanks* *for* *your* *time*!
### PoC
poc6gpac: [poc6gpac.zip](https://github.com/gpac/gpac/files/13181307/poc6gpac.zip)
### **Impact**
This vulnerability is capable of causing crashes, or possible code execution.
### Reference
https://github.com/gpac/gpac
### Environment
```
ubuntu:20.04
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
clang version 10.0.0-4ubuntu1
afl-cc++4.09
```
### Credit
Zeng Yunxiang
Song Jiaxuan | heap-buffer-overflow in str2ulong src/media_tools/avilib.c:137:16 in gpac/MP4Box | https://api.github.com/repos/gpac/gpac/issues/2669/comments | 0 | 2023-10-26T18:25:32Z | 2023-12-04T10:07:48Z | https://github.com/gpac/gpac/issues/2669 | 1,964,116,818 | 2,669 |
[
"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/bug-reporting/
---
Dear gpac team:
I'm trying out a low latency dash setup with the built-in HTTP server file sink. I tried requesting a ongoing segment with `curl`.
I noticed that even though the header did say `Transfer-Encoding: chunked`, and the transfer is indeed using chunked HTTP chunked transfer correctly, the timing of the chunks delivery is delayed.
I have observed the following when a GET request is made against a segment that is being produced.
1. Transfer the already written data immediately as the first chunk(s).
2. When the segment is fully complete, transfer the rest of chunks.
But according to the docs, it should rather be that a chunk is transferred as soon as received.
My setup to reproduce and demostrate the mentioned behavior:
- `gpac` version
```
gpac - GPAC command line filter engine - version 2.3-DEV-rev612-gcea3eeb7-master
(c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
```
- Command to generate the low latency dash
```
gpac -i video.mp4 reframer:rt=on @ -o http://localhost:8080/live.mpd:rdirs=outdir:segdur=10:cdur=1:reqlog=GET:dynamic:timeout=30
```
- Command to request the producing chunk
```
curl --trace-time --trace-ascii tracefile -o /dev/null http://localhost:8080/video-post_dash_track2_5.m4s
```
- Key traces
- A chunk was sent upfront while the rest of the chunks are all sent at once around 15:34:20
```
0000: GET /video-post_dash_track2_5.m4s HTTP/1.1
002c: Host: localhost:8080
0042: User-Agent: curl/7.88.1
005b: Accept: */*
0068:
15:34:16.544927 <= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
15:34:16.544993 <= Recv header, 22 bytes (0x16)
0000: Server: GPAC 2.3-DEV
15:34:16.545003 <= Recv header, 37 bytes (0x25)
0000: Date: Thu, 26 Oct 2023 07:34:16 GMT
15:34:16.545012 <= Recv header, 24 bytes (0x18)
0000: Connection: keep-alive
15:34:16.545020 <= Recv header, 24 bytes (0x18)
0000: Keep-Alive: timeout=30
15:34:16.545031 <= Recv header, 28 bytes (0x1c)
0000: Transfer-Encoding: chunked
15:34:16.545040 <= Recv header, 2 bytes (0x2)
15:34:16.545045 <= Recv data, 9846 bytes (0x2676)
...
15:34:20.816489 <= Recv data, 10000 bytes (0x2710)
15:34:20.817787 <= Recv data, 30186 bytes (0x75ea)
15:34:20.821023 <= Recv data, 10000 bytes (0x2710)
15:34:20.822142 <= Recv data, 10000 bytes (0x2710)
15:34:20.823493 <= Recv data, 10000 bytes (0x2710)
15:34:20.824825 <= Recv data, 10000 bytes (0x2710)
15:34:20.826173 <= Recv data, 10000 bytes (0x2710)
15:34:20.827521 <= Recv data, 10000 bytes (0x2710)
15:34:20.828869 <= Recv data, 10000 bytes (0x2710)
15:34:20.835266 <= Recv data, 10000 bytes (0x2710)
15:34:20.841620 <= Recv data, 10000 bytes (0x2710)
15:34:20.842950 <= Recv data, 10000 bytes (0x2710)
15:34:20.844094 <= Recv data, 10000 bytes (0x2710)
15:34:20.845188 <= Recv data, 2842 bytes (0xb1a)
```
[Gist for full trace](https://gist.github.com/hiimdoublej-swag/a6b07798fa2baf06877a1225cec60df1)
I'll happily provide more information to clarify, or help test out some setups if needed, thanks. | HTTP server file sink does not transfer chunks in time. | https://api.github.com/repos/gpac/gpac/issues/2668/comments | 10 | 2023-10-26T08:19:53Z | 2023-12-05T04:53:56Z | https://github.com/gpac/gpac/issues/2668 | 1,962,971,475 | 2,668 |
[
"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/
- [ ] 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/bug-reporting/
The ASID option in the gstreamer command, works only for some of the inputs, if multiple inputs contain the same ASID they are not put together under that ASID
The gpac command I used
```bash
gpac
-i tcp://gstreamer_augmented:5021:gpac:#ASID=65 reframer:rt=on
-i tcp://gstreamer_augmented:5020:gpac:#ASID=65 reframer:rt=on
-i tcp://gstreamer_augmented:6021:gpac:#ASID=66 reframer:rt=on
-i tcp://gstreamer_augmented:6020:gpac:#ASID=66 reframer:rt=on
-i tcp://gstreamer_augmented:7021:gpac:#ASID=67 reframer:rt=on
-i tcp://gstreamer_augmented:7020:gpac:#ASID=67 reframer:rt=on
-o http://origin:8081/live/upload/playlist.mpd:template=segment_$$(openssl rand -hex 5):buf=-200:seg_sync=no:segdur=2.0:cdur=0.2:asto=1.8:dmode=dynamic:cmaf=cmf2:profile=dashif.ll:utcs=https://time.akamai.com/?iso:hmode=push
```
The resulting maniffest
```xml
<?xml version="1.0"?>
<!-- MPD file Generated with GPAC version 2.3-DEV-rev588-g7edc40fe-master at 2023-10-25T21:46:57.097Z -->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT4.000S" type="dynamic" availabilityStartTime="2023-10-25T21:45:57.001Z" publishTime="2023-10-25T21:46:57.097Z" minimumUpdatePeriod="PT0H0M2.000S" timeShiftBufferDepth="PT0H0M30.000S" maxSegmentDuration="PT0H0M2.637S" profiles="urn:mpeg:dash:profile:isoff-live:2011,http://www.dashif.org/guidelines/low-latency-live-v5,urn:mpeg:dash:profile:cmaf:2019">
<ProgramInformation moreInformationURL="http://gpac.io">
<Title>playlist.mpd generated by GPAC</Title>
</ProgramInformation>
<ServiceDescription id="0">
<Latency max="6000" min="2000" referenceId="0" target="4000"/>
<PlaybackRate max="1.04" min="0.96"/>
</ServiceDescription>
<Period id="DID1" start="PT0H0M0.000S">
<AdaptationSet id="67" segmentAlignment="true" startWithSAP="1">
<SegmentTemplate media="segment_6c622448fc$Number$.m4s" initialization="segment_6c622448fcinit.mp4" timescale="90000" presentationTimeOffset="324058869" availabilityTimeOffset="1.8" startNumber="1" duration="180000"/>
<Representation id="1" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="2279">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
</Representation>
</AdaptationSet>
<AdaptationSet id="66" segmentAlignment="true" maxWidth="1280" maxHeight="720" par="16:9" startWithSAP="1">
<SegmentTemplate media="segment_6c622448fc_r1_$Number$.m4s" initialization="segment_6c622448fc_r1_init.mp4" timescale="90000" presentationTimeOffset="324058869" availabilityTimeOffset="1.8" startNumber="1" duration="180000"/>
<Representation id="2" mimeType="video/mp4" codecs="avc1.4D401F" width="1280" height="720" sar="1:1" bandwidth="2200000">
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" startWithSAP="1">
<SegmentTemplate media="segment_6c622448fc_r2_$Number$.m4s" initialization="segment_6c622448fc_r2_init.mp4" timescale="90000" presentationTimeOffset="324058869" availabilityTimeOffset="1.8" startNumber="1" duration="180000"/>
<Representation id="3" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="2282">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" maxWidth="1280" maxHeight="720" par="16:9" startWithSAP="1">
<SegmentTemplate media="segment_6c622448fc_r3_$Number$.m4s" initialization="segment_6c622448fc_r3_init.mp4" timescale="90000" presentationTimeOffset="324058869" availabilityTimeOffset="1.8" startNumber="1" duration="180000"/>
<Representation id="4" mimeType="video/mp4" codecs="avc1.4D401F" width="1280" height="720" sar="1:1" bandwidth="2090000">
</Representation>
</AdaptationSet>
<AdaptationSet id="65" segmentAlignment="true" maxWidth="1280" maxHeight="720" par="16:9" startWithSAP="1">
<SegmentTemplate media="segment_6c622448fc_r4_$Number$.m4s" initialization="segment_6c622448fc_r4_init.mp4" timescale="90000" presentationTimeOffset="324058869" availabilityTimeOffset="1.8" startNumber="1" duration="180000"/>
<Representation id="5" mimeType="video/mp4" codecs="avc1.4D401F" width="1280" height="720" sar="1:1" bandwidth="2090000">
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" startWithSAP="1">
<SegmentTemplate media="segment_6c622448fc_r5_$Number$.m4s" initialization="segment_6c622448fc_r5_init.mp4" timescale="90000" presentationTimeOffset="324058869" availabilityTimeOffset="1.8" startNumber="1" duration="180000"/>
<Representation id="6" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="2276">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
</Representation>
</AdaptationSet>
</Period>
<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="https://time.akamai.com/?iso"/>
</MPD>
```
Is possible to see that the ASIDs are not correctly assigned in the playlist and this issue prevents the player to correctly play the stream | ASID property do not apply correctly in multiple tracks | https://api.github.com/repos/gpac/gpac/issues/2667/comments | 1 | 2023-10-25T21:53:43Z | 2023-12-04T08:56:24Z | https://github.com/gpac/gpac/issues/2667 | 1,962,292,475 | 2,667 |
[
"gpac",
"gpac"
] | # SEGV in MP4Box
### Description
SEGV in gpac/MP4Box.
#0 0x7ffff6697edd in gf_isom_find_od_id_for_track /afltest/gpac/src/isomedia/media_odf.c:522:14
### Version
```shell
MP4Box - GPAC version 2.3-DEV-rev605-gfc9e29089-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_FFMPEG GPAC_HAS_VORBIS GPAC_HAS_LINUX_DVB
```
### ASAN Log
./MP4Box -def -saf -unhint -ocr -out /dev/null poc5gpac
```shell
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3351432==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000002c (pc 0x7ffff6697edd bp 0x7ffffffe65f0 sp 0x7ffffffe6420 T0)
==3351432==The signal is caused by a READ memory access.
==3351432==Hint: address points to the zero page.
#0 0x7ffff6697edd in gf_isom_find_od_id_for_track /afltest/gpac/src/isomedia/media_odf.c:522:14
#1 0x7ffff6910e8e in gf_media_export_saf /afltest/gpac/src/media_tools/media_export.c:851:16
#2 0x7ffff69121c1 in gf_media_export /afltest/gpac/src/media_tools/media_export.c:1391:49
#3 0x4fe755 in mp4box_main /afltest/gpac/applications/mp4box/mp4box.c:6577:7
#4 0x7ffff58cc082 in __libc_start_main /build/glibc-BHL3KM/glibc-2.31/csu/../csu/libc-start.c:308:16
#5 0x42adad in _start (/afltest/gpac/bin/gcc/MP4Box+0x42adad)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /afltest/gpac/src/isomedia/media_odf.c:522:14 in gf_isom_find_od_id_for_track
==3351432==ABORTING
```
### Reproduction
```shell
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j24
./bin/gcc/MP4Box -def -saf -unhint -ocr -out /dev/null poc5gpac
```
### PoC
poc5gpac: https://github.com/Frank-Z7/z-vulnerabilitys/blob/main/poc5gpac
### **Impact**
This vulnerability is capable of causing crashes.
### Reference
https://github.com/gpac/gpac
### Environment
```
ubuntu:20.04
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
clang version 10.0.0-4ubuntu1
afl-cc++4.09
```
### Credit
Zeng Yunxiang
Song Jiaxuan | SEGV in gpac/MP4Box in gf_isom_find_od_id_for_track /afltest/gpac/src/isomedia/media_odf.c:522:14 | https://api.github.com/repos/gpac/gpac/issues/2666/comments | 0 | 2023-10-25T06:06:04Z | 2023-10-26T10:37:04Z | https://github.com/gpac/gpac/issues/2666 | 1,960,612,139 | 2,666 |
[
"gpac",
"gpac"
] | Command line example in wasm.gpac.io :
_gpac -i https://bevara.ddns.net/test-signals/mpeg1/medical_demo.mpg -sloop vout_
produce the following error when looping :
_session done, restarting (loop 1)
Aborted(Assertion failed: emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.)_
It is likely that the playing loop _em_main_loop_ is restarted before _emscripten_cancel_main_loop_ is called.
The sloop argument is mainly given for testing, if there is no fix on this argument, is there a way to play a video in loop into a canvas? | GPAC wasm failed at playing video file in loop with sloop | https://api.github.com/repos/gpac/gpac/issues/2665/comments | 0 | 2023-10-24T13:32:07Z | 2024-02-08T14:11:59Z | https://github.com/gpac/gpac/issues/2665 | 1,959,263,771 | 2,665 |
[
"gpac",
"gpac"
] | # heap-buffer-overflow in ffdmx_parse_side_data /afltest/gpac/src/filters/ff_dmx.c:202:14 in gpac/gpac
### Description
Heap-buffer-overflow in MP4Box.
### Version
```shell
MP4Box - GPAC version 2.3-DEV-rev605-gfc9e29089-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_FFMPEG GPAC_HAS_VORBIS GPAC_HAS_LINUX_DVB
```
### ASAN Log
./MP4Box -dash 1000 -diod -ts -dynamic -out /dev/null poc4gpac
```shell
=================================================================
==2427334==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000008f2c at pc 0x7ffff7382cb6 bp 0x7ffffffebc30 sp 0x7ffffffebc28
READ of size 4 at 0x602000008f2c thread T0
#0 0x7ffff7382cb5 in ffdmx_parse_side_data /afltest/gpac/src/filters/ff_dmx.c:202:14
#1 0x7ffff7382cb5 in ffdmx_init_common /afltest/gpac/src/filters/ff_dmx.c:1240:4
#2 0x7ffff738a0ca in ffdmx_initialize /afltest/gpac/src/filters/ff_dmx.c:1457:9
#3 0x7ffff6e7fa09 in gf_filter_new_finalize /afltest/gpac/src/filter_core/filter.c:543:8
#4 0x7ffff6e6f252 in gf_fs_load_source_dest_internal /afltest/gpac/src/filter_core/filter_session.c:3558:7
#5 0x7ffff6e94cf0 in gf_filter_swap_source_register /afltest/gpac/src/filter_core/filter.c:3824:2
#6 0x7ffff6e0c7be in gf_filter_pid_resolve_link_internal /afltest/gpac/src/filter_core/filter_pid.c:3545:11
#7 0x7ffff6e1b131 in gf_filter_pid_resolve_link_check_loaded /afltest/gpac/src/filter_core/filter_pid.c:3824:9
#8 0x7ffff6e1b131 in gf_filter_pid_init_task /afltest/gpac/src/filter_core/filter_pid.c:5111:12
#9 0x7ffff6e63b29 in gf_fs_thread_proc /afltest/gpac/src/filter_core/filter_session.c:2105:3
#10 0x7ffff6e6257d in gf_fs_run /afltest/gpac/src/filter_core/filter_session.c:2405:3
#11 0x7ffff67a6e5c in gf_dasher_process /afltest/gpac/src/media_tools/dash_segmenter.c:1236:6
#12 0x50dfc7 in do_dash /afltest/gpac/applications/mp4box/mp4box.c:4831:15
#13 0x50dfc7 in mp4box_main /afltest/gpac/applications/mp4box/mp4box.c:6245:7
#14 0x7ffff58cc082 in __libc_start_main /build/glibc-BHL3KM/glibc-2.31/csu/../csu/libc-start.c:308:16
#15 0x42adad in _start (/afltest/gpac/bin/gcc/MP4Box+0x42adad)
0x602000008f2c is located 4 bytes to the left of 16-byte region [0x602000008f30,0x602000008f40)
allocated by thread T0 here:
#0 0x4a3809 in realloc (/afltest/gpac/bin/gcc/MP4Box+0x4a3809)
#1 0x7ffff3bafda6 in av_stream_add_side_data (/lib/x86_64-linux-gnu/libavformat.so.58+0x1bdda6)
SUMMARY: AddressSanitizer: heap-buffer-overflow /afltest/gpac/src/filters/ff_dmx.c:202:14 in ffdmx_parse_side_data
Shadow bytes around the buggy address:
0x0c047fff9190: fa fa 02 fa fa fa 00 05 fa fa 00 06 fa fa fd fa
0x0c047fff91a0: fa fa 07 fa fa fa 00 fa fa fa fd fd fa fa 00 06
0x0c047fff91b0: fa fa 00 01 fa fa 04 fa fa fa 00 fa fa fa 00 07
0x0c047fff91c0: fa fa 00 00 fa fa 07 fa fa fa 00 fa fa fa fd fd
0x0c047fff91d0: fa fa 00 06 fa fa 00 01 fa fa 04 fa fa fa 00 fa
=>0x0c047fff91e0: fa fa 00 00 fa[fa]00 00 fa fa fd fd fa fa fd fa
0x0c047fff91f0: fa fa fd fa fa fa fd fd fa fa fd fa fa fa fd fa
0x0c047fff9200: fa fa fd fd fa fa fd fa fa fa fd fa fa fa fd fa
0x0c047fff9210: fa fa fd fa fa fa fd fd fa fa fd fa fa fa fd fa
0x0c047fff9220: fa fa fd fa fa fa fd fa fa fa fd fd fa fa fd fa
0x0c047fff9230: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fd
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
==2427334==ABORTING
```
### Reproduction
```shell
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j24
./bin/gcc/MP4Box -dash 1000 -diod -ts -dynamic -out /dev/null poc4gpac
```
*Thanks* *for* *your* *time*!
### PoC
poc4gpac: https://github.com/Frank-Z7/z-vulnerabilitys/blob/main/poc4gpac
### **Impact**
This vulnerability is capable of causing crashes.
### Reference
https://github.com/gpac/gpac
### Environment
```
ubuntu:20.04
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
clang version 10.0.0-4ubuntu1
afl-cc++4.09
```
### Credit
Zeng Yunxiang
Song Jiaxuan | heap-buffer-overflow in ffdmx_parse_side_data /afltest/gpac/src/filters/ff_dmx.c:202:14 in gpac/MP4Box | https://api.github.com/repos/gpac/gpac/issues/2664/comments | 0 | 2023-10-24T13:31:01Z | 2023-10-26T10:37:05Z | https://github.com/gpac/gpac/issues/2664 | 1,959,261,781 | 2,664 |
[
"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/bug-reporting/
For Compilation on Ubuntu Mantic (23.10) and possibly 22.x versions as well, the `libjack-dev` dependency should be replaced by a `libjack-jackd2-dev` dependency. `libjack-dev` install would remove lots of the existing multimedia packages in the system since `libjack0` is not compatible with the `libjack-jackd2-0` used by Ubuntu.
The version v2.2.1 doesn't compile on 23.10. Master from 2023-10-24 does without problem (Easy install). | For Ubuntu 23.10, libjack-dev needs to be replaced with libjack-jackd2-dev | https://api.github.com/repos/gpac/gpac/issues/2663/comments | 1 | 2023-10-24T12:36:25Z | 2023-10-26T10:38:44Z | https://github.com/gpac/gpac/issues/2663 | 1,959,161,060 | 2,663 |
[
"gpac",
"gpac"
] | # SEGV in MP4Box
### Description
SEGV in gpac/MP4Box.
#0 0x7ffff67d35c7 in gf_avc_change_vui /afltest/gpac/src/media_tools/av_parsers.c:6872:55
### Version
```shell
MP4Box - GPAC version 2.3-DEV-rev605-gfc9e29089-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_FFMPEG GPAC_HAS_VORBIS GPAC_HAS_LINUX_DVB
```
### ASAN Log
./MP4Box -add self:hdr=none:videofmt=undef:asemode=v1-qt poc2gpac
```shell
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3037856==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7ffff67d35c7 bp 0x7ffffffec090 sp 0x7ffffffe29c0 T0)
==3037856==The signal is caused by a READ memory access.
==3037856==Hint: address points to the zero page.
#0 0x7ffff67d35c7 in gf_avc_change_vui /afltest/gpac/src/media_tools/av_parsers.c:6872:55
#1 0x7ffff67d6ce5 in gf_avc_change_color /afltest/gpac/src/media_tools/av_parsers.c:6950:9
#2 0x7ffff677f62c in gf_media_change_color /afltest/gpac/src/media_tools/isom_tools.c:198:3
#3 0x54e165 in import_file /afltest/gpac/applications/mp4box/fileimport.c:1670:9
#4 0x4f7d1e in do_add_cat /afltest/gpac/applications/mp4box/mp4box.c
#5 0x4f7d1e in mp4box_main /afltest/gpac/applications/mp4box/mp4box.c:6196:13
#6 0x7ffff58cc082 in __libc_start_main /build/glibc-BHL3KM/glibc-2.31/csu/../csu/libc-start.c:308:16
#7 0x42adad in _start (/afltest/gpac/bin/gcc/MP4Box+0x42adad)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /afltest/gpac/src/media_tools/av_parsers.c:6872:55 in gf_avc_change_vui
==3037856==ABORTING
```
### Reproduction
```shell
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j24
./bin/gcc/MP4Box -add self:hdr=none:videofmt=undef:asemode=v1-qt poc2gpac
```
### PoC
poc2gpac: https://github.com/Frank-Z7/z-vulnerabilitys/blob/main/poc2gpac
### **Impact**
This vulnerability is capable of causing crashes.
### Reference
https://github.com/gpac/gpac
### Environment
```
ubuntu:20.04
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
clang version 10.0.0-4ubuntu1
afl-cc++4.09
```
### Credit
Zeng Yunxiang
Song Jiaxuan | SEGV in MP4Box in gf_avc_change_vui /afltest/gpac/src/media_tools/av_parsers.c:6872:55 | https://api.github.com/repos/gpac/gpac/issues/2662/comments | 0 | 2023-10-24T08:09:10Z | 2023-10-26T10:37:04Z | https://github.com/gpac/gpac/issues/2662 | 1,958,731,817 | 2,662 |
[
"gpac",
"gpac"
] | # SEGV in MP4Box
### Description
SEGV in gpac/MP4Box.
#0 0x7ffff6798224 in gf_media_change_pl /afltest/gpac/src/media_tools/isom_tools.c:3293:42
### Version
```shell
MP4Box - GPAC version 2.3-DEV-rev605-gfc9e29089-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_FFMPEG GPAC_HAS_VORBIS GPAC_HAS_LINUX_DVB
```
### ASAN Log
./MP4Box -add self:svcmode=splitbase:negctts:compat=15 poc3gpac
```shell
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3037861==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000002 (pc 0x7ffff6798224 bp 0x00000000000f sp 0x7ffffffec1c0 T0)
==3037861==The signal is caused by a WRITE memory access.
==3037861==Hint: address points to the zero page.
#0 0x7ffff6798224 in gf_media_change_pl /afltest/gpac/src/media_tools/isom_tools.c:3293:42
#1 0x54edae in import_file /afltest/gpac/applications/mp4box/fileimport.c:1767:8
#2 0x4f7d1e in do_add_cat /afltest/gpac/applications/mp4box/mp4box.c
#3 0x4f7d1e in mp4box_main /afltest/gpac/applications/mp4box/mp4box.c:6196:13
#4 0x7ffff58cc082 in __libc_start_main /build/glibc-BHL3KM/glibc-2.31/csu/../csu/libc-start.c:308:16
#5 0x42adad in _start (/afltest/gpac/bin/gcc/MP4Box+0x42adad)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /afltest/gpac/src/media_tools/isom_tools.c:3293:42 in gf_media_change_pl
==3037861==ABORTING
```
### Reproduction
```shell
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j24
./bin/gcc/MP4Box -add self:svcmode=splitbase:negctts:compat=15 poc3gpac
```
### PoC
poc3gpac: https://github.com/Frank-Z7/z-vulnerabilitys/blob/main/poc3gpac
### **Impact**
This vulnerability is capable of causing crashes.
### Reference
https://github.com/gpac/gpac
### Environment
```
ubuntu:20.04
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
clang version 10.0.0-4ubuntu1
afl-cc++4.09
```
### Credit
Zeng Yunxiang
Song Jiaxuan | SEGV in gpac/MP4Box in gf_media_change_pl /afltest/gpac/src/media_tools/isom_tools.c:3293:42 | https://api.github.com/repos/gpac/gpac/issues/2661/comments | 0 | 2023-10-24T08:08:44Z | 2023-10-26T10:37:05Z | https://github.com/gpac/gpac/issues/2661 | 1,958,731,162 | 2,661 |
[
"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/bug-reporting/
---
Is it expected that the [master](https://github.com/gpac/gpac/tree/master) branch does not include the changes from [v2.2.1](https://github.com/gpac/gpac/tree/v2.2.1)?
https://github.com/gpac/gpac/compare/master...v2.2.1 | Question: `master` branch does not contain `v2.2.1` | https://api.github.com/repos/gpac/gpac/issues/2660/comments | 1 | 2023-10-23T14:10:31Z | 2023-10-23T15:59:06Z | https://github.com/gpac/gpac/issues/2660 | 1,957,270,412 | 2,660 |
[
"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/bug-reporting/
1、version
./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev602-ged8424300-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
2、platform
uname -a
Linux returnzero-virtual-machine 6.2.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
3、Reproduce
./MP4Box -bt $poc
4、ASCAN
./MP4Box -bt '/home/returnzero/gpac/out/default/crashes/id:000000,sig:06,src:000008,time:167295,execs:4216,op:havoc,rep:6'
[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 861217
[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 861217
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[MP4 Loading] decoding sample 1 from track ID 8 failed
Error loading scene: BitStream Not Compliant
Error: BitStream Not Compliant
=================================================================
==3703==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x7f0d974b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7f0d95d38b3b in NewSFDouble scenegraph/vrml_tools.c:300
#2 0x7f0d95d38b3b in gf_sg_vrml_field_pointer_new scenegraph/vrml_tools.c:558
SUMMARY: AddressSanitizer: 8 byte(s) leaked in 1 allocation(s).
5、Impact
This vulnerability allows a remote attacker to cause a denial of service on an affected gpac MP4Box. Exploiting this vulnerability requires user interaction, as the target must access a malicious page or open a malicious file.
6、poc
https://github.com/ReturnHere/CrashReport/blob/main/id%5E%25000000%2Csig%5E%2506%2Csrc%5E%25000008%2Ctime%5E%25167295%2Cexecs%5E%254216%2Cop%5E%25havoc%2Crep%5E%256
| Memory leaks in NewSFDouble scenegraph/vrml_tools.c:300 | https://api.github.com/repos/gpac/gpac/issues/2658/comments | 2 | 2023-10-23T06:39:49Z | 2023-12-09T11:54:02Z | https://github.com/gpac/gpac/issues/2658 | 1,956,459,097 | 2,658 |
[
"gpac",
"gpac"
] | # heap-buffer-overflow in gf_isom_use_compact_size gpac/src/isomedia/isom_write.c:3403:3 in gpac/gpac
### Description
Heap-buffer-overflow in MP4Box.
### Version
```shell
MP4Box - GPAC version 2.3-DEV-rev605-gfc9e29089-master
(c) 2000-2023 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_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_FFMPEG GPAC_HAS_VORBIS GPAC_HAS_LINUX_DVB
```
### ASAN Log
./MP4Box -add self:moovts=-1:noedit:stz2:profile=high:level=7 poc1gpac
```shell
=================================================================
==3459603==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000006b71 at pc 0x0000004a2c4f bp 0x7ffffffec1a0 sp 0x7ffffffeb968
WRITE of size 4 at 0x602000006b71 thread T0
#0 0x4a2c4e in __asan_memset (/afltest/gpac/bin/gcc/MP4Box+0x4a2c4e)
#1 0x7ffff665aacc in gf_isom_use_compact_size /afltest/gpac/src/isomedia/isom_write.c:3403:3
#2 0x54e099 in import_file /afltest/gpac/applications/mp4box/fileimport.c:1707:8
#3 0x4f7d1e in do_add_cat /afltest/gpac/applications/mp4box/mp4box.c
#4 0x4f7d1e in mp4box_main /afltest/gpac/applications/mp4box/mp4box.c:6196:13
#5 0x7ffff58cc082 in __libc_start_main /build/glibc-BHL3KM/glibc-2.31/csu/../csu/libc-start.c:308:16
#6 0x42adad in _start (/afltest/gpac/bin/gcc/MP4Box+0x42adad)
0x602000006b71 is located 0 bytes to the right of 1-byte region [0x602000006b70,0x602000006b71)
allocated by thread T0 here:
#0 0x4a34ed in malloc (/afltest/gpac/bin/gcc/MP4Box+0x4a34ed)
#1 0x7ffff665aa7d in gf_isom_use_compact_size /afltest/gpac/src/isomedia/isom_write.c:3401:24
SUMMARY: AddressSanitizer: heap-buffer-overflow (/afltest/gpac/bin/gcc/MP4Box+0x4a2c4e) in __asan_memset
Shadow bytes around the buggy address:
0x0c047fff8d10: fa fa 00 04 fa fa 00 00 fa fa 00 00 fa fa 00 00
0x0c047fff8d20: fa fa fd fd fa fa fd fd fa fa 00 00 fa fa 00 05
0x0c047fff8d30: fa fa 00 fa fa fa 00 00 fa fa 00 00 fa fa 00 00
0x0c047fff8d40: fa fa 00 00 fa fa 00 00 fa fa 04 fa fa fa 00 00
0x0c047fff8d50: fa fa 00 00 fa fa fd fd fa fa fd fa fa fa fd fd
=>0x0c047fff8d60: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa[01]fa
0x0c047fff8d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8db0: 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
==3459603==ABORTING
```
### Reproduction
```shell
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j24
./bin/gcc/MP4Box -add self:moovts=-1:noedit:stz2:profile=high:level=7 poc1gpac
```
### PoC
poc1gpac: https://github.com/Frank-Z7/z-vulnerabilitys/blob/main/poc1gpac
### **Impact**
This vulnerability is capable of causing crashes.
### Reference
https://github.com/gpac/gpac
### Environment
```
ubuntu:20.04
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
clang version 10.0.0-4ubuntu1
afl-cc++4.09
```
### Credit
Zeng Yunxiang
Song Jiaxuan | heap-buffer-overflow in gf_isom_use_compact_size gpac/src/isomedia/isom_write.c:3403:3 in gpac/gpac | https://api.github.com/repos/gpac/gpac/issues/2657/comments | 0 | 2023-10-22T20:14:14Z | 2023-10-23T13:23:29Z | https://github.com/gpac/gpac/issues/2657 | 1,956,040,458 | 2,657 |
[
"gpac",
"gpac"
] | ```
$ grep DISABLE_OD -r . | grep -v DISABLE_OD_DUMP
./build/config.mak:DISABLE_OD_PARSE=no
./src/Makefile:ifeq ($(DISABLE_OD_PARSE),no)
./src/Makefile:ifeq ($(DISABLE_OD_PARSE),no)
./config.mak:DISABLE_OD_PARSE=no
./configure: echo "#define GPAC_DISABLE_OD_PARSE" >> $TMPH
./configure:echo "DISABLE_OD_PARSE=$disable_od_parse" >> config.mak
```
and
```
$ grep MINIMAL_OD -r . | grep -v MINIMAL_ODF
./build/config.mak:MINIMAL_OD=
./src/Makefile:ifeq ($(MINIMAL_OD),no)
./config.mak:MINIMAL_OD=
./configure:echo "MINIMAL_OD=$disable_od" >> config.mak
```
Is MINIMAL_OD synonymous to MINIMAL_ODF? | Unused flags DISABLE_OD_PARSE and MINIMAL_ODF? | https://api.github.com/repos/gpac/gpac/issues/2656/comments | 1 | 2023-10-19T19:03:29Z | 2023-12-04T08:36:07Z | https://github.com/gpac/gpac/issues/2656 | 1,952,888,163 | 2,656 |
[
"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/bug-reporting/
---
https://github.com/gpac/gpac/pull/1369 attempts to fix the XML escaping, but did not apply the changes to `UTCTiming`
```bash
ffmpeg -re -f lavfi -i testsrc -t 5 sample.mp4
gpac \
-i sample.mp4 \
--utcs='https://time.akamai.com/?iso&ms' \
-o 'public.mpd:dmode=dynamic:profile=live'
```
will produce
```xml
<?xml version="1.0"?>
<!-- MPD file Generated with GPAC version 2.2.1-revrelease at 2023-10-19T15:23:06.676Z -->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.000S" type="dynamic" availabilityStartTime="2023-10-19T15:23:06.673Z" publishTime="2023-10-19T15:23:06.676Z" minimumUpdatePeriod="PT0H0M1.000S" timeShiftBufferDepth="PT0H0M30.000S" maxSegmentDuration="PT0H0M5.000S" profiles="urn:mpeg:dash:profile:isoff-live:2011">
<ProgramInformation moreInformationURL="http://gpac.io">
<Title>public.mpd generated by GPAC</Title>
</ProgramInformation>
<Period id="DID1" start="PT0H0M0.000S">
<AdaptationSet segmentAlignment="true" maxWidth="320" maxHeight="240" maxFrameRate="25" par="4:3" lang="und" startWithSAP="1">
<SegmentTemplate media="sample_dash$Number$.m4s" initialization="sample_dashinit.mp4" timescale="12800" startNumber="1" duration="12800"/>
<Representation id="1" mimeType="video/mp4" codecs="avc1.F4000D" width="320" height="240" frameRate="25" sar="1:1" bandwidth="38547">
</Representation>
</AdaptationSet>
</Period>
<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="https://time.akamai.com/?iso&ms"/>
</MPD>
```
The expected value is
```xml
<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="https://time.akamai.com/?iso&ms"/>
``` | `UTCTiming` needs XML escaping for DASH MPD | https://api.github.com/repos/gpac/gpac/issues/2655/comments | 1 | 2023-10-19T15:29:52Z | 2023-10-19T18:11:29Z | https://github.com/gpac/gpac/issues/2655 | 1,952,535,437 | 2,655 |
[
"gpac",
"gpac"
] | A memory leak has occurred when running program MP4Box, this can reproduce on the latest commit.
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev602-ged8424300-master
(c) 2000-2023 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: --static-build --extra-cflags=-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link --extra-ldflags=-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FREETYPE GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB
```
git log
```
commit ed8424300fc4a1f5231ecd1d47f502ddd3621d1a (HEAD -> master, origin/master, origin/HEAD)
Author: Aurelien David <aurelien.david@telecom-paristech.fr>
Date: Tue Oct 17 17:05:49 2023 +0200
```
### Verification steps
```
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --static-build '--extra-cflags=-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link' '--extra-ldflags=-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link'
make
cd bin/gcc
./MP4Box -info $poc
```
### POC file
[gpac_direct_leak_xtra_box_read.zip](https://github.com/gpac/gpac/files/13040370/gpac_direct_leak_xtra_box_read.zip)
### AddressSanitizer output
```
[isom] not enough bytes in box Xtra: 125 left, reading -32775 (file isomedia/box_code_base.c, line 13240), skipping box - try specifying -no-check (might crash)
[iso file] Box "Xtra" (start 0) has 125 extra bytes
File has no movie (moov) - static data container
=================================================================
==1286074==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 256 byte(s) in 1 object(s) allocated from:
#0 0x49ffad in malloc (/home/gpac/bin/gcc/MP4Box+0x49ffad)
#1 0x590e50 in gf_malloc /home/gpac/src/utils/alloc.c:150:9
#2 0x14f6466 in xtra_box_read /home/gpac/src/isomedia/box_code_base.c:13227:10
#3 0x87f34e in gf_isom_box_read /home/gpac/src/isomedia/box_funcs.c:2021:9
#4 0x87da29 in gf_isom_box_parse_ex /home/gpac/src/isomedia/box_funcs.c:311:14
#5 0x87c479 in gf_isom_parse_root_box /home/gpac/src/isomedia/box_funcs.c:38:8
#6 0x896562 in gf_isom_parse_movie_boxes_internal /home/gpac/src/isomedia/isom_intern.c:385:7
#7 0x895f5e in gf_isom_parse_movie_boxes /home/gpac/src/isomedia/isom_intern.c:897:6
#8 0x89b0ea in gf_isom_open_file /home/gpac/src/isomedia/isom_intern.c:1023:19
#9 0x8a36ea in gf_isom_open /home/gpac/src/isomedia/isom_read.c
#10 0x4e9e78 in mp4box_main /home/gpac/applications/mp4box/mp4box.c:6297:12
#11 0x4f4f10 in main /home/gpac/applications/mp4box/mp4box.c:6939:1
#12 0x7ffff6f55082 in __libc_start_main /build/glibc-iA3wr8/glibc-2.31/csu/../csu/libc-start.c:308:16
SUMMARY: AddressSanitizer: 256 byte(s) leaked in 1 allocation(s).
``` | Memory leak in xtra_box_read function of box_code_base.c:13227:10 | https://api.github.com/repos/gpac/gpac/issues/2654/comments | 0 | 2023-10-19T09:11:37Z | 2023-10-23T13:23:28Z | https://github.com/gpac/gpac/issues/2654 | 1,951,682,886 | 2,654 |
[
"gpac",
"gpac"
] | [Y] I looked for a similar issue and couldn't find any.
[Y] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
[Y] I give enough information for contributors to reproduce my issue
Description
There is a integer overflow issue in isomedia/box_code_base.c:413
System info
Ubuntu 22.04.2 LTS
GPAC-2.2.1
Build command
./configure --enable-sanitizer && make
crash command
/usr/local/bin/MP4Box -saf -diod poc
poc_file:
[poc.zip](https://github.com/gpac/gpac/files/13040344/poc.zip)
Crash output:
isomedia/box_code_base.c:413:29: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
| Integer overflow issue in isomedia/box_code_base.c:413 | https://api.github.com/repos/gpac/gpac/issues/2652/comments | 1 | 2023-10-19T09:06:47Z | 2023-12-08T06:37:55Z | https://github.com/gpac/gpac/issues/2652 | 1,951,673,630 | 2,652 |
[
"gpac",
"gpac"
] | ./MP4Box -dash 1000 ./POC
[POC File](https://drive.google.com/file/d/1dKMnAGFeGeU5KHxPSbp1vZIvM308jpDx)
```
Environment
Distributor ID: Debian
Description: Debian GNU/Linux bookworm/sid
Version
I checked against the latest release as of 10/17/23 the current master branch at commit 2fb17d2248bc88bd01434096e684d9b61d4d949b .
Description
This AddressSanitizer output is indicating a large OOB read of invalid heap memory past a buffer allocated in the function filein_initialize_ex at [line 248](https://github.com/gpac/gpac/blob/master/src/filters/in_file.c#L248). This exception occurred in the function mpgviddmx_process at [line 1166](https://github.com/gpac/gpac/blob/master/src/filters/reframe_mpgvid.c#L1166) in the file src/filters/reframe_mpgvid.c. This error being an OOB read indicates that the error is related to the source calculation. The size of the read matches the size being iterated in the while(remain) and the read is directly after the allocated memory indicating that the loop is iterating one more time than it should.
src/filters/reframe_mpgvid.c:[line 1158](https://github.com/gpac/gpac/blob/master/src/filters/reframe_mpgvid.c#L1158)
//bytes come from both our store and the data packet
if (bytes_from_store) {
memcpy(pck_data, ctx->hdr_store+current, bytes_from_store);
assert(size >= bytes_from_store);
size -= bytes_from_store;
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset - bytes_from_store);
}
memcpy(pck_data + bytes_from_store, start, (size_t) size);//ASAN report here
} else {
//bytes only come the data packet
memcpy(pck_data, start, (size_t) size);
if (byte_offset != GF_FILTER_NO_BO) {
gf_filter_pck_set_byte_offset(dst_pck, byte_offset + start - (u8 *) data);
}
}
ASAN
[Dasher] No template assigned, using $File$_dash$FS$$Number$
=================================================================
==328411==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62200000bc89 at pc 0x55d1e1252f47 bp 0x7ffd880e8470 sp 0x7ffd880e7c40
READ of size 5002 at 0x62200000bc89 thread T0
#0 0x55d1e1252f46 in __asan_memcpy (/path/gpac/build4/bin/gcc/MP4Box+0x109f46) (BuildId: 07d4e21339b97d2fcf0fd0c64228219778b0247c)
#1 0x7fbd664391df in mpgviddmx_process /path/gpac/src/filters/reframe_mpgvid.c:1166:4
#2 0x7fbd65fad353 in gf_filter_process_task /path/gpac/src/filter_core/filter.c:2971:7
#3 0x7fbd65f7ad9b in gf_fs_thread_proc /path/gpac/src/filter_core/filter_session.c:2105:3
#4 0x7fbd65f78eef in gf_fs_run /path/gpac/src/filter_core/filter_session.c:2405:3
#5 0x7fbd6582802a in gf_dasher_process /path/gpac/src/media_tools/dash_segmenter.c:1236:6
#6 0x55d1e12b76dc in do_dash /path/gpac/applications/mp4box/mp4box.c:4831:15
#7 0x55d1e12a8b6e in mp4box_main /path/gpac/applications/mp4box/mp4box.c:6245:7
#8 0x7fbd64a461c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#9 0x7fbd64a46284 in __libc_start_main csu/../csu/libc-start.c:360:3
#10 0x55d1e11d0dd0 in _start (/path/gpac/build4/bin/gcc/MP4Box+0x87dd0) (BuildId: 07d4e21339b97d2fcf0fd0c64228219778b0247c)
0x62200000bc89 is located 0 bytes to the right of 5001-byte region [0x62200000a900,0x62200000bc89)
allocated by thread T0 here:
#0 0x55d1e1253c1e in malloc (/path/gpac/build4/bin/gcc/MP4Box+0x10ac1e) (BuildId: 07d4e21339b97d2fcf0fd0c64228219778b0247c)
#1 0x7fbd661b7f9b in filein_initialize_ex /path/gpac/src/filters/in_file.c:248:16
#2 0x7fbd65f9a754 in gf_filter_new_finalize /path/gpac/src/filter_core/filter.c:543:8
SUMMARY: AddressSanitizer: heap-buffer-overflow (/path/gpac/build4/bin/gcc/MP4Box+0x109f46) (BuildId: 07d4e21339b97d2fcf0fd0c64228219778b0247c) in __asan_memcpy
Shadow bytes around the buggy address:
0x0c447fff9740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c447fff9750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c447fff9760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c447fff9770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c447fff9780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c447fff9790: 00[01]fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c447fff97a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c447fff97b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c447fff97c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c447fff97d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c447fff97e0: 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
==328411==ABORTING
Impact
This vulnerability can crash the program. Also, leaking OOB heap can be used as a primitive during exploitation.
Occurrences
reframe_mpgvid.c L1166
``` | OOB read of Heap | https://api.github.com/repos/gpac/gpac/issues/2651/comments | 0 | 2023-10-18T15:45:11Z | 2023-10-23T13:23:27Z | https://github.com/gpac/gpac/issues/2651 | 1,950,063,735 | 2,651 |
[
"gpac",
"gpac"
] | Hi, sorry if I am missing something available from the documentation.
I looked at gpac's nodejs doc, at the test/gpac.js, at several filter's source code and documentation, at the doxygen as well as the general filter documentation.
I'm trying to write a custom source that feeds data into a filter session using the nodejs API.
I have been testing 2 options:
### 1. using a custom filter
This is my preferred solution, however I keep failing at building a simple graph.
Here's my code:
```
const process = require("process");
const GPAC_NODEJS = process.env["GPAC_NODEJS"] || "share/nodejs/build/Debug/gpac";
const gpac = require(GPAC_NODEJS);
gpac.init();
gpac.set_logs("all@debug");
const fs = new gpac.FilterSession();
const custom_filter = fs.new_filter("mysource");
custom_filter.set_max_pids(-1);
custom_filter.pids = [];
custom_filter.push_cap('StreamType', 'Visual', gpac.GF_CAPS_OUTPUT);
custom_filter.process = function()
{
console.log(`custom_filter.process()`);
return gpac.GF_OK;
}
custom_filter.configure_pid = function(pid, is_remove)
{
console.log(`custom_filter.configure_pid(${pid}, ${is_remove})`);
return gpac.GF_OK;
}
custom_filter.process_event = function(evt)
{
console.log(`custom_filter.process_event(${evt})`);
return true;
}
custom_filter.reconfigure_output = function(pid){
console.log(`custom_filter.reconfigure_output(${pid})`);
return gpac.GF_OK;
}
// const f1 = fs.load("pout");
// const f1 = fs.load("fout:force_null");
// const f1 = fs.load_dst("test.mp4");
const f1 = fs.load("inspect:full");
f1.set_source(custom_filter);
fs.run();
fs.print_graph()
```
The custom filter implementation obviously does nothing useful but logging calls, which never happens as the filter is never connected. What am I missing ?
Do I need to supply a specific argument to the `set_source(...)` function in order to explicitly connect these 2 filters ?
```
f1.set_source(custom_filter, ARG);
```
I tried several options there, but couldn't figure it out.
### 2. using FIO wrapping
FIO wrapping seems like it could also achieve my goal:
```
const fs = new gpac.FilterSession();
const URL = "myuri"
const fio_wrapper = new gpac.FileIO(url, fio_factory);
const f1 = fs.load_src(fio_wrapper.url);
const f2 = fs.load('inspect');
f2.set_source(f1);
fs.run();
fs.print_graph();
```
My understanding is that gpac first reads the file in an attempt to probe it, then resolves a graph based on the result, is that correct ? Is the ressource url actually involved in the graph resolution (eg. graph resolver inferring the source type from a file extension) ?
At this point I have to log each of the FileIO API functions to figure out what happens in different contexts. Is there additional documentation to understand how the FileIO API works internally in different contexts ?
Finally, is there a case for which the FileIO API solution be favoured over the custom filter when trying to create a source ?
Thanks in advance for any help on this. | Implementing a custom source using the nodejs API | https://api.github.com/repos/gpac/gpac/issues/2650/comments | 2 | 2023-10-18T10:07:22Z | 2024-02-16T22:01:32Z | https://github.com/gpac/gpac/issues/2650 | 1,949,365,621 | 2,650 |
[
"gpac",
"gpac"
] | poc
https://github.com/gandalf4a/crash_report/blob/main/gpac/MP4Box/poc3/segv_291
./MP4Box -dash 10000 poc
```
Description
new 3 SEGV in MP4Box
Version
$ ./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev566-g50c2ab06f-master
Platform
$ uname -a
Linux user-GE40-2PC-Dragon-Eyes 6.2.0-33-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 7 10:33:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Credit
Gandalf4a
Impact
This vulnerability allows a remote attacker to cause a denial of service on an affected gpac MP4Box. Exploiting this vulnerability requires user interaction, as the target must access a malicious page or open a malicious file.
Occurrences
filter_pck.c L108
SEGV in /gpac/src/filter_core/filter_pck.c:108:6 in gf_filter_pck_new_alloc_internal
poc
https://github.com/gandalf4a/crash_report/blob/main/gpac/MP4Box/poc3/segv_108
asan
[32m[Dasher] No template assigned, using $File$_dash$FS$$Number$
[0m[31m[PCMReframe] Missing audio ch, cannot parse
[0mAddressSanitizer:DEADLYSIGNAL
=================================================================
==1019581==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f6b6fcf09b1 bp 0x7ffc80a77bd0 sp 0x7ffc80a77ae0 T0)
==1019581==The signal is caused by a READ memory access.
==1019581==Hint: address points to the zero page.
#0 0x7f6b6fcf09b1 in gf_filter_pck_new_alloc_internal /home/user/fuzzing_gpac/gpac/src/filter_core/filter_pck.c:108:6
#1 0x7f6b70284641 in pcmreframe_process /home/user/fuzzing_gpac/gpac/src/filters/reframe_rawpcm.c:399:19
#2 0x7f6b6fdafa33 in gf_filter_process_task /home/user/fuzzing_gpac/gpac/src/filter_core/filter.c:2971:7
#3 0x7f6b6fd7d47b in gf_fs_thread_proc /home/user/fuzzing_gpac/gpac/src/filter_core/filter_session.c:2105:3
#4 0x7f6b6fd7b5cf in gf_fs_run /home/user/fuzzing_gpac/gpac/src/filter_core/filter_session.c:2405:3
#5 0x7f6b6f62ac6a in gf_dasher_process /home/user/fuzzing_gpac/gpac/src/media_tools/dash_segmenter.c:1236:6
#6 0x558186b736dc in do_dash /home/user/fuzzing_gpac/gpac/applications/mp4box/mp4box.c:4831:15
#7 0x558186b64b6e in mp4box_main /home/user/fuzzing_gpac/gpac/applications/mp4box/mp4box.c:6245:7
#8 0x7f6b6e629d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#9 0x7f6b6e629e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#10 0x558186a8cdd4 in _start (/home/user/fuzzing_gpac/gpac/bin/gcc/MP4Box+0x82dd4) (BuildId: 53333ca7bff59dd9a3d1b2821e7c5f3a9aac76b9)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/user/fuzzing_gpac/gpac/src/filter_core/filter_pck.c:108:6 in gf_filter_pck_new_alloc_internal
==1019581==ABORTING
filter_pid.c L9257
SEGV in /gpac/src/filter_core/filter_pid.c:9257:68 in gf_filter_pid_get_rfc_6381_codec_string
poc
https://github.com/gandalf4a/crash_report/blob/main/gpac/MP4Box/poc3/segv_9257
asan
[32m[iso file] Unknown top-level box type freN
[0m[32m[iso file] Unknown box type 00000004 in parent moov
[0m[31m[iso file] Read Box type 00000200 (0x00000200) at position 1213 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[0m[33m[iso file] Box "moov" (start 351) has 703 extra bytes
[0m[32m[iso file] Unknown top-level box type s7Fyp
[0m[33m[iso file] Box "tfdt" (start 2056) has 84 extra bytes
[0m[31m[iso file] Read Box type 00000001 (0x00000001) at position 2156 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[0m[33m[iso file] Box "traf" (start 2028) has 470 extra bytes
[0m[32m[iso file] Unknown box type sdBp in parent traf
[0m[32m[iso file] Unknown box type shgp in parent traf
[0m[33m[iso file] saio box without flags nor aux info type and no default scheme, ignoring
[0m[33m[iso file] senc box without tenc, assuming MS smooth+piff
[0m[31m[isobmf] cannot parse senc, missing IV/crypto state
[0m[33m[iso file] Box "uuid" (start 3475) has 58 extra bytes
[0m[33m[iso file] Box "uuid" (start 3565) has 58 extra bytes
[0m[31m[iso file] Read Box type 00000000 (0x00000000) at position 3655 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[0m[33m[iso file] Box "trgr" (start 3467) has 225 extra bytes
[0m[32m[Dasher] No template assigned, using $File$_dash$FS$$Number$
[0m[31m[IsoMedia] Failed to fetch initial sample 1 for track 1
[0mAddressSanitizer:DEADLYSIGNAL
=================================================================
==1019207==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f7712b4d940 bp 0x000000000000 sp 0x7ffd2c720c30 T0)
==1019207==The signal is caused by a READ memory access.
==1019207==Hint: address points to the zero page.
#0 0x7f7712b4d940 in gf_filter_pid_get_rfc_6381_codec_string /home/user/fuzzing_gpac/gpac/src/filter_core/filter_pid.c:9257:68
#1 0x7f7712c614f1 in dasher_get_rfc_6381_codec_name /home/user/fuzzing_gpac/gpac/src/filters/dasher.c:1993:9
#2 0x7f7712c614f1 in dasher_update_rep /home/user/fuzzing_gpac/gpac/src/filters/dasher.c:2385:3
#3 0x7f7712c2a38f in dasher_setup_rep /home/user/fuzzing_gpac/gpac/src/filters/dasher.c:2418:2
#4 0x7f7712c2a38f in dasher_setup_period /home/user/fuzzing_gpac/gpac/src/filters/dasher.c:6511:4
#5 0x7f7712c5be25 in dasher_switch_period /home/user/fuzzing_gpac/gpac/src/filters/dasher.c:6478:9
#6 0x7f7712c14d45 in dasher_process /home/user/fuzzing_gpac/gpac/src/filters/dasher.c:9683:6
#7 0x7f7712bafa33 in gf_filter_process_task /home/user/fuzzing_gpac/gpac/src/filter_core/filter.c:2971:7
#8 0x7f7712b7d47b in gf_fs_thread_proc /home/user/fuzzing_gpac/gpac/src/filter_core/filter_session.c:2105:3
#9 0x7f7712b7b5cf in gf_fs_run /home/user/fuzzing_gpac/gpac/src/filter_core/filter_session.c:2405:3
#10 0x7f771242ac6a in gf_dasher_process /home/user/fuzzing_gpac/gpac/src/media_tools/dash_segmenter.c:1236:6
#11 0x55884948e6dc in do_dash /home/user/fuzzing_gpac/gpac/applications/mp4box/mp4box.c:4831:15
#12 0x55884947fb6e in mp4box_main /home/user/fuzzing_gpac/gpac/applications/mp4box/mp4box.c:6245:7
#13 0x7f7711429d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#14 0x7f7711429e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#15 0x5588493a7dd4 in _start (/home/user/fuzzing_gpac/gpac/bin/gcc/MP4Box+0x82dd4) (BuildId: 53333ca7bff59dd9a3d1b2821e7c5f3a9aac76b9)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/user/fuzzing_gpac/gpac/src/filter_core/filter_pid.c:9257:68 in gf_filter_pid_get_rfc_6381_codec_string
==1019207==ABORTING
dash_client.c L10106
SEGV in gf_dash_group_get_audio_channels in /gpac/src/media_tools/dash_client.c:10106:11
asan
[32m[DASH] Setting up period start 0 duration 0 xlink none ID P1
[0m[33m[DASH] Cannot compute default segment duration
[0m[32m[DASH] AS#1 changed quality to bitrate 256 kbps - sample rate 8000 (playback speed 1)
[0m[32m[DASH] AS#2 changed quality to bitrate 800 kbps - Width 1280 Height 720 FPS 29/1 (playback speed 1)
[0m[32m[DASHDmx] setting up group 0 from /home/user/vul/MP4Box/crash2/id000457sig11src000410time401783180execs3815819ophavocrep2
[0m[31m[DASHDmx] group 1 error locating plugin for segment - mime type video/mp4 name /home/user/vul/MP4Box/crash2/v1_init_gpac.mp4: Requested URL is not valid or cannot be found
[0mAddressSanitizer:DEADLYSIGNAL
=================================================================
==1019179==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f5653047580 bp 0x00000000000a sp 0x7ffc8ecc6ba0 T0)
==1019179==The signal is caused by a READ memory access.
==1019179==Hint: address points to the zero page.
#0 0x7f5653047580 in __GI_____strtol_l_internal stdlib/../stdlib/strtol_l.c:291:10
#1 0x559fac822e25 in strtol (/home/user/fuzzing_gpac/gpac/bin/gcc/MP4Box+0xf0e25) (BuildId: 53333ca7bff59dd9a3d1b2821e7c5f3a9aac76b9)
#2 0x7f5654173566 in atoi /usr/include/stdlib.h:364:16
#3 0x7f5654173566 in gf_dash_group_get_audio_channels /home/user/fuzzing_gpac/gpac/src/media_tools/dash_client.c:10106:11
#4 0x7f5654173566 in gf_dash_group_get_quality_info /home/user/fuzzing_gpac/gpac/src/media_tools/dash_client.c:10263:25
#5 0x7f56548eb4d7 in dashdmx_declare_properties /home/user/fuzzing_gpac/gpac/src/filters/dmx_dash.c:1619:7
#6 0x7f56548eb4d7 in dashdmx_configure_pid /home/user/fuzzing_gpac/gpac/src/filters/dmx_dash.c:2050:2
#7 0x7f565470740c in gf_filter_pid_configure /home/user/fuzzing_gpac/gpac/src/filter_core/filter_pid.c:876:6
#8 0x7f56547262a6 in gf_filter_pid_connect_task /home/user/fuzzing_gpac/gpac/src/filter_core/filter_pid.c:1230:3
#9 0x7f565477d47b in gf_fs_thread_proc /home/user/fuzzing_gpac/gpac/src/filter_core/filter_session.c:2105:3
#10 0x7f565477b5cf in gf_fs_run /home/user/fuzzing_gpac/gpac/src/filter_core/filter_session.c:2405:3
#11 0x7f565402ac6a in gf_dasher_process /home/user/fuzzing_gpac/gpac/src/media_tools/dash_segmenter.c:1236:6
#12 0x559fac89b6dc in do_dash /home/user/fuzzing_gpac/gpac/applications/mp4box/mp4box.c:4831:15
#13 0x559fac88cb6e in mp4box_main /home/user/fuzzing_gpac/gpac/applications/mp4box/mp4box.c:6245:7
#14 0x7f5653029d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#15 0x7f5653029e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#16 0x559fac7b4dd4 in _start (/home/user/fuzzing_gpac/gpac/bin/gcc/MP4Box+0x82dd4) (BuildId: 53333ca7bff59dd9a3d1b2821e7c5f3a9aac76b9)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV stdlib/../stdlib/strtol_l.c:291:10 in __GI_____strtol_l_internal
==1019179==ABORTING
```
| SEGV in MP4Box | https://api.github.com/repos/gpac/gpac/issues/2649/comments | 3 | 2023-10-16T15:11:33Z | 2023-10-19T21:00:41Z | https://github.com/gpac/gpac/issues/2649 | 1,945,468,303 | 2,649 |
[
"gpac",
"gpac"
] | https://github.com/Janette88/test_pocs/blob/main/sbo3
MP4Box -dash 1000 /home/fuzz/crashes/sbo3
```
Description
stack-buffer-overflow in gf_text_get_utf8_line at filters/load_text.c:381.
#Version
git log
commit 7edc40feef23efd8c9948292d269eae76fa475af (HEAD -> master, origin/master, origin/HEAD)
Author: jeanlf <jeanlf@gpac.io>
Date: Thu Oct 12 16:58:53 2023 +0200
./bin/gcc/MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev588-g7edc40fee-master
(c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Proof of Concept
./bin/gcc/MP4Box -dash 1000 /home/fuzz/crashes/sbo3
[Dasher] No template assigned, using $File$_dash$FS$$Number$
[Dasher] No bitrate property assigned to PID sbo_381, computing from bitstream
[TXTIn] Bad SRT formatting - expecting number got "m[ññ<?xml versi0"A217Z" minimumU.(17Z --> wi"
[TXTIn] Corrupted SRT frame 0 after frame 0
[TXTIn] Error scanning SRT frame 0 timing
[TXTIn] Corrupted SRT frame 0 after frame 0
[TXTIn] Error scanning SRT frame 0 timing
[TXTIn] Corrupted SRT frame 0 after frame 0
[TXTIn] Error scanning SRT frame 0 timing
[TXTIn] Corrupted SRT frame 0 after frame 0
[TXTIn] Error scanning SRT frame 0 timing
[TXTIn] Corrupted SRT frame 0 after frame 0
[TXTIn] Error scanning SRT frame 0 timing
[TXTIn] Corrupted SRT frame 0 after frame 0
[TXTIn] Error scanning SRT frame 0 timing
[TXTIn] Corrupted SRT frame 0 after frame 0
[TXTIn] Error scanning SRT frame 0 timing
[TXTIn] Corrupted SRT frame 0 after frame 0
[TXTIn] Error scanning SRT frame 0 timing
[TXTIn] Corrupted SRT frame -1 after frame 0
=================================================================
==59407==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffffffed310 at pc 0x7ffff761f16d bp 0x7ffffffebfe0 sp 0x7ffffffeb788
WRITE of size 2048 at 0x7ffffffed310 thread T0
#0 0x7ffff761f16c in __interceptor_strcpy ../../../../src/libsanitizer/asan/asan_interceptors.cc:431
#1 0x7ffff4d52d1c in strcpy /usr/include/x86_64-linux-gnu/bits/string_fortified.h:90
#2 0x7ffff4d52d1c in gf_text_get_utf8_line filters/load_text.c:381
#3 0x7ffff4d71af3 in txtin_process_srt filters/load_text.c:996
#4 0x7ffff4d6b4f3 in txtin_process filters/load_text.c:4015
#5 0x7ffff4a5d4ae in gf_filter_process_task filter_core/filter.c:2971
#6 0x7ffff4a2ab11 in gf_fs_thread_proc filter_core/filter_session.c:2105
#7 0x7ffff4a2f8b6 in gf_fs_run filter_core/filter_session.c:2405
#8 0x7ffff43bc0bd in gf_dasher_process media_tools/dash_segmenter.c:1236
#9 0x555555621d26 in do_dash /home/fuzz/gpac/applications/mp4box/mp4box.c:4831
#10 0x555555621d26 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6245
#11 0x7ffff164c082 in __libc_start_main ../csu/libc-start.c:308
#12 0x5555555fa05d in _start (/home/fuzz/gpac/bin/gcc/MP4Box+0xa605d)
Address 0x7ffffffed310 is located in stack of thread T0 at offset 2336 in frame
#0 0x7ffff4d708ef in txtin_process_srt filters/load_text.c:949
This frame has 14 object(s):
[32, 36) 'sh' (line 950)
[48, 52) 'sm' (line 950)
[64, 68) 'ss' (line 950)
[80, 84) 'sms' (line 950)
[96, 100) 'eh' (line 950)
[112, 116) 'em' (line 950)
[128, 132) 'es' (line 950)
[144, 148) 'ems' (line 950)
[160, 164) 'char_len' (line 950)
[176, 180) 'set_start_char' (line 951)
[192, 196) 'set_end_char' (line 951)
[208, 212) 'line' (line 952)
[224, 248) '<unknown>'
[288, 2336) 'szLine' (line 953) <== Memory access at offset 2336 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow ../../../../src/libsanitizer/asan/asan_interceptors.cc:431 in __interceptor_strcpy
Shadow bytes around the buggy address:
0x10007fff5a10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007fff5a20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007fff5a30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007fff5a40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007fff5a50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x10007fff5a60: 00 00[f3]f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3
0x10007fff5a70: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007fff5a80: 00 00 00 00 00 00 f1 f1 f1 f1 04 f2 04 f2 04 f2
0x10007fff5a90: 04 f2 00 00 00 f2 f2 f2 f2 f2 00 00 00 f3 f3 f3
0x10007fff5aa0: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10007fff5ab0: 00 00 00 00 00 00 00 00 00 00 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
==59407==ABORTING
Impact
This is capable of causing crashes and allowing modification of stack memory which could lead to remote code execution.
Occurrences
load_text.c L381
``` | stack-buffer-overflow in gf_text_get_utf8_line | https://api.github.com/repos/gpac/gpac/issues/2647/comments | 0 | 2023-10-15T00:37:58Z | 2023-10-17T15:12:09Z | https://github.com/gpac/gpac/issues/2647 | 1,943,619,176 | 2,647 |
[
"gpac",
"gpac"
] | Poc address: https://github.com/Janette88/test_pocs/blob/main/hbo_2429
MP4Box -dash 1000 /home/fuzz/crashes/hbo_2429
```
Description
heap-buffer-overflow in gf_m2ts_get_adaptation_field at media_tools/mpegts.c:2429.
Version
git log
commit 7edc40feef23efd8c9948292d269eae76fa475af (HEAD -> master, origin/master, origin/HEAD)
Author: jeanlf <jeanlf@gpac.io>
Date: Thu Oct 12 16:58:53 2023 +0200
./bin/gcc/MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev588-g7edc40fee-master
(c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Proof of Concept
./bin/gcc/MP4Box -dash 1000 /home/fuzz/crashes/hbo_2429
[MPEG-2 TS] TS Packet 2 is scrambled - not supported
[MPEG-2 TS] TS Packet 3 is scrambled - not supported
[MPEG-2 TS] TS Packet 4 is scrambled - not supported
[MPEG-2 TS] TS Packet 5 is scrambled - not supported
[MPEG-2 TS] TS Packet 6 is scrambled - not supported
[MPEG-2 TS] TS Packet 7 is scrambled - not supported
[MPEG-2 TS] TS Packet 8 is scrambled - not supported
[MPEG-2 TS] TS Packet 9 is scrambled - not supported
[MPEG-2 TS] TS Packet 10 is scrambled - not supported
[MPEG-2 TS] TS Packet 11 is scrambled - not supported
[MPEG-2 TS] TS Packet 12 is scrambled - not supported
[MPEG-2 TS] TS Packet 13 is scrambled - not supported
[MPEG-2 TS] TS Packet 14 is scrambled - not supported
[MPEG-2 TS] TS Packet 15 is scrambled - not supported
[MPEG-2 TS] TS Packet 16 is scrambled - not supported
[MPEG-2 TS] TS Packet 17 is scrambled - not supported
[MPEG-2 TS] TS Packet 18 is scrambled - not supported
[MPEG-2 TS] TS Packet 19 is scrambled - not supported
[MPEG-2 TS] TS Packet 20 is scrambled - not supported
[MPEG-2 TS] TS Packet 21 is scrambled - not supported
[MPEG-2 TS] TS Packet 22 is scrambled - not supported
[MPEG-2 TS] TS Packet 23 is scrambled - not supported
[MPEG-2 TS] TS Packet 24 is scrambled - not supported
[MPEG-2 TS] TS Packet 25 is scrambled - not supported
[MPEG-2 TS] TS Packet 26 is scrambled - not supported
[MPEG-2 TS] TS Packet 27 is scrambled - not supported
[MPEG-2 TS] TS Packet 28 is scrambled - not supported
[MPEG-2 TS] TS Packet 29 is scrambled - not supported
[MPEG-2 TS] TS Packet 30 is scrambled - not supported
[MPEG-2 TS] TS Packet 31 is scrambled - not supported
[MPEG-2 TS] TS Packet 32 is scrambled - not supported
[MPEG-2 TS] TS Packet 33 is scrambled - not supported
[MPEG-2 TS] TS Packet 34 is scrambled - not supported
[MPEG-2 TS] TS Packet 35 is scrambled - not supported
[MPEG-2 TS] TS Packet 36 is scrambled - not supported
[MPEG-2 TS] TS Packet 37 does not start with sync marker
[MPEG-2 TS] TS Packet 38 does not start with sync marker
[MPEG-2 TS] PID 0: Bad Adaptation Descriptor found (tag 0) size is 135 but only 41 bytes available
[MPEG-2 TS] PID 3703: Bad Adaptation Descriptor found (tag 0) size is 0 but only 254 bytes available
=================================================================
==59092==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x625000018da4 at pc 0x7ffff4459f03 bp 0x7ffffffec2d0 sp 0x7ffffffec2c0
READ of size 1 at 0x625000018da4 thread T0
#0 0x7ffff4459f02 in gf_m2ts_get_adaptation_field media_tools/mpegts.c:2429
#1 0x7ffff446929d in gf_m2ts_process_packet media_tools/mpegts.c:2565
#2 0x7ffff446c1e9 in gf_m2ts_process_data media_tools/mpegts.c:2842
#3 0x7ffff4bc2616 in m2tsdmx_configure_pid filters/dmx_m2ts.c:1173
#4 0x7ffff49e9b9e in gf_filter_pid_configure filter_core/filter_pid.c:876
#5 0x7ffff49f256e in gf_filter_pid_connect_task filter_core/filter_pid.c:1230
#6 0x7ffff4a2ab11 in gf_fs_thread_proc filter_core/filter_session.c:2105
#7 0x7ffff4a2f8b6 in gf_fs_run filter_core/filter_session.c:2405
#8 0x7ffff43bc0bd in gf_dasher_process media_tools/dash_segmenter.c:1236
#9 0x555555621d26 in do_dash /home/fuzz/gpac/applications/mp4box/mp4box.c:4831
#10 0x555555621d26 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6245
#11 0x7ffff164c082 in __libc_start_main ../csu/libc-start.c:308
#12 0x5555555fa05d in _start (/home/fuzz/gpac/bin/gcc/MP4Box+0xa605d)
0x625000018da4 is located 0 bytes to the right of 9380-byte region [0x625000016900,0x625000018da4)
allocated by thread T0 here:
#0 0x7ffff7690c3e in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:163
#1 0x7ffff446c57b in gf_m2ts_process_data media_tools/mpegts.c:2793
#2 0x7ffff4bc2616 in m2tsdmx_configure_pid filters/dmx_m2ts.c:1173
#3 0x7ffff49e9b9e in gf_filter_pid_configure filter_core/filter_pid.c:876
#4 0x7ffff49f256e in gf_filter_pid_connect_task filter_core/filter_pid.c:1230
#5 0x7ffff4a2ab11 in gf_fs_thread_proc filter_core/filter_session.c:2105
#6 0x7ffff4a2f8b6 in gf_fs_run filter_core/filter_session.c:2405
#7 0x7ffff43bc0bd in gf_dasher_process media_tools/dash_segmenter.c:1236
#8 0x555555621d26 in do_dash /home/fuzz/gpac/applications/mp4box/mp4box.c:4831
#9 0x555555621d26 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6245
#10 0x7ffff164c082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-buffer-overflow media_tools/mpegts.c:2429 in gf_m2ts_get_adaptation_field
Shadow bytes around the buggy address:
0x0c4a7fffb160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a7fffb170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a7fffb180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a7fffb190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c4a7fffb1a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c4a7fffb1b0: 00 00 00 00[04]fa fa fa fa fa fa fa fa fa fa fa
0x0c4a7fffb1c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a7fffb1d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a7fffb1e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a7fffb1f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c4a7fffb200: 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
==59092==ABORTING
Impact
This vulnerability is capable of crashing software, modify memory, and possible remote execution.
Occurrences
mpegts.c L2429
``` | heap-buffer-overflow in gf_m2ts_get_adaptation_field | https://api.github.com/repos/gpac/gpac/issues/2646/comments | 0 | 2023-10-15T00:36:43Z | 2023-12-01T17:15:31Z | https://github.com/gpac/gpac/issues/2646 | 1,943,618,918 | 2,646 |
[
"gpac",
"gpac"
] | Proof of Concept
https://github.com/Janette88/test_pocs/blob/main/poc_1
MP4Box -dash 1000 -out /dev/null poc_1
```
Description
Heap-buffer-overflow in ac3dmx_process at filters/reframe_ac3.c:489.
version
git log
commit 5692dc729491805e0e5f55c21d50ba1e6b19e88e (HEAD -> master, origin/master, origin/HEAD)
Author: Aurelien David <aurelien.david@telecom-paristech.fr>
Date: Wed Oct 11 13:24:46 2023 +0200
ac3dmx: add remain size check (fixes #2627)
./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev577-g5692dc729-master
(c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
./configure --enable-sanitizer
make
Proof of Concept
./bin/gcc/MP4Box -dash 1000 -out /dev/null poc_1
[Dasher] No template assigned, using $File$_dash$FS$$Number$
[AC3Dmx] 3 bytes unrecovered before sync word
Unknown CICP mapping for channel config 1/0.1
[FileOut] cannot open output file /dev/poc_1_dashinit.mp4
[FileOut] output file handle is not opened, discarding 809 bytes
[AC3Dmx] 14965 bytes unrecovered before sync word
=================================================================
==46129==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62800002bbf5 at pc 0x7ffff761e490 bp 0x7ffffffed8a0 sp 0x7ffffffed048
READ of size 128 at 0x62800002bbf5 thread T0
#0 0x7ffff761e48f in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:790
#1 0x7ffff4e8f3af in memcpy /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#2 0x7ffff4e8f3af in ac3dmx_process filters/reframe_ac3.c:489
#3 0x7ffff4a5f78e in gf_filter_process_task filter_core/filter.c:2971
#4 0x7ffff4a2cdf1 in gf_fs_thread_proc filter_core/filter_session.c:2105
#5 0x7ffff4a31b96 in gf_fs_run filter_core/filter_session.c:2405
#6 0x7ffff43bd6bd in gf_dasher_process media_tools/dash_segmenter.c:1236
#7 0x555555621d26 in do_dash /home/fuzz/gpac/applications/mp4box/mp4box.c:4831
#8 0x555555621d26 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6245
#9 0x7ffff1650082 in __libc_start_main ../csu/libc-start.c:308
#10 0x5555555fa05d in _start (/home/fuzz/gpac/bin/gcc/MP4Box+0xa605d)
0x62800002bbf5 is located 0 bytes to the right of 15093-byte region [0x628000028100,0x62800002bbf5)
allocated by thread T0 here:
#0 0x7ffff7690c3e in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:163
#1 0x7ffff4e8fa0a in ac3dmx_process filters/reframe_ac3.c:399
#2 0x7ffff4a5f78e in gf_filter_process_task filter_core/filter.c:2971
#3 0x7ffff4a2cdf1 in gf_fs_thread_proc filter_core/filter_session.c:2105
#4 0x7ffff4a31b96 in gf_fs_run filter_core/filter_session.c:2405
#5 0x7ffff43bd6bd in gf_dasher_process media_tools/dash_segmenter.c:1236
#6 0x555555621d26 in do_dash /home/fuzz/gpac/applications/mp4box/mp4box.c:4831
#7 0x555555621d26 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6245
#8 0x7ffff1650082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:790 in __interceptor_memcpy
Shadow bytes around the buggy address:
0x0c507fffd720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c507fffd730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c507fffd740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c507fffd750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c507fffd760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c507fffd770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[05]fa
0x0c507fffd780: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c507fffd790: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c507fffd7a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c507fffd7b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c507fffd7c0: 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
==46129==ABORTING
Impact
An OOB read on the heap can potentially cause a crash or information disclosure in some cases. Could be leveraged with other vulnerabilities for a more serious impact.
Occurrences
reframe_ac3.c L489
``` | heap-buffer-overflow in ac3dmx_process | https://api.github.com/repos/gpac/gpac/issues/2645/comments | 1 | 2023-10-15T00:35:41Z | 2023-10-17T15:12:51Z | https://github.com/gpac/gpac/issues/2645 | 1,943,618,724 | 2,645 |
[
"gpac",
"gpac"
] | ./bin/gcc/MP4Box -dash 1000 /home/fuzz/crashes/poc13
https://github.com/Janette88/test_pocs/blob/main/poc13
```
Description
Double-Free in isoffin_process at filters/isoffin_read.c:1541.
Version
git log
commit 5692dc729491805e0e5f55c21d50ba1e6b19e88e (HEAD -> master, origin/master, origin/HEAD)
Author: Aurelien David <aurelien.david@telecom-paristech.fr>
Date: Wed Oct 11 13:24:46 2023 +0200
ac3dmx: add remain size check (fixes #2627)
./MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev577-g5692dc729-master
(c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Proof of Concept
./configure --enable-sanitizer
make
./bin/gcc/MP4Box -dash 1000 /home/fuzz/crashes/poc13
[iso file] Unknown box type 00000000 in parent moov
[iso file] Unknown top-level box type 00000100
[Dasher] No template assigned, using $File$_dash$FS$$Number$
[Dasher] No bitrate property assigned to PID V1, computing from bitstream
filters/isoffin_read.c:1541:6: runtime error: null pointer passed as argument 2, which is declared to never be null
ASAN log:
/bin/gcc/MP4Box -dash 1000 /home/fuzz/crash/poc13
[iso file] Unknown box type 00000000 in parent moov
[iso file] Unknown top-level box type 00000100
[Dasher] No template assigned, using $File$_dash$FS$$Number$
[Dasher] No bitrate property assigned to PID V1, computing from bitstream
[IsoMedia] Failed to fetch initial sample 1 for track 2
[iso file] Unknown box type 00000000 in parent moov
[Dasher] Representation not initialized, dropping non-SAP1/2 packet CTS 18446744073709551615/12288
[IsoMedia] Failed to fetch initial sample 1 for track 2
[MuxIsom] Packet with no CTS assigned, cannot store to track, ignoring
[IsoMedia] File truncated, aborting read for track 1
[IsoMedia] Failed to fetch initial sample 1 for track 2
[Dasher] Couldn't compute bitrate of PID V1 in time for manifest generation, please specify #Bitrate property
[Dasher] Couldn't compute bitrate of PID V1 in time for manifest generation, please specify #Bitrate property
[MPD] Generating MPD at time 2023-10-12T06:43:32.827Z
[Dasher] End of Period
[Dasher] End of MPD (no more active streams)
=================================================================
==2796375==ERROR: AddressSanitizer: attempting double-free on 0x619000015480 in thread T0:
#0 0x4a7292 in free (/home/fuzz/gpac/gpac/bin/gcc/MP4Box+0x4a7292)
#1 0x7fa1fbe46f35 in gf_filterpacket_del (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0x1249f35)
#2 0x7fa1fbe1a0b2 in gf_fq_del (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0x121d0b2)
#3 0x7fa1fbe50ad5 in gf_filter_del (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0x1253ad5)
#4 0x7fa1fbe1ee09 in gf_fs_del (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0x1221e09)
#5 0x7fa1fb7c7156 in gf_dasher_del (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0xbca156)
#6 0x5026ad in do_dash /home/fuzz/gpac/gpac/applications/mp4box/mp4box.c:4894:2
#7 0x4f34ee in mp4box_main /home/fuzz/gpac/gpac/applications/mp4box/mp4box.c:6245:7
#8 0x7fa1fa87e082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#9 0x42ad4d in _start (/home/fuzz/gpac/gpac/bin/gcc/MP4Box+0x42ad4d)
0x619000015480 is located 0 bytes inside of 1084-byte region [0x619000015480,0x6190000158bc)
freed by thread T0 here:
#0 0x4a77f3 in __interceptor_realloc (/home/fuzz/gpac/gpac/bin/gcc/MP4Box+0x4a77f3)
#1 0x7fa1fb69480d in Media_GetSample (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0xa9780d)
#2 0x7fa1fb5f9af9 in gf_isom_get_sample_ex (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0x9fcaf9)
#3 0x7fa1fc1037b6 in isor_reader_get_sample (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0x15067b6)
#4 0x7fa1fc0f6855 in isoffin_process (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0x14f9855)
#5 0x7fa1fbe5ed3e in gf_filter_process_task (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0x1261d3e)
previously allocated by thread T0 here:
LLVMSymbolizer: error reading file: No such file or directory
#0 0x4a77f3 in __interceptor_realloc (/home/fuzz/gpac/gpac/bin/gcc/MP4Box+0x4a77f3)
#1 0x7fa1fbdb0641 in gf_filter_pck_expand (/home/fuzz/gpac/gpac/bin/gcc/libgpac.so.12+0x11b3641)
#2 0x7ffd80dab79f ([stack]+0x3379f)
SUMMARY: AddressSanitizer: double-free (/home/fuzz/gpac/gpac/bin/gcc/MP4Box+0x4a7292) in free
==2796375==ABORTING
POC file address:
https://github.com/Janette88/test_pocs/blob/main/poc13
Impact
Referencing memory after it has been freed multiple times can cause a program to crash, use unexpected values, memory leak or execute code .This might allow an attacker to write values to arbitrary memory spaces and create an interactive shell with elevated privileges.
Occurrences
isoffin_read.c L1541
```
| Double-Free in isoffin_process | https://api.github.com/repos/gpac/gpac/issues/2643/comments | 1 | 2023-10-13T09:15:46Z | 2023-12-01T17:08:07Z | https://github.com/gpac/gpac/issues/2643 | 1,941,569,436 | 2,643 |
[
"gpac",
"gpac"
] | # Description
heap-buffer-overflow in gf_fwrite at utils/os_file.c:1657
# Version
```
git log
commit 7edc40feef23efd8c9948292d269eae76fa475af (HEAD -> master, origin/master, origin/HEAD)
Author: jeanlf <jeanlf@gpac.io>
Date: Thu Oct 12 16:58:53 2023 +0200
./bin/gcc/MP4Box -version
MP4Box - GPAC version 2.3-DEV-rev588-g7edc40fee-master
(c) 2000-2023 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
```
# POC
https://github.com/Janette88/test_pocs/blob/main/hbo16
# Reproduce
```
./bin/gcc/MP4Box -dash 1000 /home/fuzz/crashes/hbo16
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
[SWF Parsing] tag PlaceObject over-read of 4 bytes (size 1) (frame 1)
=================================================================
==60235==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000025d1 at pc 0x7ffff75ed1bd bp 0x7ffffffec720 sp 0x7ffffffebec8
READ of size 53248 at 0x6020000025d1 thread T0
#0 0x7ffff75ed1bc in __interceptor_fwrite ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1103
#1 0x7ffff3ba5226 in gf_fwrite utils/os_file.c:1657
#2 0x7ffff4655f98 in swf_def_bits_jpeg scene_manager/swf_parse.c:2087
#3 0x7ffff46576d4 in swf_process_tag scene_manager/swf_parse.c:2374
#4 0x7ffff46576d4 in swf_parse_tag scene_manager/swf_parse.c:2405
#5 0x7ffff4d55ed9 in gf_text_process_swf filters/load_text.c:2550
#6 0x7ffff4d55ed9 in gf_text_process_swf filters/load_text.c:2527
#7 0x7ffff4d6b4f3 in txtin_process filters/load_text.c:4015
#8 0x7ffff4a5d4ae in gf_filter_process_task filter_core/filter.c:2971
#9 0x7ffff4a2ab11 in gf_fs_thread_proc filter_core/filter_session.c:2105
#10 0x7ffff4a2f8b6 in gf_fs_run filter_core/filter_session.c:2405
#11 0x7ffff43bc0bd in gf_dasher_process media_tools/dash_segmenter.c:1236
#12 0x555555621d26 in do_dash /home/fuzz/gpac/applications/mp4box/mp4box.c:4831
#13 0x555555621d26 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6245
#14 0x7ffff164c082 in __libc_start_main ../csu/libc-start.c:308
#15 0x5555555fa05d in _start (/home/fuzz/gpac/bin/gcc/MP4Box+0xa605d)
0x6020000025d1 is located 0 bytes to the right of 1-byte region [0x6020000025d0,0x6020000025d1)
allocated by thread T0 here:
#0 0x7ffff7690808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x7ffff465a345 in swf_def_hdr_jpeg scene_manager/swf_parse.c:2044
#2 0x7ffff465a345 in swf_process_tag scene_manager/swf_parse.c:2372
#3 0x7ffff465a345 in swf_parse_tag scene_manager/swf_parse.c:2405
#4 0x7ffff4d55ed9 in gf_text_process_swf filters/load_text.c:2550
#5 0x7ffff4d55ed9 in gf_text_process_swf filters/load_text.c:2527
#6 0x7ffff4d6b4f3 in txtin_process filters/load_text.c:4015
#7 0x7ffff4a5d4ae in gf_filter_process_task filter_core/filter.c:2971
#8 0x7ffff4a2ab11 in gf_fs_thread_proc filter_core/filter_session.c:2105
#9 0x7ffff4a2f8b6 in gf_fs_run filter_core/filter_session.c:2405
#10 0x7ffff43bc0bd in gf_dasher_process media_tools/dash_segmenter.c:1236
#11 0x555555621d26 in do_dash /home/fuzz/gpac/applications/mp4box/mp4box.c:4831
#12 0x555555621d26 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6245
#13 0x7ffff164c082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1103 in __interceptor_fwrite
Shadow bytes around the buggy address:
0x0c047fff8460: fa fa fd fa fa fa 00 00 fa fa 00 00 fa fa fd fa
0x0c047fff8470: fa fa fd fd fa fa fd fa fa fa 00 07 fa fa 00 07
0x0c047fff8480: fa fa 04 fa fa fa 00 05 fa fa 00 00 fa fa 00 00
0x0c047fff8490: fa fa fd fa fa fa fd fd fa fa fd fd fa fa fd fd
0x0c047fff84a0: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
=>0x0c047fff84b0: fa fa 00 00 fa fa 00 00 fa fa[01]fa fa fa fa fa
0x0c047fff84c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff84d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff84e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff84f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8500: 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
==60235==ABORTING
```
# Impact
This vulnerability allows a remote attacker to cause a denial of service or even arbitrary code execution on an affected gpac MP4Box. Exploiting this vulnerability requires user interaction, as the target must access a malicious page or open a malicious file.
# Credit
Janette88 (Jq Wang) | heap-buffer-overflow in gf_fwrite at utils/os_file.c:1657 | https://api.github.com/repos/gpac/gpac/issues/2642/comments | 1 | 2023-10-13T09:11:40Z | 2024-03-10T19:44:37Z | https://github.com/gpac/gpac/issues/2642 | 1,941,560,024 | 2,642 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.