issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 261k ⌀ | issue_title stringlengths 1 925 | issue_comments_url stringlengths 56 81 | issue_comments_count int64 0 2.5k | issue_created_at stringlengths 20 20 | issue_updated_at stringlengths 20 20 | issue_html_url stringlengths 37 62 | issue_github_id int64 387k 2.46B | issue_number int64 1 127k |
|---|---|---|---|---|---|---|---|---|---|
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
[issue.md](https://github.com/gpac/gpac/files/9943986/issue.md)

| Tiled Streaming . Delete a tiled track from the file(video_tiled.mp4). I can't see a video with a clean cut, green area in place of the removed tile.My results are shown below.My process is shown in the issue file. | https://api.github.com/repos/gpac/gpac/issues/2303/comments | 2 | 2022-11-05T14:08:19Z | 2022-11-07T11:09:29Z | https://github.com/gpac/gpac/issues/2303 | 1,437,043,915 | 2,303 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [ ] I looked for a similar issue and couldn't find any.
- [ ] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ ] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

| Tiled Streaming . Delete a tiled track from the file(video_tiled.mp4). I can't see a video with a clean cut, green area in place of the removed tile.My results are shown below. | https://api.github.com/repos/gpac/gpac/issues/2302/comments | 0 | 2022-11-05T13:57:54Z | 2022-11-05T14:10:25Z | https://github.com/gpac/gpac/issues/2302 | 1,437,040,960 | 2,302 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [X] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
# Description
Heap use after free in gf_node_get_tag scenegraph/base_scenegraph.c:1265
# System info
Ubuntu 22.04 lts
# Version info
```
MP4Box - GPAC version 2.0-revUNKNOWN_REV
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
# compile
```
./configure --enable-sanitizer --static-bin
make
```
# crash command
```
MP4Box -mp4 -carousel 0x1000 POC.svg
```
# POC
[POC-uaf.zip](https://github.com/gpac/gpac/files/9931710/POC-uaf.zip)
# Crash output
```
[Parser] SVG Scene Parsing: /home/x1do0/Desktop/share/gpac-2.0.0/crash_bugs/126.svg
[SVG Parsing] Error in parsing number (expecting digits):�<| (00/100)
[SVG Parsing] Error in parsing: �<%[��<
[SVG Parsing] line 1 - Missing attributeName attribute on (null)
[Parser] Scene parsed and Scene Graph built in 21 ms
=================================================================
==1769514==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000000310 at pc 0x7f811180f217 bp 0x7ffd2e0ec430 sp 0x7ffd2e0ec420
READ of size 8 at 0x604000000310 thread T0
#0 0x7f811180f216 in gf_node_get_tag scenegraph/base_scenegraph.c:1265
#1 0x7f8112127772 in svg_parse_animation scene_manager/loader_svg.c:372
#2 0x7f8112128f0f in svg_flush_animations scene_manager/loader_svg.c:2015
#3 0x7f8112128f0f in svg_flush_animations scene_manager/loader_svg.c:2010
#4 0x7f8112128f0f in load_svg_run scene_manager/loader_svg.c:2118
#5 0x5645ad5eda3f in EncodeFile /home/x1do0/Desktop/app_fuzzing/asan-gpac-2.0.0/applications/mp4box/fileimport.c:3114
#6 0x5645ad5b5eb0 in do_scene_encode /home/x1do0/Desktop/app_fuzzing/asan-gpac-2.0.0/applications/mp4box/main.c:4463
#7 0x5645ad5b5eb0 in mp4boxMain /home/x1do0/Desktop/app_fuzzing/asan-gpac-2.0.0/applications/mp4box/main.c:5893
#8 0x7f810f58fd8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#9 0x7f810f58fe3f in __libc_start_main_impl ../csu/libc-start.c:392
#10 0x5645ad58eb64 in _start (/home/x1do0/Desktop/app_fuzzing/asan-gpac-2.0.0/bin/gcc/MP4Box+0xa7b64)
0x604000000310 is located 0 bytes inside of 48-byte region [0x604000000310,0x604000000340)
freed by thread T0 here:
#0 0x7f8114f2a517 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:127
#1 0x7f8111a6ceeb in gf_svg_node_del scenegraph/svg_types.c:126
#2 0x7f81118138ed in gf_node_unregister scenegraph/base_scenegraph.c:761
#3 0x7f81121316b9 in svg_node_start scene_manager/loader_svg.c:1756
#4 0x7f81117a5295 in xml_sax_node_start utils/xml_parser.c:306
#5 0x7f81117a8721 in xml_sax_parse_attribute utils/xml_parser.c:395
#6 0x7f81117a8721 in xml_sax_parse utils/xml_parser.c:904
#7 0x7f81117aac20 in gf_xml_sax_parse_intern utils/xml_parser.c:1065
#8 0x7f81117ab007 in gf_xml_sax_parse utils/xml_parser.c:1093
#9 0x7f81117ab2d8 in xml_sax_read_file utils/xml_parser.c:1180
#10 0x7f81117ac60f in gf_xml_sax_parse_file utils/xml_parser.c:1292
#11 0x7f8112128e26 in load_svg_run scene_manager/loader_svg.c:2112
#12 0x5645ad5eda3f in EncodeFile /home/x1do0/Desktop/app_fuzzing/asan-gpac-2.0.0/applications/mp4box/fileimport.c:3114
#13 0x5645ad5b5eb0 in do_scene_encode /home/x1do0/Desktop/app_fuzzing/asan-gpac-2.0.0/applications/mp4box/main.c:4463
#14 0x5645ad5b5eb0 in mp4boxMain /home/x1do0/Desktop/app_fuzzing/asan-gpac-2.0.0/applications/mp4box/main.c:5893
#15 0x7f810f58fd8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
previously allocated by thread T0 here:
#0 0x7f8114f2a867 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x7f8111a6c9d1 in gf_svg_create_node scenegraph/svg_types.c:58
#2 0x7f81118156f9 in gf_node_new scenegraph/base_scenegraph.c:2014
#3 0x7f811212d13a in svg_parse_element scene_manager/loader_svg.c:712
#4 0x7f811212d13a in svg_node_start scene_manager/loader_svg.c:1706
#5 0x7f81117a5295 in xml_sax_node_start utils/xml_parser.c:306
#6 0x7f81117a8721 in xml_sax_parse_attribute utils/xml_parser.c:395
#7 0x7f81117a8721 in xml_sax_parse utils/xml_parser.c:904
#8 0x7f81117aac20 in gf_xml_sax_parse_intern utils/xml_parser.c:1065
#9 0x7f81117ab007 in gf_xml_sax_parse utils/xml_parser.c:1093
#10 0x7f81117ab2d8 in xml_sax_read_file utils/xml_parser.c:1180
#11 0x7f81117ac60f in gf_xml_sax_parse_file utils/xml_parser.c:1292
#12 0x7f8112128e26 in load_svg_run scene_manager/loader_svg.c:2112
#13 0x5645ad5eda3f in EncodeFile /home/x1do0/Desktop/app_fuzzing/asan-gpac-2.0.0/applications/mp4box/fileimport.c:3114
#14 0x5645ad5b5eb0 in do_scene_encode /home/x1do0/Desktop/app_fuzzing/asan-gpac-2.0.0/applications/mp4box/main.c:4463
#15 0x5645ad5b5eb0 in mp4boxMain /home/x1do0/Desktop/app_fuzzing/asan-gpac-2.0.0/applications/mp4box/main.c:5893
#16 0x7f810f58fd8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
SUMMARY: AddressSanitizer: heap-use-after-free scenegraph/base_scenegraph.c:1265 in gf_node_get_tag
Shadow bytes around the buggy address:
0x0c087fff8010: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff8020: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 01
0x0c087fff8030: fa fa 00 00 00 00 04 fa fa fa 00 00 00 00 05 fa
0x0c087fff8040: fa fa 00 00 00 00 00 06 fa fa 00 00 00 00 00 00
0x0c087fff8050: fa fa fd fd fd fd fd fa fa fa 00 00 00 00 00 00
=>0x0c087fff8060: fa fa[fd]fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff8070: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c087fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c087fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c087fff80b0: 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
==1769514==ABORTING
```
# Impact
can cause a program to crash, use unexpected values, or execute code.
ps: this crash still happens on the newest mp4box+asan.
| GPAC-2.0.0 MP4Box: heap-use-after-free in gf_node_get_tag | https://api.github.com/repos/gpac/gpac/issues/2301/comments | 1 | 2022-11-03T17:46:47Z | 2022-11-04T11:27:05Z | https://github.com/gpac/gpac/issues/2301 | 1,435,049,112 | 2,301 |
[
"gpac",
"gpac"
] | ## Context
We are creating our own Low Latency Hls server using ByteRange mode. We are having problems with some fragments that in
the manifest already has a defined range, but at the moment of requesting them they are still incomplete (they are not
preload hint fragments).
This behavior happens so often that we had to validate the range of bytes requested vs. the current size of the segment
in our server. If the requested bytes are not yet there we need to wait for Gpac to finish writing them.
We are not clear if this behavior is normal.
If the fragments have a byte range defined in the manifest does not mean that they are already ready in that range of
bytes?
(I clarify again that we are not talking about preload hint fragments)
We have been testing with some players and in all of them, we have seen the same behavior.
## Evidence
The player got a playlist like this:
```
#EXTM3U
#EXT-X-TARGETDURATION:2
#EXT-X-VERSION:9
#EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES,CAN-SKIP-UNTIL=12,PART-HOLD-BACK=0.630
#EXT-X-PART-INF:PART-TARGET=0.210000
#EXT-X-MEDIA-SEQUENCE:88
#EXT-X-SKIP:SKIPPED-SEGMENTS=8
#EXTINF:2.00600,
segment_track2_96.m4s
#EXTINF:1.98400,
segment_track2_97.m4s
#EXTINF:2.00500,
segment_track2_98.m4s
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_99.m4s",BYTERANGE="4294@0"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_99.m4s",BYTERANGE="3051@4294"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_99.m4s",BYTERANGE="2658@7345"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_99.m4s",BYTERANGE="2724@10003"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_99.m4s",BYTERANGE="3320@12727"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_99.m4s",BYTERANGE="3680@16047"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_99.m4s",BYTERANGE="3036@19727"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_99.m4s",BYTERANGE="2761@22763"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_99.m4s",BYTERANGE="2809@25524"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_99.m4s",BYTERANGE="2711@28333"
#EXTINF:2.00500,
segment_track2_99.m4s
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_100.m4s",BYTERANGE="3920@0"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_100.m4s",BYTERANGE="2806@3920"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_100.m4s",BYTERANGE="3099@6726"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_100.m4s",BYTERANGE="2760@9825"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_100.m4s",BYTERANGE="3249@12585"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_100.m4s",BYTERANGE="3344@15834"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_100.m4s",BYTERANGE="2813@19178"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_100.m4s",BYTERANGE="3065@21991"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_100.m4s",BYTERANGE="2826@25056"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_100.m4s",BYTERANGE="2786@27882"
#EXTINF:2.00600,
segment_track2_100.m4s
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_101.m4s",BYTERANGE="3958@0"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_101.m4s",BYTERANGE="2777@3958"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_101.m4s",BYTERANGE="3134@6735"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_101.m4s",BYTERANGE="2785@9869"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_101.m4s",BYTERANGE="2775@12654"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_101.m4s",BYTERANGE="4025@15429"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_101.m4s",BYTERANGE="2841@19454"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_101.m4s",BYTERANGE="2724@22295"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_101.m4s",BYTERANGE="2951@25019"
#EXT-X-PART:DURATION=0.16800,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_101.m4s",BYTERANGE="2438@27970"
#EXTINF:1.98400,
segment_track2_101.m4s
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_102.m4s",BYTERANGE="4093@0"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_102.m4s",BYTERANGE="3111@4093"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_102.m4s",BYTERANGE="2797@7204"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_102.m4s",BYTERANGE="3030@10001"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_102.m4s",BYTERANGE="2774@13031"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_102.m4s",BYTERANGE="3601@15805"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_102.m4s",BYTERANGE="3084@19406"
#EXT-X-PART:DURATION=0.18900,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_102.m4s",BYTERANGE="2704@22490"
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_102.m4s",BYTERANGE="3103@25194"
#EXT-X-PART:DURATION=0.16800,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_102.m4s",BYTERANGE="2412@28297"
#EXTINF:2.00500,
segment_track2_102.m4s
#EXT-X-PART:DURATION=0.21000,INDEPENDENT=YES,URI="lowLatencySeg.m4s?segment=segment_track2_103.m4s",BYTERANGE="3996@0"
#EXT-X-PRELOAD-HINT:TYPE=PART,URI="lowLatencySeg.m4s?segment=segment_track2_103.m4s",BYTERANGE-START=3996
#EXT-X-RENDITION-REPORT:URI="playlist_2.m3u8",LAST-MSN=102,LAST-PART=10
#
```
The segment_track2_103.m4s is supposed to have its Part 0 or first fragment with a defined range and already written
from 0 to 3996 Bytes.
The player requests that fragment by sending in the headers `Range: Bytes=0-3995`

Our server handles the request and validates the current size of the segment vs. the range of bytes being requested. In
the next image we can see that the segment has a size of `196 bytes` and the fragment that was requested has a range from
`0 to 3995 bytes` i.e. **it is not ready yet**, and we will have to wait until Gpac finishes writing it.

We would like to know why this is happening, the fragment is not ready yet, but in the playlist, it says it is ready...
This is our command:
```gpac -i 'rtmp://nginx/playback' -o http://origin:8080/live/public/playlist.mpd:gpac:dual=1:segdur=2:cdur=0.2:asto=1.8:llhls=br:hlsc=1:cmaf=cmf2:profile=dashif.ll:dmode=dynamic:template=segment:hmode=push:rdirs=gmem```
| Gpac ll-hls advertising byte range segments that are not ready yet | https://api.github.com/repos/gpac/gpac/issues/2299/comments | 8 | 2022-11-01T19:31:55Z | 2023-03-30T12:35:55Z | https://github.com/gpac/gpac/issues/2299 | 1,431,974,092 | 2,299 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
I'm trying to encrypt and dash an MP4 file (https://www.mediafire.com/file/z92dwuhpwxsdf9c/bbb_avc_aac.mp4/file) using the command `gpac -i bbb_avc_aac.mp4 cecrypt:cfile=crypt.xml -o bbb.mpd:dual:stl:profile=live:pssh=mv` along with the crypt file:
```
<?xml version="1.0" encoding="UTF-8" ?>
<GPACDRM type="CENC AES-CTR">
<!-- Widevine -->
<DRMInfo type="pssh" version="0">
<BS ID128="EDEF8BA979D64ACEA3C827DCD51D21ED"/>
<BS data64="AAAAP3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAB8SEAjof0FSQkzUsovUwKSE8+EaBWV6ZHJtSOPclZsG"/>
</DRMInfo>
<CrypTrack IsEncrypted="1" IV_size="8" first_IV="0x22ee7d4745d3a26a" saiSavedBox="senc">
<key KID="0x08e87f4152424cd4b28bd4c0a484f3e1" value="0x8704aeedecd6aae0413e3d53d2d1f60e"/>
</CrypTrack>
</GPACDRM>
```
I've got this PSSH from my DRM provider, EZDRM. It has a length of 63 bytes and can be correctly parsed by https://tools.axinom.com/decoders/PsshBox. However, the resulting MPD file has a different value for it:
```
<?xml version="1.0"?>
<!-- MPD file Generated with GPAC version 2.1-DEV-rev429-g6f4ed0c29-master at 2022-10-31T17:46:45.871Z -->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.000S" type="static" mediaPresentationDuration="PT0H1M0.232S" maxSegmentDuration="PT0H0M8.334S" profiles="urn:mpeg:dash:profile:isoff-live:2011" xmlns:cenc="urn:mpeg:cenc:2013">
<ProgramInformation moreInformationURL="http://gpac.io">
<Title>bbb.mpd generated by GPAC</Title>
</ProgramInformation>
<Period duration="PT0H1M0.232S">
<AdaptationSet segmentAlignment="true" maxWidth="1920" maxHeight="1080" maxFrameRate="30" par="16:9" lang="und" startWithSAP="1">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="08e87f41-5242-4cd4-b28b-d4c0a484f3e1"/>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" value="Widevine">
<cenc:pssh>AAAAX3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAD8AAAA/cHNzaAAAAADt74upedZKzqPIJ9zVHSHtAAAAHxIQCOh/QVJCTNSyi9TApITz4RoFZXpkcm1I49yVmwY=</cenc:pssh>
</ContentProtection>
<SegmentTemplate media="bbb_avc_aac_dash_track1_$Time$.m4s" initialization="bbb_avc_aac_dash_track1_init.mp4" timescale="30000" presentationTimeOffset="1980" startNumber="1">
<SegmentTimeline>
<S t="3960" d="250000"/>
<S d="237000"/>
<S d="116000"/>
<S d="219000"/>
<S d="250000"/>
<S d="119000"/>
<S d="250000"/>
<S d="121000"/>
<S d="243000"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="1" mimeType="video/mp4" codecs="avc1.640029" width="1920" height="1080" frameRate="30" sar="1:1" bandwidth="3084144">
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" lang="und" startWithSAP="1">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="08e87f41-5242-4cd4-b28b-d4c0a484f3e1"/>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" value="Widevine">
<cenc:pssh>AAAAX3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAD8AAAA/cHNzaAAAAADt74upedZKzqPIJ9zVHSHtAAAAHxIQCOh/QVJCTNSyi9TApITz4RoFZXpkcm1I49yVmwY=</cenc:pssh>
</ContentProtection>
<SegmentTemplate media="bbb_avc_aac_dash_track2_$Time$.m4s" initialization="bbb_avc_aac_dash_track2_init.mp4" timescale="48000" startNumber="1">
<SegmentTimeline>
<S t="0" d="47104"/>
<S d="48128" r="6"/>
<S d="47104"/>
<S d="48128" r="6"/>
<S d="47104"/>
<S d="48128" r="6"/>
<S d="47104"/>
<S d="48128" r="6"/>
<S d="47104"/>
<S d="48128" r="6"/>
<S d="47104"/>
<S d="48128" r="6"/>
<S d="47104"/>
<S d="48128" r="6"/>
<S d="47104"/>
<S d="48128" r="1"/>
<S d="48640"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation id="2" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="384110">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="6"/>
</Representation>
</AdaptationSet>
</Period>
</MPD>
```
This value, `AAAAX3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAD8AAAA/cHNzaAAAAADt74upedZKzqPIJ9zVHSHtAAAAHxIQCOh/QVJCTNSyi9TApITz4RoFZXpkcm1I49yVmwY=`, is 32 bytes longer. Trying to decode it on https://tools.axinom.com/decoders/PsshBox gives an error. Looking at the hexadecimal version I can clearly tell that the start and end of the values are similar, but something is added in the middle.
My main problem is that the DRM provider's servers respond with an `500 Internal server error` when I try to retrieve the license for playback (using e.g. Google Chrome along with `video.js`). I can fix this error by manually replacing the longer PSSH values in the MPD file with the one from the input crypt file. But I'd rather know if I'm doing something wrong while encrypting and dashing my content. Is there a way that I can tell GPAC to copy the PSSH value exactly, instead of rewriting it?
For completeness: I'm running GPAC on macOS with the latest version `2.1-DEV-rev429-g6f4ed0c29-master` installed using `brew install gpac --HEAD`, but I encountered the same problem when trying the older `1.0.1` release. | Widevine PSSH in MPD is 32 bytes longer than provided in crypt file | https://api.github.com/repos/gpac/gpac/issues/2297/comments | 2 | 2022-10-31T18:01:02Z | 2022-11-04T18:32:57Z | https://github.com/gpac/gpac/issues/2297 | 1,430,257,170 | 2,297 |
[
"gpac",
"gpac"
] | ### Description
Stack buffer overflow in function dimC_box_read at isomedia/box_code_3gpp.c:1070
### System info
ubuntu 20.04 lts
### version info:
···
/MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev428-gcb8ae46c8-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB
···
### compile
./configure --enable-sanitizer
make
###
crash command:
./MP4Box -bt poc2
poc2 :
[poc2.zip](https://github.com/gpac/gpac/files/9897264/poc2.zip)
Here is stack overflow output by ASAN:
```
[AV1] Error parsing tile group, tile 0 start 58 + size 17220 exceeds OBU length 3
[AV1] Frame parsing did not consume the right number of bytes !
[AV1] could not parse AV1 OBU at position 42. Leaving parsing.
[ISOBMFF] AV1ConfigurationBox overflow read 17 bytes, of box size 16.
[iso file] Box "av1C" size 24 (start 20) invalid (read 25)
=================================================================
==22786==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff0c1f8a40 at pc 0x7f7bb77cb3ad bp 0x7fff0c1f85d0 sp 0x7fff0c1f7d78
READ of size 1031 at 0x7fff0c1f8a40 thread T0
#0 0x7f7bb77cb3ac in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cc:443
#1 0x7f7bb43ee2dd in dimC_box_read isomedia/box_code_3gpp.c:1070
#2 0x7f7bb44aca33 in gf_isom_box_read isomedia/box_funcs.c:1866
#3 0x7f7bb44aca33 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#4 0x7f7bb44ade85 in gf_isom_parse_root_box isomedia/box_funcs.c:38
#5 0x7f7bb44d6efc in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:378
#6 0x7f7bb44dd111 in gf_isom_parse_movie_boxes isomedia/isom_intern.c:868
#7 0x7f7bb44dd111 in gf_isom_open_file isomedia/isom_intern.c:988
#8 0x55829fb43139 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6211
#9 0x7f7bb1a59082 in __libc_start_main ../csu/libc-start.c:308
#10 0x55829fb1ecbd in _start (/home/fuzz/gpac/bin/gcc/MP4Box+0xa3cbd)
Address 0x7fff0c1f8a40 is located in stack of thread T0 at offset 1056 in frame
#0 0x7f7bb43edeff in dimC_box_read isomedia/box_code_3gpp.c:1048
This frame has 1 object(s):
[32, 1056) 'str' (line 1049) <== Memory access at offset 1056 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:443 in __interceptor_strdup
Shadow bytes around the buggy address:
0x1000618370f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100061837100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100061837110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100061837120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100061837130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x100061837140: 00 00 00 00 00 00 00 00[f3]f3 f3 f3 f3 f3 f3 f3
0x100061837150: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00
0x100061837160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100061837170: f1 f1 f1 f1 f1 f1 f8 f2 00 f2 f2 f2 00 00 f3 f3
0x100061837180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100061837190: 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
==22786==ABORTING
```
### Impact
This is capable of causing crashes and allowing modification of stack memory which could lead to remote code execution.
### Code location
```
GF_Err dimC_box_read(GF_Box *s, GF_BitStream *bs)
{
char str[1024];
u32 i;
GF_DIMSSceneConfigBox *p = (GF_DIMSSceneConfigBox *)s;
ISOM_DECREASE_SIZE(p, 3);
p->profile = gf_bs_read_u8(bs);
p->level = gf_bs_read_u8(bs);
p->pathComponents = gf_bs_read_int(bs, 4);
p->fullRequestHost = gf_bs_read_int(bs, 1);
p->streamType = gf_bs_read_int(bs, 1);
p->containsRedundant = gf_bs_read_int(bs, 2);
i=0;
str[0]=0;
while (i < GF_ARRAY_LENGTH(str)) {
str[i] = gf_bs_read_u8(bs);
if (!str[i]) break;
i++;
}
ISOM_DECREASE_SIZE(p, i);
**p->textEncoding = gf_strdup(str);** //line:1070 this issue
i=0;
str[0]=0;
while (i < GF_ARRAY_LENGTH(str)) {
str[i] = gf_bs_read_u8(bs);
if (!str[i]) break;
i++;
}
ISOM_DECREASE_SIZE(p, i);
p->contentEncoding = gf_strdup(str); //line:1081 issue 2294 related
return GF_OK;
}
```
| Stack buffer overflow in function dimC_box_read at isomedia/box_code_3gpp.c:1070 | https://api.github.com/repos/gpac/gpac/issues/2296/comments | 1 | 2022-10-31T01:21:46Z | 2022-11-04T08:28:44Z | https://github.com/gpac/gpac/issues/2296 | 1,429,110,423 | 2,296 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [X] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
# Description
A fixed length buffer value_string is allocated in smil_parse_time_list, while in the later memcpy, it doesn't check the length and simply copy content to this buffer, causing overflow.
```c
static void smil_parse_time_list(GF_Node *e, GF_List *values, char *begin_or_end_list)
{
SMIL_Time *value;
char value_string[500];
char *str = begin_or_end_list, *tmp;
u32 len;
/* get rid of leading spaces */
while (*str == ' ') str++;
while (1) {
tmp = strchr(str, ';');
if (tmp) len = (u32) (tmp-str);
else len = (u32) strlen(str);
memcpy(value_string, str, len);
while ((len > 0) && (value_string[len - 1] == ' '))
```
# Impact
Since the content is absolutely controllable by users, an unlimited length will cause stack overflow, corrupting canary, causing DoS or even Remote Code Execution.
# Mitigation
We can just set a length limit to it, making it less than 500 byte.
# Reproduce
On Ubuntu 22.04 lts, make with this.
```
./configure --static-bin
make
```
Run the following command with POC.svg.
```
MP4Box -mp4 -sync 0x1000 ./POC.svg
```
You may get a buffer overflow detected error.
```
[Parser] SVG Scene Parsing: ../encode_2-gpac-2.0.0/out/default/crashes/0.svg
*** buffer overflow detected ***: terminated | (00/100)
Aborted
```
GDB info before crash
```
─────────────────────────────────────────────────────[ REGISTERS / show-flags off / show-compact-regs off ]──────────────────────────────────────────────────────
RAX 0x6804
RBX 0x0
RCX 0x1f4
RDX 0x6804
*RDI 0x7fffffff6640 ◂— 0x0
RSI 0xda20cc ◂— 0xff22802d68353548
R8 0x0
R9 0xda08b0 ◂— 0x0
R10 0xda2050 ◂— 0x1790
R11 0xd80c00 (main_arena+96) —▸ 0xdabcf0 ◂— 0x0
R12 0xda08b0 ◂— 0x0
R13 0x7fffffff6640 ◂— 0x0
R14 0xda20cc ◂— 0xff22802d68353548
R15 0xb650c3 ◂— 'wallclock('
RBP 0x6804
RSP 0x7fffffff6600 ◂— 0x0
*RIP 0x4c756b (smil_parse_time_list+123) ◂— call 0xadfe30
──────────────────────────────────────────────────────────────[ DISASM / x86-64 / set emulate on ]───────────────────────────────────────────────────────────────
0x4c77e2 <smil_parse_time_list+754> jmp smil_parse_time_list+110 <smil_parse_time_list+110>
↓
0x4c755e <smil_parse_time_list+110> mov edx, ebp
0x4c7560 <smil_parse_time_list+112> mov ecx, 0x1f4
0x4c7565 <smil_parse_time_list+117> mov rsi, r14
0x4c7568 <smil_parse_time_list+120> mov rdi, r13
► 0x4c756b <smil_parse_time_list+123> call __memcpy_chk <__memcpy_chk>
dstpp: 0x7fffffff6640 ◂— 0x0
srcpp: 0xda20cc ◂— 0xff22802d68353548
len: 0x6804
dstlen: 0x1f4
```
Backtrace
```
pwndbg> bt
#0 0x0000000000a84c3c in pthread_kill ()
#1 0x0000000000a640d6 in raise ()
#2 0x0000000000402136 in abort ()
#3 0x0000000000a7b476 in __libc_message ()
#4 0x0000000000adfe2a in __fortify_fail ()
#5 0x0000000000adfc46 in __chk_fail ()
#6 0x00000000004c7570 in smil_parse_time_list ()
#7 0x00000000004c965b in gf_svg_parse_attribute ()
#8 0x000000000063d178 in svg_node_start ()
#9 0x0000000000463486 in xml_sax_node_start ()
#10 0x0000000000464629 in xml_sax_parse ()
#11 0x0000000000464e63 in xml_sax_read_file.part ()
#12 0x000000000046515e in gf_xml_sax_parse_file ()
#13 0x000000000063b80a in load_svg_run ()
#14 0x000000000042a5e8 in EncodeFile ()
#15 0x000000000041252c in mp4boxMain ()
#16 0x0000000000a598fa in __libc_start_call_main ()
#17 0x0000000000a5b157 in __libc_start_main_impl ()
#18 0x0000000000402b95 in _start ()
```
# Credit
xdchase
# POC
[POC-bof.zip](https://github.com/gpac/gpac/files/9894378/POC-bof.zip)
| GPAC-2.0.0 MP4Box: stack overflow with unlimited length and controllable content in smil_parse_time_list | https://api.github.com/repos/gpac/gpac/issues/2295/comments | 0 | 2022-10-29T18:52:22Z | 2022-11-04T08:28:14Z | https://github.com/gpac/gpac/issues/2295 | 1,428,405,742 | 2,295 |
[
"gpac",
"gpac"
] | ### Description
Stack buffer overflow in function dimC_box_read at isomedia/box_code_3gpp.c:1081
### System info
ubuntu 20.04 lts
### version info:
```
/MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev428-gcb8ae46c8-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
### compile
./configure --enable-sanitizer
make
### crash command:
./MP4Box -bt poc
### poc :
[poc.zip](https://github.com/gpac/gpac/files/9893514/poc.zip)
Here is stack overflow output by ASAN:
```
[ISOBMFF] AV1ConfigurationBox: read only 4 bytes (expected 16).
[iso file] Box "av1C" (start 20) has 12 extra bytes
=================================================================
==11666==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd002eb3a0 at pc 0x7fb38db0e3ad bp 0x7ffd002eaf30 sp 0x7ffd002ea6d8
READ of size 1028 at 0x7ffd002eb3a0 thread T0
#0 0x7fb38db0e3ac in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cc:443
#1 0x7fb38a731423 in dimC_box_read isomedia/box_code_3gpp.c:1081
#2 0x7fb38a7efa33 in gf_isom_box_read isomedia/box_funcs.c:1866
#3 0x7fb38a7efa33 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#4 0x7fb38a7f0e85 in gf_isom_parse_root_box isomedia/box_funcs.c:38
#5 0x7fb38a819efc in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:378
#6 0x7fb38a820111 in gf_isom_parse_movie_boxes isomedia/isom_intern.c:868
#7 0x7fb38a820111 in gf_isom_open_file isomedia/isom_intern.c:988
#8 0x5652cd468139 in mp4box_main /home/fuzz/gpac/applications/mp4box/mp4box.c:6211
#9 0x7fb387d9c082 in __libc_start_main ../csu/libc-start.c:308
#10 0x5652cd443cbd in _start (/home/fuzz/gpac/bin/gcc/MP4Box+0xa3cbd)
Address 0x7ffd002eb3a0 is located in stack of thread T0 at offset 1056 in frame
#0 0x7fb38a730eff in dimC_box_read isomedia/box_code_3gpp.c:1048
This frame has 1 object(s):
[32, 1056) 'str' (line 1049) <== Memory access at offset 1056 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:443 in __interceptor_strdup
Shadow bytes around the buggy address:
0x100020055620: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100020055630: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100020055640: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100020055650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100020055660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x100020055670: 00 00 00 00[f3]f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3
0x100020055680: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
0x100020055690: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
0x1000200556a0: f1 f1 f8 f2 00 f2 f2 f2 00 00 f3 f3 00 00 00 00
0x1000200556b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1000200556c0: 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
==11666==ABORTING
```
### Impact
This is capable of causing crashes and allowing modification of stack memory which could lead to remote code execution.
| Stack buffer overflow in function dimC_box_read at isomedia/box_code_3gpp.c:1081 | https://api.github.com/repos/gpac/gpac/issues/2294/comments | 0 | 2022-10-29T11:56:42Z | 2022-11-04T08:28:13Z | https://github.com/gpac/gpac/issues/2294 | 1,428,231,070 | 2,294 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [X] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
# Description
An arbitrary free can be triggered in csgp_box_del when doing gf_free
```c
void csgp_box_del(GF_Box *a)
{
GF_CompactSampleGroupBox *p = (GF_CompactSampleGroupBox *)a;
if (p->patterns) {
u32 i;
for (i=0; i<p->pattern_count; i++) {
if (p->patterns[i].sample_group_description_indices)
gf_free(p->patterns[i].sample_group_description_indices);
}
gf_free(p->patterns);
}
gf_free(p);
}
```
# Analyse
After encountering a POC (see attachment) can trigger segmentation fault and analysing it thoroughly, I found that this is actully the same bug mentioned in this [issue](https://github.com/gpac/gpac/issues/2214), ASAN detects a huge chunk malloc failed. More precisely, csgp_box_read will return OOM error to gf_isom_box_parse_ex if users try to malloc large chunks. After this, newBox structure is corrupted but the program doesn't fall fast, and later calls gf_isom_box_del(newBox) to free all the elements of it, which causing free to uninitialized memory (ps. no-check flag is not set, if it's set, more unexpected things would happen). By constructing heap fengshui to leave malicious data on heap, this bug can be leveraged to arbitrary free or double free.
# Impact
Since video content is controllable by users, this will crash the service, causing Denial of Service and Remote Code Execution potentially.
# Mitigation
After OOM error, the program should fall as fast as possible. Since the issue mentioned above is closed but unfixed, the best way here is to reset ptr->pattern_count when malloc fails in csgp_box_read. See [pull request](https://github.com/gpac/gpac/pull/2292).
# Reproducer
On Ubuntu 22.04 lts, Make with this.
```
$ ./configure --static-bin && make
```
Run the following command with POC.mp4.
```
$ MP4Box -split 1:2 ./POC.mp4
```
You will get a Segmentation fault. GDB info as below
```
Program received signal SIGSEGV, Segmentation fault.
0x0000000000a8cfce in free ()
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
─────────────[ REGISTERS / show-flags off / show-compact-regs off ]─────────────
*RAX 0x20
*RBX 0xffffffffffffff98
RCX 0x0
*RDX 0x1
*RDI 0x203a5845202e6563 ('ce. EX: ')
*RSI 0x203a5845202e6553 ('Se. EX: ')
*R8 0xd95620 ◂— 0xd95
R9 0x0
*R10 0x22
*R11 0xdb4000
R12 0x0
*R13 0x63736770
*R14 0xd94350 ◂— 0x63736770 /* 'pgsc' */
*R15 0xfffffffe
*RBP 0xd94350 ◂— 0x63736770 /* 'pgsc' */
*RSP 0x7fffffff7e20 ◂— 0x1000b5c08d
*RIP 0xa8cfce (free+30) ◂— mov rax, qword ptr [rdi - 8]
──────────────────────[ DISASM / x86-64 / set emulate on ]──────────────────────
► 0xa8cfce <free+30> mov rax, qword ptr [rdi - 8]
```
Backtrace
```
pwndbg> bt
#0 0x0000000000a8cfce in free ()
#1 0x0000000000947b83 in csgp_box_del ()
#2 0x0000000000532bcc in gf_isom_box_del ()
#3 0x00000000005333c0 in gf_isom_box_parse_ex ()
#4 0x0000000000533890 in gf_isom_parse_root_box ()
#5 0x000000000053b406 in gf_isom_parse_movie_boxes_internal ()
#6 0x000000000053cb67 in gf_isom_open_file ()
#7 0x0000000000413cbc in mp4boxMain ()
#8 0x0000000000a598fa in __libc_start_call_main ()
#9 0x0000000000a5b157 in __libc_start_main_impl ()
#10 0x0000000000402b95 in _start ()
```
# Credit
xdchase
Janette88
# POC
[POC.zip](https://github.com/gpac/gpac/files/9891946/POC.zip)
| GPAC-2.0.0 MP4Box: invalid free in csgp_box_del | https://api.github.com/repos/gpac/gpac/issues/2293/comments | 1 | 2022-10-28T21:21:59Z | 2022-11-04T08:12:23Z | https://github.com/gpac/gpac/issues/2293 | 1,427,850,588 | 2,293 |
[
"gpac",
"gpac"
] | Hi,
I tried to extract the box info of a segment using MP4Box with `-diso` option. I got `[iso file] Unknown top-level box type imda
` and `Error opening file <file_name>.mp4: IsoMedia File is truncated`.
Windows 64 bits
```
> MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev426-g3b6f2436-master
```
the sample video: https://www.mediafire.com/file/ungdop0ywxrenvk/omafv2.0.base.1.mp4/file
| Unknown top-level box type imda | https://api.github.com/repos/gpac/gpac/issues/2291/comments | 4 | 2022-10-20T18:51:37Z | 2022-10-27T13:36:26Z | https://github.com/gpac/gpac/issues/2291 | 1,417,100,376 | 2,291 |
[
"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
Hello, I tried to change the value of `speed` [parameter](https://github.com/gpac/gpac/wiki/inspect), but the play back speed does not change. Can you please let me know how to change playback speed when `inspect` filter is used as a sink?
Here is the code I tested, I used the newest code in master.
```
import libgpac as gpac
import time
fs = gpac.FilterSession(0)
f1 = fs.load_src(f"http://localhost/dash/coaster2/coaster2_10x5.mpd")
f2 = fs.load("dashin")
f3 = fs.load("tileagg")
f4 = fs.load("inspect:interleave=true:deep=true:dur=15:buffer=3000:speed=0.02")
f2.set_source(f1)
f3.set_source(f2)
f4.set_source(f3)
btime = time.time()
fs.run()
print(f'\n\nDone, executing time: {time.time() - btime}')
fs.print_graph()
fs.delete()
gpac.close()
```
I changed `speed` to different values, from 0.02 to 100, but the reported executing time is always about 2.4 seconds. If I set `dur` to 15 and `speed` to 1.0, should the total time report be around 15 seconds too?
| inspect filter, 'speed' parameter does not work | https://api.github.com/repos/gpac/gpac/issues/2290/comments | 1 | 2022-10-20T18:09:33Z | 2022-11-03T21:31:49Z | https://github.com/gpac/gpac/issues/2290 | 1,417,050,123 | 2,290 |
[
"gpac",
"gpac"
] | The Audio requires raw streaming instead of mp4 or m4a,and the Dolby Vision MP4 file generated by the above process is tested to be perfectly compatible with Apple devices.
###
**For Mac or Linux:**
```
> ffmpeg -i $1 -c copy -vbsf hevc_mp4toannexb -f hevc -y -an video.tmp.hevc;
> ffmpeg -i $1 -c copy -y -vn audio.tmp.aac; #Can not be omitted
> mp4muxer -i video.tmp.hevc -o $2.tmp.mp4 --dvh1flag 0 --dv-profile 5 --mpeg4-comp-brand mp42,iso6,isom,msdh,dby1 --overwrite;
> mp4box -add "$2.tmp.mp4#video" -add "audio.tmp.aac" -new $2.mp4;
```
**For Windows:**
```
@echo off
for %%i in (%*) do (
ffmpeg -y -i %%i.ts -map 0:a -c copy %%i.aac && ffmpeg -y -i %%i.ts -c copy -vbsf hevc_mp4toannexb -f hevc %%i.hevc && mp4muxer -i %%i.hevc -o %%i.hevc.mp4 --dvh1flag 0 --dv-profile 5 --mpeg4-comp-brand mp42,iso6,isom,msdh,dby1 --overwrite && mp4box -inter 500 -noprog -add %%i.hevc.mp4#1:name= -add %%i.aac#1:name=:lang=chi -brand mp42isom -ab iso6 -ab msdh -ab dby1 -new MUX_%%i.mp4
)
pause.
```
**Requirements**
- [ffmpeg](https://ffmpeg.org/download.html) (>=5.0)
Read track info, extract stream
- [mp4box](https://gpac.wp.imt.fr/downloads/gpac-nightly-builds/) (>=2.1)
Mux video, audio, subtitle together
- [mp4muxer](https://github.com/DolbyLaboratories/dlb_mp4base/tree/master/bin)
Mux ES to DoVi mp4
Please ensure the version of these software, or the output may not be correct! | Apple Device Dolby Vision Perfect Mixed Stream Sharing Posts | https://api.github.com/repos/gpac/gpac/issues/2289/comments | 5 | 2022-10-20T17:39:53Z | 2022-10-29T04:50:31Z | https://github.com/gpac/gpac/issues/2289 | 1,417,015,590 | 2,289 |
[
"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.
- [ N/A ] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ X ] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
The [Wiki page for import opts](https://github.com/gpac/gpac/wiki/mp4box-import-opts/) recommends "(see ISO/IEC 23001-8)" under the **colr** option. [That standard has been revised and replaced by three, new, separate standards,](https://www.iso.org/standard/69661.html) because _of course_ ISO would like you to pay for three, separate standards...
Tools like mkvtoolnix, x264, etc. include the codepoints in their documentation.
If directing end-users to the appropriate external document or standard is the desired look in the gpac/mp4box documentation, then perhaps point them to something easily and freely available, preferably directly, like a link to [ITU H.273](https://www.itu.int/rec/T-REC-H.273/en) which I believe the ISO standards are just referencing anyways. | Wiki suggestion | https://api.github.com/repos/gpac/gpac/issues/2288/comments | 1 | 2022-10-17T02:21:42Z | 2022-10-18T14:34:58Z | https://github.com/gpac/gpac/issues/2288 | 1,410,775,812 | 2,288 |
[
"gpac",
"gpac"
] | 

| Why is video playing green? | https://api.github.com/repos/gpac/gpac/issues/2287/comments | 28 | 2022-10-13T11:38:48Z | 2022-11-03T20:14:00Z | https://github.com/gpac/gpac/issues/2287 | 1,407,648,157 | 2,287 |
[
"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/2013/07/16/how-to-file-a-bug-properly/
HI, I want to do tile streaming and follow the instruction in https://github.com/gpac/gpac/wiki/HEVC-Tile-based-adaptation-guide
However, after I package the video and ran the following code:
MP4Box -add video_tiled.hvc:split_tiles -new video_tiled.mp4
MP4Box -rem 3 video_tiled.mp4 -out test_tile_lost.mp4
I had some problems opening the output video (video_tiled.mp4 test_tile_lost.mp4). I tried several ways to open but all failed:
1) gpac -i video_tiled.mp4
No filter chain found for PID video_tiled.mp4 in filter fin to any loaded filters - NOT CONNECTED
2)ffplay video_tiled.mp4
No decoder could be found for codec none
Failed to open file 'video_tiled.mp4' or configure filtergraph
3) I open the mp4 file with the some players and it turns out that hvt1 and hvc2 decoder are required.
Besides, I also found some problems with the gpac, like when I ran:
gpac -gui
[Compositor] Failed to load a video output module.
Failed to load filter "compositor:player=gui": I/O Error
I am new to this and I have looked the issues and cannot find the solutions. I think I have the same issue with https://github.com/gpac/gpac/issues/1550#issue-665001400 , but it is closed.
Thanks a lot if you could give some suggestions !
| Some problems with opening the encoded videos | https://api.github.com/repos/gpac/gpac/issues/2286/comments | 1 | 2022-10-11T21:21:00Z | 2022-10-13T15:54:15Z | https://github.com/gpac/gpac/issues/2286 | 1,405,242,213 | 2,286 |
[
"gpac",
"gpac"
] | ### Description
Memory Leak in gf_odf_new_iod odf/odf_code.c:415
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -xmt poc1.xmt
```
### POC
https://github.com/FDU-Sec/poc/blob/main/gpac/poc1.xmt
### ASAN
```
XMT: MPEG-4 (XMT) Scene Parsing
[XMT Parsing] Invalid XML document: Invalid character '<' - Line 13: </decSpeci (line 13)
Error loading scene: Corrupted Data in file/stream
Error: Corrupted Data in file/stream
=================================================================
==40452==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 80 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab51a63192 in gf_odf_new_iod odf/odf_code.c:415
#2 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#3 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#4 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#5 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#6 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#7 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#8 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#9 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#10 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#11 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#12 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#13 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#14 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#15 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 112 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab51a614d2 in gf_odf_new_esd odf/odf_code.c:126
#2 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#3 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#4 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#5 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#6 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#7 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#8 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#9 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#10 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#11 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#12 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#13 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#14 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#15 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 80 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407af30 in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdef30)
#1 0x7fab513fa07e in realloc_chain utils/list.c:621
#2 0x7fab513fa07e in gf_list_add utils/list.c:630
#3 0x7fab51d028ce in xmt_parse_descriptor scene_manager/loader_xmt.c:1987
#4 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#5 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#6 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#7 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#8 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#9 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#10 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#11 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#12 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#13 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#14 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#15 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab51a68722 in gf_odf_new_dcd odf/odf_code.c:1107
#2 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#3 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#4 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#5 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#6 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#7 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#8 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#9 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#10 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#11 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#12 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#13 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#14 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#15 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab513f9e5d in gf_list_new utils/list.c:601
#2 0x7fab51a6151c in gf_odf_new_esd odf/odf_code.c:130
#3 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#4 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#5 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#6 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#7 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#8 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#9 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#10 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#11 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#12 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#13 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#14 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#15 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#16 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab513f9e5d in gf_list_new utils/list.c:601
#2 0x7fab51a6153b in gf_odf_new_esd odf/odf_code.c:131
#3 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#4 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#5 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#6 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#7 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#8 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#9 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#10 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#11 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#12 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#13 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#14 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#15 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#16 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab513f9e5d in gf_list_new utils/list.c:601
#2 0x7fab51a631ff in gf_odf_new_iod odf/odf_code.c:421
#3 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#4 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#5 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#6 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#7 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#8 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#9 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#10 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#11 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#12 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#13 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#14 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#15 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#16 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab513f9e5d in gf_list_new utils/list.c:601
#2 0x7fab51a614f4 in gf_odf_new_esd odf/odf_code.c:129
#3 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#4 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#5 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#6 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#7 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#8 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#9 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#10 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#11 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#12 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#13 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#14 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#15 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#16 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab513f9e5d in gf_list_new utils/list.c:601
#2 0x7fab51a68740 in gf_odf_new_dcd odf/odf_code.c:1110
#3 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#4 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#5 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#6 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#7 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#8 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#9 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#10 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#11 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#12 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#13 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#14 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#15 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#16 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab513f9e5d in gf_list_new utils/list.c:601
#2 0x7fab51a6321e in gf_odf_new_iod odf/odf_code.c:423
#3 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#4 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#5 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#6 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#7 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#8 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#9 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#10 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#11 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#12 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#13 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#14 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#15 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#16 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab513f9e5d in gf_list_new utils/list.c:601
#2 0x7fab51a631e0 in gf_odf_new_iod odf/odf_code.c:420
#3 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#4 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#5 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#6 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#7 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#8 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#9 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#10 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#11 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#12 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#13 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#14 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#15 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#16 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7fab5407ab40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fab513f9e5d in gf_list_new utils/list.c:601
#2 0x7fab51a631b4 in gf_odf_new_iod odf/odf_code.c:419
#3 0x7fab51a6c843 in gf_odf_desc_new odf/odf_codec.c:244
#4 0x7fab51d0244f in xmt_parse_descriptor scene_manager/loader_xmt.c:1942
#5 0x7fab51d0553d in xmt_node_start scene_manager/loader_xmt.c:2571
#6 0x7fab51436f35 in xml_sax_node_start utils/xml_parser.c:304
#7 0x7fab5143a20f in xml_sax_parse_attribute utils/xml_parser.c:393
#8 0x7fab5143a20f in xml_sax_parse utils/xml_parser.c:911
#9 0x7fab5143bdfd in gf_xml_sax_parse_intern utils/xml_parser.c:1072
#10 0x7fab5143c6b7 in gf_xml_sax_parse utils/xml_parser.c:1100
#11 0x7fab5143c9c8 in xml_sax_read_file utils/xml_parser.c:1187
#12 0x7fab5143d5c4 in gf_xml_sax_parse_file utils/xml_parser.c:1299
#13 0x7fab51cf010a in load_xmt_run scene_manager/loader_xmt.c:3134
#14 0x564329084177 in dump_isom_scene /gpac/applications/mp4box/filedump.c:207
#15 0x56432906e4b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#16 0x7fab4f439c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
SUMMARY: AddressSanitizer: 464 byte(s) leaked in 12 allocation(s).
```
### Environment
Ubuntu 18.04.5 LTS
Clang 10.0.1
gcc 7.5.0
### Credit
Peng Deng ([Fudan University](https://secsys.fudan.edu.cn/))
| Memory Leak in gf_odf_new_iod odf/odf_code.c:415 | https://api.github.com/repos/gpac/gpac/issues/2285/comments | 0 | 2022-10-11T07:56:13Z | 2022-10-11T11:02:17Z | https://github.com/gpac/gpac/issues/2285 | 1,404,173,443 | 2,285 |
[
"gpac",
"gpac"
] | ### Description
Memory Leak in gf_list_new utils/list.c:601
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -bt poc
```
### POC
https://github.com/FDU-Sec/poc/blob/main/gpac/poc
### ASAN
```
[iso file] Box "emsg" (start 0) has 20 extra bytes
[iso file] Read Box type 0000bl (0x0000626C) at position 709 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "minf" (start 645) has 3344 extra bytes
[iso file] Track with no sample table !
[iso file] Track with no sample description box !
[iso file] Incomplete box mdat - start 4159 size 68
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] Box "emsg" (start 0) has 20 extra bytes
[iso file] Read Box type 0000bl (0x0000626C) at position 709 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "minf" (start 645) has 3344 extra bytes
[iso file] Track with no sample table !
[iso file] Track with no sample description box !
[iso file] Incomplete box mdat - start 4159 size 68
[iso file] Incomplete file while reading for dump - aborting parsing
Scene loaded - dumping root scene
=================================================================
==62092==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7f4e18113b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7f4e15492e5d in gf_list_new utils/list.c:601
#2 0x7f4e159acd1c in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:775
#3 0x7f4e159af13b in gf_isom_parse_movie_boxes isomedia/isom_intern.c:868
#4 0x7f4e159af13b in gf_isom_open_file isomedia/isom_intern.c:988
#5 0x558bdd469254 in mp4box_main /gpac/applications/mp4box/mp4box.c:6175
#6 0x7f4e134d2c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7f4e18113b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7f4e15492e5d in gf_list_new utils/list.c:601
#2 0x7f4e159acd1c in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:775
#3 0x7f4e159af13b in gf_isom_parse_movie_boxes isomedia/isom_intern.c:868
#4 0x7f4e159af13b in gf_isom_open_file isomedia/isom_intern.c:988
#5 0x558bdd47b106 in dump_isom_scene /gpac/applications/mp4box/filedump.c:166
#6 0x558bdd4654b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#7 0x7f4e134d2c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 96 byte(s) in 1 object(s) allocated from:
#0 0x7f4e18113b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7f4e1593720d in emsg_box_new isomedia/box_code_base.c:12515
#2 0x7f4e15982447 in gf_isom_box_new_ex isomedia/box_funcs.c:1718
#3 0x7f4e15982447 in gf_isom_box_parse_ex isomedia/box_funcs.c:247
#4 0x7f4e15983a7c in gf_isom_parse_root_box isomedia/box_funcs.c:38
#5 0x7f4e159a927c in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:378
#6 0x7f4e159af13b in gf_isom_parse_movie_boxes isomedia/isom_intern.c:868
#7 0x7f4e159af13b in gf_isom_open_file isomedia/isom_intern.c:988
#8 0x558bdd47b106 in dump_isom_scene /gpac/applications/mp4box/filedump.c:166
#9 0x558bdd4654b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#10 0x7f4e134d2c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 96 byte(s) in 1 object(s) allocated from:
#0 0x7f4e18113b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7f4e1593720d in emsg_box_new isomedia/box_code_base.c:12515
#2 0x7f4e15982447 in gf_isom_box_new_ex isomedia/box_funcs.c:1718
#3 0x7f4e15982447 in gf_isom_box_parse_ex isomedia/box_funcs.c:247
#4 0x7f4e15983a7c in gf_isom_parse_root_box isomedia/box_funcs.c:38
#5 0x7f4e159a927c in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:378
#6 0x7f4e159af13b in gf_isom_parse_movie_boxes isomedia/isom_intern.c:868
#7 0x7f4e159af13b in gf_isom_open_file isomedia/isom_intern.c:988
#8 0x558bdd469254 in mp4box_main /gpac/applications/mp4box/mp4box.c:6175
#9 0x7f4e134d2c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 80 byte(s) in 1 object(s) allocated from:
#0 0x7f4e18113f30 in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdef30)
#1 0x7f4e1549307e in realloc_chain utils/list.c:621
#2 0x7f4e1549307e in gf_list_add utils/list.c:630
#3 0x7f4e159aa6d0 in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:776
#4 0x7f4e159af13b in gf_isom_parse_movie_boxes isomedia/isom_intern.c:868
#5 0x7f4e159af13b in gf_isom_open_file isomedia/isom_intern.c:988
#6 0x558bdd47b106 in dump_isom_scene /gpac/applications/mp4box/filedump.c:166
#7 0x558bdd4654b4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6336
#8 0x7f4e134d2c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
Indirect leak of 80 byte(s) in 1 object(s) allocated from:
#0 0x7f4e18113f30 in realloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdef30)
#1 0x7f4e1549307e in realloc_chain utils/list.c:621
#2 0x7f4e1549307e in gf_list_add utils/list.c:630
#3 0x7f4e159aa6d0 in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:776
#4 0x7f4e159af13b in gf_isom_parse_movie_boxes isomedia/isom_intern.c:868
#5 0x7f4e159af13b in gf_isom_open_file isomedia/isom_intern.c:988
#6 0x558bdd469254 in mp4box_main /gpac/applications/mp4box/mp4box.c:6175
#7 0x7f4e134d2c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
SUMMARY: AddressSanitizer: 384 byte(s) leaked in 6 allocation(s).
```
### Environment
```
Ubuntu 18.04.5 LTS
Clang 10.0.1
gcc 7.5.0
```
### Credit
Peng Deng ([Fudan University](https://secsys.fudan.edu.cn/))
| Memory Leak in gf_list_new utils/list.c:601 | https://api.github.com/repos/gpac/gpac/issues/2284/comments | 0 | 2022-10-11T07:44:42Z | 2022-10-11T11:02:16Z | https://github.com/gpac/gpac/issues/2284 | 1,404,158,827 | 2,284 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [X] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [X] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
Generated dash files are not synced when the audio track have a `start_time` greater than 0, in this case 975ms.
This is the step that i follow to crypt and dash the file where audio is not synced
Source file
```
"streams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "High",
"codec_type": "video",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"width": 1280,
"height": 720,
"coded_width": 1280,
"coded_height": 720,
"closed_captions": 0,
"has_b_frames": 2,
"sample_aspect_ratio": "27:20",
"display_aspect_ratio": "12:5",
"pix_fmt": "yuv420p",
"level": 31,
"color_range": "tv",
"color_space": "bt709",
"color_transfer": "bt709",
"color_primaries": "bt709",
"chroma_location": "left",
"field_order": "progressive",
"refs": 1,
"is_avc": "true",
"nal_length_size": "4",
"r_frame_rate": "24000/1001",
"avg_frame_rate": "24000/1001",
"time_base": "1/1000",
"start_pts": 0,
"start_time": "0.000000",
"bits_per_raw_sample": "8",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "eng",
"title": "Default",
"BPS": "3221287",
"NUMBER_OF_FRAMES": "195745",
"NUMBER_OF_BYTES": "3287404087",
"_STATISTICS_WRITING_APP": "mkvmerge v70.0.0 ('Caught A Lite Sneeze') 64-bit",
"_STATISTICS_WRITING_DATE_UTC": "2022-10-08 15:58:19",
"_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES",
"DURATION": "02:16:04.197000000"
}
},
{
"index": 1,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/1000",
"start_pts": 975,
"start_time": "0.975000",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "fre",
"title": "Français",
"BPS": "160690",
"NUMBER_OF_FRAMES": "382651",
"NUMBER_OF_BYTES": "163969132",
"_STATISTICS_WRITING_APP": "mkvmerge v70.0.0 ('Caught A Lite Sneeze') 64-bit",
"_STATISTICS_WRITING_DATE_UTC": "2022-10-08 15:58:19",
"_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES",
"DURATION": "02:16:04.194000000"
}
},
```
--------------------------------
ffmpeg extract audio stream `ffmpeg -i 1635.mkv -map 0:1 -c:a copy -map_metadata -1 -metadata:s:0 language=fre 1_1635.mp4`
```
ffprobe -v quiet -print_format json -show_streams 1_1635.mp4
{
"streams": [
{
"index": 0,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_tag_string": "mp4a",
"codec_tag": "0x6134706d",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/48000",
"start_pts": 46800,
"start_time": "0.975000",
"duration_ts": 391834536,
"duration": "8163.219500",
"bit_rate": "160690",
"nb_frames": "382651",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "fre",
"handler_name": "SoundHandler",
"vendor_id": "[0][0][0][0]"
}
}
]
}
```
--------------------------------
MP4Box crypt file `/usr/bin/MP4Box -crypt clearkey.xml dash/1_1635.mp4 -out dash/crypt/1_1635.mp4`
```
ffprobe -v quiet -print_format json -show_streams dash/crypt/1_1635.mp4
{
"streams": [
{
"index": 0,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_tag_string": "mp4a",
"codec_tag": "0x6134706d",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/48000",
"start_pts": 46848,
"start_time": "0.976000",
"duration_ts": 391834536,
"duration": "8163.219500",
"bit_rate": "160690",
"nb_frames": "382651",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "fre",
"handler_name": "SoundHandler",
"vendor_id": "[0][0][0][0]"
},
"side_data_list": [
{
"side_data_type": "Encryption initialization data"
}
]
}
]
}
```
--------------------------------
MP4Box dash file
```
/usr/bin/MP4Box -dash 4000 -frag 4000 -rap -fps 24 /home/tmp_encode/1600/dash/crypt/0_1635.mp4:id=0:asID=0:role=main:desc_as="<Label>Default</Label>" \
/home/tmp_encode/1600/dash/crypt/1_1635.mp4:id=1:asID=1:role=alternate:desc_as="<Label>Français</Label>" \
-profile onDemand -out /home/tmp_encode/1600/dash/1635/manifest.mpd
```
```
ffprobe -v quiet -print_format json -show_streams 1_1635_dashinit.mp4
{
"streams": [
{
"index": 0,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_tag_string": "mp4a",
"codec_tag": "0x6134706d",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/48000",
"start_pts": 93744,
"start_time": "1.953000",
"duration_ts": 391881384,
"duration": "8164.195500",
"bit_rate": "54",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "fre",
"handler_name": "SoundHandler",
"vendor_id": "[0][0][0][0]"
},
"side_data_list": [
{
"side_data_type": "Encryption initialization data"
}
]
}
]
}
```
--------------------------------
I found a workaround by creating a silence and append it at the beginning of the audio that solve this, but is there another way to solve this with MP4Box ?
Create silence of 975ms
`ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -t 0.975 975ms.mp4`
Concat the files
`ffmpeg -i 975ms.mp4 -i 1_1635.mp4 -filter_complex "[0:a][1:a]concat=n=2:v=0:a=1" -metadata:s:0 language=fre tmp_1_1635.mp4 -y`
```
ffprobe -v quiet -print_format json -show_streams tmp_1_1635.mp4
{
"streams": [
{
"index": 0,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_tag_string": "mp4a",
"codec_tag": "0x6134706d",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/48000",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 391881648,
"duration": "8164.201000",
"bit_rate": "128629",
"nb_frames": "382698",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "fre",
"handler_name": "SoundHandler",
"vendor_id": "[0][0][0][0]"
}
}
]
}
```
--------------------------------
After crypt and dash audio is in sync.
```
ffprobe -v quiet -print_format json -show_streams 1635/1_1635_dashinit.mp4
{
"streams": [
{
"index": 0,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_tag_string": "mp4a",
"codec_tag": "0x6134706d",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/48000",
"start_pts": -1024,
"start_time": "-0.021333",
"duration_ts": 391881656,
"duration": "8164.201167",
"bit_rate": "31",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "fre",
"handler_name": "SoundHandler",
"vendor_id": "[0][0][0][0]"
},
"side_data_list": [
{
"side_data_type": "Encryption initialization data"
}
]
}
]
}
```
Also MP4Box seems to always add `"start_time": "-0.021333"` why is that ?
| Dashing video with audio that have a start_time > 0 are not synced | https://api.github.com/repos/gpac/gpac/issues/2283/comments | 20 | 2022-10-09T12:42:19Z | 2022-11-08T21:57:13Z | https://github.com/gpac/gpac/issues/2283 | 1,402,263,092 | 2,283 |
[
"gpac",
"gpac"
] | ### Description
SEGV in isomedia/meta.c:177 in gf_isom_get_meta_item_info
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -info mp4box-info-segv-1
```
### POC
https://github.com/17ssDP/fuzzer_crashes/blob/main/gpac/mp4box-info-segv-1
### ASAN
```
[iso file] Unknown box type i000000 in parent iinf
[iso file] Unknown top-level box type v000000
[iso file] Incomplete box v000000 - start 308 size 191662031
[iso file] Incomplete file while reading for dump - aborting parsing
# File Meta type: "Meta" - 3 resource item(s)
ASAN:DEADLYSIGNAL
=================================================================
==52314==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000028 (pc 0x7f4d67b428f9 bp 0x000000000000 sp 0x7ffcd749c3c0 T0)
==52314==The signal is caused by a READ memory access.
==52314==Hint: address points to the zero page.
#0 0x7f4d67b428f8 in gf_isom_get_meta_item_info isomedia/meta.c:177
#1 0x55fa2660a89e in DumpMetaItem /gpac/applications/mp4box/filedump.c:2467
#2 0x55fa26642cc8 in DumpMovieInfo /gpac/applications/mp4box/filedump.c:3820
#3 0x55fa265efee4 in mp4box_main /gpac/applications/mp4box/mp4box.c:6359
#4 0x7f4d669cfc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
#5 0x55fa265c00a9 in _start (/gpac/bin/gcc/MP4Box+0x4e0a9)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV isomedia/meta.c:177 in gf_isom_get_meta_item_info
==52314==ABORTING
```
### Environment
```
Ubuntu 16.04
Clang 10.0.1
gcc 5.5
```
| SEGV isomedia/meta.c:177 in gf_isom_get_meta_item_info | https://api.github.com/repos/gpac/gpac/issues/2282/comments | 0 | 2022-10-09T08:38:17Z | 2022-10-10T15:44:29Z | https://github.com/gpac/gpac/issues/2282 | 1,402,200,347 | 2,282 |
[
"gpac",
"gpac"
] | ### Description
SEGV in isomedia/meta.c:1929 in gf_isom_meta_restore_items_ref
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -info mp4box-info-segv-0
```
### POC
https://github.com/17ssDP/fuzzer_crashes/blob/main/gpac/mp4box-info-segv-0
### ASAN
```
[iso file] Read Box type 0003E8d (0x0003E864) at position 653 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Missing DataInformationBox
[iso file] Box "minf" (start 645) has 3400 extra bytes
[iso file] Track with no sample table !
[iso file] Track with no sample description box !
[isom] not enough bytes in box A9too: 29 left, reading 41 (file isomedia/box_code_apple.c, line 117)
[iso file] Read Box "A9too" (start 4122) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box "ilst" (start 4114) failed (Invalid IsoMedia File) - skipping
[iso file] Read Box type 000000! (0x00000021) at position 4077 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "meta" (start 4069) has 74 extra bytes
ASAN:DEADLYSIGNAL
=================================================================
==57686==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000002c (pc 0x7fb4c621a438 bp 0x000000000000 sp 0x7fff370fe330 T0)
==57686==The signal is caused by a READ memory access.
==57686==Hint: address points to the zero page.
#0 0x7fb4c621a437 in gf_isom_meta_restore_items_ref isomedia/meta.c:1929
#1 0x7fb4c60c4127 in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:429
#2 0x7fb4c60d00e5 in gf_isom_parse_movie_boxes isomedia/isom_intern.c:866
#3 0x7fb4c60d00e5 in gf_isom_open_file isomedia/isom_intern.c:986
#4 0x5627a34e0048 in mp4box_main /gpac/applications/mp4box/mp4box.c:6175
#5 0x7fb4c5089c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
#6 0x5627a34b30a9 in _start (/gpac/bin/gcc/MP4Box+0x4e0a9)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV isomedia/meta.c:1929 in gf_isom_meta_restore_items_ref
==57686==ABORTING
```
### Environment
```
Ubuntu 16.04
Clang 10.0.1
gcc 5.5
``` | SEGV isomedia/meta.c:1929 in gf_isom_meta_restore_items_ref | https://api.github.com/repos/gpac/gpac/issues/2281/comments | 0 | 2022-10-09T08:34:59Z | 2022-10-10T15:44:28Z | https://github.com/gpac/gpac/issues/2281 | 1,402,199,623 | 2,281 |
[
"gpac",
"gpac"
] | ### Description
Heap-buffer-overflow in isomedia/box_funcs.c:2074 in gf_isom_box_dump_start_ex
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -diso mp4box-diso-heap-buffer-over-flow-1
```
### POC
https://github.com/17ssDP/fuzzer_crashes/blob/main/gpac/mp4box-diso-heap-buffer-over-flow-1
### ASAN
```
[iso file] Read Box type 04@0004 (0x04400004) at position 94 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "meta" (start 32) has 206 extra bytes
[iso file] Box "uuid" (start 4061) has 58 extra bytes
[iso file] Incomplete box mdat - start 4151 size 54847
[iso file] Incomplete file while reading for dump - aborting parsing
=================================================================
==18099==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x604000000540 at pc 0x7f54a04dd880 bp 0x7ffcec3ea7e0 sp 0x7ffcec3ea7d0
READ of size 1 at 0x604000000540 thread T0
#0 0x7f54a04dd87f in gf_isom_box_dump_start_ex isomedia/box_funcs.c:2074
#1 0x7f54a04dd87f in gf_isom_box_dump_start isomedia/box_funcs.c:2093
#2 0x7f54a04c0ae7 in trgt_box_dump isomedia/box_dump.c:5807
#3 0x7f54a04ddbb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
#4 0x7f54a0470ffa in gf_isom_box_array_dump isomedia/box_dump.c:104
#5 0x7f54a04ddda8 in gf_isom_box_dump_done isomedia/box_funcs.c:2115
#6 0x7f54a04c09d5 in trgr_box_dump isomedia/box_dump.c:5799
#7 0x7f54a04ddbb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
#8 0x7f54a04714d6 in gf_isom_dump isomedia/box_dump.c:138
#9 0x55e8639f1804 in dump_isom_xml /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/filedump.c:2067
#10 0x55e8639c1d79 in mp4box_main /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/mp4box.c:6364
#11 0x7f549f4e0c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
#12 0x55e8639920a9 in _start (/home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/bin/gcc/MP4Box+0x4e0a9)
0x604000000540 is located 0 bytes to the right of 48-byte region [0x604000000510,0x604000000540)
allocated by thread T0 here:
#0 0x7f54a2a4cb40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7f54a041bd12 in trgt_box_new isomedia/box_code_base.c:10623
SUMMARY: AddressSanitizer: heap-buffer-overflow isomedia/box_funcs.c:2074 in gf_isom_box_dump_start_ex
Shadow bytes around the buggy address:
0x0c087fff8050: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00
0x0c087fff8060: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
0x0c087fff8070: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
0x0c087fff8080: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00
0x0c087fff8090: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00
=>0x0c087fff80a0: fa fa 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa
0x0c087fff80b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c087fff80c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c087fff80d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c087fff80e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c087fff80f0: 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
==18099==ABORTING
```
### Environment
```
Ubuntu 16.04
Clang 10.0.1
gcc 5.5
```
| heap-buffer-overflow isomedia/box_funcs.c:2074 in gf_isom_box_dump_start_ex | https://api.github.com/repos/gpac/gpac/issues/2280/comments | 0 | 2022-10-09T08:31:37Z | 2022-10-10T15:44:28Z | https://github.com/gpac/gpac/issues/2280 | 1,402,198,804 | 2,280 |
[
"gpac",
"gpac"
] | ### Description
Heap-buffer-overflow in isomedia/box_funcs.c:2065 in gf_isom_box_dump_start_ex
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -diso mp4box-diso-heap-buffer-over-flow-0
```
### POC
https://github.com/17ssDP/fuzzer_crashes/blob/main/gpac/mp4box-diso-heap-buffer-over-flow-0
### ASAN
```
[iso file] Box "UNKN" (start 30833) has 12 extra bytes
=================================================================
==18339==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6040000002c4 at pc 0x7ff06818591e bp 0x7fff27b7c2e0 sp 0x7fff27b7c2d0
READ of size 4 at 0x6040000002c4 thread T0
#0 0x7ff06818591d in gf_isom_box_dump_start_ex isomedia/box_funcs.c:2065
#1 0x7ff06818591d in gf_isom_box_dump_start isomedia/box_funcs.c:2093
#2 0x7ff068168ae7 in trgt_box_dump isomedia/box_dump.c:5807
#3 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
#4 0x7ff068118ffa in gf_isom_box_array_dump isomedia/box_dump.c:104
#5 0x7ff068185da8 in gf_isom_box_dump_done isomedia/box_funcs.c:2115
#6 0x7ff0681689d5 in trgr_box_dump isomedia/box_dump.c:5799
#7 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
#8 0x7ff068118ffa in gf_isom_box_array_dump isomedia/box_dump.c:104
#9 0x7ff068185da8 in gf_isom_box_dump_done isomedia/box_funcs.c:2115
#10 0x7ff06811d37b in trak_box_dump isomedia/box_dump.c:553
#11 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
#12 0x7ff068118ffa in gf_isom_box_array_dump isomedia/box_dump.c:104
#13 0x7ff068185da8 in gf_isom_box_dump_done isomedia/box_funcs.c:2115
#14 0x7ff06811a792 in moov_box_dump isomedia/box_dump.c:220
#15 0x7ff068185bb8 in gf_isom_box_dump isomedia/box_funcs.c:2108
#16 0x7ff0681194d6 in gf_isom_dump isomedia/box_dump.c:138
#17 0x5610e0fba804 in dump_isom_xml /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/filedump.c:2067
#18 0x5610e0f8ad79 in mp4box_main /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/mp4box.c:6364
#19 0x7ff067188c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
#20 0x5610e0f5b0a9 in _start (/home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/bin/gcc/MP4Box+0x4e0a9)
0x6040000002c4 is located 4 bytes to the right of 48-byte region [0x604000000290,0x6040000002c0)
allocated by thread T0 here:
#0 0x7ff06a6f4b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7ff0680c3d12 in trgt_box_new isomedia/box_code_base.c:10623
SUMMARY: AddressSanitizer: heap-buffer-overflow isomedia/box_funcs.c:2065 in gf_isom_box_dump_start_ex
Shadow bytes around the buggy address:
0x0c087fff8000: fa fa fd fd fd fd fd fa fa fa 00 00 00 00 00 05
0x0c087fff8010: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
0x0c087fff8020: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 01
0x0c087fff8030: fa fa 00 00 00 00 04 fa fa fa 00 00 00 00 00 03
0x0c087fff8040: fa fa 00 00 00 00 01 fa fa fa 00 00 00 00 00 00
=>0x0c087fff8050: fa fa 00 00 00 00 00 00[fa]fa 00 00 00 00 00 00
0x0c087fff8060: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
0x0c087fff8070: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
0x0c087fff8080: fa fa 00 00 00 00 00 00 fa fa fd fd fd fd fd fd
0x0c087fff8090: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 fa
0x0c087fff80a0: fa fa 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==18339==ABORTING
```
### Environment
```
Ubuntu 16.04
Clang 10.0.1
gcc 5.5
``` | heap-buffer-overflow isomedia/box_funcs.c:2065 in gf_isom_box_dump_start_ex | https://api.github.com/repos/gpac/gpac/issues/2279/comments | 0 | 2022-10-09T08:27:36Z | 2022-10-10T15:44:27Z | https://github.com/gpac/gpac/issues/2279 | 1,402,197,769 | 2,279 |
[
"gpac",
"gpac"
] | ### Description
Heap-buffer-overflow in isomedia/isom_intern.c:227 in FixSDTPInTRAF
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -bt mp4box-bt-heap-buffer-over-flow-0
```
### POC
https://github.com/17ssDP/fuzzer_crashes/blob/main/gpac/mp4box-bt-heap-buffer-over-flow-0
### ASAN
```
[iso file] Unknown box type sjhm in parent sinf
[iso file] Unknown box type sgp00 in parent stbl
[iso file] Read Box type 00000000 (0x00000000) at position 2168 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "traf" (start 2028) has 458 extra bytes
[iso file] Unknown box type shgp in parent traf
=================================================================
==31145==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000001914 at pc 0x7fe0339cbbf8 bp 0x7ffc2041a330 sp 0x7ffc2041a320
READ of size 1 at 0x602000001914 thread T0
#0 0x7fe0339cbbf7 in FixSDTPInTRAF isomedia/isom_intern.c:227
#1 0x7fe0339cbbf7 in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:663
#2 0x7fe0339ce0e5 in gf_isom_parse_movie_boxes isomedia/isom_intern.c:866
#3 0x7fe0339ce0e5 in gf_isom_open_file isomedia/isom_intern.c:986
#4 0x55ec82396048 in mp4box_main /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/mp4box.c:6175
#5 0x7fe032987c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
#6 0x55ec823690a9 in _start (/home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/bin/gcc/MP4Box+0x4e0a9)
0x602000001914 is located 0 bytes to the right of 4-byte region [0x602000001910,0x602000001914)
allocated by thread T0 here:
#0 0x7fe035ef3b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7fe0338a4541 in sdtp_box_read isomedia/box_code_base.c:8354
SUMMARY: AddressSanitizer: heap-buffer-overflow isomedia/isom_intern.c:227 in FixSDTPInTRAF
Shadow bytes around the buggy address:
0x0c047fff82d0: fa fa 00 00 fa fa 00 00 fa fa 01 fa fa fa 00 00
0x0c047fff82e0: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa fd fa
0x0c047fff82f0: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
0x0c047fff8300: fa fa 00 fa fa fa 00 00 fa fa 00 07 fa fa 00 00
0x0c047fff8310: fa fa 00 fa fa fa 00 00 fa fa 00 00 fa fa 00 00
=>0x0c047fff8320: fa fa[04]fa fa fa 00 00 fa fa 00 00 fa fa fa fa
0x0c047fff8330: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8340: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8350: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8360: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8370: 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
==31145==ABORTING
```
### Environment
```
Ubuntu 16.04
Clang 10.0.1
gcc 5.5
```
| heap-buffer-overflow isomedia/isom_intern.c:227 in FixSDTPInTRAF | https://api.github.com/repos/gpac/gpac/issues/2278/comments | 0 | 2022-10-09T08:21:31Z | 2022-10-10T15:44:27Z | https://github.com/gpac/gpac/issues/2278 | 1,402,196,162 | 2,278 |
[
"gpac",
"gpac"
] | ### Description
SEGV scene_manager/scene_dump.c:693 in gf_dump_vrml_sffield
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -bt mp4box-bt-segv-1
```
### POC
https://github.com/17ssDP/fuzzer_crashes/blob/main/gpac/mp4box-bt-segv-1
### ASAN
```
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent minf
[iso file] Missing DataInformationBox
[iso file] Unknown box type 0000 in parent moov
[iso file] Read Box type 0000 (0x30303030) at position 11542 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "moov" (start 20) has 806 extra bytes
[iso file] Unknown top-level box type 0000
[iso file] Incomplete box 0000 - start 12356 size 808358436
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent minf
[iso file] Missing DataInformationBox
[iso file] Unknown box type 0000 in parent moov
[iso file] Read Box type 0000 (0x30303030) at position 11542 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "moov" (start 20) has 806 extra bytes
[iso file] Unknown top-level box type 0000
[iso file] Incomplete box 0000 - start 12356 size 808358436
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[ODF] Reading bifs config: shift in sizes (not supported)
[MP4 Loading] Unable to fetch sample 38 from track ID 8 - aborting track import
Scene loaded - dumping 1 systems streams
ASAN:DEADLYSIGNAL
=================================================================
==42376==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f6a20c34c94 bp 0x60b000000720 sp 0x7ffd44396130 T0)
==42376==The signal is caused by a READ memory access.
==42376==Hint: address points to the zero page.
#0 0x7f6a20c34c93 in gf_dump_vrml_sffield scene_manager/scene_dump.c:693
#1 0x7f6a20c69012 in gf_dump_vrml_simple_field scene_manager/scene_dump.c:775
#2 0x7f6a20c5020c in DumpXReplace scene_manager/scene_dump.c:2291
#3 0x7f6a20c5020c in gf_sm_dump_command_list scene_manager/scene_dump.c:2901
#4 0x7f6a20c77d57 in gf_sm_dump scene_manager/scene_dump.c:3519
#5 0x556786082cef in dump_isom_scene /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/filedump.c:221
#6 0x55678605d7ff in mp4box_main /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/mp4box.c:6336
#7 0x7f6a1f3bac86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
#8 0x55678602f0a9 in _start (/home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/bin/gcc/MP4Box+0x4e0a9)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV scene_manager/scene_dump.c:693 in gf_dump_vrml_sffield
==42376==ABORTING
```
### Environment
```
Ubuntu 16.04
Clang 10.0.1
gcc 5.5
```
| SEGV scene_manager/scene_dump.c:693 in gf_dump_vrml_sffield | https://api.github.com/repos/gpac/gpac/issues/2277/comments | 0 | 2022-10-09T08:18:14Z | 2022-10-10T15:44:26Z | https://github.com/gpac/gpac/issues/2277 | 1,402,195,329 | 2,277 |
[
"gpac",
"gpac"
] |
### Description
SEGV in BD_CheckSFTimeOffset bifs/field_decode.c:58
### Version
```
$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev368-gfd054169b-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
### Replay
```
git clone https://github.com/gpac/gpac.git
cd gpac
./configure --enable-sanitizer
make -j$(nproc)
./bin/gcc/MP4Box -bt mp4box-bt-segv-0
```
### POC
https://github.com/17ssDP/fuzzer_crashes/blob/main/gpac/mp4box-bt-segv-0
### ASAN
```
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent minf
[iso file] Missing DataInformationBox
[iso file] Unknown box type 0000 in parent moov
[iso file] Read Box type 0000 (0x30303030) at position 11542 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "moov" (start 20) has 806 extra bytes
[iso file] Unknown top-level box type 0000
[iso file] Incomplete box 0000 - start 12356 size 808358436
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent minf
[iso file] Missing DataInformationBox
[iso file] Unknown box type 0000 in parent moov
[iso file] Read Box type 0000 (0x30303030) at position 11542 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "moov" (start 20) has 806 extra bytes
[iso file] Unknown top-level box type 0000
[iso file] Incomplete box 0000 - start 12356 size 808358436
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[ODF] Reading bifs config: shift in sizes (not supported)
ASAN:DEADLYSIGNAL | (00/100)
=================================================================
==64022==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000001 (pc 0x7f4bf2457608 bp 0x7fff7805fc00 sp 0x7fff7805f360 T0)
==64022==The signal is caused by a READ memory access.
==64022==Hint: address points to the zero page.
#0 0x7f4bf2457607 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x5b607)
#1 0x7f4befd4dd1a in BD_CheckSFTimeOffset bifs/field_decode.c:58
#2 0x7f4befd53e80 in gf_bifs_dec_sf_field bifs/field_decode.c:105
#3 0x7f4befd6a1be in BM_XReplace bifs/memory_decoder.c:355
#4 0x7f4befd6a1be in BM_ParseExtendedUpdates bifs/memory_decoder.c:398
#5 0x7f4befd754ad in BM_ParseInsert bifs/memory_decoder.c:586
#6 0x7f4befd754ad in BM_ParseCommand bifs/memory_decoder.c:908
#7 0x7f4befd7660d in gf_bifs_decode_command_list bifs/memory_decoder.c:1038
#8 0x7f4bf0743bc6 in gf_sm_load_run_isom scene_manager/loader_isom.c:303
#9 0x562cf53f8dd7 in dump_isom_scene /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/filedump.c:207
#10 0x562cf53d37ff in mp4box_main /home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/applications/mp4box/mp4box.c:6336
#11 0x7f4beef6ec86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
#12 0x562cf53a50a9 in _start (/home/fuzz/dp/chunkfuzzer-evaluation/benchmark/gpac-asan/bin/gcc/MP4Box+0x4e0a9)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x5b607)
==64022==ABORTING
```
### Environment
```
Ubuntu 16.04
Clang 10.0.1
gcc 5.5
```
| SEGV BD_CheckSFTimeOffset bifs/field_decode.c:58 | https://api.github.com/repos/gpac/gpac/issues/2276/comments | 0 | 2022-10-09T08:13:42Z | 2022-10-10T15:44:26Z | https://github.com/gpac/gpac/issues/2276 | 1,402,194,113 | 2,276 |
[
"gpac",
"gpac"
] | I've perused the man page, Google and closed issues, I cannot find anything.
My source video contains this:
```
ffprobe 1.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
creation_time : 2019-04-09T06:01:42.000000Z
location : +12.3456+078.9012/
location-eng : +12.3456+078.9012/
com.android.version: 11
com.android.capture.fps: 60.000000
```
I've tried:
`MP4Box -udta com.android.version:type=name:str=9 newfile.mp4` - doesn't work.
`MP4Box -itags com.android.version:9 newfile.mp4` - doesn't work.
So, how can I add metadata to an MP4 file? | How to add metadata to an MP4 file? | https://api.github.com/repos/gpac/gpac/issues/2275/comments | 6 | 2022-10-08T13:53:17Z | 2022-10-18T15:42:39Z | https://github.com/gpac/gpac/issues/2275 | 1,401,954,461 | 2,275 |
[
"gpac",
"gpac"
] | I have been working on a project which needs to examine the frames of a streamed video. I have followed the steps provided at https://github.com/gpac/gpac/wiki/HEVC-Tile-based-adaptation-guide to create a tiled video and used the same reference to create a mpd file.
I setup my DASH server and started streaming the video, but its only playable on GPAC and not on any other media player (i.e VLC). Is there a way to save the frames of this streamed video using gpac? | Extract frames from tiled videos | https://api.github.com/repos/gpac/gpac/issues/2274/comments | 1 | 2022-10-06T18:47:08Z | 2022-10-10T16:39:10Z | https://github.com/gpac/gpac/issues/2274 | 1,400,150,310 | 2,274 |
[
"gpac",
"gpac"
] | Hi,
Is there an option to advance parsing manually.Currently I see that start() function runs the parsing from the beginning till the end of the container automatically. But I am looking for a way to invoke the parsing routine manually.
Thanks.
| How can I invoke parsing when needed? | https://api.github.com/repos/gpac/gpac/issues/2273/comments | 2 | 2022-10-03T08:02:35Z | 2022-10-03T10:56:55Z | https://github.com/gpac/gpac/issues/2273 | 1,394,310,843 | 2,273 |
[
"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/file/g3ykan71w89nglu/47_3616555604852_01_001.aac/file
I have use this XML configuration and command to generate an encrypted HLS stream for using with FairPlay DRM. Although safari browser can play the audio, I cannot hear anything.
1. The XML configuration
```
<?xml version="1.0" encoding="UTF-8" />
<GPACDRM type="HLS SAES">
<!-- example for GPAC - keys are listed after the content and UL follows -->
<DRMInfo type="pssh" version="1" cypherOffset="9" cypherIV="0x00000000000000000000000000000001" cypherKey="0x6770616363656E6364726D746F6F6C31">
<BS ID128="94CE86FB07FF4F43ADB893D2FA968CA2"/>
<BS value="1" bits="32"/>
<BS ID128="0x279926496a7f5d25da69f2b3b2799a7f"/>
<BS bits="8" string="CID=Toto"/>
<BS ID128="0x5544694d47473326622665665a396b36"/>
</DRMInfo>
<CrypTrack IsEncrypted="1" constant_IV_size="16" constant_IV="0x65656565656565656565656565656565">
<key KID="0x279926496a7f5d25da69f2b3b2799a7f" value="0xd5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5" hlsInfo='URI="skd://twelve",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"'/>
</CrypTrack>
</GPACDRM>
```
2. Gpac command:
`gpac -i source cecrypt:cfile=DRM.xml:segdur=100:segext=aac -o res/live.m3u8
`
I found this command in the issue [#2230](https://github.com/gpac/gpac/issues/2230) to create Sample-AES encrypted stream for AAC audio file.
4. The generated HLS stream
```
#EXTM3U
#EXT-X-TARGETDURATION:100
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="47_3616555604852_01_001_dashinit.mp4"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://twelve",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXTINF:99.9851,
47_3616555604852_01_001_dash1.aac
#EXTINF:100.008,
47_3616555604852_01_001_dash2.aac
#EXTINF:99.9851,
47_3616555604852_01_001_dash3.aac
#EXTINF:100.008,
47_3616555604852_01_001_dash4.aac
#EXTINF:3.73841,
47_3616555604852_01_001_dash5.aac
#EXT-X-ENDLIST
```
I saw that the browser can play the audio, browser tab show the speaker symbol, but I cannot hear anything from it. I can ensure that my FairPlay DRM implementation works very well.
Could anyone help me to generate an SAMPLE-AES encrypted HLS stream that compatible with FairPlay DRM? Thank you very much! | Cannot decrypt stream encrypted by GPAC HLS AES when test FairPlay DRM? | https://api.github.com/repos/gpac/gpac/issues/2272/comments | 6 | 2022-09-30T08:38:11Z | 2022-10-05T03:37:17Z | https://github.com/gpac/gpac/issues/2272 | 1,392,075,347 | 2,272 |
[
"gpac",
"gpac"
] | When putting some wrong parameters (hevc with avc options), my command-line stalled:
```
gpac -i avgen:dur=2 @ enc:gfloc:c=hevc:b=5100k:r=30/1:bf=2:b_strategy=0:fintra=2:profile=high:color_primaries=1:color_trc=1:colorspace=1::x264-params="level=40:no-open-gop=1:scenecut=0" -o hevc.mp4
``` | command-line never exits | https://api.github.com/repos/gpac/gpac/issues/2270/comments | 1 | 2022-09-28T18:55:52Z | 2022-09-29T10:49:00Z | https://github.com/gpac/gpac/issues/2270 | 1,389,811,561 | 2,270 |
[
"gpac",
"gpac"
] | ```gpac -i avgen:dur=2 @ c=h264 -o gpac.mp4``` works but ```gpac -i avgen:dur=2 @ c=h264 @ bsrw -o gpac.mp4``` loops forever. | Introduction of bsrw filter breaks execution | https://api.github.com/repos/gpac/gpac/issues/2269/comments | 4 | 2022-09-28T18:52:38Z | 2022-09-29T13:40:17Z | https://github.com/gpac/gpac/issues/2269 | 1,389,807,966 | 2,269 |
[
"gpac",
"gpac"
] | **edit:** Using cbcs `tenc.default_constant_IV, default_constant_IV_size` atom fields fixed Firefox(widevine) playback, see my additinal comment. New test content for CBCS_1:9 pattern here.
https://refapp.hbbtv.org/dash/test_dashjs_wv.html?video=springcbcs2wv
Win10 Firefox cbcs test fails, what is the secret of Firefox cbcs encryption scheme? I also asked the same in dashjs slack but no answers yet. Win10 Edge(playready, cbcs1:9, cbcs0:0)=ok, Win10 Chrome(widevine, cbcs1:9, cbcs0:0)=ok, Android Chrome(widevine, cbcs1:9, cbcs0:0)=ok.
Do gpac talents know more about the Firefox issue?
**CBCS_1:9 pattern (10% encrypt, 90% nocrypt)**
https://refapp.hbbtv.org/dash/test_dashjs_wv.html?video=llamacbcswv
https://refapp.hbbtv.org/dash/test_dashjs_wv.html?video=llamacbcs
**CBCS_0:0 pattern**
https://refapp.hbbtv.org/dash/test_dashjs_wv.html?video=llamacbcs2wv
https://refapp.hbbtv.org/dash/test_dashjs_wv.html?video=llamacbcs2
See drmxml examples here for video and audio tracks, audio is using a default settings without `crypt_,skip_` arguments.
**CBCS_1:9 drm.xml**
http://refapp.hbbtv.org/videos/00_llama_1080p_cbcs_v1/temp-gpacdrmvideo.xml
http://refapp.hbbtv.org/videos/00_llama_1080p_cbcs_v1/temp-gpacdrmaudio.xml
```
<?xml version="1.0" encoding="UTF-8" ?>
<GPACDRM type="CENC AES-CBC Pattern">
...clip...
<CrypTrack trackID="1" IsEncrypted="1" IV_size="16" first_IV="0x22ee7d4745d3a26a0100000000000002" saiSavedBox="senc" crypt_byte_block="1" skip_byte_block="9" >
<key KID="0x43215678123412341234123412341236" value="0x12341234123412341234123412341236"/>
</CrypTrack>
</GPACDRM>
```
**CBCS_0:0 drm.xml**
http://refapp.hbbtv.org/videos/00_llama_1080p_cbcs_v2/temp-gpacdrmvideo.xml
http://refapp.hbbtv.org/videos/00_llama_1080p_cbcs_v2/temp-gpacdrmaudio.xml
```
<?xml version="1.0" encoding="UTF-8" ?>
<GPACDRM type="CENC AES-CBC Pattern">
...clip...
<CrypTrack trackID="1" IsEncrypted="1" IV_size="16" first_IV="0x22ee7d4745d3a26a0100000000000002" saiSavedBox="senc" crypt_byte_block="0" skip_byte_block="0" >
<key KID="0x43215678123412341234123412341236" value="0x12341234123412341234123412341236"/>
</CrypTrack>
</GPACDRM>
```
This is mp4box cmdlines, `tfdt64bit, cmf2, noroll, segdur=8sec` flags.
```
MP4Box -crypt "temp-gpacdrmvideo.xml" temp-v1.mp4 -out "drm/temp-v1.mp4"
MP4Box -crypt "temp-gpacdrmaudio.xml" temp-a1.mp4 -out "drm/temp-a1.mp4"
MP4Box -dash 384000 -frag 384000 -dash-scale 48000 -mem-frags -rap -profile dashavc264:live ^
-profile-ext "urn:hbbtv:dash:profile:isoff-live:2012" -min-buffer 4000 ^
-bs-switching no -sample-groups-traf -single-traf --tfdt64 --tfdt_traf --noroll=yes --cmaf=cmf2 ^
-subsegs-per-sidx 0 ^
-segment-name "$RepresentationID$/$Number$$Init=i$" -out manifest.mpd ^
"temp-v1.mp4#trackID=1:id=v1:period=p0:dur=30" ^
"temp-a1.mp4#trackID=1:id=a1:period=p0:dur=30"
``` | CBCS encryption not working on Firefox but Edge+Chrome ok (dashjs player) | https://api.github.com/repos/gpac/gpac/issues/2268/comments | 7 | 2022-09-26T09:09:56Z | 2022-10-19T08:23:28Z | https://github.com/gpac/gpac/issues/2268 | 1,385,707,963 | 2,268 |
[
"gpac",
"gpac"
] | Hi, I just start to use MP4box few days ago. this is fantastic, thank you all.
Could you please check the problem I met below:
Product: gpac/mp4box 2.0 for win-x64 (the latest stable) issued on 2022/02/22
Problem: part of font tag in srt could be miss after importing
Enviroment: Win10 command prompt
Command: mp4box -add vediofile.mp4 -add subtitle.srt targetfile.mp4
SRT sample in input file:
1
00:00:01,200 --> 00:00:04,000
\<font color=#FFFF70>The first language\</font>
The second language (english) line
(File encoding: Win CRLF UTF-8)
Text in MP4 file, same as the exported to STR file:
1
00:00:01,200 --> 00:00:04,000
\<font color=#FFFF70>The first language
The second language (english) line
The \</font> at the end of the first language line is missing.
When I open a new command prompt, and tried to export to a text-only MP4, seems the outfile is correct, but later I repeat the same command, I always got problems.
I tried with an older version (MP4box 0.5), didn't see this problem
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
| Missing </font> tag after import srt subtitle | https://api.github.com/repos/gpac/gpac/issues/2267/comments | 8 | 2022-09-23T02:59:06Z | 2022-10-03T09:35:04Z | https://github.com/gpac/gpac/issues/2267 | 1,383,233,884 | 2,267 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
Hello,
I follow sample code from this [issue](https://github.com/gpac/gpac/issues/2250), but if `on_rate_adaptation` return -2 for a group, the function `on_rate_adaptation` is not called for that group anymore in subsequent segments.
To demonstrate this point, I inserted a print statement at the beginning of the `on_rate_adaptation` function to print out all groups that were adapted. I returned -2 for the tile in the second row and the second column. The `group_idx` of this tile is 12.
When I run the code, the group 12 is adapted at the first video segment.

But from the second segment onward, the `on_rate_adaptation` was never called for the group 12, meaning this tile was disabled for the whole video.

Here is the [link](https://drive.google.com/file/d/1R3XYIFLFpcKtTn3BgjbNb_IM54W_XKBT/view?usp=sharing) to the mpd file and video tiles.
Here is the code I use to generate the results above:
```import datetime
import types
import sys
import time
import libgpac as gpac
print("Welcome to GPAC Python !\nVersion: " + gpac.version + "\n" + gpac.copyright_cite)
#parse our args
mem_track=0
gpac.init(mem_track)
class MyCustomDASHAlgo:
def on_period_reset(self, type):
print('period reset type ' + str(type))
def on_new_group(self, group):
print('new group ' + str(group.idx) + ' qualities ' + str(len(group.qualities)) + ' codec ' + group.qualities[0].codec + ' SRD ' + str(group.SRD.x) + 'x' + str(group.SRD.y));
group.active = True
if group.qualities[0].codec.startswith("hvt"):
group.tile = True
else:
group.tile = False
def on_rate_adaptation(self, group, base_group, force_low_complexity, stats):
print (f'We are checking group_idx:{group.idx} at {(group.SRD.y, group.SRD.x)}')
if group.tile and group.SRD.x == 384 and group.SRD.y == 384:
print(f'We are adapting on group_idx:{group.idx}, active quality: {stats.active_quality_idx}')
if group.active:
print('deactivate group idx ' + str(group.idx))
group.active = False
return -2
group.active = True
print('regular quality for group idx ' + str(group.idx))
return 0
mydash = MyCustomDASHAlgo()
#define a custom filter
class MyFilterSession(gpac.FilterSession):
def __init__(self, flags=0, blacklist=None, nb_threads=0, sched_type=0):
gpac.FilterSession.__init__(self, flags, blacklist, nb_threads, sched_type)
def on_filter_new(self, f):
if f.name == "dashin":
print("Binding DASH algo ");
f.bind(mydash);
#create a session
fs = MyFilterSession(0)
f1 = fs.load_src(f"http://localhost/dash/coaster2/coaster2_10x5.mpd")
f2 = fs.load("dashin")
f3 = fs.load("tileagg")
f4 = fs.load("ffdec:hevc")
#load a sink
f5 = fs.load("inspect:interleave=true:deep=true:dur=5:buffer=2000")
f2.set_source(f1)
f3.set_source(f2)
f4.set_source(f3)
f5.set_source(f4)
#run the session in blocking mode
btime = time.time()
fs.run()
print(f'Done, executing time: {time.time() - btime}')
fs.print_graph()
fs.delete()
gpac.close()
```
| Tile dropping with -2 option does not work, on_rate_adaptation function is not called | https://api.github.com/repos/gpac/gpac/issues/2266/comments | 1 | 2022-09-22T13:48:51Z | 2022-09-28T16:43:24Z | https://github.com/gpac/gpac/issues/2266 | 1,382,486,828 | 2,266 |
[
"gpac",
"gpac"
] | I posted this question here https://github.com/gpac/gpac/issues/2262 but I wasn't very clear.
I wanted to know if there was anyway to get all of the input extensions/formats that is supported by **Mp4Box**?
Thanks!
| Any way to generate an accurate list of supported video/audio input formats for MP4Box? | https://api.github.com/repos/gpac/gpac/issues/2265/comments | 2 | 2022-09-22T12:54:20Z | 2022-09-27T00:48:25Z | https://github.com/gpac/gpac/issues/2265 | 1,382,404,983 | 2,265 |
[
"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.
tool: GPAC-2.1-DEV-rev273-g02437a478-master
The Created tag of my files has been set by the camera where the date had not been set.
I'm attempting to set the tag to the first date/time reported from the GPS using the
```-time [tkID=]DAY/MONTH/YEAR-H:M:S: set movie or track creation time``` format
```mp4box -time 03/05/2022-16:05:40 video.MP4```
but the result from ```mp4box -info video.MP4``` is ```Created: GMT Mon May 2 08:05:40 2022```
Admittedly, the input is local time (GMT+8), which accounts for the time difference, but not the day.
The docs are not clear if there some trickery that adjusts it to GMT. Am I doing it correctly?
| MP4Box -time reports 1 day earlier after update | https://api.github.com/repos/gpac/gpac/issues/2263/comments | 1 | 2022-09-17T03:29:38Z | 2022-09-19T09:13:49Z | https://github.com/gpac/gpac/issues/2263 | 1,376,651,005 | 2,263 |
[
"gpac",
"gpac"
] | Reading the documentation it seems like it's based on how it's built.
However, it's really hard to make out proper formats/extension that are allowed to be imported via mp4box.
I know this isn't a big issue, just wondering! Thanks! | Any way to generate an accurate list of supported video/audio input formats? | https://api.github.com/repos/gpac/gpac/issues/2262/comments | 2 | 2022-09-16T21:36:29Z | 2022-09-21T16:34:41Z | https://github.com/gpac/gpac/issues/2262 | 1,376,498,809 | 2,262 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
Hello,
I am trying to set the buffer of the playback to 2 seconds using this command:
```
gpac httpin:src=http://localhost/dash/coaster2/coaster2_6x3.mpd dashin tileagg ffdec inspect:buffer=2000:dur=5 -graph
```
However, it seems the playback buffer is overwritten by some configuration. The streaming session also hang. Here is the error:

Setting buffer less than 1000 will resume the playback again. Can you please let me know a way to set playback buffer for the inspect filter?.
| How to set the size of playback buffer? | https://api.github.com/repos/gpac/gpac/issues/2260/comments | 1 | 2022-09-15T19:13:18Z | 2022-09-16T14:44:00Z | https://github.com/gpac/gpac/issues/2260 | 1,374,970,444 | 2,260 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
Possible relevant lines from the source file:
```c
#if !defined(_WIN32)
#include <sys/time.h>
#endif
...
#if defined(_MSC_VER)
#include <time.h>
#include <sys/timeb.h>
#endif
static void js_random_init(JSContext *ctx)
{
#if defined(_MSC_VER) // FIXME: more precision
struct _timeb tb;
_ftime(&tb);
ctx->random_state = ( (int64_t)tb.time * 1000000) + (tb.millitm*1000);
#else
struct timeval tv;
gettimeofday(&tv, NULL);
ctx->random_state = ((int64_t)tv.tv_sec * 1000000) + tv.tv_usec;
#endif
/* the state must be non zero */
if (ctx->random_state == 0)
ctx->random_state = 1;
}
...
static JSValue js___date_clock(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv)
{
int64_t d;
#if defined(_MSC_VER) // FIXME: more precision
struct _timeb tb;
_ftime(&tb);
d = ( (int64_t)tb.time * 1000000) + (tb.millitm*1000);
#else
struct timeval tv;
gettimeofday(&tv, NULL);
d = (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
#endif
return JS_NewInt64(ctx, d);
}
```
excerpt from the make log:
```c
D:/mabs/build/gpac-git/src/quickjs/quickjs.c:10838:30: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
else if (d > INT64_MAX)
~ ^~~~~~~~~
D:/mabs/msys64/mingw32/include/stdint.h:84:19: note: expanded from macro 'INT64_MAX'
#define INT64_MAX 9223372036854775807LL
^~~~~~~~~~~~~~~~~~~~~
D:/mabs/build/gpac-git/src/quickjs/quickjs.c:42033:5: error: call to undeclared function 'gettimeofday'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
gettimeofday(&tv, NULL);
^
D:/mabs/build/gpac-git/src/quickjs/quickjs.c:42148:5: error: call to undeclared function 'gettimeofday'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
gettimeofday(&tv, NULL);
^
D:/mabs/build/gpac-git/src/quickjs/quickjs.c:48381:5: error: call to undeclared function 'gettimeofday'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
gettimeofday(&tv, NULL);
^
1 warning and 3 errors generated.
make[1]: *** [../config.mak:147: quickjs/quickjs.o] Error 1
make[1]: Leaving directory '/build/gpac-git/build-32bit/src'
make: *** [Makefile:13: all] Error 2
```
Possible suggested fixes:
1. Change `#if !defined(_WIN32)` to `#if !defined(_MSC_VER)` to match the rest of the file as mingw-w64 gcc does provide a `gettimeofday()` function
2. Change the `#if defined(_MSC_VER)`s in the rest of the file to `#if defined(_WIN32)` to include mingw-w64
| mingw-w64 gcc: compilation failed on implicit gettimeofday | https://api.github.com/repos/gpac/gpac/issues/2259/comments | 7 | 2022-09-15T18:38:10Z | 2022-09-20T17:25:06Z | https://github.com/gpac/gpac/issues/2259 | 1,374,931,600 | 2,259 |
[
"gpac",
"gpac"
] | When using `cat input.ivf | gpac -i - vout` I get the following errors:
```
[IVF] Wrong frame size 1653761469
[IVF] Wrong frame size 1201015313
[IVF] Wrong frame size 694008384
[IVF] Wrong frame size 2555895191
[IVF] Wrong frame size 3525515593
[IVF] Wrong frame size 4081952536
[IVF] Wrong frame size 4244438912
[IVF] Wrong frame size 1216447311
[IVF] Wrong frame size 2265514515
session last process error BitStream Not Compliant
```
`gpac -i input.ivf vout` on the other hand works fine.
What can I do here?
____
Background: I want to repackage ivf frames coming from a tcp port and forward them to another tcp port as mp4.
This is one step on the way. If I am doing something completely wrong, please tell me :) | gpac has problems reading from stdin | https://api.github.com/repos/gpac/gpac/issues/2256/comments | 1 | 2022-09-08T19:11:53Z | 2022-09-12T14:43:40Z | https://github.com/gpac/gpac/issues/2256 | 1,366,867,789 | 2,256 |
[
"gpac",
"gpac"
] | poc: https://github.com/Janette88/test_pocs/blob/main/poc1_hbo.dat
```
Description
Buffer Over Read in function gf_utf8_wcslen at gpac/src/utils/utf.c:442 .
gpac version
git log
commit fc4749f9ce8d6ddf50d1f1104366cdacede14d33 (grafted, HEAD -> master, origin/master, origin/HEAD)
Author: Aurelien David <aurelien.david@telecom-paristech.fr>
Date: Mon Aug 1 06:44:34 2022 -0700
fix quickjs build on osx < 10.12 (#2229)
./MP4Box -version
MP4Box - GPAC version 2.1-DEV-revUNKNOWN-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Proof of Concept
with asan log:
./MP4Box -diso ../../../test/poc1_hbo.dat
[isom] invalid tag size in Xtra !
[isom] not enough bytes in box Xtra: 7 left, reading 8 (file isomedia/box_code_base.c, line 12863), skipping box
[iso file] Box "Xtra" (start 24) has 7 extra bytes
[iso file] Read Box type 00000001 (0x00000001) at position 92 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "moof" (start 84) has 8 extra bytes
[iso file] Movie fragment but no moov (yet) - possibly broken parsing!
[iso file] Box "vwid" (start 204) has 5 extra bytes
[iso file] Unknown top-level box type 00000B01
[iso file] Incomplete box 00000B01 - start 264 size 34164724
[iso file] Incomplete file while reading for dump - aborting parsing
=================================================================
==95685==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000f20 at pc 0x7f9c7e90cab8 bp 0x7ffdd7e1c960 sp 0x7ffdd7e1c950
READ of size 2 at 0x603000000f20 thread T0
#0 0x7f9c7e90cab7 in gf_utf8_wcslen utils/utf.c:442
#1 0x7f9c7e90cab7 in gf_utf8_wcslen utils/utf.c:438
#2 0x7f9c7ede8243 in xtra_box_dump isomedia/box_dump.c:6471
#3 0x7f9c7edef7ed in gf_isom_box_dump isomedia/box_funcs.c:2108
#4 0x7f9c7edb5fa9 in gf_isom_dump isomedia/box_dump.c:138
#5 0x55de6ec03d86 in dump_isom_xml /home/fuzz/gpac2/gpac/applications/mp4box/filedump.c:2061
#6 0x55de6ebe6c49 in mp4box_main /home/fuzz/gpac2/gpac/applications/mp4box/mp4box.c:6372
#7 0x7f9c7c3bf082 in __libc_start_main ../csu/libc-start.c:308
#8 0x55de6ebc0afd in _start (/home/fuzz/gpac2/gpac/bin/gcc/MP4Box+0xa2afd)
0x603000000f21 is located 0 bytes to the right of 17-byte region [0x603000000f10,0x603000000f21)
allocated by thread T0 here:
#0 0x7f9c82138808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x7f9c7ed9a26b in xtra_box_read isomedia/box_code_base.c:12890
#2 0x7f9c7edeb593 in gf_isom_box_read isomedia/box_funcs.c:1860
#3 0x7f9c7edeb593 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#4 0x7f9c7edec9e5 in gf_isom_parse_root_box isomedia/box_funcs.c:38
#5 0x7f9c7ee15a6c in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:373
#6 0x7f9c7ee1bbdf in gf_isom_parse_movie_boxes isomedia/isom_intern.c:860
#7 0x7f9c7ee1bbdf in gf_isom_open_file isomedia/isom_intern.c:980
#8 0x55de6ebe5539 in mp4box_main /home/fuzz/gpac2/gpac/applications/mp4box/mp4box.c:6181
#9 0x7f9c7c3bf082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-buffer-overflow utils/utf.c:442 in gf_utf8_wcslen
Shadow bytes around the buggy address:
0x0c067fff8190: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa
0x0c067fff81a0: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa
0x0c067fff81b0: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00
0x0c067fff81c0: 00 fa fa fa 00 00 00 06 fa fa 00 00 00 fa fa fa
0x0c067fff81d0: 00 00 00 02 fa fa 00 00 00 03 fa fa fd fd fd fd
=>0x0c067fff81e0: fa fa 00 00[01]fa fa fa 00 00 00 00 fa fa 00 00
0x0c067fff81f0: 00 fa fa fa fd fd fd fd fa fa fa fa fa fa fa fa
0x0c067fff8200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8210: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8220: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8230: 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
==95685==ABORTING
valgrind (without asan) log:
valgrind ./MP4Box -diso ../../../test/poc1_hbo.dat
==99671== Memcheck, a memory error detector
==99671== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==99671== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==99671== Command: ./MP4Box -diso ../../../test/poc1_hbo.dat
==99671==
[isom] invalid tag size in Xtra !
[isom] not enough bytes in box Xtra: 7 left, reading 8 (file isomedia/box_code_base.c, line 12863), skipping box
[iso file] Box "Xtra" (start 24) has 7 extra bytes
[iso file] Read Box type 00000001 (0x00000001) at position 92 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "moof" (start 84) has 8 extra bytes
[iso file] Movie fragment but no moov (yet) - possibly broken parsing!
[iso file] Box "vwid" (start 204) has 5 extra bytes
[iso file] Unknown top-level box type 00000B01
[iso file] Incomplete box 00000B01 - start 264 size 34164724
[iso file] Incomplete file while reading for dump - aborting parsing
==99671== Invalid read of size 2
==99671== at 0x4933D0C: gf_utf8_wcslen (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A7944D: xtra_box_dump (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A7BDF1: gf_isom_box_dump (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A684E5: gf_isom_dump (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x13F532: dump_isom_xml (in /home/fuzz/gpac2/gpac/bin/gcc/MP4Box)
==99671== by 0x131C9E: mp4box_main (in /home/fuzz/gpac2/gpac/bin/gcc/MP4Box)
==99671== by 0x5144082: (below main) (libc-start.c:308)
==99671== Address 0x5543320 is 16 bytes inside a block of size 17 alloc'd
==99671== at 0x483C855: malloc (vg_replace_malloc.c:381)
==99671== by 0x4A5F326: xtra_box_read (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A7A7D8: gf_isom_box_parse_ex (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A7B022: gf_isom_parse_root_box (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A839D5: gf_isom_parse_movie_boxes_internal (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A85196: gf_isom_open_file (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x132F03: mp4box_main (in /home/fuzz/gpac2/gpac/bin/gcc/MP4Box)
==99671== by 0x5144082: (below main) (libc-start.c:308)
==99671==
==99671== Invalid read of size 2
==99671== at 0x4933D0C: gf_utf8_wcslen (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4933D6B: gf_utf8_wcstombs (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A7946E: xtra_box_dump (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A7BDF1: gf_isom_box_dump (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A684E5: gf_isom_dump (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x13F532: dump_isom_xml (in /home/fuzz/gpac2/gpac/bin/gcc/MP4Box)
==99671== by 0x131C9E: mp4box_main (in /home/fuzz/gpac2/gpac/bin/gcc/MP4Box)
==99671== by 0x5144082: (below main) (libc-start.c:308)
==99671== Address 0x5543320 is 16 bytes inside a block of size 17 alloc'd
==99671== at 0x483C855: malloc (vg_replace_malloc.c:381)
==99671== by 0x4A5F326: xtra_box_read (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A7A7D8: gf_isom_box_parse_ex (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A7B022: gf_isom_parse_root_box (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A839D5: gf_isom_parse_movie_boxes_internal (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x4A85196: gf_isom_open_file (in /home/fuzz/gpac2/gpac/bin/gcc/libgpac.so.12.0.0)
==99671== by 0x132F03: mp4box_main (in /home/fuzz/gpac2/gpac/bin/gcc/MP4Box)
==99671== by 0x5144082: (below main) (libc-start.c:308)
==99671==
==99671==
==99671== HEAP SUMMARY:
==99671== in use at exit: 0 bytes in 0 blocks
==99671== total heap usage: 309 allocs, 309 frees, 739,238 bytes allocated
==99671==
==99671== All heap blocks were freed -- no leaks are possible
==99671==
==99671== For lists of detected and suppressed errors, rerun with: -s
==99671== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
ps: The vulnerability exits in the newest version. I checked it ever happened in older version ,but the patch didn't work in the newest version.The bug is still there. I tried to fix the bug based on the commit 915e2cb. (https://github.com/gpac/gpac/commit/915e2cba715f36b7cc29e28888117831ca143d78)
in /gpac/src/isomedia/box_code_base.c#L12890
if (prop_size>4) {
tag_size-=2;
prop_type = gf_bs_read_u16(bs);
prop_size -= 6;
ISOM_DECREASE_SIZE_NO_ERR(ptr, prop_size)
//add 2 extra bytes for UTF16 case string dump
data2 = gf_malloc(sizeof(char) * (prop_size+3)); //1) modified prop_size+2 into prop_size+3
gf_bs_read_data(bs, data2, prop_size);
data2[prop_size] = 0;
data2[prop_size+1] = 0;
data2[prop_size+2] = 0; //2) add this line
tag_size-=prop_size;
} else {
prop_size = 0;
}
Then saved the file and recompiled the gpac, here is my testing log :
valgrind ./MP4Box -diso ../../../test/poc1_hbo.dat
==103699== Memcheck, a memory error detector
==103699== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==103699== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==103699== Command: ./MP4Box -diso ../../../test/poc1_hbo.dat
==103699==
[isom] invalid tag size in Xtra !
[isom] not enough bytes in box Xtra: 7 left, reading 8 (file isomedia/box_code_base.c, line 12863), skipping box
[iso file] Box "Xtra" (start 24) has 7 extra bytes
[iso file] Read Box type 00000001 (0x00000001) at position 92 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "moof" (start 84) has 8 extra bytes
[iso file] Movie fragment but no moov (yet) - possibly broken parsing!
[iso file] Box "vwid" (start 204) has 5 extra bytes
[iso file] Unknown top-level box type 00000B01
[iso file] Incomplete box 00000B01 - start 264 size 34164724
[iso file] Incomplete file while reading for dump - aborting parsing
==103699==
==103699== HEAP SUMMARY:
==103699== in use at exit: 0 bytes in 0 blocks
==103699== total heap usage: 309 allocs, 309 frees, 739,239 bytes allocated
==103699==
==103699== All heap blocks were freed -- no leaks are possible
==103699==
==103699== For lists of detected and suppressed errors, rerun with: -s
==103699== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Hope it's helpful!
Impact
This vulnerabilities are capable of crashing software, Modify Memory, and possible remote execution.
Occurrences
utf.c L442
``` | Buffer Over Read in gf_utf8_wcslen | https://api.github.com/repos/gpac/gpac/issues/2255/comments | 0 | 2022-09-08T09:54:15Z | 2022-09-12T09:47:01Z | https://github.com/gpac/gpac/issues/2255 | 1,365,935,749 | 2,255 |
[
"gpac",
"gpac"
] | ### Description
Using the `src` parameter when joining a multicast feed results in `Feature Not Supported` error. I'm running the latest revision of GPAC on Rocky 8. Without the filtering GPAC receives traffic from 2 sources which isn't working either. When using TSDuck I'm able to join the source specific multicast using
```
tsp -I ip --ssm 10.1.2.3@239.1.2.3:1234
```
Using GPAC I'm trying the following:
```
gpac -i udp://239.1.2.3:port=1234:src=10.1.2.3
```
It results in `Failed to load filter for "udp://239.1.2.3:port=1234:src=10.1.2.3": Feature Not Supported` however. | Source filtering for UDP multicast not working | https://api.github.com/repos/gpac/gpac/issues/2254/comments | 2 | 2022-09-06T13:31:54Z | 2022-11-14T17:10:20Z | https://github.com/gpac/gpac/issues/2254 | 1,363,294,679 | 2,254 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
There is a similar issues[ here](https://github.com/gpac/gpac/issues/2084), but the code provided no longer works, the link provided in the answer also die.
I tried drop the top-left tile by returning -2, then in the later iterations, I want to turn on streaming for the top-left tile by returning 0. However, the streaming client hang without returning errors:

Is there any option to temporarily drop a tile, then later enable streaming for that tile? This drop tile approach is very popular in the research community.
Here is the code of the tile adaptation algorithm:
```
def on_rate_adaptation(self, group, base_group, force_low_complexity, stats):
if group.SRD.x == 0 and group.SRD.y == 0:
print(f'We are adapting on globalid: {global_id}, group_idx:{group.idx}, active quality: {stats.active_quality_idx}')
if stats.active_quality_idx != -2:
return -2
else:
return 0
return 0
```
| Tile dropping with -2 option does not work when switching between -2 and other levels alternatively | https://api.github.com/repos/gpac/gpac/issues/2250/comments | 9 | 2022-09-01T13:44:50Z | 2022-10-28T19:06:15Z | https://github.com/gpac/gpac/issues/2250 | 1,358,876,408 | 2,250 |
[
"gpac",
"gpac"
] | Hi! My name is Roberto.
I have installed this version that I got from [https://gpac.wp.imt.fr/downloads/](url)
```
MP4Box - GPAC version 2.0-rev0-g418db414-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
```
OS: Windows 10 Home x64
I'm trying to add cover to mp4 files, so I am using the code in cmd as it fallows:
`mp4box -add cover=myfile.jpg "my_video.mp4"`
And I get this error:
> Failure while importing media: Requested URL is not valid or cannot be found
> Error importing cover=myfile.jpg: Requested URL is not valid or cannot be found
This jpg files is 409*545 px
Like a week ago, I did add cover to some video files with a older version of gpc, and it worked.
Today, I'm getting this issue, so I installed latest gpac version, but same "Requested URL is not valid or cannot be found" error.
I will appreciate if someone help me out.
Roberto. | [mp4box][cover tag] Failure while importing media | https://api.github.com/repos/gpac/gpac/issues/2249/comments | 2 | 2022-08-31T18:24:40Z | 2022-09-01T21:31:55Z | https://github.com/gpac/gpac/issues/2249 | 1,357,699,959 | 2,249 |
[
"gpac",
"gpac"
] | We are working with MOV files produced by Atomos Ninja V devices, which create a broken MOV file structure. The company is not responding to service such low level mistakes they made, but that is completely another topic.
**The issue:**
Audio is in "in24" format, as 24-bit 4-channel 48000 samples/second track (length 1.2sec in sample below). The path:
```
moov.trak[1].mdia.minf.stbl.stsz { 20-8 @ 65779208 = 12 }
. . . . . - version = 00
. . . . . - flags[3] = {00:00:00}
. . . . . - sample_size = 00000003 = 3
. . . . . - number_of_entries = 0000E100 = 57600
```
Given the 24-bit 4-channel configuration, one would expect a figure of 12 written in the constant sample size field. But they are made it wrong. Comparing it with other random internet found files, we see proper calculation of sample size, as a number that covers all bits of all channels = one audio sample in the time axis.
The consequence is dramatic - GPAC (and even my own mov reader code) would access only the first quarter of every given chunk, since we naturally use the sample_size * samples_in_chunk (of stsc). It does not return correct data when reading in our app using gpac library, and it does not return the correct -raw track dump using the MP4Box tool.
While we were debugging this odd behavior, I found that e.g. ffmpeg includes a quirk that overrides the constant sample_size with a calculated value that originates from the sample description (stsd) atom - if the audio is uncompressed, its easy to calculate the sample size. And this value is used then instead of the value that is read from the file - likely taking the path of - they got the data right, but they got some key metadata wrong.
**Potential solution**:
Could GPAC implement such override, eg. in the following way:
- for simple lpcm/in24 format, decode the stsd and derive an expected sample_size
- if the file indicated sample size is smaller, override it with the calculated size
- emit a big warning, that the user deals with potentially broken file (ill formatted)
- the functionality could be optional/masked, if there is a way to do it easily
**Alternative way:**
Is it possible to override the loaded isoMedia with a custom sample_size or stsz atom, when we are only using gf_isom_get_sample to read such file? We can easily detect this type of a badly setup MOV file.
| quirk for a wrongly indicated audio sample size (format: in24) | https://api.github.com/repos/gpac/gpac/issues/2248/comments | 1 | 2022-08-30T22:04:02Z | 2022-09-12T13:31:48Z | https://github.com/gpac/gpac/issues/2248 | 1,356,363,225 | 2,248 |
[
"gpac",
"gpac"
] | Hello,
I am a researcher looking into 360 TILED videos and was looking for a good open source DASH implementation for my studies.
I want to set up new bandwidth prediction algorithm, viewpoint prediction algorithm, and bitrate selection algorithm for tiles. Do I need to modify the source code, or can it be done through JS? | new bitrate selection algorithm for 360-degree videos | https://api.github.com/repos/gpac/gpac/issues/2247/comments | 5 | 2022-08-30T01:58:10Z | 2023-06-13T05:33:25Z | https://github.com/gpac/gpac/issues/2247 | 1,355,061,768 | 2,247 |
[
"gpac",
"gpac"
] | [POC](https://cdn.discordapp.com/attachments/1002845697801977896/1004011628288802887/null_dereference)
```
Version
06:02:21 root@ubuntu gcc ±|master ✗|→ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev259-gfc4749f9c-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration:
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_FAAD GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_LINUX_DVB
Proof of Conect
./MP4Box -info ./null_dereference
ASAN Log
[iso file] extra box udta found in moov, deleting
[iso file] extra box udta found in moov, deleting
[iso file] extra box udta found in moov, deleting
[iso file] extra box udta found in moov, deleting
[iso file] Unknown box type 0000 in parent minf
[iso file] Unknown box type s0000s in parent stbl
[ISO file] dataReferenceIndex set to 0 in sample entry, overriding to 1
[iso file] Read Box type FFFFFFEA (0xFFFFFFEA) at position 764 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "dims" (start 748) has 10 extra bytes
[iso file] Read Box type 00000000 (0x00000000) at position 782 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "stsd" (start 732) has 48 extra bytes
[iso file] Missing DataInformationBox
[iso file] Unknown box type 00000000 in parent stbl
[iso file] Unknown box type url in parent dinf
[iso file] Missing dref box in dinf
[iso file] Unknown top-level box type 000000
[iso file] Unknown top-level box type 00000008
[iso file] Incomplete box 00000000 - start 1574 size 808465447
[iso file] Incomplete file while reading for dump - aborting parsing
# Movie Info - 2 tracks - TimeScale 3158064
Duration 00:04:16.000 (recomputed 00:00:09.000)
Fragmented: no
Progressive (moov before mdat)
Major Brand 0000 - version 808464432 - compatible brands: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
Created: GMT Sat Sep 19 11:55:28 2065
Modified: GMT Sat Sep 19 11:54:46 2065
Copyrights:
(lap) 000000000
1 UDTA types:
cprt:
# Track 1 Info - ID 12336 - TimeScale 16
Media Duration 00:12:51.000 (recomputed 00:00:09.000)
Track flags: Disabled In Movie Size is AspectRatio
Media Info: Language "``o (``o)" - Type "soun:dims" - 15 samples
Alternate Group ID 12336
3GPP DIMS stream - size 0 x 0 - Profile 0 - Level 0
pathComponents: 0 - useFullRequestHost: no
stream type: secondary - redundant: main+redundant
AddressSanitizer:DEADLYSIGNAL
=================================================================
==8678==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000569547 bp 0x000000000001 sp 0x7fff81bca2d0 T0)
==8678==The signal is caused by a READ memory access.
==8678==Hint: address points to the zero page.
#0 0x569546 in DumpTrackInfo /root/gpac_stable_asan/applications/mp4box/filedump.c:3361:12
#1 0x57267f in DumpMovieInfo /root/gpac_stable_asan/applications/mp4box/filedump.c:3994:3
#2 0x545302 in mp4box_main /root/gpac_stable_asan/applications/mp4box/mp4box.c:6367:9
#3 0x7f7368cafc86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
#4 0x428b79 in _start (/root/gpac_stable_asan/bin/gcc/MP4Box+0x428b79)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /root/gpac_stable_asan/applications/mp4box/filedump.c:3361:12 in DumpTrackInfo
==8678==ABORTING
Root Cause
gf_isom_get_dims_description@plt returns NULL data.
Therefore, an error occurs when referring to the corresponding part.
gf_isom_get_dims_description(file, trackNum, 1, &dims);
fprintf(stderr, "\t3GPP DIMS stream - size %d x %d - Profile %d - Level %d\n", w, h, dims.profile, dims.level);
fprintf(stderr, "\tpathComponents: %d - useFullRequestHost: %s\n", dims.pathComponents, dims.fullRequestHost ? "yes" : "no");
fprintf(stderr, "\tstream type: %s - redundant: %s\n", dims.streamType ? "primary" : "secondary", (dims.containsRedundant==1) ? "main" : ((dims.containsRedundant==2) ? "redundant" : "main+redundant") );
if (dims.textEncoding[0]) fprintf(stderr, "\ttext encoding %s\n", dims.textEncoding);
=> 0x4589f6 <DumpTrackInfo+13174>: call 0x40f500 <gf_isom_get_dims_description@plt>
Guessed arguments:
arg[0]: 0x8c8990 --> 0x0
arg[1]: 0x1
arg[2]: 0x1
arg[3]: 0x7ffffffd2ee0 --> 0x0
typedef struct
{
/*! profile*/
u8 profile;
/*! level*/
u8 level;
/*! number of components in path*/
u8 pathComponents;
/*! full request*/
Bool fullRequestHost;
/*! stream type*/
Bool streamType;
/*! has redundant sample (carousel)*/
u8 containsRedundant;
/*! text encoding string*/
const char *textEncoding;
/*! content encoding string*/
const char *contentEncoding;
/*! script string*/
const char *content_script_types;
/*! mime type string*/
const char *mime_type;
/*! xml schema location string*/
const char *xml_schema_loc;
} GF_DIMSDescription;
Impact
Deinal of Service
Occurrences
isomedia.h L3680
filedump.c L3361
``` | Null Pointer Dereference Caused Segmentation Fault | https://api.github.com/repos/gpac/gpac/issues/2246/comments | 0 | 2022-08-24T19:28:34Z | 2022-09-12T09:40:46Z | https://github.com/gpac/gpac/issues/2246 | 1,349,923,512 | 2,246 |
[
"gpac",
"gpac"
] | Latest master has issues loading in audio files

It hangs here forever and then eventually gives the error `At least one required element has not been found`
**Basic command line to replicate the error**
`"MP4Box.exe" -add "E:/Legion.2010.BluRay.1080p/Legion.2010.BluRay.1080p_out.h264#1:name=:lang=und:fps=23.976:ID=1" -add "E:/Legion.2010.BluRay.1080p/audio.ac3#None:name=:delay=0:lang=und:ID=2" -new "E:\Legion.2010.BluRay.1080p\Legion.2010.BluRay.1080p_out.muxed_output.mp4"`
**Sample of the audio file**
https://www.mediafire.com/file/724dlbd6qlop8ra/audio.ac3/file
If I don't add the audio the file mux's just fine. Also if I use the older 1.0.1 release of mp4box.exe it accepts the input flawlessly
Windows 10 x64 | Bug when importing audio files with latest master | https://api.github.com/repos/gpac/gpac/issues/2245/comments | 2 | 2022-08-24T12:17:20Z | 2022-09-12T12:03:03Z | https://github.com/gpac/gpac/issues/2245 | 1,349,350,952 | 2,245 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [X] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
I tried to use FLAC via HLS and was running into some issues. Trying to DASH a .flac file directly flat out doesn't work right, GPAC creates multiple periods from the single input.
At first it seemed like making a .mp4 file out of the .flac first would work, but then I ran into stuttering / skipping (depending on the player used) no matter which fragment or segment settings I used, even without a video stream to muddy up the fragment / segment lengths. Then I noticed the glitches always occurred at the same exact timestamps, and even with single file / single fragment output.
I went back and checked the "original" remuxed FLAC .mp4 used as the input for DASH, and lo and behold, it has stuttering, and you can see it in the decoder output when you try to play it back with GPAC player:
```
Q:\OLK>mp4box -add One_Last_Kiss.flac -new OLK_FLAC_96_24_ao.mp4
Track Importing FLAC - SampleRate 48000 Num Channels 2
[MP4Mux] PID audio ID 1 Sample 3277 with DTS 13421312 less than previous sample DTS 13421312, adjusting prev sample duration
Saving OLK_FLAC_96_24_ao.mp4: 0.500 secs Interleaving
Q:\OLK>gpac -gui OLK_FLAC_96_24_ao.mp4
[iso file] Found stts entry with sample_delta=0 - forbidden ! Fixing to 1
[flac] invalid residual
[flac] decode_frame() failed
[FFDec] PID OLK_FLAC_96_24_ao.mp4 failed to decode frame PTS 3432448: Invalid data found when processing input
[flac] invalid sync code
[flac] invalid frame header
[flac] decode_frame() failed
[FFDec] PID OLK_FLAC_96_24_ao.mp4 failed to decode frame PTS 3436544: Invalid data found when processing input
[flac] invalid residual
[flac] decode_frame() failed
[FFDec] PID OLK_FLAC_96_24_ao.mp4 failed to decode frame PTS 5875968: Invalid data found when processing input
[flac] invalid sync code
[flac] invalid frame header
[flac] decode_frame() failed
[FFDec] PID OLK_FLAC_96_24_ao.mp4 failed to decode frame PTS 5880064: Invalid data found when processing input
[flac] invalid residual
[flac] decode_frame() failed
[FFDec] PID OLK_FLAC_96_24_ao.mp4 failed to decode frame PTS 7649536: Invalid data found when processing input
[flac] invalid sync code
[flac] invalid frame header
[flac] decode_frame() failed
[FFDec] PID OLK_FLAC_96_24_ao.mp4 failed to decode frame PTS 7653632: Invalid data found when processing input
[flac] invalid residual
[flac] decode_frame() failed
[FFDec] PID OLK_FLAC_96_24_ao.mp4 failed to decode frame PTS 11229440: Invalid data found when processing input
[flac] invalid channel mode: 12
[flac] invalid frame header
[flac] decode_frame() failed
[FFDec] PID OLK_FLAC_96_24_ao.mp4 failed to decode frame PTS 11233536: Invalid data found when processing input
[flac] invalid residual
[flac] decode_frame() failed
[FFDec] PID OLK_FLAC_96_24_ao.mp4 failed to decode frame PTS 11660032: Invalid data found when processing input
[flac] switching bps mid-stream is not supported
[flac] decode_frame() failed
[FFDec] PID OLK_FLAC_96_24_ao.mp4 failed to decode frame PTS 11664128: Invalid data found when processing input
No filter chain found for PID play.svg in filter SVGLoad:Progressive to any loaded filters - NOT CONNECTED
```
Every `[flac]` or `[FFDec]` message in the console corresponds to an audible glitch. I tried `-flat` to see if it might be an interleaving issue, but it didn't make a difference. Something about the way GPAC is muxing the file is causing the FLAC decoder (both here in GPAC and elsewhere) to detect channel mode and bps switches that don't exist in the source .flac file at all.
For comparison, even though ffmpeg complains that FLAC in mp4 is experimental, it seems to work just fine.
```
Q:\OLK>ffmpeg -i One_Last_Kiss.flac -c copy -hide_banner One_Last_Kiss.mp4
Input #0, flac, from 'One_Last_Kiss.flac':
Duration: 00:04:18.43, start: 0.000000, bitrate: 2727 kb/s
Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit)
[mp4 @ 0000027caeee83c0] track 0: codec frame size is not set
[mp4 @ 0000027caeee83c0] flac in MP4 support is experimental, add '-strict -2' if you want to use it.
Could not write header for output file #0 (incorrect codec parameters ?): Experimental feature
Error initializing output stream 0:0 --
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Last message repeated 1 times
Q:\OLK>ffmpeg -i One_Last_Kiss.flac -c copy -strict -2 -hide_banner One_Last_Kiss.mp4
Input #0, flac, from 'One_Last_Kiss.flac':
Duration: 00:04:18.43, start: 0.000000, bitrate: 2727 kb/s
Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit)
[mp4 @ 000001fc816190c0] track 0: codec frame size is not set
Output #0, mp4, to 'One_Last_Kiss.mp4':
Metadata:
encoder : Lavf59.24.100
Stream #0:0: Audio: flac (fLaC / 0x43614C66), 96000 Hz, stereo, s32 (24 bit)
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 86062kB time=00:04:18.43 bitrate=2728.1kbits/s speed=88.2x
video:0kB audio:86036kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.029658%
Q:\OLK>gpac -gui One_Last_Kiss.mp4
Q:\OLK>
```
ffmpeg's file plays through to the end without a single glitch or console message, nor does it cause issues when sent through GPAC dasher.
Using ffmpeg to remux either mp4 back to .flac produces a file with an identical Audio MD5 to the original. | FLAC files not being muxed properly | https://api.github.com/repos/gpac/gpac/issues/2244/comments | 4 | 2022-08-22T22:44:15Z | 2022-09-16T10:47:39Z | https://github.com/gpac/gpac/issues/2244 | 1,347,081,081 | 2,244 |
[
"gpac",
"gpac"
] | - [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [X] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Hello. I have a problem about muxing WEBVTT subtitle to mp4box. On muxed mp4 video using mp4box with WEBVTT won't show the subtitle only in mpv or VLC.
In mkvtoolnix muxed mkv with webvtt, it shows correct subtitle.
See the two screenshots and shared files below:
WEBVTT texts:
```
WEBVTT
00:00.000 --> 00:02.000
Test
```
OS: Windows 11 Pro 21H2
mp4box version: 2.1-DEV-rev259-gfc4749f9-master
mp4box + mkvtoolnix muxed file: https://mega.nz/folder/nxVlgKYZ#HMLcZzKwtVDgIpSAAG6h3Q
mkvtoolnix muxed:

mp4box muxed:

- Martin Eesmaa | Format "wvtt" of WEBVTT subtitle muxed of mp4box won't show subtitle. | https://api.github.com/repos/gpac/gpac/issues/2243/comments | 2 | 2022-08-20T05:59:58Z | 2022-08-25T05:15:36Z | https://github.com/gpac/gpac/issues/2243 | 1,345,066,874 | 2,243 |
[
"gpac",
"gpac"
] | Attempting to generate a live-profile DASH manifest using two xHE-AAC representations that have different frame sizes results in a warning that the segments are not aligned, whereas inspection of the source media files indicates that they are.
Full command that invokes the error:
```
$ /Applications/GPAC.app/Contents/MacOS/MP4Box -dash 5000 -rap -out sintel/live.mpd:dual -profile live -segment-name '$RepresentationID$_$Number%03d$' sintel_12.mp4 sintel_24.mp4
[Dasher] Segments are not aligned across representations: first rep segment duration 4.92263 but new segment duration 6.91955 for the same segment 1
[Dasher] No segment alignment, switching to full profile
[MPD] Generating MPD at time 2022-08-16T10:39:40.544Zsegs)(85.14 %) / MPD 29.26s 98 %.63s 94 %%
[Dasher] End of Period
[Dasher] End of MPD (no more active streams)
```
The media files causing the error are uploaded here:
Representation 1 (12kbit/s): https://www.mediafire.com/file/pm4qg2rmwu868nr/sintel_12.mp4/file
Representation 2 (24kbit/s): https://www.mediafire.com/file/qvrii06n54y0iew/sintel_24.mp4/file
They were generated using a commercial xHE-AAC encoder so unfortunately I cannot give the command that produced them, but using the same build of MP4Box we can see that the random access points are located at exactly the same composition timesamps in both files:
```
$ /Applications/GPAC.app/Contents/MacOS/MP4Box -std -dts sintel_12.mp4 2>/dev/null | awk '$8 == "1" { print $0 }'
Sample 1 DTS 0 CTS 0 339 1 2529 0 0 0 0 0 0 0
Sample 54 DTS 217088 CTS 217088 451 1 10114 0 0 0 0 0 0 0
Sample 108 DTS 438272 CTS 438272 568 1 18061 0 0 0 0 0 0 0
Sample 162 DTS 659456 CTS 659456 518 1 25882 0 0 0 0 0 0 0
Sample 216 DTS 880640 CTS 880640 546 1 33966 0 0 0 0 0 0 0
Sample 270 DTS 1101824 CTS 1101824 559 1 42042 0 0 0 0 0 0 0
Sample 323 DTS 1318912 CTS 1318912 557 1 49770 0 0 0 0 0 0 0
$ /Applications/GPAC.app/Contents/MacOS/MP4Box -std -dts sintel_24.mp4 2>/dev/null | awk '$8 == "1" { print $0 }'
Sample 1 DTS 0 CTS 0 350 1 3821 0 0 0 0 0 0 0
Sample 107 DTS 217088 CTS 217088 516 1 18814 0 0 0 0 0 0 0
Sample 215 DTS 438272 CTS 438272 504 1 34244 0 0 0 0 0 0 0
Sample 323 DTS 659456 CTS 659456 494 1 49724 0 0 0 0 0 0 0
Sample 431 DTS 880640 CTS 880640 504 1 65142 0 0 0 0 0 0 0
Sample 539 DTS 1101824 CTS 1101824 516 1 80491 0 0 0 0 0 0 0
Sample 645 DTS 1318912 CTS 1318912 518 1 95637 0 0 0 0 0 0 0
```
Notice that the "Sample" number is different in each representation because the xHE-AAC encoder uses different frame sizes for different bitrates. Nevertheless, the CTS for each RAP is the same in both files.
Operating system: MacOS 12.5
MP4Box installed from the nightly builds:
```
$ /Applications/GPAC.app/Contents/MacOS/MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev259-gfc4749f9-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --extra-cflags=-Wno-deprecated -Wno-shift-negative-value
Features: GPAC_CONFIG_DARWIN GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FAAD GPAC_HAS_MAD GPAC_HAS_LIBA52 GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_FFMPEG GPAC_HAS_OPENSVC GPAC_HAS_JP2 GPAC_HAS_OPENHEVC GPAC_HAS_THEORA GPAC_HAS_VORBIS GPAC_HAS_XVID
```
Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
| [MP4Box] DASH for xHE-AAC wrongly creates unaligned segments | https://api.github.com/repos/gpac/gpac/issues/2242/comments | 3 | 2022-08-16T10:51:26Z | 2022-09-12T15:58:07Z | https://github.com/gpac/gpac/issues/2242 | 1,340,166,212 | 2,242 |
[
"gpac",
"gpac"
] | Excuse me, I want to ask how to call [session.http_max_rate]on python code
I am referring Advanced example (https://github.com/gpac/gpac/wiki/python#advanced-example)
I want to test my ABS by changing the internet speed indefinitely
| how to call python api(session.http_max_rate=VALUE ) | https://api.github.com/repos/gpac/gpac/issues/2241/comments | 1 | 2022-08-04T07:36:22Z | 2022-09-14T10:16:30Z | https://github.com/gpac/gpac/issues/2241 | 1,328,199,787 | 2,241 |
[
"gpac",
"gpac"
] | [POC](https://github.com/CythZ/fuzzpoc/raw/main/poc-gpac-mergetrack)
**Description:**
heap-buffer-overflow in function MergeTrack;
```c
for (i = 0; i < saiz->sample_count; i++) {
GF_CENCSampleAuxInfo *sai;
const u8 *key_info=NULL;
u32 key_info_size, samp_num;
u64 cur_position;
if (nb_saio != 1)
offset = saio->offsets[i] + moof_offset; //seems like i does not match to the saio->offset's size
```
when I use gdb:
```
pwndbg> telescope saio->offsets-2
00:0000│ 0x5555557e4050 ◂— 0x0
01:0008│ 0x5555557e4058 ◂— 0x21 /* '!' */
02:0010│ 0x5555557e4060 ◂— 0x0
03:0018│ 0x5555557e4068 ◂— 0x0
04:0020│ 0x5555557e4070 ◂— 0x377
05:0028│ 0x5555557e4078 ◂— 0x21 /* '!' */
06:0030│ 0x5555557e4080 —▸ 0x5555557e40a0 —▸ 0x5555557e3ff0 ◂— 0x7361696f /* 'oias' */
07:0038│ 0x5555557e4088 ◂— 0xa00000001
pwndbg> print saiz->sample_count
$12 = 24
```
**Version**
```
MP4Box - GPAC version 2.1-DEV-rev257-g7360c7ed9-master
```
**Reproduce:**
```
$ ./configure --enable-sanitizer
$ make
$ ./MP4Box -xmt poc
```
**ASAN report:**
```
==23129==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6030000015e8 at pc 0x7f209ff6b4b2 bp 0x7ffc3965a7e0 sp 0x7ffc3965a7d0
READ of size 8 at 0x6030000015e8 thread T0
#0 0x7f209ff6b4b1 in MergeTrack isomedia/track.c:1090
#1 0x7f209fe562d2 in MergeFragment isomedia/isom_intern.c:92
#2 0x7f209fe59527 in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:714
#3 0x7f209fe5dd9b in gf_isom_parse_movie_boxes isomedia/isom_intern.c:860
#4 0x7f209fe5dd9b in gf_isom_open_file isomedia/isom_intern.c:980
#5 0x55b116848c74 in mp4box_main /home//out/gpac/applications/mp4box/mp4box.c:6181
#6 0x7f209d8a6c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
#7 0x55b116829669 in _start (/home//out/gpac/bin/gcc/MP4Box+0x84669)
0x6030000015e8 is located 0 bytes to the right of 24-byte region [0x6030000015d0,0x6030000015e8)
allocated by thread T0 here:
#0 0x7f20a27feb40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
#1 0x7f209fdd52f3 in saio_box_read isomedia/box_code_base.c:10378
#2 0x7f209fe30149 in gf_isom_box_read isomedia/box_funcs.c:1860
#3 0x7f209fe30149 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#4 0x7f209fe35d0a in gf_isom_box_array_read isomedia/box_funcs.c:1753
#5 0x7f209fdbca0e in traf_box_read isomedia/box_code_base.c:6342
#6 0x7f209fe30149 in gf_isom_box_read isomedia/box_funcs.c:1860
#7 0x7f209fe30149 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#8 0x7f209fe35d0a in gf_isom_box_array_read isomedia/box_funcs.c:1753
#9 0x7f209fe31ac7 in gf_isom_box_read isomedia/box_funcs.c:1860
#10 0x7f209fe31ac7 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#11 0x7f209fe3272c in gf_isom_parse_root_box isomedia/box_funcs.c:38
#12 0x7f209fe57f34 in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:373
#13 0x7f209fe5dd9b in gf_isom_parse_movie_boxes isomedia/isom_intern.c:860
#14 0x7f209fe5dd9b in gf_isom_open_file isomedia/isom_intern.c:980
#15 0x55b116848c74 in mp4box_main /home//out/gpac/applications/mp4box/mp4box.c:6181
#16 0x7f209d8a6c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
SUMMARY: AddressSanitizer: heap-buffer-overflow isomedia/track.c:1090 in MergeTrack
Shadow bytes around the buggy address:
0x0c067fff8260: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 02
0x0c067fff8270: fa fa 00 00 00 fa fa fa fd fd fd fa fa fa fd fd
0x0c067fff8280: fd fd fa fa fd fd fd fa fa fa 00 00 00 fa fa fa
0x0c067fff8290: 00 00 04 fa fa fa fd fd fd fd fa fa 00 00 00 00
0x0c067fff82a0: fa fa 00 00 00 03 fa fa 00 00 00 00 fa fa 00 00
=>0x0c067fff82b0: 00 00 fa fa 00 00 04 fa fa fa 00 00 00[fa]fa fa
0x0c067fff82c0: 00 00 00 00 fa fa 00 00 00 fa fa fa 00 00 00 00
0x0c067fff82d0: fa fa 00 00 00 fa fa fa 00 00 00 00 fa fa 00 00
0x0c067fff82e0: 00 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff82f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fff8300: 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
==23129==ABORTING
``` | heap-buffer-overflow in function MergeTrack | https://api.github.com/repos/gpac/gpac/issues/2240/comments | 0 | 2022-08-01T07:05:53Z | 2022-09-12T09:36:21Z | https://github.com/gpac/gpac/issues/2240 | 1,323,933,263 | 2,240 |
[
"gpac",
"gpac"
] | Hello,
My goal is to be able to build GPAC on my own for an Android version that I have available following the guide on the wiki https://github.com/gpac/gpac/wiki/GPAC-Build-Guide-for-Android. However, I'm facing problems running the gpac version built on my own. So I took a step back to have at least one version running correctly before do my changes.
Therefore, I am trying to run GPAC on Android using the nightly version `gpac-2.1-DEV-latest-master`. I have already tried on a phone with Android API 31 and an Android API 28 via Android Studio Emulator. On both cases the app just crashes while trying to use the "_Open URL_" function.
The URL that I'm trying to open contains a HEVC DASH-SRD manifest and can be found [here](https://www.mediafire.com/file/l4rydewrvwlubrt/new_york_tile_lost.mpd/file.)
I've also tried with an URL with a MP4 video and the same thing happened.
Using the Logcat tool from Android Studio it can be seen a few informations of what is happening
```
21:41:07.655 3329-3405/io.gpac.gpac D/EGL_emulation: eglMakeCurrent: 0xdb2eea40: ver 3 1 (tinfo 0xe2fdfaa0)
2022-07-31 21:41:07.662 3329-3405/io.gpac.gpac D/OpenGLRenderer: endAllActiveAnimators on 0xc4b34680 (RippleDrawable) with handle 0xbbe49c80
2022-07-31 21:41:07.818 3329-3431/io.gpac.gpac E/GPAC: Failed to rename /data/user/0/io.gpac.gpac/GPAC/history_urls.tmp to /data/user/0/io.gpac.gpac/GPAC/history_urls
2022-07-31 21:41:07.894 3329-3405/io.gpac.gpac D/EGL_emulation: eglMakeCurrent: 0xdb2eea40: ver 3 1 (tinfo 0xe2fdfaa0)
2022-07-31 21:41:07.985 3329-3433/io.gpac.gpac I/GPAC: connect(http://xxxxxxxx/hevc_tiles_mp4/new_york_tile_lost.mpd)
2022-07-31 21:41:09.026 3329-3433/io.gpac.gpac D/EGL_emulation: eglMakeCurrent: 0xc8187960: ver 3 1 (tinfo 0xded31b40)
2022-07-31 21:41:09.028 3329-3433/io.gpac.gpac I/GPACRenderer: Surface changed from thread Thread[GLThread 144,5,main]
2022-07-31 21:41:09.028 3329-3433/io.gpac.gpac I/GPAC: Resizing to 1440x2560
2022-07-31 21:41:09.643 3329-3329/io.gpac.gpac I/Choreographer: Skipped 96 frames! The application may be doing too much work on its main thread.
2022-07-31 21:41:09.650 3329-3405/io.gpac.gpac I/OpenGLRenderer: Davey! duration=1703ms; Flags=0, IntendedVsync=125078111465, Vsync=125144778129, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=125156307760, AnimationStart=125156352470, PerformTraversalsStart=125157470920, DrawStart=126773470150, SyncQueued=126774217400, SyncStart=126774387190, IssueDrawCommandsStart=126774729420, SwapBuffers=126780268330, FrameCompleted=126781385840, DequeueBufferDuration=123000, QueueBufferDuration=318000,
2022-07-31 21:41:10.170 3329-3461/io.gpac.gpac W/VideoCapabilities: Unrecognized profile 4 for video/hevc
2022-07-31 21:41:10.184 3329-3461/io.gpac.gpac I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
2022-07-31 21:41:10.187 3329-3461/io.gpac.gpac E/io.gpac.gpac: JNI ERROR (app bug): accessed stale Global 0xdf45939e (index 234117433 in a table of size 696)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] JNI DETECTED ERROR IN APPLICATION: use of deleted global reference 0xdf45939e
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] "Thread-5" prio=5 tid=24 Runnable
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] | group="main" sCount=0 dsCount=0 flags=0 obj=0x14900000 self=0xc77fb600
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] | sysTid=3461 nice=0 cgrp=default sched=0/0 handle=0xbeb2a970
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] | state=R schedstat=( 62161620 288644477 285 ) utm=3 stm=3 core=0 HZ=100
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] | stack=0xbea2f000-0xbea31000 stackSize=1010KB
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] | held mutexes= "mutator lock"(shared held)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #00 pc 004151b6 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+198)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #01 pc 0051034e /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+382)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #02 pc 0050b603 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+83)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #03 pc 0031a720 /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1088)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #04 pc 0031ac35 /system/lib/libart.so (art::JavaVMExt::JniAbortF(char const*, char const*, ...)+117)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #05 pc 00516b37 /system/lib/libart.so (art::Thread::DecodeJObject(_jobject*) const+871)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #06 pc 000d53d9 /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::CheckInstance(art::ScopedObjectAccess&, art::(anonymous namespace)::ScopedCheck::InstanceKind, _jobject*, bool)+153)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #07 pc 000d4637 /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::CheckPossibleHeapValue(art::ScopedObjectAccess&, char, art::(anonymous namespace)::JniValueType)+551)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #08 pc 000d3a5b /system/lib/libart.so (art::(anonymous namespace)::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::(anonymous namespace)::JniValueType*)+811)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #09 pc 000d76f6 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::DeleteRef(char const*, _JNIEnv*, _jobject*, art::IndirectRefKind)+918)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #10 pc 000c020b /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::DeleteLocalRef(_JNIEnv*, _jobject*)+43)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #11 pc 004de89f /data/app/io.gpac.gpac-hbpicUWWbweo3t3tZzDRIg==/lib/x86/libgpac.so (mcdec_find_decoder+783)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #12 pc 004dd848 /data/app/io.gpac.gpac-hbpicUWWbweo3t3tZzDRIg==/lib/x86/libgpac.so (???)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #13 pc 004dd5fa /data/app/io.gpac.gpac-hbpicUWWbweo3t3tZzDRIg==/lib/x86/libgpac.so (???)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #14 pc 00480585 /data/app/io.gpac.gpac-hbpicUWWbweo3t3tZzDRIg==/lib/x86/libgpac.so (???)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #15 pc 00487502 /data/app/io.gpac.gpac-hbpicUWWbweo3t3tZzDRIg==/lib/x86/libgpac.so (???)
2022-07-31 21:41:10.310 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #16 pc 0049aeb5 /data/app/io.gpac.gpac-hbpicUWWbweo3t3tZzDRIg==/lib/x86/libgpac.so (???)
2022-07-31 21:41:10.311 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #17 pc 009be9ef /data/app/io.gpac.gpac-hbpicUWWbweo3t3tZzDRIg==/lib/x86/libgpac.so (RunThread+255)
2022-07-31 21:41:10.311 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #18 pc 0008f065 /system/lib/libc.so (__pthread_start(void*)+53)
2022-07-31 21:41:10.311 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] native: #19 pc 0002485b /system/lib/libc.so (__start_thread+75)
2022-07-31 21:41:10.311 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545] (no managed stack frames)
2022-07-31 21:41:10.311 3329-3461/io.gpac.gpac A/io.gpac.gpac: java_vm_ext.cc:545]
2022-07-31 21:41:10.861 3329-3461/io.gpac.gpac A/io.gpac.gpac: runtime.cc:558] Runtime aborting...
```
The whole log can be found [here](https://www.mediafire.com/file/sougqjmlbw58voj/gpac_URL.log/file)
Can someone help me with this? It seems to be a problem with the libraries, but I am not really sure what it can be done.
Maybe I am not using the app correctly. I've also tried to run the URL Manifest in the "_Run gpac_" function running the command as I would on the PC, but it is not recognizing the `vout` filter as follows:
`-i http://xxxxxxxx/hevc_tiles_mp4/new_york_tile_lost.mpd vout`
The gpac that I've compiled have other problems that it is worth to have its own issue related to it. However, having a stable gpac android version is my highest priority.
I really appreciate any help on this case!
Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
| Android nightly version crashes using "Open URL" function | https://api.github.com/repos/gpac/gpac/issues/2239/comments | 2 | 2022-08-01T02:05:06Z | 2022-09-28T14:32:24Z | https://github.com/gpac/gpac/issues/2239 | 1,323,693,033 | 2,239 |
[
"gpac",
"gpac"
] | [POC](https://cdn.discordapp.com/attachments/1002845697801977896/1002848643759493230/recursion)
```
It can cause Denial-of-service attack.
Version
root@ubuntu:~/gpac/.git# cat refs/heads/master
0102c5d4db7fdbf08b5b591b2a6264de33867a07
system stack size (default)
root@ubuntu:~/gpac/bin/gcc# ulimit -s
8192
Execute
root@ubuntu:~/gpac/bin/gcc# ./MP4Box -info -disox -dump-chap-ogg -dump-cover -drtp -x3dv -out /dev/null ./recursion
[iso file] Unknown box type FF0000 in parent moov
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80000 in parent moov
[iso file] Incomplete box mdat - start 11495 size 808395597
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] Unknown box type FF0000 in parent moov
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80000 in parent moov
[iso file] Incomplete box mdat - start 11495 size 808395597
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
Segmentation fault
GDB
#1 ...
#7880 0x00007ffff6cdbf19 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:466
#7881 0x00007ffff6cdc6c7 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:658
#7882 0x00007ffff6cdc89f in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:568
#7883 0x00007ffff6cdcc25 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:544
#7884 0x00007ffff6cdbf19 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:466
#7885 0x00007ffff6cdc6c7 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:658
#7886 0x00007ffff6cdc89f in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:568
#7887 0x00007ffff6cdcc25 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:544
#7888 0x00007ffff6cdbf19 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:466
#7889 0x00007ffff6cdc6c7 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:658
#7890 0x00007ffff6cdc89f in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:568
#7891 0x00007ffff6cdcc25 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:544
#7892 0x00007ffff6cdbf19 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:466
#7893 0x00007ffff6cdc6c7 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:658
#7894 0x00007ffff6cdc89f in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:568
#7895 0x00007ffff6cdcc25 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:544
#7896 0x00007ffff6cdbf19 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:466
#7897 0x00007ffff6cdc6c7 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:658
#7898 0x00007ffff6cdc89f in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:568
#7899 0x00007ffff6cdcc25 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:544
#7900 0x00007ffff6cdbf19 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:466
#7901 0x00007ffff6cdc6c7 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:658
#7902 0x00007ffff6cdc89f in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:568
#7903 0x00007ffff6cdcc25 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:544
#7904 0x00007ffff6cdbf19 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:466
#7905 0x00007ffff6cdc6c7 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:658
#7906 0x00007ffff6cdc89f in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:568
#7907 0x00007ffff6cdcc25 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:544
#7908 0x00007ffff6cdbf19 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:466
#7909 0x00007ffff6cdc6c7 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:658
#7910 0x00007ffff6cdc89f in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:568
#7911 0x00007ffff6cdcc25 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:544
#7912 0x00007ffff6cdbf19 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:466
#7913 0x00007ffff6cdc6c7 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:658
#7914 0x00007ffff6cdc89f in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:568
#7915 0x00007ffff6cdcc25 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:544
#7916 0x00007ffff6cdbf19 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:466
#7917 0x00007ffff6cdc6c7 in SFS_Expression (parser=0x7fffffff6f30) at bifs/script_dec.c:658
#7918 0x00007ffff6cdb61c in SFS_CompoundExpression (parser=0x7fffffff6f30) at bifs/script_dec.c:419
#7919 0x00007ffff6cdaed3 in SFS_IfStatement (parser=0x7fffffff6f30) at bifs/script_dec.c:334
#7920 0x00007ffff6cdac78 in SFS_Statement (parser=0x7fffffff6f30) at bifs/script_dec.c:303
#7921 0x00007ffff6cdab2c in SFS_StatementBlock (parser=0x7fffffff6f30, funcBody=GF_TRUE) at bifs/script_dec.c:287
#7922 0x00007ffff6cd9f01 in SFScript_Parse (codec=<optimized out>, script_field=0x8e1740, bs=0x8cded0, n=<optimized out>) at bifs/script_dec.c:210
#7923 0x00007ffff6cc5563 in gf_bifs_dec_sf_field (codec=0x8de970, bs=0x8cded0, node=0x8e1850, field=0x7fffffff7060, is_mem_com=GF_FALSE) at bifs/field_decode.c:277
#7924 0x00007ffff6cc9156 in BD_DecMFFieldVec (codec=0x8de970, bs=0x8cded0, node=0x8e1850, field=0x7fffffff7130, is_mem_com=<optimized out>) at bifs/field_decode.c:427
#7925 0x00007ffff6cc9a74 in gf_bifs_dec_field (codec=0x8de970, bs=0x8cded0, node=0x8e1850, field=0x7fffffff7130, is_mem_com=GF_FALSE) at bifs/field_decode.c:566
#7926 0x00007ffff6cca419 in gf_bifs_dec_node_list (codec=0x8de970, bs=0x8cded0, node=0x8e1850, is_proto=<optimized out>) at bifs/field_decode.c:626
#7927 0x00007ffff6cc8130 in gf_bifs_dec_node (codec=0x51, bs=<optimized out>, NDT_Tag=<optimized out>) at bifs/field_decode.c:928
#7928 0x00007ffff6cc8daa in BD_DecMFFieldVec (codec=0x8de970, bs=0x8cded0, node=0x8e17c0, field=0x7fffffff7720, is_mem_com=GF_FALSE) at bifs/field_decode.c:436
#7929 0x00007ffff6cc9a74 in gf_bifs_dec_field (codec=0x8de970, bs=0x8cded0, node=0x8e17c0, field=0x7fffffff7720, is_mem_com=GF_FALSE) at bifs/field_decode.c:566
#7930 0x00007ffff6cca419 in gf_bifs_dec_node_list (codec=0x8de970, bs=0x8cded0, node=0x8e17c0, is_proto=<optimized out>) at bifs/field_decode.c:626
#7931 0x00007ffff6cc8130 in gf_bifs_dec_node (codec=0x37, bs=<optimized out>, NDT_Tag=<optimized out>) at bifs/field_decode.c:928
#7932 0x00007ffff6cb5067 in BD_DecSceneReplace (codec=0x8de970, bs=0x8cded0, proto_list=<optimized out>) at bifs/com_dec.c:1357
#7933 0x00007ffff6cd6043 in BM_SceneReplace (codec=0x8de970, bs=0x6, com_list=0x8ded30) at bifs/memory_decoder.c:867
#7934 0x00007ffff6cd6556 in BM_ParseCommand (codec=0x8de970, bs=0x8cded0, com_list=0x8ded30) at bifs/memory_decoder.c:917
#7935 0x00007ffff6cd7075 in gf_bifs_decode_command_list (codec=0x8de970, ESID=<optimized out>,
data=0x8dedb0 "\314\314", '\060' <repeats 169 times>, "\020", '\060' <repeats 28 times>..., data_length=0x2010, com_list=0x8ded30) at bifs/memory_decoder.c:1038
#7936 0x00007ffff70b378e in gf_sm_load_run_isom (load=0x7fffffff8660) at scene_manager/loader_isom.c:303
#7937 0x00007ffff70765ab in gf_sm_load_run (load=0x7fffffff8660) at scene_manager/scene_manager.c:719
#7938 0x0000000000443136 in dump_isom_scene (file=<optimized out>, inName=0x7fffffffe754 "/dev/null", is_final_name=GF_TRUE, dump_mode=GF_SM_DUMP_X3D_VRML,
do_log=<optimized out>, no_odf_conv=<optimized out>) at filedump.c:203
#7939 0x0000000000434038 in mp4box_main (argc=<optimized out>, argv=<optimized out>) at mp4box.c:6344
#7940 0x00007ffff657ec87 in __libc_start_main (main=0x4410a0 <main>, argc=0xa, argv=0x7fffffffe488, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7fffffffe478) at ../csu/libc-start.c:310
#7941 0x00000000004103fa in _start
Impact
DoS
Occurrences
script_dec.c L434
``` | Segmentation Fault in SFS_Expression | https://api.github.com/repos/gpac/gpac/issues/2238/comments | 0 | 2022-07-31T11:07:37Z | 2022-09-12T08:54:24Z | https://github.com/gpac/gpac/issues/2238 | 1,323,430,649 | 2,238 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
This is some feature suggest concerning output message from MP4Box
Error output saved to a mariadb column of type text reveal ANSI, an example error:
```
[33m[Importer] Cannot load filter for input file "/dash/3_644495.vtt:lang:fre"
[0m[31mFailure while importing media: Requested URL is not valid or cannot be found
[0m[31mError importing /dash/3_644495.vtt:lang:fre: Requested URL is not valid or cannot be found
[0m
```
Progress statistiques parsing the output of the following command to show progress:
```
/usr/bin/MP4Box -dash 4000 -frag 4000 -rap -fps 24 ...
```
which produce
```
[Dasher] No template assigned, using $File$$FS$_dash
[MPD] Generating MPD at time 2022-07-29T14:26:59.022Z(2367 segs) AS#3.1(A) done (2367 segs) seg #2344 0.29s (7.20 %) / MPD 9372.54s 99 % %
[Dasher] End of Period
[Dasher] End of MPD (no more active streams)
```
is not possible.
The following is perfect:
```
/usr/bin/MP4Box -crypt drm.xml in.mp4 -out out.mp4
```
Output this clean one line updated
```
Encrypting: 100.00 %
```
To summarize, an option to show only errors and stats to command line would be very nice.
ffmpeg have options to do exactly that
```
ffmpeg ... -v error -stats
```
Hope this make sense
Best,
| Parsing output and saving error output to database | https://api.github.com/repos/gpac/gpac/issues/2237/comments | 1 | 2022-07-29T15:25:37Z | 2022-09-28T17:01:03Z | https://github.com/gpac/gpac/issues/2237 | 1,322,385,756 | 2,237 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
| Below is my requirement:If I change my 360 degree view to any direction(right/left/up/down) while navigating, then is it possible to find out from the log files that there is a change in field of view(FoV)? If possible, then can you please guide me on how to extract the statements from the log which says that there is change in "field of view". | https://api.github.com/repos/gpac/gpac/issues/2236/comments | 1 | 2022-07-29T10:45:39Z | 2022-09-12T09:57:25Z | https://github.com/gpac/gpac/issues/2236 | 1,322,081,984 | 2,236 |
[
"gpac",
"gpac"
] | This is not an issue, just a quick question.
I have local videos which are considered different qualities for the same video, and I want to package them in HLS and Dash.
I was able to successfully generate both of them but without any URL to host from.
I read your wiki and tried to do so, but I encountered issues and the m3u8 did not have the host URL
I saw
[DASH Low Latency](https://github.com/gpac/gpac/wiki/dash_low_latency)
[HLS Low Latency](https://github.com/gpac/gpac/wiki/llhls)
I suspect that the commands used in for example (DASH Low Latency) are for live video encoding | [Question] How to insert my website url to M3U8 and MPD files ? | https://api.github.com/repos/gpac/gpac/issues/2235/comments | 9 | 2022-07-27T12:34:26Z | 2022-07-29T11:31:10Z | https://github.com/gpac/gpac/issues/2235 | 1,319,499,398 | 2,235 |
[
"gpac",
"gpac"
] | Your build scripts are a bit complicated and I am hoping for some guidance. Here is a Dockerfile which shows exactly how I am building gpac:
```Dockerfile
FROM fedora:29
RUN dnf group install -y "C Development Tools and Libraries" "Development Tools"
RUN dnf install -y zlib-devel
RUN mkdir -p /var/repo
WORKDIR /var/repo
RUN git clone https://github.com/gpac/gpac.git -b v2.0.0
WORKDIR /var/repo/gpac
RUN ./configure --static-bin
RUN make
```
Basically I cannot get past this error.
```
make[2]: Entering directory '/var/repo/gpac/applications/gpac'
CC gpac.c
CC compositor_tools.c
CC gpac_help.c
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lz
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lz
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
```
I am **guessing** that it is trying to static link with some `glibc` libraries which is generally discouraged (for good reasons). You probably want to be linking dynamically to all of `glibc`, then statically to everything else. I wrestled with your build scripts for a couple hours and I couldn't figure it out.
Extra info:
* The fedora build succeeds when I remove `--static-bin`
* I tried 2 other branches of gpac:
* `master` also has the error
* `v1.0.1` does not have the error
| Problems building on fedora with --static-bin | https://api.github.com/repos/gpac/gpac/issues/2234/comments | 2 | 2022-07-27T02:13:35Z | 2022-07-27T16:14:37Z | https://github.com/gpac/gpac/issues/2234 | 1,318,933,417 | 2,234 |
[
"gpac",
"gpac"
] | Hey folks, Im using the latest nightly build (2.1-DEV-rev254-g0102c5d4-master) where I try to convert a HLS m3u8 adaptive stream manifest to a DASH mpd manifest using the following command:
`MP4Box -mpd master.m3u8 -out master.mpd`
The problem here seems that MP4Box does not seem to respect that all representations stored are in a seperated folders, This is the mpd I get back from my command:
```
<?xml version="1.0"?>
<!-- MPD file Generated with GPAC version 2.1-DEV-rev254-g0102c5d4-master at 1970-01-01T00:00:00.000Z -->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" id="master.m3u8" minBufferTime="PT1.500S" type="static" mediaPresentationDuration="PT0H0M31.000S" profiles="urn:mpeg:dash:profile:isoff-main:2011">
<ProgramInformation moreInformationURL="http://gpac.io">
<Title>v-h264-480p-avc1.42001f/master.m3u8</Title>
<Source>Generated from URL master.m3u8</Source>
<Copyright>Generated by GPAC 2.1-DEV-rev254-g0102c5d4-master</Copyright>
</ProgramInformation>
<Period duration="PT0H0M31.000S">
<AdaptationSet segmentAlignment="true" lang=""Deutsch">
<Representation id="R1_1" mimeType="video/mp2t" codecs="ec-3" audioSamplingRate="48000" bandwidth="128000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-eac3-de-ec-3_384000.m4s"/>
<SegmentTimeline>
<S t="0" d="9024"/>
<S d="8992"/>
<S d="8992"/>
<S d="3008"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="9024"/>
<SegmentURL media="f-0001.m4s" duration="8992"/>
<SegmentURL media="f-0002.m4s" duration="8992"/>
<SegmentURL media="f-0003.m4s" duration="3008"/>
</SegmentList>
</Representation>
<Representation id="R1_2" mimeType="video/mp2t" codecs="ec-3" audioSamplingRate="48000" bandwidth="128000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-eac3-en-ec-3_384000.m4s"/>
<SegmentTimeline>
<S t="0" d="9024"/>
<S d="8992"/>
<S d="8992"/>
<S d="2976"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="9024"/>
<SegmentURL media="f-0001.m4s" duration="8992"/>
<SegmentURL media="f-0002.m4s" duration="8992"/>
<SegmentURL media="f-0003.m4s" duration="2976"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" lang=""English">
<Representation id="R2_1" mimeType="video/mp2t" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="128000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-aac-en-mp4a.40.2_256000.m4s"/>
<SegmentTimeline>
<S t="0" d="9002"/>
<S d="9002"/>
<S d="9002"/>
<S d="3018"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="9002"/>
<SegmentURL media="f-0001.m4s" duration="9002"/>
<SegmentURL media="f-0002.m4s" duration="9002"/>
<SegmentURL media="f-0003.m4s" duration="3018"/>
</SegmentList>
</Representation>
<Representation id="R2_2" mimeType="video/mp2t" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="128000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-aac-de-mp4a.40.2_256000.m4s"/>
<SegmentTimeline>
<S t="0" d="9002"/>
<S d="9002"/>
<S d="9002"/>
<S d="3050"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="9002"/>
<SegmentURL media="f-0001.m4s" duration="9002"/>
<SegmentURL media="f-0002.m4s" duration="9002"/>
<SegmentURL media="f-0003.m4s" duration="3050"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" lang=""English">
<Representation id="R3_1" mimeType="video/mp2t" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="128000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-aac-en-mp4a.40.2_128000.m4s"/>
<SegmentTimeline>
<S t="0" d="9002"/>
<S d="9002"/>
<S d="9002"/>
<S d="3018"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="9002"/>
<SegmentURL media="f-0001.m4s" duration="9002"/>
<SegmentURL media="f-0002.m4s" duration="9002"/>
<SegmentURL media="f-0003.m4s" duration="3018"/>
</SegmentList>
</Representation>
<Representation id="R3_2" mimeType="video/mp2t" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="128000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-aac-de-mp4a.40.2_128000.m4s"/>
<SegmentTimeline>
<S t="0" d="9002"/>
<S d="9002"/>
<S d="9002"/>
<S d="3050"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="9002"/>
<SegmentURL media="f-0001.m4s" duration="9002"/>
<SegmentURL media="f-0002.m4s" duration="9002"/>
<SegmentURL media="f-0003.m4s" duration="3050"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" lang=""English">
<Representation id="R4_1" mimeType="video/mp2t" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="128000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-aac_he-en-mp4a.40.5_96000.m4s"/>
<SegmentTimeline>
<S t="0" d="9002"/>
<S d="9002"/>
<S d="9002"/>
<S d="3018"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="9002"/>
<SegmentURL media="f-0001.m4s" duration="9002"/>
<SegmentURL media="f-0002.m4s" duration="9002"/>
<SegmentURL media="f-0003.m4s" duration="3018"/>
</SegmentList>
</Representation>
<Representation id="R4_2" mimeType="video/mp2t" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="128000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-aac_he-de-mp4a.40.5_96000.m4s"/>
<SegmentTimeline>
<S t="0" d="9002"/>
<S d="9002"/>
<S d="9002"/>
<S d="3050"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="9002"/>
<SegmentURL media="f-0001.m4s" duration="9002"/>
<SegmentURL media="f-0002.m4s" duration="9002"/>
<SegmentURL media="f-0003.m4s" duration="3050"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" lang=""English">
<Representation id="R5_1" mimeType="video/mp2t" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="128000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-aac_he_v2-en-mp4a.40.5_64000.m4s"/>
<SegmentTimeline>
<S t="0" d="9002"/>
<S d="9002"/>
<S d="9002"/>
<S d="3018"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="9002"/>
<SegmentURL media="f-0001.m4s" duration="9002"/>
<SegmentURL media="f-0002.m4s" duration="9002"/>
<SegmentURL media="f-0003.m4s" duration="3018"/>
</SegmentList>
</Representation>
<Representation id="R5_2" mimeType="video/mp2t" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="128000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" startNumber="0" duration="9000">
<Initialization sourceURL="init-a-aac_he_v2-de-mp4a.40.5_64000.m4s"/>
<SegmentTimeline>
<S t="0" d="9002"/>
<S d="9002"/>
<S d="9002"/>
<S d="3050"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="9002"/>
<SegmentURL media="f-0001.m4s" duration="9002"/>
<SegmentURL media="f-0002.m4s" duration="9002"/>
<SegmentURL media="f-0003.m4s" duration="3050"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true" lang=""Deutsch">
<Representation id="R6_1" mimeType="video/mp2t" codecs="wvtt">
<SegmentList timescale="1000" startNumber="0" duration="31000">
<SegmentURL media="subs.vtt"/>
</SegmentList>
</Representation>
<Representation id="R6_2" mimeType="video/mp2t" codecs="wvtt">
<SegmentList timescale="1000" startNumber="0" duration="31000">
<SegmentURL media="subs.vtt"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet segmentAlignment="true">
<Representation id="R7_1" mimeType="video/mp2t" codecs="avc1.640029,ec-3" width="1920" height="1080" bandwidth="7343001">
<SegmentList timescale="1000" startNumber="0" duration="10000">
<Initialization sourceURL="init-v-h264-1080p-avc1.640029.m4s"/>
<SegmentTimeline>
<S t="0" d="10010"/>
<S d="8007"/>
<S d="10010"/>
<S d="2001"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="10010"/>
<SegmentURL media="f-0001.m4s" duration="8007"/>
<SegmentURL media="f-0002.m4s" duration="10010"/>
<SegmentURL media="f-0003.m4s" duration="2001"/>
</SegmentList>
</Representation>
<Representation id="R7_2" mimeType="video/mp2t" codecs="avc1.4d0028,ec-3" width="1280" height="720" bandwidth="3882700">
<SegmentList timescale="1000" startNumber="0" duration="10000">
<Initialization sourceURL="init-v-h264-720p-avc1.4d0028.m4s"/>
<SegmentTimeline>
<S t="0" d="10010"/>
<S d="8007"/>
<S d="10010"/>
<S d="2001"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="10010"/>
<SegmentURL media="f-0001.m4s" duration="8007"/>
<SegmentURL media="f-0002.m4s" duration="10010"/>
<SegmentURL media="f-0003.m4s" duration="2001"/>
</SegmentList>
</Representation>
<Representation id="R7_3" mimeType="video/mp2t" codecs="avc1.42001f,ec-3" width="640" height="360" bandwidth="2152550">
<SegmentList timescale="1000" startNumber="0" duration="10000">
<Initialization sourceURL="init-v-h264-480p-avc1.42001f.m4s"/>
<SegmentTimeline>
<S t="0" d="10010"/>
<S d="8007"/>
<S d="10010"/>
<S d="2001"/>
</SegmentTimeline>
<SegmentURL media="f-0000.m4s" duration="10010"/>
<SegmentURL media="f-0001.m4s" duration="8007"/>
<SegmentURL media="f-0002.m4s" duration="10010"/>
<SegmentURL media="f-0003.m4s" duration="2001"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>
```
Where my folder structure looks like this:

And my master.m3u8 I use as Input like that:
```
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-PLAYLIST-TYPE VOD
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-0",NAME="Deutsch",CHANNELS="6",LANGUAGE="Deutsch",URI="a-eac3-de-ec-3_384000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-0",NAME="English",CHANNELS="6",LANGUAGE="English",URI="a-eac3-en-ec-3_384000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-3",NAME="English",CHANNELS="2",LANGUAGE="English",URI="a-aac-en-mp4a.40.2_256000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-3",NAME="Deutsch",CHANNELS="2",LANGUAGE="Deutsch",URI="a-aac-de-mp4a.40.2_256000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-4",NAME="English",CHANNELS="2",LANGUAGE="English",URI="a-aac-en-mp4a.40.2_128000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-4",NAME="Deutsch",CHANNELS="2",LANGUAGE="Deutsch",URI="a-aac-de-mp4a.40.2_128000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-5",NAME="English",CHANNELS="2",LANGUAGE="English",URI="a-aac_he-en-mp4a.40.5_96000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-5",NAME="Deutsch",CHANNELS="2",LANGUAGE="Deutsch",URI="a-aac_he-de-mp4a.40.5_96000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-6",NAME="English",CHANNELS="2",LANGUAGE="English",URI="a-aac_he_v2-en-mp4a.40.5_64000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-6",NAME="Deutsch",CHANNELS="2",LANGUAGE="Deutsch",URI="a-aac_he_v2-de-mp4a.40.5_64000/master.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="s-0",NAME="Deutsch",FORCED="NO",LANGUAGE="Deutsch",URI="s-vtt-de/master.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="s-0",NAME="English",FORCED="NO",LANGUAGE="English",URI="s-vtt-en/master.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=7343001,RESOLUTION=1920x1080,CODECS="avc1.640029,ec-3",AUDIO="a-0",SUBTITLES="s-0"
v-h264-1080p-avc1.640029/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=7202201,RESOLUTION=1920x1080,CODECS="avc1.640029,mp4a.40.2",AUDIO="a-3",SUBTITLES="s-0"
v-h264-1080p-avc1.640029/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=7061401,RESOLUTION=1920x1080,CODECS="avc1.640029,mp4a.40.2",AUDIO="a-4",SUBTITLES="s-0"
v-h264-1080p-avc1.640029/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=7026201,RESOLUTION=1920x1080,CODECS="avc1.640029,mp4a.40.5",AUDIO="a-5",SUBTITLES="s-0"
v-h264-1080p-avc1.640029/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=6991001,RESOLUTION=1920x1080,CODECS="avc1.640029,mp4a.40.5",AUDIO="a-6",SUBTITLES="s-0"
v-h264-1080p-avc1.640029/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3882700,RESOLUTION=1280x720,CODECS="avc1.4d0028,ec-3",AUDIO="a-0",SUBTITLES="s-0"
v-h264-720p-avc1.4d0028/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3741900,RESOLUTION=1280x720,CODECS="avc1.4d0028,mp4a.40.2",AUDIO="a-3",SUBTITLES="s-0"
v-h264-720p-avc1.4d0028/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3601100,RESOLUTION=1280x720,CODECS="avc1.4d0028,mp4a.40.2",AUDIO="a-4",SUBTITLES="s-0"
v-h264-720p-avc1.4d0028/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3565900,RESOLUTION=1280x720,CODECS="avc1.4d0028,mp4a.40.5",AUDIO="a-5",SUBTITLES="s-0"
v-h264-720p-avc1.4d0028/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3530700,RESOLUTION=1280x720,CODECS="avc1.4d0028,mp4a.40.5",AUDIO="a-6",SUBTITLES="s-0"
v-h264-720p-avc1.4d0028/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2152550,RESOLUTION=640x360,CODECS="avc1.42001f,ec-3",AUDIO="a-0",SUBTITLES="s-0"
v-h264-480p-avc1.42001f/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2011750,RESOLUTION=640x360,CODECS="avc1.42001f,mp4a.40.2",AUDIO="a-3",SUBTITLES="s-0"
v-h264-480p-avc1.42001f/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1870950,RESOLUTION=640x360,CODECS="avc1.42001f,mp4a.40.2",AUDIO="a-4",SUBTITLES="s-0"
v-h264-480p-avc1.42001f/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1835750,RESOLUTION=640x360,CODECS="avc1.42001f,mp4a.40.5",AUDIO="a-5",SUBTITLES="s-0"
v-h264-480p-avc1.42001f/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1800550,RESOLUTION=640x360,CODECS="avc1.42001f,mp4a.40.5",AUDIO="a-6",SUBTITLES="s-0"
v-h264-480p-avc1.42001f/master.m3u8
```
If I now check the line that says: #EXT-X-STREAM-INF:BANDWIDTH=7343001,RESOLUTION=1920x1080,CODECS ...v-h264-1080p-avc1.640029/master.m3u8
I can clearly see that there is a refrence to a folder, where is that folder reference translated at the mpd output? To me it seems they are simply getting ignored, it's not there. Result is that VideoJS is not able to play the stream at all where the m3u8/HLS stream works fine.
Any way to correct this?
Besides I see that mimeType is always "video/mp2t" where my stream is fragmented mp4. How to change this? | Adaptive HLS m3u8 to DASH mpd file - folder path seems to be missing | https://api.github.com/repos/gpac/gpac/issues/2233/comments | 12 | 2022-07-26T14:28:47Z | 2022-11-08T15:50:38Z | https://github.com/gpac/gpac/issues/2233 | 1,318,328,342 | 2,233 |
[
"gpac",
"gpac"
] | [POC](https://cdn.discordapp.com/attachments/749985926125453345/1000247949961474158/poc)
```
Description
Null pointer dereference caused segmentation fault. This can cause Denial-of -service attack.
version
smlijun@ubuntu:~/gpac_asan/bin/gcc$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev243-gf87b12b32-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration:
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
#Asan Log
smlijun@ubuntu:~/gpac_asan/bin/gcc$ ./MP4Box -bt ../../../gpac/bin/gcc/poc
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent minf
[iso file] Missing DataInformationBox
[iso file] Unknown box type 0000 in parent moov
[iso file] Read Box type 0000 (0x30303030) at position 11542 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "moov" (start 20) has 806 extra bytes
[iso file] Unknown top-level box type 0000
[iso file] Incomplete box 0000 - start 12356 size 808358436
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent moov
[iso file] Unknown box type 0000 in parent minf
[iso file] Missing DataInformationBox
[iso file] Unknown box type 0000 in parent moov
[iso file] Read Box type 0000 (0x30303030) at position 11542 has size 0 but is not at root/file level. Forbidden, skipping end of parent box !
[iso file] Box "moov" (start 20) has 806 extra bytes
[iso file] Unknown top-level box type 0000
[iso file] Incomplete box 0000 - start 12356 size 808358436
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[ODF] Reading bifs config: shift in sizes (not supported)
[MP4 Loading] Unable to fetch sample 38 from track ID 8 - aborting track import
Scene loaded - dumping 1 systems streams
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3541124==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fa63fcdc018 bp 0x60b0000007d0 sp 0x7fff0a6821a0 T0)
==3541124==The signal is caused by a READ memory access.
==3541124==Hint: address points to the zero page.
#0 0x7fa63fcdc017 in gf_dump_vrml_simple_field.isra.0 (/home/smlijun/gpac_asan/bin/gcc/libgpac.so.12+0x38f017)
#1 0x7fa63fcdcc1b in DumpXReplace (/home/smlijun/gpac_asan/bin/gcc/libgpac.so.12+0x38fc1b)
#2 0x7fa63fcd728a in gf_sm_dump_command_list (/home/smlijun/gpac_asan/bin/gcc/libgpac.so.12+0x38a28a)
#3 0x7fa63fcde00c in gf_sm_dump (/home/smlijun/gpac_asan/bin/gcc/libgpac.so.12+0x39100c)
#4 0x559fd823f0b7 in dump_isom_scene (/home/smlijun/gpac_asan/bin/gcc/MP4Box+0x340b7)
#5 0x559fd8234b50 in mp4box_main (/home/smlijun/gpac_asan/bin/gcc/MP4Box+0x29b50)
#6 0x7fa63f77f082 in __libc_start_main ../csu/libc-start.c:308
#7 0x559fd822458d in _start (/home/smlijun/gpac_asan/bin/gcc/MP4Box+0x1958d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/home/smlijun/gpac_asan/bin/gcc/libgpac.so.12+0x38f017) in gf_dump_vrml_simple_field.isra.0
==3541124==ABORTING
Impact
This vuln is capable of DoS.
Occurrences
scene_dump.c L750
``` | Null Pointer Dereference Caused Segmentation Fault | https://api.github.com/repos/gpac/gpac/issues/2232/comments | 0 | 2022-07-24T04:36:12Z | 2022-07-24T09:30:39Z | https://github.com/gpac/gpac/issues/2232 | 1,315,806,663 | 2,232 |
[
"gpac",
"gpac"
] | Hello folks,
I have the following HLS structure given:

Within each folder, I have such a structure:

As you can maybe already imagine, I only have HLS in use. Now I also wanted to have Dash compatibility, so I started to convert the master.m3u8 on each subfolder like so:
`MP4Box -mpd master.m3u8 -out master.mpd`
Awesome, now I have a mpd file that basically references the m3u8 playlist. But why referencing, why not simply generate an independent mpd file from the m3u8 that references the m4s/ts segments directly?
This is the m3u8 I use as input:
```
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:9
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-MAP:URI="init-a-aac-de-mp4a.40.2_128000.m4s"
#EXTINF:9.002667,
f-0000.m4s
#EXTINF:1.056000,
f-0001.m4s
#EXT-X-ENDLIST
```
This is what I get in return:
```
<MPD type="static" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:hls="urn:gpac:hls:aes:mpd:2015" profiles="urn:mpeg:dash:profile:full:2011" id="master.m3u8" mediaPresentationDuration="PT9S" minBufferTime="PT1.5S">
<ProgramInformation moreInformationURL="http://gpac.sourceforge.net">
<Title>master.m3u8</Title>
<Source>Generated from URL master.m3u8</Source>
<Copyright>Generated by GPAC 0.5.2-DEV-revVersion: 0.5.2-426-gc5ad4e4+dfsg5-5 from master.m3u8</Copyright>
</ProgramInformation>
<Period start="PT0S" duration="PT9S" >
<AdaptationSet segmentAlignment="true">
</AdaptationSet>
</Period>
</MPD>
```
I'm not sure how compatible such an output is, can somebody give an advice here?
This was the first "issue", if it's really an issue in the end...
The second problem I have is at the master.m3u8 file at the root directory of my HLS structure.
The file looks like this:
```
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-PLAYLIST-TYPE VOD
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-0",NAME="Deutsch",CHANNELS="2",AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="de",URI="a-eac3-de-ec-3_224000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-0",NAME="English",CHANNELS="2",AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="en",URI="a-eac3-en-ec-3_224000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-3",NAME="English",CHANNELS="2",AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="en",URI="a-aac-en-mp4a.40.2_256000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-3",NAME="Deutsch",CHANNELS="2",AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="de",URI="a-aac-de-mp4a.40.2_256000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-4",NAME="English",CHANNELS="2",AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="en",URI="a-aac-en-mp4a.40.2_128000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-4",NAME="Deutsch",CHANNELS="2",AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="de",URI="a-aac-de-mp4a.40.2_128000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-5",NAME="English",CHANNELS="2",AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="en",URI="a-aac_he-en-mp4a.40.5_96000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-5",NAME="Deutsch",CHANNELS="2",AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="de",URI="a-aac_he-de-mp4a.40.5_96000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-6",NAME="English",CHANNELS="2",AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="en",URI="a-aac_he_v2-en-mp4a.40.5_64000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-6",NAME="Deutsch",CHANNELS="2",AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="de",URI="a-aac_he_v2-de-mp4a.40.5_64000/master.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH="1976550",RESOLUTION=640x456,CODECS="avc1.42001f,ec-3",AUDIO="a-0"
v-h264-480p-avc1.42001f/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH="2011750",RESOLUTION=640x456,CODECS="avc1.42001f,mp4a.40.2",AUDIO="a-3"
v-h264-480p-avc1.42001f/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH="1870950",RESOLUTION=640x456,CODECS="avc1.42001f,mp4a.40.2",AUDIO="a-4"
v-h264-480p-avc1.42001f/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH="1835750",RESOLUTION=640x456,CODECS="avc1.42001f,mp4a.40.5",AUDIO="a-5"
v-h264-480p-avc1.42001f/master.m3u8
#EXT-X-STREAM-INF:BANDWIDTH="1800550",RESOLUTION=640x456,CODECS="avc1.42001f,mp4a.40.5",AUDIO="a-6"
v-h264-480p-avc1.42001f/master.m3u8
```
If I run the MP4box command from above against this m3u8 file I get back the following error:
```
MP4Box -mpd master.m3u8 -out master.mpd
MP4Box: media_tools/m3u8.c:752: declare_sub_playlist: Assertion `0' failed.
Aborted
```
Can somebody help? How can I convert my HLS to a Dash structure?
Thanks in advance | How can I convert a m3u8 file to mpd? | https://api.github.com/repos/gpac/gpac/issues/2231/comments | 2 | 2022-07-21T09:24:34Z | 2022-07-26T11:00:30Z | https://github.com/gpac/gpac/issues/2231 | 1,312,951,602 | 2,231 |
[
"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
Hello!
I'm trying to put DRM (fairplay) with `HLS SAES` but for some reason is not working as expected
1. When I put the `constant_IV` it puts it in each fragment when it should only put it in the "header" and besides it is not constant in each video fragment it increases in 1. **(look IV in the actual m3u8)**
2. The encryption type of the `EXT-X-KEY:METHOD` is left as `AES-128` and I am expecting it to be `SAMPLE-AES`.
### Command
```bash
gpac -i 1080.mp4 -o res-hls/manifest.m3u8:segdur=10:hlsdrm=drm-hls.xml
```
### drm-hls.xml
```xml
<?xml version="1.0" encoding="UTF-8"?>
<GPACDRM type="HLS SAES">
<DRMInfo type="pssh" version="1" cypherOffset="1">
<!-- System ID (Fairplay) -->
<BS ID128="94CE86FB07FF4F43ADB893D2FA968CA2"/>
<BS value="1" bits="32"/>
<BS ID128="0x4c2xxxxxxxxxxxxxxxxxxxxxdb156f8cda"/>
<BS ID128="0xe98xxxxxxxxxxxxxxxxxxxxxe3261e7e1d"/>
</DRMInfo>
<CrypTrack constant_IV="0x4c2xxxxxxxxxxxxxxxxxxxxxdb156f8cda">
<key KID="0x4c2xxxxxxxxxxxxxxxxxxxxxdb156f8cda" value="0xe98xxxxxxxxxxxxxxxxxxxxx3261e7e1d" hlsInfo='URI="skd://fps.drm_provider.com/;4c2xxxxx-xxxx-xxxx-xxxx-xxdb156f8cda"'/>
</CrypTrack>
</GPACDRM>
```
### Actual
```m3u
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="1080_dash_track1_init.mp4"
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDB
#EXTINF:14.9333,
1080_dash_track1_1.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDC
#EXTINF:5.2,
1080_dash_track1_2.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDD
#EXTINF:10.2667,
1080_dash_track1_3.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDE
#EXTINF:10.1333,
1080_dash_track1_4.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDF
#EXTINF:10.1333,
1080_dash_track1_5.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCD0
#EXTINF:9.8,
1080_dash_track1_6.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCD1
#EXTINF:10.2,
1080_dash_track1_7.m4s
#EXT-X-KEY:METHOD=AES-128,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCD2
```
### Expected
```m3u8
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="1080_dash_track1_init.mp4"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://fps.drm_provider.com/;4c2XXXXX-7ab1-XXXX-XXXX-XXXXXXXXcda",IV=0x4C2XXXXX7AB1XXXXXXXXXXXXXXXXCDA
#EXTINF:14.9333,
1080_dash_track1_1.m4s
#EXTINF:5.2,
1080_dash_track1_2.m4s
#EXTINF:10.2667,
1080_dash_track1_3.m4s
#EXTINF:10.1333,
1080_dash_track1_4.m4s
#EXTINF:10.1333,
1080_dash_track1_5.m4s
#EXTINF:9.8,
1080_dash_track1_6.m4s
#EXTINF:10.2,
1080_dash_track1_7.m4s
```
I don't know if maybe I'm missing something, but from all the documentation I've read, the command and the DRM config looks good
| DRM with fairplay and HLS SAES problms | https://api.github.com/repos/gpac/gpac/issues/2230/comments | 4 | 2022-07-19T15:03:56Z | 2022-10-03T09:58:40Z | https://github.com/gpac/gpac/issues/2230 | 1,309,661,576 | 2,230 |
[
"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 iss…[cut]
**Issue**
When downloading a nightly build of GPAC from this link https://gpac.wp.imt.fr/downloads/gpac-nightly-builds/ it states on that very site that the versions for OS X (or macOS how they call it now) are compatible "with 10.7 and above". This no longer seems to be a case.
Downloading the latest version and installing it on Mac OS X 10.10.5 (Yosemite) results in an application bundle that's blocked out in Finder (with a stop symbol across the icon) and running the contained binaries directly from Terminal results in following issue:
```
$ /Applications/GPAC.app/Contents/MacOS/gpac --help
dyld: Library not loaded: /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
Referenced from: /Applications/GPAC.app/Contents/MacOS/./lib/libavdevice.58.dylib
Reason: image not found
Trace/BPT trap: 5
```
With how badly the OS X ecosystem works regarding backwards compatibility you're probably no longer be able to fix the package for older systems (albeit this would be appreciated), so an update of the information of the website seems to be reasonable as a fix. | Website: Nightly Builds are not "compatible with OS X version 10.7" (and some above) anymore | https://api.github.com/repos/gpac/gpac/issues/2229/comments | 6 | 2022-07-19T14:34:30Z | 2022-09-29T17:25:42Z | https://github.com/gpac/gpac/issues/2229 | 1,309,617,356 | 2,229 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
I'm able to encrypt successfully mp4 with this drm.xml file
```
<GPACDRM type="CENC AES-CTR">
<DRMInfo type="pssh" version="1">
<!-- ?? this indicates the PSSH SystemID ?? -->
<BS ID128="1077efecc0b24d02ace33c1e52e2fb4b"/>
<!-- ?? this indicates the PSSH number of keys (version 1), on 32 bits ?? -->
<BS bits="32" value="1"/>
<!-- KID -->
<BS ID128="e76cacfd3ecda68a76f28dc5d41c0e19"/>
</DRMInfo>
<!--
IV_size : is the size in bytes of the Initialization Vector. It should be 0 (if track is not encrypted i.e the IsEncrypted flag is 0x0), 8 or 16. When not set, guessed from the size of the first_IV attribute.
first_IV : is the first Initialization Vector used for this track. If the scheme type uses constant IV and constant_IV -->
<CrypTrack IV_size="8" first_IV="0x603f39bfdb3d9799" isEncrypted="1" saiSavedBox="senc" trackID="1">
<!-- KID with 0x before --> <!-- KEY with 0x before -->
<key KID="0xe76cacfd3ecda68a76f28dc5d41c0e19" value="0x034482e9652d9510d6b91e1b60e601b2"/>
</CrypTrack>
</GPACDRM>
```
I don't understand what first_IV is for and if i should edit this value ?
Also can anyone confirm if my comments with ?? are right ?
Thanks.
note: this two pages helped me to generate keys
[Link 1](https://github.com/Dash-Industry-Forum/dash.js/wiki/Generate-MPEG-DASH-content-encrypted-with-MPEG-CENC-ClearKey)
[Link 2](https://ahelpme.com/software/drm/mpeg-dash-and-clearkey-cenc-drm-encryption-with-nginx-bento4-and-dashjs-under-centos-8/) | Should i change first_IV with clearkey encryption ? | https://api.github.com/repos/gpac/gpac/issues/2228/comments | 3 | 2022-07-18T18:38:06Z | 2022-07-19T16:32:38Z | https://github.com/gpac/gpac/issues/2228 | 1,308,365,927 | 2,228 |
[
"gpac",
"gpac"
] | Excuse me, I want to ask how to call [session.http_bitrate](https://doxygen.gpac.io/classpython_1_1libgpac_1_1libgpac_1_1_filter_session.html#a31223012cba8ee5207e7556a60dce1cc) on python code
I am referring Advanced example (https://github.com/gpac/gpac/wiki/python#advanced-example) | how to call python api(session.http_bitrate ) | https://api.github.com/repos/gpac/gpac/issues/2227/comments | 1 | 2022-07-17T10:02:46Z | 2022-07-19T16:35:08Z | https://github.com/gpac/gpac/issues/2227 | 1,307,049,667 | 2,227 |
[
"gpac",
"gpac"
] | Old build that works correctly
`MP4Box - GPAC version 1.1.0-DEV-rev1161-g2dfbf0c7a-master`
Newest build I've tried
`MP4Box - GPAC version 2.1-DEV-rev243-gf87b12b32-master`
Example long file path/name
`"\\?\E:\Downloads\Rocky.Horror.Picture.Show.The.1975.BluRay.1080p.DTS-HD.MA.7.1.AVC.REMUX-xxxxxxx\Rocky.Horror.Picture.Show.The.1975.BluRay.1080p.DTS-HD.MA.7.1.AVC.REMUX-xxxxxxLONGER123_temp\Rocky.Horror.Picture.Show.The.1975.BluRay.1080p.DTS-HD.MA.7.1.AVC.REMUX-xxxxxxLONGER123_chapters.txt"`
**Error:**
When muxing long filenames on newer versions of mp4box, it displays an error such as this during muxing
`Track Importing MPEG-4 AVC - Width 1792 Height 1080 FPS 96000/4004 Error: Requested URL is not valid or cannot be found`
I do understand the pathname is very long. However, I figured since the older versions had no issues with this, maybe it's something you could look into?
Thanks!! | Long path name error with newer versions (MP4Box) | https://api.github.com/repos/gpac/gpac/issues/2226/comments | 15 | 2022-07-14T19:20:01Z | 2022-07-20T18:53:05Z | https://github.com/gpac/gpac/issues/2226 | 1,305,193,415 | 2,226 |
[
"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.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
**Description:**
`In Gpac 2.1 (current commit) ,there is a heap-use-after-free vulnerability which occurs in function gf_node_try_destroy() at scenegraph/base_scenegraph.c:668.`
**Version info:**
git log
```
commit b9c5a244b73e57216bd4ba7ac76359ea0fda12e4 (grafted, HEAD -> master, origin/master, origin/HEAD)
Author: Romain Bouqueau <romain.bouqueau.pro@gmail.com>
Date: Tue Jul 12 23:04:57 2022 +0200
fix string comparison
```
./MP4Box -version
```
MP4Box - GPAC version 2.1-DEV-revUNKNOWN-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
**crash command:**
./MP4Box -xmt poc
**crash output**
```
[iso file] Unknown box type url@ in parent dref
[iso file] Unknown box type mp1Dv in parent stsd
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type t0E18 in parent trak
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 803698
[iso file] Incomplete file while reading for dump - aborting parsing
[iso file] Unknown box type url@ in parent dref
[iso file] Unknown box type mp1Dv in parent stsd
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type t0E18 in parent trak
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Incomplete box mdat - start 11495 size 803698
[iso file] Incomplete file while reading for dump - aborting parsing
MPEG-4 BIFS Scene Parsing
[ODF] Reading bifs config: shift in sizes (not supported)
Scene loaded - dumping 1 systems streams
=================================================================
==9431==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000005ad0 at pc 0x7fdf63587e63 bp 0x7fffa63615f0 sp 0x7fffa63615e0
READ of size 8 at 0x604000005ad0 thread T0
#0 0x7fdf63587e62 in gf_node_try_destroy scenegraph/base_scenegraph.c:668
#1 0x7fdf63599519 in gf_sg_command_del scenegraph/commands.c:120
#2 0x7fdf63e3fd1f in gf_sm_au_del scene_manager/scene_manager.c:113
#3 0x7fdf63e3fd1f in gf_sm_reset_stream scene_manager/scene_manager.c:126
#4 0x7fdf63e3fd1f in gf_sm_delete_stream scene_manager/scene_manager.c:133
#5 0x7fdf63e3fd1f in gf_sm_del scene_manager/scene_manager.c:147
#6 0x55cdaef071f0 in dump_isom_scene /home/fuzz/gpac2.1/gpac/applications/mp4box/filedump.c:220
#7 0x55cdaeef0b00 in mp4box_main /home/fuzz/gpac2.1/gpac/applications/mp4box/mp4box.c:6344
#8 0x7fdf60fdb082 in __libc_start_main ../csu/libc-start.c:308
#9 0x55cdaeecaafd in _start (/home/fuzz/gpac2.1/gpac/bin/gcc/MP4Box+0xa2afd)
0x604000005ad0 is located 0 bytes inside of 48-byte region [0x604000005ad0,0x604000005b00)
freed by thread T0 here:
#0 0x7fdf66d4540f in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:122
#1 0x7fdf6358734d in gf_node_unregister scenegraph/base_scenegraph.c:763
#2 0x7fdf63599519 in gf_sg_command_del scenegraph/commands.c:120
#3 0x7fdf63e3fd1f in gf_sm_au_del scene_manager/scene_manager.c:113
#4 0x7fdf63e3fd1f in gf_sm_reset_stream scene_manager/scene_manager.c:126
#5 0x7fdf63e3fd1f in gf_sm_delete_stream scene_manager/scene_manager.c:133
#6 0x7fdf63e3fd1f in gf_sm_del scene_manager/scene_manager.c:147
#7 0x55cdaef071f0 in dump_isom_scene /home/fuzz/gpac2.1/gpac/applications/mp4box/filedump.c:220
#8 0x55cdaeef0b00 in mp4box_main /home/fuzz/gpac2.1/gpac/applications/mp4box/mp4box.c:6344
#9 0x7fdf60fdb082 in __libc_start_main ../csu/libc-start.c:308
previously allocated by thread T0 here:
#0 0x7fdf66d45808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x7fdf63653321 in Group_Create scenegraph/mpeg4_nodes.c:7579
#2 0x7fdf63653321 in gf_sg_mpeg4_node_new scenegraph/mpeg4_nodes.c:36809
#3 0x7fdf63589266 in gf_node_new scenegraph/base_scenegraph.c:1996
#4 0x7fdf638d7b05 in gf_bifs_dec_node bifs/field_decode.c:900
#5 0x7fdf638c415a in BD_DecSceneReplace bifs/com_dec.c:1357
#6 0x7fdf638c415a in BD_DecSceneReplace bifs/com_dec.c:1336
#7 0x7fdf638edbca in BM_SceneReplace bifs/memory_decoder.c:866
#8 0x7fdf638ee5ae in BM_ParseCommand bifs/memory_decoder.c:916
#9 0x7fdf638ef28c in gf_bifs_decode_command_list bifs/memory_decoder.c:1037
#10 0x7fdf63e9d9dc in gf_sm_load_run_isom scene_manager/loader_isom.c:303
#11 0x55cdaef0729b in dump_isom_scene /home/fuzz/gpac2.1/gpac/applications/mp4box/filedump.c:203
#12 0x55cdaeef0b00 in mp4box_main /home/fuzz/gpac2.1/gpac/applications/mp4box/mp4box.c:6344
#13 0x7fdf60fdb082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-use-after-free scenegraph/base_scenegraph.c:668 in gf_node_try_destroy
Shadow bytes around the buggy address:
0x0c087fff8b00: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff8b10: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff8b20: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff8b30: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff8b40: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
=>0x0c087fff8b50: fa fa 00 00 00 00 01 fa fa fa[fd]fd fd fd fd fd
0x0c087fff8b60: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
0x0c087fff8b70: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
0x0c087fff8b80: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff8b90: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff8ba0: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd 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
==9431==ABORTING
```
**poc:**
[poc.zip](https://github.com/gpac/gpac/files/9099701/poc.zip)
PS: The bug is similar with https://github.com/gpac/gpac/issues/2194 . i submit the bug report again because the vulnerability is not fixed under the newest version (the current commit) . Pls check again :-)
| (unpatched) heap-use-after-free in gf_node_try_destroy() in gpac2.1 (the newest commit) | https://api.github.com/repos/gpac/gpac/issues/2225/comments | 1 | 2022-07-13T07:09:42Z | 2022-07-19T22:10:41Z | https://github.com/gpac/gpac/issues/2225 | 1,303,001,709 | 2,225 |
[
"gpac",
"gpac"
] | 
this picture gpac -gui url
in the picture the BW is python api(self.download_rate ) right?
and all tiles needed bandwidth is python api (self.total_rate) right? | I want to ask some questions about python api | https://api.github.com/repos/gpac/gpac/issues/2224/comments | 1 | 2022-07-12T07:33:07Z | 2022-07-21T05:37:14Z | https://github.com/gpac/gpac/issues/2224 | 1,301,660,548 | 2,224 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [ ] I looked for a similar issue and couldn't find any.
- [ ] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ ] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
**Description:**
`A crash happened on MP4Box(GPAC version 2.1-DEV-revUNKNOWN-master) due to a null pointer dereference vulnerability in gf_filter_pid_set_property_full function (filter_core/filter_pid.c:5250) .
`
**MP4Box version**
```
./MP4Box -version
MP4Box - GPAC version 2.1-DEV-revUNKNOWN-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
**poc**
[poc.zip](https://github.com/gpac/gpac/files/9062544/poc.zip)
**command**
`./MP4Box -info poc`
**crash output**
```
[AVC|H264] Warning: Error parsing NAL unit
filter_core/filter_pid.c:5250:6: runtime error: member access within null pointer of type 'struct GF_FilterPid'
```
**gdb output**
```
pwndbg> r
Starting program: /home/fuzz/gpac2.1/gpac/bin/gcc/MP4Box -info ../../../test/segv2/poc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[AVC|H264] Warning: Error parsing NAL unit
filter_core/filter_pid.c:5250:6: runtime error: member access within null pointer of type 'struct GF_FilterPid'
[Inferior 1 (process 2239153) exited with code 01]
pwndbg> b filter_pid.c:5250
Breakpoint 1 at 0x7ffff4b829f6: filter_pid.c:5250. (6 locations)
pwndbg> r
Starting program: /home/fuzz/gpac2.1/gpac/bin/gcc/MP4Box -info ../../../test/segv2/poc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, gf_filter_pid_set_property_full (is_info=GF_FALSE, value=0x7ffffffe9150, dyn_name=0x0, prop_name=0x0, prop_4cc=1347244884, pid=0x613000000040) at filter_core/filter_pid.c:5301
5301 return gf_filter_pid_set_property_full(pid, prop_4cc, NULL, NULL, value, GF_FALSE);
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ REGISTERS ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
RAX 0x0
RBX 0x7ffffffe8f50 ◂— 0x41b58ab3
RCX 0xfffffffd22a ◂— 0x0
RDX 0x7ffffffe9150 ◂— 0x2
RDI 0x613000000040 ◂— 0x613000000040 /* '@' */
RSI 0x504d5354
R8 0x0
R9 0x7ffff58cb4f0 (global_log_tools+496) ◂— 0x2
R10 0x7ffff24ab3f1 ◂— 'gf_filter_pid_set_property'
R11 0x7ffff4b84110 (gf_filter_pid_set_property) ◂— endbr64
R12 0x613000000040 ◂— 0x613000000040 /* '@' */
R13 0x7ffffffe9150 ◂— 0x2
R14 0x504d5354
R15 0xfffffffd1ea ◂— 0x0
RBP 0x7ffffffe9060 —▸ 0x7ffffffe9380 —▸ 0x7ffffffea0d0 —▸ 0x7ffffffea170 —▸ 0x7ffffffea280 ◂— ...
RSP 0x7ffffffe8f30 ◂— 0x0
RIP 0x7ffff4b841c6 (gf_filter_pid_set_property+182) ◂— test r12, r12
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ DISASM ]──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
► 0x7ffff4b841c6 <gf_filter_pid_set_property+182> test r12, r12
0x7ffff4b841c9 <gf_filter_pid_set_property+185> je gf_filter_pid_set_property+1477 <gf_filter_pid_set_property+1477>
0x7ffff4b841cf <gf_filter_pid_set_property+191> test r12b, 7
0x7ffff4b841d3 <gf_filter_pid_set_property+195> jne gf_filter_pid_set_property+1477 <gf_filter_pid_set_property+1477>
0x7ffff4b841d9 <gf_filter_pid_set_property+201> mov rax, r12
0x7ffff4b841dc <gf_filter_pid_set_property+204> shr rax, 3
0x7ffff4b841e0 <gf_filter_pid_set_property+208> cmp byte ptr [rax + 0x7fff8000], 0
0x7ffff4b841e7 <gf_filter_pid_set_property+215> jne gf_filter_pid_set_property+1447 <gf_filter_pid_set_property+1447>
0x7ffff4b841ed <gf_filter_pid_set_property+221> cmp r12, qword ptr [r12]
0x7ffff4b841f1 <gf_filter_pid_set_property+225> jne gf_filter_pid_set_property+1016 <gf_filter_pid_set_property+1016>
0x7ffff4b841f7 <gf_filter_pid_set_property+231> mov esi, r14d
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ SOURCE (CODE) ]───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
In file: /home/fuzz/gpac2.1/gpac/src/filter_core/filter_pid.c
5296
5297 GF_EXPORT
5298 GF_Err gf_filter_pid_set_property(GF_FilterPid *pid, u32 prop_4cc, const GF_PropertyValue *value)
5299 {
5300 if (!prop_4cc) return GF_BAD_PARAM;
► 5301 return gf_filter_pid_set_property_full(pid, prop_4cc, NULL, NULL, value, GF_FALSE);
5302 }
5303
5304 GF_EXPORT
5305 GF_Err gf_filter_pid_set_property_str(GF_FilterPid *pid, const char *name, const GF_PropertyValue *value)
5306 {
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ STACK ]───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
00:0000│ rsp 0x7ffffffe8f30 ◂— 0x0
01:0008│ 0x7ffffffe8f38 ◂— 0x0
02:0010│ 0x7ffffffe8f40 —▸ 0x7ffffffe9030 —▸ 0x7ffff54af2c0 ◂— 0x6372636170672e /* '.gpacrc' */
03:0018│ 0x7ffffffe8f48 —▸ 0x7ffffffe8f50 ◂— 0x41b58ab3
04:0020│ rbx 0x7ffffffe8f50 ◂— 0x41b58ab3
05:0028│ 0x7ffffffe8f58 —▸ 0x7ffff5640eff ◂— '1 48 100 11 szName:5290'
06:0030│ 0x7ffffffe8f60 —▸ 0x7ffff4b84110 (gf_filter_pid_set_property) ◂— endbr64
07:0038│ 0x7ffffffe8f68 —▸ 0x618000000c80 —▸ 0x7ffff6de03e0 (FileInRegister) —▸ 0x7ffff56a6580 ◂— 0x6e6966 /* 'fin' */
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ BACKTRACE ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
► f 0 0x7ffff4b841c6 gf_filter_pid_set_property+182
f 1 0x7ffff4b841c6 gf_filter_pid_set_property+182
f 2 0x7ffff4c06993 gf_filter_pid_raw_new+595
f 3 0x7ffff4dc30b1 filein_process+2721
f 4 0x7ffff4c0eb6d gf_filter_process_task+3581
f 5 0x7ffff4bd4953 gf_fs_thread_proc+2275
f 6 0x7ffff4be0c67 gf_fs_run+455
f 7 0x7ffff462a677 gf_media_import+10263
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
pwndbg> bt
#0 gf_filter_pid_set_property_full (is_info=GF_FALSE, value=0x7ffffffe9150, dyn_name=0x0, prop_name=0x0, prop_4cc=1347244884, pid=0x613000000040) at filter_core/filter_pid.c:5301
#1 gf_filter_pid_set_property (pid=pid@entry=0x613000000040, prop_4cc=prop_4cc@entry=1347244884, value=0x7ffffffe9150) at filter_core/filter_pid.c:5301
#2 0x00007ffff4c06993 in gf_filter_pid_raw_new (filter=filter@entry=0x618000000c80, url=0x603000000f40 "../../../test/segv2/poc", local_file=<optimized out>, mime_type=<optimized out>, fext=<optimized out>, probe_data=<optimized out>, probe_size=<optimized out>, trust_mime=<optimized out>, out_pid=<optimized out>) at filter_core/filter.c:3891
#3 0x00007ffff4dc30b1 in filein_process (filter=<optimized out>) at filters/in_file.c:481
#4 0x00007ffff4c0eb6d in gf_filter_process_task (task=0x607000000b10) at filter_core/filter.c:2639
#5 0x00007ffff4bd4953 in gf_fs_thread_proc (sess_thread=sess_thread@entry=0x616000000110) at filter_core/filter_session.c:1857
#6 0x00007ffff4be0c67 in gf_fs_run (fsess=fsess@entry=0x616000000080) at filter_core/filter_session.c:2118
#7 0x00007ffff462a677 in gf_media_import (importer=importer@entry=0x7ffffffeaa50) at media_tools/media_import.c:1226
#8 0x0000555555651a12 in convert_file_info (inName=<optimized out>, track_id=0x555555764fb0 <info_track_id>) at fileimport.c:130
#9 0x000055555562279f in mp4box_main (argc=<optimized out>, argv=<optimized out>) at mp4box.c:6265
#10 0x00007ffff1949083 in __libc_start_main (main=0x5555555f6a00 <main>, argc=3, argv=0x7fffffffe488, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe478) at ../csu/libc-start.c:308
#11 0x00005555555f6afe in _start () at mp4box.c:6811
pwndbg> p pid
$2 = (GF_FilterPid *) 0x613000000040
pwndbg> c
Continuing.
[AVC|H264] Warning: Error parsing NAL unit
Breakpoint 1, gf_filter_pid_set_property_full (is_info=GF_FALSE, value=0x7ffffffe9810, dyn_name=0x0, prop_name=0x0, prop_4cc=1146050121, pid=0x0) at filter_core/filter_pid.c:5301
5301 return gf_filter_pid_set_property_full(pid, prop_4cc, NULL, NULL, value, GF_FALSE);
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
............
until.......
pwndbg> p pid
$3 = (GF_FilterPid *) 0x0
pwndbg> i b
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
breakpoint already hit 9 times
1.1 y 0x00007ffff4b829f6 in gf_filter_pid_set_property_full at filter_core/filter_pid.c:5250
1.2 y 0x00007ffff4b8314e in gf_filter_pid_set_property_full at filter_core/filter_pid.c:5250
1.3 y 0x00007ffff4b834d1 in gf_filter_pid_set_property_full at filter_core/filter_pid.c:5250
1.4 y 0x00007ffff4b8393e in gf_filter_pid_set_property_full at filter_core/filter_pid.c:5250
1.5 y 0x00007ffff4b83cc1 in gf_filter_pid_set_property_full at filter_core/filter_pid.c:5250
1.6 y 0x00007ffff4b841c6 in gf_filter_pid_set_property_full at filter_core/filter_pid.c:5250
pwndbg> n
filter_core/filter_pid.c:5250:6: runtime error: member access within null pointer of type 'struct GF_FilterPid'
[Inferior 1 (process 2239158) exited with code 01]
```
**source code**
```
5246 static GF_Err gf_filter_pid_set_property_full(GF_FilterPid *pid, u32 prop_4cc, const char *prop_name, char *dyn_name, const GF_PropertyValue *value, Bool is_info)
5247 {
5248 GF_PropertyMap *map;
5249 const GF_PropertyValue *oldp;
5250 if (PID_IS_INPUT(pid)) { //**here**//
5251 GF_LOG(GF_LOG_ERROR, GF_LOG_FILTER, ("Attempt to write property on input PID in filter %s - ignoring\n", pid->filter->name));
5252 return GF_BAD_PARAM;
5253 }
``` | A NULL pointer dereference in gf_filter_pid_set_property_full | https://api.github.com/repos/gpac/gpac/issues/2223/comments | 0 | 2022-07-07T10:26:55Z | 2022-07-12T17:13:11Z | https://github.com/gpac/gpac/issues/2223 | 1,297,164,642 | 2,223 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [ ] I looked for a similar issue and couldn't find any.
- [ ] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ ] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
**Description:**
` There is a runtime error: shift exponent 65283 is too large for 32-bit type 'int' at av_parsers.c:5910.`
**System info:**
`Ubuntu 20.04 LTS (GNU/Linux 5.13.0-52-generic x86_64)`
**gpac version**
```
git log
commit fcaa01ebba02426bd79f90ebb24efe8339ac71aa (grafted, HEAD -> master, origin/master, origin/HEAD)
Author: Aurelien David <aurelien.david@telecom-paristech.fr>
Date: Thu Jun 30 08:45:32 2022 +0200
fix ead703f for non-window
```
**step to reproduce:**
```
./configure --enable-sanitizer && make -j$(nproc)
./MP4Box -info poc
```
poc :
[poc.zip](https://github.com/gpac/gpac/files/9055090/poc.zip)
**crash output:**
```
[Core] exp-golomb read failed, not enough bits in bitstream !
[AVC|H264] Warning: Error parsing NAL unit
[AVC|H264] Warning: Error parsing NAL unit
[Core] exp-golomb read failed, not enough bits in bitstream !
[AVC|H264] Warning: Error parsing NAL unit
[Core] exp-golomb read failed, not enough bits in bitstream !
media_tools/av_parsers.c:5910:20: runtime error: shift exponent 65283 is too large for 32-bit type 'int'
```
**gdb track**
```
pwndbg> b media_tools/av_parsers.c:5910
Breakpoint 1 at 0x7ffff459ce65: file media_tools/av_parsers.c, line 5910.
pwndbg> r
Starting program: /home/fuzz/gpac2.1/gpac/bin/gcc/MP4Box -info ../../../test/poc33
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Core] exp-golomb read failed, not enough bits in bitstream !
[AVC|H264] Warning: Error parsing NAL unit
[AVC|H264] Warning: Error parsing NAL unit
[Core] exp-golomb read failed, not enough bits in bitstream !
[AVC|H264] Warning: Error parsing NAL unit
[Core] exp-golomb read failed, not enough bits in bitstream !
Breakpoint 1, avc_compute_poc (si=0x7ffffffe9820) at media_tools/av_parsers.c:5910
5910 max_frame_num = 1 << (si->sps->log2_max_frame_num);
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ REGISTERS ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
RAX 0xfffffffd30c ◂— 0x0
RBX 0x7ffffffe98c0 —▸ 0x7ffffffe98f0 —▸ 0x7ffffffea0e0 —▸ 0x7ffffffea180 —▸ 0x7ffffffea290 ◂— ...
RCX 0x0
RDX 0x7ffffffe9860 —▸ 0x62d0000b6f80 —▸ 0x1000000000 ◂— 0x0
RDI 0x7ffffffe9820 ◂— 0x1400
RSI 0x62d0000b6f80 —▸ 0x1000000000 ◂— 0x0
R8 0xffffffff ◂— 0x0
R9 0xffffffff ◂— 0x0
R10 0xffffffff ◂— 0x0
R11 0x0
R12 0x610000000940 ◂— 0x0
R13 0x0
R14 0x7ffffffe9800 ◂— 0x41b58ab3
R15 0x62d0000b4400 ◂— 0x0
RBP 0x7ffffffe9760 —▸ 0x7ffffffe98f0 —▸ 0x7ffffffea0e0 —▸ 0x7ffffffea180 —▸ 0x7ffffffea290 ◂— ...
RSP 0x7ffffffe9740 —▸ 0x610000000940 ◂— 0x0
RIP 0x7ffff459ce65 (avc_compute_poc+69) ◂— test sil, 3
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ DISASM ]──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
► 0x7ffff459ce65 <avc_compute_poc+69> test sil, 3
0x7ffff459ce69 <avc_compute_poc+73> jne avc_compute_poc+2962 <avc_compute_poc+2962>
0x7ffff459ce6f <avc_compute_poc+79> lea rdx, [rsi + 0xc]
0x7ffff459ce73 <avc_compute_poc+83> cmp rsi, -0xc
0x7ffff459ce77 <avc_compute_poc+87> jae avc_compute_poc+2942 <avc_compute_poc+2942>
0x7ffff459ce7d <avc_compute_poc+93> mov rax, rdx
0x7ffff459ce80 <avc_compute_poc+96> shr rax, 3
0x7ffff459ce84 <avc_compute_poc+100> movzx ecx, byte ptr [rax + 0x7fff8000]
0x7ffff459ce8b <avc_compute_poc+107> mov rax, rdx
0x7ffff459ce8e <avc_compute_poc+110> and eax, 7
0x7ffff459ce91 <avc_compute_poc+113> add eax, 3
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ SOURCE (CODE) ]───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
In file: /home/fuzz/gpac2.1/gpac/src/media_tools/av_parsers.c
5905 s32 field_poc[2] = { 0,0 };
5906 s32 max_frame_num;
5907
5908 if (!si->sps) return;
5909
► 5910 max_frame_num = 1 << (si->sps->log2_max_frame_num);
5911
5912 /* picture type */
5913 if (si->sps->frame_mbs_only_flag || !si->field_pic_flag) pic_type = AVC_PIC_FRAME;
5914 else if (si->bottom_field_flag) pic_type = AVC_PIC_FIELD_BOTTOM;
5915 else pic_type = AVC_PIC_FIELD_TOP;
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ STACK ]───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
00:0000│ rsp 0x7ffffffe9740 —▸ 0x610000000940 ◂— 0x0
01:0008│ 0x7ffffffe9748 —▸ 0x7ffffffe98c0 —▸ 0x7ffffffe98f0 —▸ 0x7ffffffea0e0 —▸ 0x7ffffffea180 ◂— ...
02:0010│ 0x7ffffffe9750 —▸ 0x610000000940 ◂— 0x0
03:0018│ 0x7ffffffe9758 ◂— 0x0
04:0020│ rbp 0x7ffffffe9760 —▸ 0x7ffffffe98f0 —▸ 0x7ffffffea0e0 —▸ 0x7ffffffea180 —▸ 0x7ffffffea290 ◂— ...
05:0028│ 0x7ffffffe9768 —▸ 0x7ffff45e2f7e (gf_avc_parse_nalu+5566) ◂— lea rdi, [r15 + 0x92ec]
06:0030│ 0x7ffffffe9770 —▸ 0x7ffffffe98f0 —▸ 0x7ffffffea0e0 —▸ 0x7ffffffea180 —▸ 0x7ffffffea290 ◂— ...
07:0038│ 0x7ffffffe9778 —▸ 0x7ffff3def311 (gf_log+353) ◂— mov eax, dword ptr [rip + 0x378fa29]
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ BACKTRACE ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
► f 0 0x7ffff459ce65 avc_compute_poc+69
f 1 0x7ffff45e2f7e gf_avc_parse_nalu+5566
f 2 0x7ffff50294e9 naludmx_process+2553
f 3 0x7ffff50294e9 naludmx_process+2553
f 4 0x7ffff4c0eb6d gf_filter_process_task+3581
f 5 0x7ffff4bd4953 gf_fs_thread_proc+2275
f 6 0x7ffff4be0c67 gf_fs_run+455
f 7 0x7ffff462a677 gf_media_import+10263
─────────────────────────────────────────────────────────
pwndbg> p si->sps->log2_max_frame_num
$1 = 65283
pwndbg> bt
#0 avc_compute_poc (si=0x7ffffffe9820) at media_tools/av_parsers.c:5910
#1 0x00007ffff45e2f7e in gf_avc_parse_nalu (bs=0x610000000940, avc=0x62d0000b4400) at media_tools/av_parsers.c:6055
#2 0x00007ffff50294e9 in naludmx_parse_nal_avc (is_islice=<optimized out>, is_slice=<optimized out>, skip_nal=<optimized out>, nal_type=20, size=2305, data=0x62200000a929 "\024", ctx=0x61b00000d280) at filters/reframe_nalu.c:2620
#3 naludmx_process (filter=<optimized out>) at filters/reframe_nalu.c:3165
#4 0x00007ffff4c0eb6d in gf_filter_process_task (task=0x607000000db0) at filter_core/filter.c:2639
#5 0x00007ffff4bd4953 in gf_fs_thread_proc (sess_thread=sess_thread@entry=0x616000000110) at filter_core/filter_session.c:1857
#6 0x00007ffff4be0c67 in gf_fs_run (fsess=fsess@entry=0x616000000080) at filter_core/filter_session.c:2118
#7 0x00007ffff462a677 in gf_media_import (importer=importer@entry=0x7ffffffeaa60) at media_tools/media_import.c:1226
#8 0x0000555555651a12 in convert_file_info (inName=<optimized out>, track_id=0x555555764fb0 <info_track_id>) at fileimport.c:130
#9 0x000055555562279f in mp4box_main (argc=<optimized out>, argv=<optimized out>) at mp4box.c:6265
#10 0x00007ffff1949083 in __libc_start_main (main=0x5555555f6a00 <main>, argc=3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at ../csu/libc-start.c:308
#11 0x00005555555f6afe in _start () at mp4box.c:6811
pwndbg>
```
| runtime error: shift exponent 65283 is too large for 32-bit type 'int' at av_parsers.c:5910 | https://api.github.com/repos/gpac/gpac/issues/2221/comments | 0 | 2022-07-06T13:26:10Z | 2022-07-12T17:13:10Z | https://github.com/gpac/gpac/issues/2221 | 1,295,841,827 | 2,221 |
[
"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.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
**Description**
`Heap use after free in fuction gf_isom_dovi_config_get located in isomedia/avc_ext.c:2490`
**System info**
`ubuntu 20.04 lts`
**version info:**
```
./MP4Box -version
MP4Box - GPAC version 2.1-DEV-revUNKNOWN-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
**compile**
```
./configure --enable-sanitizer
make
```
**crash command:**
`./MP4Box -info poc`
**poc :**
[poc.zip](https://github.com/gpac/gpac/files/9051242/poc.zip)
**Crash output:**
```
[iso file] Unknown box type mp4u in parent stsd
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Unknown box type drzf in parent dinf
[iso file] Missing dref box in dinf
[iso file] Incomplete box mdat - start 11495 size 853076
[iso file] Incomplete file while reading for dump - aborting parsing
# Movie Info - 5 tracks - TimeScale 90000
Duration 00:00:22.839 (recomputed 00:00:22.848)
Fragmented: no
Progressive (moov before mdat)
Major Brand isom - version 1 - compatible brands:
Created: GMT Wed Sep 14 06:08:31 2078
Modified: GMT Wed Sep 14 06:08:33 2078
File has root IOD (96 bytes)
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: Simple Profile @ Level 1 (0x01)
Audio PL: High Quality Audio Profile @ Level 2 (0x0f)
1 UDTA types:
hnti:
# Track 1 Info - ID 1 - TimeScale 90000
Media Duration 00:00:22.800
Track flags: Enabled
Media Info: Language "Undetermined (und)" - Type "vide:mp4u" - 342 samples
Visual Sample Entry Info: width=176 height=144 (depth=24 bits)
Visual Track layout: x=0 y=0 width=176 height=144
=================================================================
==2234976==ERROR: AddressSanitizer: heap-use-after-free on address 0x60f000000130 at pc 0x7fbba822fbc0 bp 0x7ffe87b46740 sp 0x7ffe87b46730
READ of size 8 at 0x60f000000130 thread T0
#0 0x7fbba822fbbf in gf_isom_dovi_config_get isomedia/avc_ext.c:2490
#1 0x55f3db03107a in DumpTrackInfo /home/fuzz/gpac2.1/gpac/applications/mp4box/filedump.c:2862
#2 0x55f3db03ea17 in DumpMovieInfo /home/fuzz/gpac2.1/gpac/applications/mp4box/filedump.c:3994
#3 0x55f3db012ad0 in mp4box_main /home/fuzz/gpac2.1/gpac/applications/mp4box/mp4box.c:6367
#4 0x7fbba58ed082 in __libc_start_main ../csu/libc-start.c:308
#5 0x55f3dafe7afd in _start (/home/fuzz/gpac2.1/gpac/bin/gcc/MP4Box+0xa2afd)
0x60f000000130 is located 0 bytes inside of 168-byte region [0x60f000000130,0x60f0000001d8)
freed by thread T0 here:
#0 0x7fbbab63440f in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:122
#1 0x7fbba825252d in unkn_box_read isomedia/box_code_base.c:793
#2 0x7fbba83015e3 in gf_isom_box_read isomedia/box_funcs.c:1860
#3 0x7fbba83015e3 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#4 0x7fbba830615a in gf_isom_box_array_read isomedia/box_funcs.c:1753
#5 0x7fbba82524fb in unkn_box_read isomedia/box_code_base.c:789
#6 0x7fbba83015e3 in gf_isom_box_read isomedia/box_funcs.c:1860
#7 0x7fbba83015e3 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#8 0x7fbba830615a in gf_isom_box_array_read isomedia/box_funcs.c:1753
#9 0x7fbba82524fb in unkn_box_read isomedia/box_code_base.c:789
#10 0x7fbba83015e3 in gf_isom_box_read isomedia/box_funcs.c:1860
#11 0x7fbba83015e3 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#12 0x7fbba830615a in gf_isom_box_array_read isomedia/box_funcs.c:1753
#13 0x7fbba82524fb in unkn_box_read isomedia/box_code_base.c:789
#14 0x7fbba83015e3 in gf_isom_box_read isomedia/box_funcs.c:1860
#15 0x7fbba83015e3 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#16 0x7fbba830615a in gf_isom_box_array_read isomedia/box_funcs.c:1753
#17 0x7fbba83015e3 in gf_isom_box_read isomedia/box_funcs.c:1860
#18 0x7fbba83015e3 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#19 0x7fbba8302a35 in gf_isom_parse_root_box isomedia/box_funcs.c:38
#20 0x7fbba832babc in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:373
#21 0x7fbba8331c2f in gf_isom_parse_movie_boxes isomedia/isom_intern.c:860
#22 0x7fbba8331c2f in gf_isom_open_file isomedia/isom_intern.c:980
#23 0x55f3db00c549 in mp4box_main /home/fuzz/gpac2.1/gpac/applications/mp4box/mp4box.c:6181
#24 0x7fbba58ed082 in __libc_start_main ../csu/libc-start.c:308
previously allocated by thread T0 here:
#0 0x7fbbab634808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x7fbba82521ef in unkn_box_read isomedia/box_code_base.c:768
#2 0x7fbba83015e3 in gf_isom_box_read isomedia/box_funcs.c:1860
#3 0x7fbba83015e3 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#4 0x7fbba830615a in gf_isom_box_array_read isomedia/box_funcs.c:1753
#5 0x7fbba82524fb in unkn_box_read isomedia/box_code_base.c:789
#6 0x7fbba83015e3 in gf_isom_box_read isomedia/box_funcs.c:1860
#7 0x7fbba83015e3 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#8 0x7fbba830615a in gf_isom_box_array_read isomedia/box_funcs.c:1753
#9 0x7fbba82524fb in unkn_box_read isomedia/box_code_base.c:789
#10 0x7fbba83015e3 in gf_isom_box_read isomedia/box_funcs.c:1860
#11 0x7fbba83015e3 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#12 0x7fbba830615a in gf_isom_box_array_read isomedia/box_funcs.c:1753
#13 0x7fbba82524fb in unkn_box_read isomedia/box_code_base.c:789
#14 0x7fbba83015e3 in gf_isom_box_read isomedia/box_funcs.c:1860
#15 0x7fbba83015e3 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#16 0x7fbba830615a in gf_isom_box_array_read isomedia/box_funcs.c:1753
#17 0x7fbba83015e3 in gf_isom_box_read isomedia/box_funcs.c:1860
#18 0x7fbba83015e3 in gf_isom_box_parse_ex isomedia/box_funcs.c:271
#19 0x7fbba8302a35 in gf_isom_parse_root_box isomedia/box_funcs.c:38
#20 0x7fbba832babc in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:373
#21 0x7fbba8331c2f in gf_isom_parse_movie_boxes isomedia/isom_intern.c:860
#22 0x7fbba8331c2f in gf_isom_open_file isomedia/isom_intern.c:980
#23 0x55f3db00c549 in mp4box_main /home/fuzz/gpac2.1/gpac/applications/mp4box/mp4box.c:6181
#24 0x7fbba58ed082 in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-use-after-free isomedia/avc_ext.c:2490 in gf_isom_dovi_config_get
Shadow bytes around the buggy address:
0x0c1e7fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c1e7fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c1e7fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c1e7fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c1e7fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa
=>0x0c1e7fff8020: fa fa fa fa fa fa[fd]fd fd fd fd fd fd fd fd fd
0x0c1e7fff8030: fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa
0x0c1e7fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1e7fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1e7fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1e7fff8070: 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
==2234976==ABORTING
```
**Impact**
can cause a program to crash, use unexpected values, or execute code.
Occurrences:
avc_ext.c:2490
ps: this test was still based on the newest mp4box+asan. The bug happened in avc_ext.c:2490 which was the same location with the other issue i submitted (https://github.com/gpac/gpac/issues/2218). Maybe asan mistakenly reports "heap-use-after-free" instead of "heap-buffer-overflow". Pls check it again.
| Heap Use After Free in function gf_isom_dovi_config_get | https://api.github.com/repos/gpac/gpac/issues/2220/comments | 1 | 2022-07-06T03:36:02Z | 2022-07-12T17:13:50Z | https://github.com/gpac/gpac/issues/2220 | 1,295,074,577 | 2,220 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
**Description**
`Segmentation fault in DOVI_DuplicateConfig at isomedia/avc_ext.c:1479`
**version info:**
```
fuzz@ubuntu:~/gpac2.1/gpac$ git log
commit fcaa01ebba02426bd79f90ebb24efe8339ac71aa (grafted, HEAD -> master, origin/master, origin/HEAD)
Author: Aurelien David <aurelien.david@telecom-paristech.fr>
Date: Thu Jun 30 08:45:32 2022 +0200
fix ead703f for non-windows
```
```
fuzz@ubuntu:~/gpac2.1/gpac/bin/gcc$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-revUNKNOWN-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --prefix=/home/fuzz/gpac2.1/install/
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_LINUX_DVB GPAC_DISABLE_3D
```
**command:**
`./MP4Box -info poc_segv`
ASAN trace:
```
[iso file] Unknown box type m~4v in parent stsd
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Unknown box type drzf in parent dinf
[iso file] Missing dref box in dinf
[iso file] Incomplete box mdat - start 11495 size 901341
[iso file] Incomplete file while reading for dump - aborting parsing
#Movie Info - 5 tracks - TimeScale 90000
Duration 00:00:22.839 (recomputed 00:00:22.848)
Fragmented: no
Progressive (moov before mdat)
Major Brand isom - version 1 - compatible brands:
Created: GMT Wed Sep 14 06:08:31 2078
Modified: GMT Wed Sep 14 06:08:33 2078
File has root IOD (96 bytes)
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: Simple Profile @ Level 1 (0x01)
Audio PL: High Quality Audio Profile @ Level 2 (0x0f)
1 UDTA types:
hnti:
#Track 1 Info - ID 1 - TimeScale 90000
Media Duration 00:00:22.800
Track flags: Enabled
Media Info: Language "Undetermined (und)" - Type "vide:m~4v" - 342 samples
Visual Sample Entry Info: width=176 height=144 (depth=24 bits)
Visual Track layout: x=0 y=0 width=176 height=144
AddressSanitizer:DEADLYSIGNAL
==2983245==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7feb96a1d5e6 bp 0x7ffe20ae7150 sp 0x7ffe20abf8f0 T0)
==2983245==The signal is caused by a READ memory access.
==2983245==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 0x7feb96a1d5e6 in DOVI_DuplicateConfig /home/fuzz/gpac2.1/gpac/src/isomedia/avc_ext.c:1479:31
#1 0x7feb96a1d5e6 in gf_isom_dovi_config_get /home/fuzz/gpac2.1/gpac/src/isomedia/avc_ext.c:2491:9
#2 0x521d6a in DumpTrackInfo /home/fuzz/gpac2.1/gpac/applications/mp4box/filedump.c:2862:45
#3 0x5352e5 in DumpMovieInfo /home/fuzz/gpac2.1/gpac/applications/mp4box/filedump.c:3994:3
#4 0x4f6e72 in mp4box_main /home/fuzz/gpac2.1/gpac/applications/mp4box/mp4box.c:6367:9
#5 0x7feb95e5f082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#6 0x42abfd in _start (/home/fuzz/gpac2.1/gpac/bin/gcc/MP4Box+0x42abfd)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/fuzz/gpac2.1/gpac/src/isomedia/avc_ext.c:1479:31 in DOVI_DuplicateConfig
==2983245==ABORTING
```
**gdb debug info:**
```
[iso file] Unknown box type m~4v in parent stsd
[iso file] extra box maxr found in hinf, deleting
[iso file] extra box maxr found in hinf, deleting
[iso file] Unknown box type 80rak in parent moov
[iso file] Unknown box type drzf in parent dinf
[iso file] Missing dref box in dinf
[iso file] Incomplete box mdat - start 11495 size 901341
[iso file] Incomplete file while reading for dump - aborting parsing
#Movie Info - 5 tracks - TimeScale 90000
Duration 00:00:22.839 (recomputed 00:00:22.848)
Fragmented: no
Progressive (moov before mdat)
Major Brand isom - version 1 - compatible brands:
Created: GMT Wed Sep 14 06:08:31 2078
Modified: GMT Wed Sep 14 06:08:33 2078
File has root IOD (96 bytes)
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: Simple Profile @ Level 1 (0x01)
Audio PL: High Quality Audio Profile @ Level 2 (0x0f)
1 UDTA types:
hnti:
#Track 1 Info - ID 1 - TimeScale 90000
Media Duration 00:00:22.800
Track flags: Enabled
Media Info: Language "Undetermined (und)" - Type "vide:m~4v" - 342 samples
Visual Sample Entry Info: width=176 height=144 (depth=24 bits)
Visual Track layout: x=0 y=0 width=176 height=144
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff668c5e6 in DOVI_DuplicateConfig (cfg=0x647374734c000024) at isomedia/avc_ext.c:1479
1479 out->dv_version_major = cfg->dv_version_major;
LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ REGISTERS ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
RAX 0xc8e6e8e69800004
RBX 0x603000001150 ◂— 0x0
RCX 0x1
RDX 0x14
RDI 0x647374734c000024
RSI 0x0
R8 0x7ffff5e47000 —▸ 0x5dab98 —▸ 0x4b11d0 (__sanitizer::ThreadContextBase::OnDead()) ◂— ret
R9 0x1
R10 0x28
R11 0x7ffff668c401 (gf_isom_vp_config_get+1153) ◂— mov sp, 0x89ff
R12 0x61cd20 (__afl_area_ptr) —▸ 0xecd740 (__afl_area_initial) ◂— 0x100
R13 0x7ffffffc96e0 ◂— 0x0
R14 0x603000001150 ◂— 0x0
R15 0x647374734c000000
RBP 0x7fffffff0b30 —▸ 0x7fffffff0ed0 —▸ 0x7fffffffe3b0 ◂— 0x0
RSP 0x7ffffffc92d0 ◂— 0x32 /* '2' */
RIP 0x7ffff668c5e6 (gf_isom_dovi_config_get+374) ◂— mov al, byte ptr [rax + 0x7fff8000]
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ DISASM ]──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
► 0x7ffff668c5e6 <gf_isom_dovi_config_get+374> mov al, byte ptr [rax + 0x7fff8000]
0x7ffff668c5ec <gf_isom_dovi_config_get+380> test al, al
0x7ffff668c5ee <gf_isom_dovi_config_get+382> jne gf_isom_dovi_config_get+847 <gf_isom_dovi_config_get+847>
↓
0x7ffff668c7bf <gf_isom_dovi_config_get+847> mov ecx, edi
0x7ffff668c7c1 <gf_isom_dovi_config_get+849> and cl, 7
0x7ffff668c7c4 <gf_isom_dovi_config_get+852> cmp cl, al
0x7ffff668c7c6 <gf_isom_dovi_config_get+854> jl gf_isom_dovi_config_get+388 <gf_isom_dovi_config_get+388>
↓
0x7ffff668c5f4 <gf_isom_dovi_config_get+388> mov al, byte ptr [rdi]
0x7ffff668c5f6 <gf_isom_dovi_config_get+390> mov rcx, r14
0x7ffff668c5f9 <gf_isom_dovi_config_get+393> shr rcx, 3
0x7ffff668c5fd <gf_isom_dovi_config_get+397> mov cl, byte ptr [rcx + 0x7fff8000]
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ SOURCE (CODE) ]───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
In file: /home/fuzz/gpac2.1/gpac/src/isomedia/avc_ext.c
1474 {
1475 GF_DOVIDecoderConfigurationRecord* out = NULL;
1476 GF_SAFEALLOC(out, GF_DOVIDecoderConfigurationRecord);
1477 if (!out) return NULL;
1478
► 1479 out->dv_version_major = cfg->dv_version_major;
1480 out->dv_version_minor = cfg->dv_version_minor;
1481 out->dv_profile = cfg->dv_profile;
1482 out->dv_level = cfg->dv_level;
1483 out->rpu_present_flag = cfg->rpu_present_flag;
1484 out->el_present_flag = cfg->el_present_flag;
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ STACK ]───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
00:0000│ rsp 0x7ffffffc92d0 ◂— 0x32 /* '2' */
01:0008│ 0x7ffffffc92d8 —▸ 0xfffc9703 ◂— 0x0
02:0010│ 0x7ffffffc92e0 —▸ 0x7ffffffc96f0 ◂— 0x0
03:0018│ 0x7ffffffc92e8 —▸ 0xfffffff92e2 ◂— 0x0
04:0020│ 0x7ffffffc92f0 —▸ 0xfffffff92e0 ◂— 0x0
05:0028│ 0x7ffffffc92f8 —▸ 0x521d6b (DumpTrackInfo+7099) ◂— test rax, rax
06:0030│ 0x7ffffffc9300 ◂— 0x0
07:0038│ 0x7ffffffc9308 ◂— 0x0
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ BACKTRACE ]─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
► f 0 0x7ffff668c5e6 gf_isom_dovi_config_get+374
f 1 0x7ffff668c5e6 gf_isom_dovi_config_get+374
f 2 0x521d6b DumpTrackInfo+7099
f 3 0x5352e6 DumpMovieInfo+8118
f 4 0x4f6e73 mp4box_main+34947
f 5 0x7ffff5ace083 __libc_start_main+243
```
**poc:**
[poc_segv.zip](https://github.com/gpac/gpac/files/9044094/poc_segv.zip)
| Segmentation fault in DOVI_DuplicateConfig at isomedia/avc_ext.c:1479 | https://api.github.com/repos/gpac/gpac/issues/2219/comments | 1 | 2022-07-05T07:16:32Z | 2022-07-12T17:13:41Z | https://github.com/gpac/gpac/issues/2219 | 1,293,890,400 | 2,219 |
[
"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.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
**Description**
A heap-buffer-overflow has occurred in function gf_isom_dovi_config_get of isomedia/avc_ext.c:2490 when running program MP4Box,this can reproduce on the lattest commit.
**version info**
```
fuzz@ubuntu:~/gpac2.1/gpac/bin/gcc$ ./MP4Box -version
MP4Box - GPAC version 2.1-DEV-revUNKNOWN-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SSL GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
**crash command**
` ./MP4Box -info poc1`
**crash output**
```
[iso file] Unknown box type 00000200 in parent stsd
# Movie Info - 1 track - TimeScale 1000
Duration 00:00:10.000 (recomputed 4 Days, 14:43:47.879)
Fragmented: no
Major Brand mp4@ - version 0 - compatible brands: mp42 mp41 isom iso2
Created: GMT Thu Apr 26 09:02:13 2012
# Track 1 Info - ID 1 - TimeScale 3000
Media Duration 00:00:10.000 (recomputed 4 Days, 14:43:47.879)
Track flags: Enabled In Movie In Preview
Media Info: Language "Undetermined (und)" - Type "vide:00000200" - 300 samples
Visual Sample Entry Info: width=320 height=240 (depth=24 bits)
Visual Track layout: x=0 y=0 width=320 height=240
=================================================================
==2235126==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60f000000130 at pc 0x7ff2a69b3bc0 bp 0x7fff43da89f0 sp 0x7fff43da89e0
READ of size 8 at 0x60f000000130 thread T0
#0 0x7ff2a69b3bbf in gf_isom_dovi_config_get isomedia/avc_ext.c:2490
#1 0x56165102107a in DumpTrackInfo /home/fuzz/gpac2.1/gpac/applications/mp4box/filedump.c:2862
#2 0x56165102ea17 in DumpMovieInfo /home/fuzz/gpac2.1/gpac/applications/mp4box/filedump.c:3994
#3 0x561651002ad0 in mp4box_main /home/fuzz/gpac2.1/gpac/applications/mp4box/mp4box.c:6367
#4 0x7ff2a4071082 in __libc_start_main ../csu/libc-start.c:308
#5 0x561650fd7afd in _start (/home/fuzz/gpac2.1/gpac/bin/gcc/MP4Box+0xa2afd)
Address 0x60f000000130 is a wild pointer.
SUMMARY: AddressSanitizer: heap-buffer-overflow isomedia/avc_ext.c:2490 in gf_isom_dovi_config_get
Shadow bytes around the buggy address:
0x0c1e7fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c1e7fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c1e7fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c1e7fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c1e7fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa
=>0x0c1e7fff8020: fa fa fa fa fa fa[fa]fa fa fa fa fa fa fa fa fa
0x0c1e7fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1e7fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1e7fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1e7fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1e7fff8070: 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
==2235126==ABORTING
```
**source code**
```
2481 GF_DOVIDecoderConfigurationRecord *gf_isom_dovi_config_get(GF_ISOFile* the_file, u32 trackNumber, u32 DescriptionIndex)
2482 {
2483 GF_TrackBox* trak;
2484 GF_MPEGVisualSampleEntryBox *entry;
2485 trak = gf_isom_get_track_from_file(the_file, trackNumber);
2486 if (!trak || !trak->Media || !DescriptionIndex) return NULL;
2487 entry = (GF_MPEGVisualSampleEntryBox*)gf_list_get(trak->Media->information->sampleTable->SampleDescription->child_boxes, DescriptionIndex - 1);
2488 if (!entry) return NULL;
2489 if (entry->internal_type != GF_ISOM_SAMPLE_ENTRY_VIDEO) return NULL;
2490 if (!entry->dovi_config) return NULL; /**here**/
2491 return DOVI_DuplicateConfig(&entry->dovi_config->DOVIConfig);
2492 }
```
**sample poc:**
[poc1.zip](https://github.com/gpac/gpac/files/9038477/poc1.zip)
ps: it is similar with the issue which occured in older gpac version ( https://github.com/gpac/gpac/issues/1846) . The bug was not patched . It still occured in the newest version.
| heap-buffer-overflow in function gf_isom_dovi_config_get | https://api.github.com/repos/gpac/gpac/issues/2218/comments | 0 | 2022-07-04T10:10:00Z | 2022-07-12T17:13:10Z | https://github.com/gpac/gpac/issues/2218 | 1,292,941,893 | 2,218 |
[
"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
Dolby vision profile 5 is working great on Apple TV but Dolby Atmos is recognized as DD+ only. If I use mp4muxer Dolby Atmos works. This can be reproduced demuxing any mkv with FFMPEG and muxing it with mp4box.
| DD+ Atmos not working on Apple TV | https://api.github.com/repos/gpac/gpac/issues/2217/comments | 14 | 2022-07-03T20:34:25Z | 2022-09-26T17:46:36Z | https://github.com/gpac/gpac/issues/2217 | 1,292,414,350 | 2,217 |
[
"gpac",
"gpac"
] | **version info:**
```
root:# MP4Box -version
MP4Box - GPAC version 2.1-DEV-rev232-gfcaa01ebb-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --prefix=/path_to_build --enable-debug --enable-sanitizer
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_PNG GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
**poc:**[poc](https://github.com/0xdd96/PoC/raw/main/gpac/gpac-isom_iod-stack-overflow)
**command:** MP4Box -hint -out /dev/null $poc$
Here is the trace reported by ASAN:
```
root:# ./MP4Box -hint -out /dev/null poc
[ODF] Error reading descriptor (tag 4 size 14): Invalid MPEG-4 Descriptor
[iso file] Unknown box type tra7F in parent moov
[ODF] Not enough bytes (3) to read descriptor (size=93)
[ODF] Error reading descriptor (tag 3 size 34): Invalid MPEG-4 Descriptor
[iso file] Read Box "esds" (start 5507) failed (Invalid MPEG-4 Descriptor) - skipping
[ODF] Not enough bytes (3) to read descriptor (size=93)
[ODF] Error reading descriptor (tag 3 size 34): Invalid MPEG-4 Descriptor
[iso file] Unknown box type drB3f in parent dinf
[iso file] Missing dref box in dinf
[iso file] extra box maxr found in hinf, deleting
Hinting track ID 1 - Type "mp4v:mp4v" (mpeg4-generic) - BW 1393 kbps
Cannot create hinter (Invalid IsoMedia File)
Track ID 6 disabled - skipping hint
ASAN:DEADLYSIGNAL
=================================================================
==15396==ERROR: AddressSanitizer: stack-overflow on address 0x7fffff7feff8 (pc 0x7ffff6f1b64d bp 0x7ffff75d2320 sp 0x7fffff7ff000 T0)
#0 0x7ffff6f1b64c (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x10364c)
#1 0x7ffff6f1b0e7 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x1030e7)
#2 0x7ffff6e40271 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x28271)
#3 0x7ffff6ef6b0a in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb0a)
#4 0x7ffff1cba647 in gf_malloc utils/alloc.c:150
#5 0x7ffff269f8e6 in gf_odf_new_isom_iod odf/odf_code.c:739
#6 0x7ffff268357e in gf_odf_create_descriptor odf/desc_private.c:77
#7 0x7ffff2684794 in gf_odf_parse_descriptor odf/descriptors.c:88
#8 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#9 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#10 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#11 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#12 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#13 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#14 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#15 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#16 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#17 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#18 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#19 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#20 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#21 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#22 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#23 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#24 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#25 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#26 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#27 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#28 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#29 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#30 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#31 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#32 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#33 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#34 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#35 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#36 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#37 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#38 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#39 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#40 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#41 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#42 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#43 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#44 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#45 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#46 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#47 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#48 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#49 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#50 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#51 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#52 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#53 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#54 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#55 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#56 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#57 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#58 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#59 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#60 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#61 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#62 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#63 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#64 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#65 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#66 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#67 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#68 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#69 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#70 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#71 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#72 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#73 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#74 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#75 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#76 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#77 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#78 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#79 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#80 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#81 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#82 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#83 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#84 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#85 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#86 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#87 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#88 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#89 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#90 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#91 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#92 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#93 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#94 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#95 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#96 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#97 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#98 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#99 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#100 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#101 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#102 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#103 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#104 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#105 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#106 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#107 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#108 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#109 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#110 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#111 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#112 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#113 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#114 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#115 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#116 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#117 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#118 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#119 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#120 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#121 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#122 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#123 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#124 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#125 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#126 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#127 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#128 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#129 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#130 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#131 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#132 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#133 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#134 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#135 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#136 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#137 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#138 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#139 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#140 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#141 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#142 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#143 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#144 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#145 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#146 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#147 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#148 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#149 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#150 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#151 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#152 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#153 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#154 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#155 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#156 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#157 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#158 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#159 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#160 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#161 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#162 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#163 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#164 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#165 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#166 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#167 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#168 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#169 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#170 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#171 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#172 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#173 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#174 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#175 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#176 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#177 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#178 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#179 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#180 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#181 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#182 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#183 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#184 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#185 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#186 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#187 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#188 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#189 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#190 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#191 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#192 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#193 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#194 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#195 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#196 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#197 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#198 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#199 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#200 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#201 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#202 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#203 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#204 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#205 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#206 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#207 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#208 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#209 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#210 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#211 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#212 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#213 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#214 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#215 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#216 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#217 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#218 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#219 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#220 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#221 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#222 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#223 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#224 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#225 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#226 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#227 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#228 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#229 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#230 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#231 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#232 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#233 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#234 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#235 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#236 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#237 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#238 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#239 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#240 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#241 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#242 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#243 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#244 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#245 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#246 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#247 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
#248 0x7ffff26a0c16 in gf_odf_read_isom_iod odf/odf_code.c:847
#249 0x7ffff2683a29 in gf_odf_read_descriptor odf/desc_private.c:292
#250 0x7ffff2684a45 in gf_odf_parse_descriptor odf/descriptors.c:109
SUMMARY: AddressSanitizer: stack-overflow (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x10364c)
==15396==ABORTING
``` | AddressSanitizer: stack-overflow when processing ISOM_IOD | https://api.github.com/repos/gpac/gpac/issues/2216/comments | 0 | 2022-07-02T17:45:58Z | 2022-07-12T17:13:10Z | https://github.com/gpac/gpac/issues/2216 | 1,292,105,535 | 2,216 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [X] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
Hello:
I have one video without subtitle, its name: 13864_en.mp4; I have one English subtitle in SRT format: 13864_en.srt; I have yet another Chinese subtitle in SRT format: 13864_cn.srt.
I can make a video with English subtitle with the following simple command:
mp4box -add 13864_en.srt:hdlr=sbtl:lang=eng 13864_en.mp4 -out 13864_English.mp4
But when I tried to make a video with Chinese subtitle, none of my commands works.
The following is the log:
D:\Videos\Youtube>mp4box -for-test -add 13864_en.mp4#video -add '13864_cn.srt:lang=zh-Hans:name=Mandarin (Simplified)' -out 13864Chinese.mp4
IsoMedia import 13864_en.mp4 - track ID 1 - Video (size 1280 x 720)
[Importer] Cannot load filter for input file "'13864_cn.srt"
Failure while importing media: Requested URL is not valid or cannot be found
Error importing '13864_cn.srt:lang=zh-Hans:name=Mandarin: Requested URL is not valid or cannot be found
D:\Videos\Youtube>mp4box -for-test -add 13864_en.mp4#video -add '13864_cn.srt:lang=zh-Hans' -out 13864Chinese.mp4
Broken argument specifier or file name missing - check usage with -h
D:\Videos\Youtube>mp4box -for-test -add 13864_en.mp4#video -add '13864_cn.srt:lang=zh-CN' -out 13864Chinese.mp4
Broken argument specifier or file name missing - check usage with -h
D:\Videos\Youtube>mp4box -for-test -add 13864_en.mp4#video -add '13864_cn.srt:lang=zh-TW' -out 13864Chinese.mp4
Broken argument specifier or file name missing - check usage with -h
D:\Videos\Youtube>dir 13864*
Volume in drive D is SATABackup
Volume Serial Number is 4425-E62C
Directory of D:\Videos\Youtube
07/02/2022 01:52 PM 8,204,487 13864Chinese.mp4
07/02/2022 01:32 PM 8,204,323 13864EN720P.mp4
07/02/2022 10:32 AM 122 13864_cn.srt
06/30/2022 01:45 PM 8,219,623 13864_en.mp4
06/30/2022 01:55 PM 136 13864_en.srt
5 File(s) 24,628,691 bytes
0 Dir(s) 449,866,760,192 bytes free
D:\Videos\Youtube>type 13864_en.srt
1
0:00:00,00 --> 0:00:30,233
Zelensky published a video of a Russian cruise missile hitting the AMSTOR shopping center in Kremenchug
D:\Videos\Youtube>type 13864_cn.srt
1
0:00:00 --> 0:00:29
µ│¢Þ┐×µû»Õƒ║ÕÅæÕ©âõ║åõ©Çµ«Áõ┐äþ¢ùµû»ÕÀíÞê¬Õ»╝Õ╝╣Õç╗õ©¡ÕàïÕêùÚù¿õ©ÿµá╝ AMSTOR Þ┤¡þë®õ©¡Õ┐âþÜäÞºåÚóæ
D:\Videos\Youtube>mp4box -add 13864_en.srt:hdlr=sbtl:lang=eng 13864_en.mp4 -out 13864_English.mp4
Track Importing Timed Text - Text track 1280 x 720 font Serif (size 18) layer 0
0.500 secs Interleaving
D:\Videos\Youtube>dir 13864_English.mp4
Volume in drive D is SATABackup
Volume Serial Number is 4425-E62C
Directory of D:\Videos\Youtube
07/02/2022 02:09 PM 8,204,342 13864_English.mp4
1 File(s) 8,204,342 bytes
0 Dir(s) 449,858,551,808 bytes free
D:\Videos\Youtube>mp4box -add 13864_cn.srt:hdlr=sbtl:lang=zh-CN 13864_en.mp4 -out 13864_Chinese.mp4
Track Importing Timed Text - Text track 1280 x 720 font Serif (size 18) layer 0
[TXTIn] Error scanning SRT frame 1 timing
[TXTIn] Bad SRT formatting - expecting number got "µ│¢Þ┐×µû»Õƒ║ÕÅæÕ©âõ║åõ©Çµ«Áõ┐äþ¢ùµû»ÕÀíÞê¬Õ»╝Õ╝╣Õç╗õ©¡ÕàïÕêùÚù¿õ©ÿµá╝ AMSTOR Þ┤¡þë®õ©¡Õ┐âþÜäÞºåÚóæ"
0.500 secs Interleaving
D:\Videos\Youtube>mp4box -version
MP4Box - GPAC version 2.1-DEV-rev232-gfcaa01eb-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: (static configuration file)
Features: GPAC_CONFIG_WIN32 GPAC_64_BITS GPAC_MEMORY_TRACKING GPAC_HAS_SSL GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_FAAD GPAC_HAS_MAD GPAC_HAS_LIBA52 GPAC_HAS_JPEG GPAC_HAS_PNG GPAC_HAS_FFMPEG GPAC_HAS_OPENSVC GPAC_HAS_JP2 GPAC_HAS_OPENHEVC GPAC_HAS_THEORA GPAC_HAS_VORBIS GPAC_HAS_XVID GPAC_HAS_GLU
D:\Videos\Youtube>
Please advise on how to make burn Chinese subtitle into a .MP4 format video. I am using Windows 10 version 21H2, MP4box latest version: version 2.1-DEV-rev232-gfcaa01eb-master
Thanks,
| How to burn subtitle in simplified Chinese into a video? | https://api.github.com/repos/gpac/gpac/issues/2215/comments | 9 | 2022-07-02T12:18:21Z | 2022-07-23T13:45:12Z | https://github.com/gpac/gpac/issues/2215 | 1,292,043,921 | 2,215 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
**Describe the bug**
There is a bug (out of memory) in mp4Box-GPAC version 2.0-revUNKNOWN_REV , can be triggered via MP4Box+ ASan
**Step to reproduce**
1) compile gpac-2.0.0
`./configure --enable-sanitizer && make -j$(nproc)`
2) get version
```
fuzz@ubuntu:~/fuzzing_gpac/gpac-2.0.0/bin/gcc$ ./MP4Box -version
MP4Box - GPAC version 2.0-revUNKNOWN_REV
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --enable-sanitizer
Features: GPAC_CONFIG_LINUX GPAC_64_BITS GPAC_HAS_IPV6 GPAC_HAS_SOCK_UN GPAC_MINIMAL_ODF GPAC_HAS_QJS GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
3)run poc in terminal:
`fuzz@ubuntu:~/fuzzing_gpac/gpac-2.0.0/bin/gcc$ ./MP4Box -diso ../../../poc_oom
`
**Sanitizer output**
```
fuzz@ubuntu:~/fuzzing_gpac/gpac-2.0.0/bin/gcc$ ./MP4Box -diso ../../../poc_oom
[iso file] Unknown top-level box type dchm
[iso file] Unknown top-level box type 000000
=================================================================
==10079==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x3fffce000 bytes
#0 0x7ff3b5c10808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x7ff3b28f2f94 in csgp_box_read isomedia/box_code_base.c:12657
#2 0x7ff3b294454b in gf_isom_box_read isomedia/box_funcs.c:1832
#3 0x7ff3b294454b in gf_isom_box_parse_ex isomedia/box_funcs.c:264
#4 0x7ff3b29458c2 in gf_isom_parse_root_box isomedia/box_funcs.c:38
#5 0x7ff3b296eb44 in gf_isom_parse_movie_boxes_internal isomedia/isom_intern.c:373
#6 0x7ff3b2974c1f in gf_isom_parse_movie_boxes isomedia/isom_intern.c:852
#7 0x7ff3b2974c1f in gf_isom_open_file isomedia/isom_intern.c:972
#8 0x5580a802520d in mp4boxMain /home/fuzz/fuzzing_gpac/gpac-2.0.0/applications/mp4box/main.c:5968
#9 0x7ff3aff58082 in __libc_start_main ../csu/libc-start.c:308
==10079==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: AddressSanitizer: out-of-memory ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 in __interceptor_malloc
==10079==ABORTING
```
**Testing Enviorments:**
```
ubuntu20.04 lts
gcc 9.4.0
MP4Box - GPAC version 2.0-revUNKNOWN_REV
```
POC:
[poc_oom.zip](https://github.com/gpac/gpac/files/9024741/poc_oom.zip)
ps:
it also crashed under the newest gpac version(MP4Box - GPAC version 2.1-DEV-revUNKNOWN-master),,so the bug was in the version prior to GPAC version 2.1-DEV-revUNKNOWN-master.
| allocator is out of memory(OOM in mp4Box-GPAC version 2.0-revUNKNOWN_REV) | https://api.github.com/repos/gpac/gpac/issues/2214/comments | 0 | 2022-07-01T03:02:40Z | 2022-07-12T17:13:09Z | https://github.com/gpac/gpac/issues/2214 | 1,290,844,410 | 2,214 |
[
"gpac",
"gpac"
] | POC: https://github.com/JieyongMa/poc/raw/main/gpac/poc_intof1_s.dat
```
Description
Integer Overflow in function lsr_translate_coords at laser/lsr_dec.c:853
gpac version
git log
commit ea3af7c8242d1a82657dc3a518df5a5b1b5e27ed (HEAD -> master, origin/master, origin/HEAD)
Author: Romain Bouqueau <romain.bouqueau.pro@gmail.com>
Date: Tue Jun 28 19:25:58 2022 +0200
POC
./MP4Box -bt ./poc_intof1_s.dat
laser/lsr_dec.c:853:10: runtime error: shift exponent 4294967295 is too large for 32-bit type 'u32' (aka 'unsigned int')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior laser/lsr_dec.c:853:10 in
[poc_intof1_s.dat](https://github.com/JieyongMa/poc/raw/main/gpac/poc_intof1_s.dat)
function lsr_translate_coords source code
static Fixed function lsr_translate_coords(GF_LASeRCodec *lsr, u32 val, u32 nb_bits)
{
#ifdef GPAC_FIXED_POINT
if (val >> (nb_bits-1) ) {
s32 neg = (s32) val - (1<<nb_bits);
if (neg < -FIX_ONE / 2)
return 2 * gf_divfix(INT2FIX(neg/2), lsr->res_factor);
return gf_divfix(INT2FIX(neg), lsr->res_factor);
} else {
if (val > FIX_ONE / 2)
return 2 * gf_divfix(INT2FIX(val/2), lsr->res_factor);
return gf_divfix(INT2FIX(val), lsr->res_factor);
}
#else
if (val >> (nb_bits-1) ) { // <--- line:853
s32 neg = (s32) val - (1<<nb_bits);
return gf_divfix(INT2FIX(neg), lsr->res_factor);
} else {
return gf_divfix(INT2FIX(val), lsr->res_factor);
}
#endif
}
GDB
gdb --args ./MP4Box -bt ./poc_intof1_s.dat
(gdb) b laser/lsr_dec.c:853
No source file named laser/lsr_dec.c.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (laser/lsr_dec.c:853) pending.
(gdb) r
Starting program: /home/fuzz/fuzz/gpac/gpac/bin/gcc/MP4Box -bt ./poc_intof1_s.dat
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, lsr_translate_coords (lsr=0x611000000540, val=0, nb_bits=0) at laser/lsr_dec.c:853
853 laser/lsr_dec.c: No such file or directory.
(gdb) l
848 in laser/lsr_dec.c
(gdb) p val
$1 = 0
(gdb) p (nb_bits-1)
$2 = 4294967295
(gdb) p nb_bits
$3 = 0
(gdb)
Impact
This vulnerability is capable of crashing software or use unexpected value.
Occurrences
lsr_dec.c L853
``` | Integer Overflow in function lsr_translate_coords | https://api.github.com/repos/gpac/gpac/issues/2213/comments | 0 | 2022-06-30T15:58:18Z | 2022-07-12T17:13:09Z | https://github.com/gpac/gpac/issues/2213 | 1,290,345,511 | 2,213 |
[
"gpac",
"gpac"
] | POC: https://github.com/JieyongMa/poc/raw/main/gpac/poc_huaf1_s.dat
```
Description
Heap Use After Free in function Q_IsTypeOn at src/bifs/unquantize.c:169
gpac version
git log
commit ea3af7c8242d1a82657dc3a518df5a5b1b5e27ed (HEAD -> master, origin/master, origin/HEAD)
Author: Romain Bouqueau <romain.bouqueau.pro@gmail.com>
Date: Tue Jun 28 19:25:58 2022 +0200
POC
./MP4Box -bt ./poc_huaf1_s.dat
=================================================================
==1301527==ERROR: AddressSanitizer: heap-use-after-free on address 0x6100000023c4 at pc 0x7ffff2264f88 bp 0x7fffffff2dc0 sp 0x7fffffff2db8
READ of size 4 at 0x6100000023c4 thread T0
#0 0x7ffff2264f87 in Q_IsTypeOn /home/fuzz/fuzz/gpac/src/bifs/unquantize.c:169:12
#1 0x7ffff2273d98 in gf_bifs_dec_unquant_field /home/fuzz/fuzz/gpac/src/bifs/unquantize.c:398:7
#2 0x7ffff21ab00d in gf_bifs_dec_sf_field /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:84:7
#3 0x7ffff21bf41f in gf_bifs_dec_field /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:518:7
#4 0x7ffff21c2403 in gf_bifs_dec_node_mask /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:671:8
#5 0x7ffff21b9791 in gf_bifs_dec_node /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:919:7
#6 0x7ffff21bd7c3 in BD_DecMFFieldVec /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:433:24
#7 0x7ffff21c064f in gf_bifs_dec_field /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:559:9
#8 0x7ffff21c18e5 in gf_bifs_dec_node_list /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:619:7
#9 0x7ffff21b984b in gf_bifs_dec_node /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:921:7
#10 0x7ffff21dd60c in BM_ParseNodeInsert /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:433:9
#11 0x7ffff21e24d3 in BM_ParseInsert /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:583:10
#12 0x7ffff21eeb02 in BM_ParseCommand /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:907:8
#13 0x7ffff21f05d2 in gf_bifs_flush_command_list /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:962:9
#14 0x7ffff21f32bc in gf_bifs_decode_command_list /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:1042:3
#15 0x7ffff39a4274 in gf_sm_load_run_isom /home/fuzz/fuzz/gpac/src/scene_manager/loader_isom.c:303:10
#16 0x7ffff3844fee in gf_sm_load_run /home/fuzz/fuzz/gpac/src/scene_manager/scene_manager.c:719:28
#17 0x585735 in dump_isom_scene /home/fuzz/fuzz/gpac/applications/mp4box/filedump.c:203:14
#18 0x54321e in mp4box_main /home/fuzz/fuzz/gpac/applications/mp4box/mp4box.c:6343:7
#19 0x553f31 in main /home/fuzz/fuzz/gpac/applications/mp4box/mp4box.c:6810:1
#20 0x7fffeee04082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#21 0x42abed in _start (/home/fuzz/fuzz/gpac/gpac/bin/gcc/MP4Box+0x42abed)
0x6100000023c4 is located 132 bytes inside of 192-byte region [0x610000002340,0x610000002400)
freed by thread T0 here:
#0 0x4a5be2 in free (/home/fuzz/fuzz/gpac/gpac/bin/gcc/MP4Box+0x4a5be2)
#1 0x7ffff0d72324 in gf_free /home/fuzz/fuzz/gpac/src/utils/alloc.c:165:2
#2 0x7ffff128e631 in gf_node_free /home/fuzz/fuzz/gpac/src/scenegraph/base_scenegraph.c:1622:2
#3 0x7ffff13bda9c in QuantizationParameter_Del /home/fuzz/fuzz/gpac/src/scenegraph/mpeg4_nodes.c:11981:2
#4 0x7ffff13afa2d in gf_sg_mpeg4_node_del /home/fuzz/fuzz/gpac/src/scenegraph/mpeg4_nodes.c:37743:3
#5 0x7ffff1272b50 in gf_node_del /home/fuzz/fuzz/gpac/src/scenegraph/base_scenegraph.c:1904:59
#6 0x7ffff12610b9 in gf_node_unregister /home/fuzz/fuzz/gpac/src/scenegraph/base_scenegraph.c:763:3
#7 0x7ffff12853d4 in gf_node_unregister_children /home/fuzz/fuzz/gpac/src/scenegraph/base_scenegraph.c:1371:3
#8 0x7ffff13bb3f5 in LOD_Del /home/fuzz/fuzz/gpac/src/scenegraph/mpeg4_nodes.c:8552:2
#9 0x7ffff13af45d in gf_sg_mpeg4_node_del /home/fuzz/fuzz/gpac/src/scenegraph/mpeg4_nodes.c:37671:3
#10 0x7ffff1272b50 in gf_node_del /home/fuzz/fuzz/gpac/src/scenegraph/base_scenegraph.c:1904:59
#11 0x7ffff12610b9 in gf_node_unregister /home/fuzz/fuzz/gpac/src/scenegraph/base_scenegraph.c:763:3
#12 0x7ffff21b9b8c in gf_bifs_dec_node /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:931:3
#13 0x7ffff21dd60c in BM_ParseNodeInsert /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:433:9
#14 0x7ffff21e24d3 in BM_ParseInsert /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:583:10
#15 0x7ffff21eeb02 in BM_ParseCommand /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:907:8
#16 0x7ffff21f05d2 in gf_bifs_flush_command_list /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:962:9
#17 0x7ffff21f32bc in gf_bifs_decode_command_list /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:1042:3
#18 0x7ffff39a4274 in gf_sm_load_run_isom /home/fuzz/fuzz/gpac/src/scene_manager/loader_isom.c:303:10
#19 0x7ffff3844fee in gf_sm_load_run /home/fuzz/fuzz/gpac/src/scene_manager/scene_manager.c:719:28
#20 0x585735 in dump_isom_scene /home/fuzz/fuzz/gpac/applications/mp4box/filedump.c:203:14
#21 0x54321e in mp4box_main /home/fuzz/fuzz/gpac/applications/mp4box/mp4box.c:6343:7
#22 0x553f31 in main /home/fuzz/fuzz/gpac/applications/mp4box/mp4box.c:6810:1
#23 0x7fffeee04082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
previously allocated by thread T0 here:
#0 0x4a5e4d in malloc (/home/fuzz/fuzz/gpac/gpac/bin/gcc/MP4Box+0x4a5e4d)
#1 0x7ffff0d72214 in gf_malloc /home/fuzz/fuzz/gpac/src/utils/alloc.c:150:9
#2 0x7ffff132e244 in QuantizationParameter_Create /home/fuzz/fuzz/gpac/src/scenegraph/mpeg4_nodes.c:12496:2
#3 0x7ffff13a96f6 in gf_sg_mpeg4_node_new /home/fuzz/fuzz/gpac/src/scenegraph/mpeg4_nodes.c:36871:10
#4 0x7ffff1298209 in gf_node_new /home/fuzz/fuzz/gpac/src/scenegraph/base_scenegraph.c:1996:51
#5 0x7ffff21b91b4 in gf_bifs_dec_node /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:893:15
#6 0x7ffff21bd7c3 in BD_DecMFFieldVec /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:433:24
#7 0x7ffff21c064f in gf_bifs_dec_field /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:559:9
#8 0x7ffff21c18e5 in gf_bifs_dec_node_list /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:619:7
#9 0x7ffff21b984b in gf_bifs_dec_node /home/fuzz/fuzz/gpac/src/bifs/field_decode.c:921:7
#10 0x7ffff21dd60c in BM_ParseNodeInsert /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:433:9
#11 0x7ffff21e24d3 in BM_ParseInsert /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:583:10
#12 0x7ffff21eeb02 in BM_ParseCommand /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:907:8
#13 0x7ffff21f05d2 in gf_bifs_flush_command_list /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:962:9
#14 0x7ffff21f32bc in gf_bifs_decode_command_list /home/fuzz/fuzz/gpac/src/bifs/memory_decoder.c:1042:3
#15 0x7ffff39a4274 in gf_sm_load_run_isom /home/fuzz/fuzz/gpac/src/scene_manager/loader_isom.c:303:10
#16 0x7ffff3844fee in gf_sm_load_run /home/fuzz/fuzz/gpac/src/scene_manager/scene_manager.c:719:28
#17 0x585735 in dump_isom_scene /home/fuzz/fuzz/gpac/applications/mp4box/filedump.c:203:14
#18 0x54321e in mp4box_main /home/fuzz/fuzz/gpac/applications/mp4box/mp4box.c:6343:7
#19 0x553f31 in main /home/fuzz/fuzz/gpac/applications/mp4box/mp4box.c:6810:1
#20 0x7fffeee04082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
SUMMARY: AddressSanitizer: heap-use-after-free /home/fuzz/fuzz/gpac/src/bifs/unquantize.c:169:12 in Q_IsTypeOn
Shadow bytes around the buggy address:
0x0c207fff8420: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
0x0c207fff8430: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
0x0c207fff8440: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
0x0c207fff8450: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
0x0c207fff8460: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
=>0x0c207fff8470: fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd
0x0c207fff8480: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
0x0c207fff8490: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c207fff84a0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
0x0c207fff84b0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c207fff84c0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd 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
==1301527==ABORTING
[poc_huaf1_s.dat](https://github.com/JieyongMa/poc/raw/main/gpac/poc_huaf1_s.dat)
Impact
This vulnerability is capable of crashing software, use unexpected value, or possible code execution.
Occurrences
unquantize.c L169
``` | Heap Use After Free in function Q_IsTypeOn | https://api.github.com/repos/gpac/gpac/issues/2212/comments | 0 | 2022-06-30T12:59:00Z | 2022-07-12T17:13:09Z | https://github.com/gpac/gpac/issues/2212 | 1,290,103,187 | 2,212 |
[
"gpac",
"gpac"
] | I need to overlay an image that has an auxiliary alpha mask over another image. HEIF specification allows me to do this, as is showcased [in the "Alpha Mask" example](https://nokiatech.github.io/heif/examples.html#alpha-1). I tried to reconstruct this sample HEIF image. The original file `alpha_1440x960.heic` can be found [here](https://github.com/nokiatech/heif/blob/gh-pages/content/overlay_grid_alpha/alpha_1440x960.heic).
Running `mp4box -info alpha_1440x960.heic`:
```
# File Meta type: "pict" - 5 resource item(s)
Primary Item - ID 1009
Item #1: ID 1002 type hvc1 Name "HEVC Image" size 1440x960
Item #2: ID 1005 type hvc1 Name "HEVC Image" size 1440x960
Item #3: ID 1008 type hvc1 Name "HEVC Image" size 1440x960 Hidden
Item #4: ID 1009 type iovl Name "Derived image" size 1440x960
File has no movie (moov) - static data container
```
Extract the raw streams from the original `alpha_1440x960.heic`:
```
$ mp4box -dump-item 1002:path=1002.hvc alpha_1440x960.heic
$ mp4box -dump-item 1005:path=1005.hvc alpha_1440x960.heic
$ mp4box -dump-item 1008:path=1008.hvc alpha_1440x960.heic
```
Reconstruct the HEIF image:
```
$ mp4box \
-add-image \
"1002.hvc":id=1002 \
-add-image \
"1005.hvc":id=1005 \
-add-image \
"1008.hvc":id=1008:alpha:hidden:ref=auxl,1005 \
-add-derived-image \
:type=iovl:id=1009:primary:image-size=1440x960:ref=dimg,1002:ref=dimg,1005:image-overlay-offsets=0,0,0,0 \
-new \
"reconstruct.heic"
>>>>>> OUTPUT <<<<<<
Track Importing HEVC - Width 1440 Height 960 FPS 25000/1000
HEVC Import results: 1 samples (4 NALUs) - Slices: 1 I 0 P 0 B - 0 SEI - 1 IDR - 0 CRA
Adding sample at time 0.000 as item 1002
Track Importing HEVC - Width 1440 Height 960 FPS 25000/1000
HEVC Import results: 1 samples (4 NALUs) - Slices: 1 I 0 P 0 B - 0 SEI - 1 IDR - 0 CRA
Adding sample at time 0.000 as item 1005
Track Importing HEVC - Width 1440 Height 960 FPS 25000/1000
HEVC Import results: 1 samples (4 NALUs) - Slices: 1 I 0 P 0 B - 0 SEI - 1 IDR - 0 CRA
HEVC Max NALU size is 396 - stream could be optimized by setting nal_length=2
Adding sample at time 0.000 as item 1008
0.500 secs Interleaving
```
The derived image, `ID=1009`, does not render properly on my Mac. Instead of correctly rendering an overlayed alpha image, it just shows all black. The original image, however, renders correctly.
By the way, running `mp4box -info reconstruct.heic` shows
```
# File Meta type: "pict" - 5 resource item(s)
Primary Item - ID 1009
Item #1: ID 1002 type hvc1 size 1440x960 SAR 1/1 3 channels (8 bpc)
Item #2: ID 1005 type hvc1 size 1440x960 SAR 1/1 3 channels (8 bpc)
Item #3: ID 1008 type hvc1 size 1440x960 SAR 1/1 3 channels (8 bpc) Hidden
Item #4: ID 1009 type iovl size 1440x960
File has no movie (moov) - static data container
```
It contains `SAR 1/1 3 channels (8 bpc)` lines the original file info does not have.
Environment:
```
Image viewed on macOS 12.4 Monterey
MP4Box: GPAC version 2.1-DEV-rev232-gfcaa01eb-master
Image extracted and reconstructed on Windows 10 21H2 19044.1766 but I don't think this matters
``` | MP4Box: HEIF overlay images with alpha mask does not produce correct file | https://api.github.com/repos/gpac/gpac/issues/2211/comments | 1 | 2022-06-30T09:54:06Z | 2022-07-20T16:28:30Z | https://github.com/gpac/gpac/issues/2211 | 1,289,887,174 | 2,211 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
---
Attempting to use BCP 47 language tags such as `{cmn,yue}-{Hans,Hant,CN,TW}` results in an error and files being tagged `und`. These should be recognized for `elng` and the old langauge element set to `chi` (since there wasn't support for `cmn`/`yue` in the old standard).
```
❯ mp4box -for-test -add 'magic.crystal.mp4#video' -add 'magic.crystal.mp4#audio:lang=yue:name=Cantonese' -add 'magic.crystal.yue-Hant.forced.srt:lang=yue-Hant:txtflags=0xC0000000:name=Cantonese (Traditional) (Forced)' -add 'magic.crystal.cmn-Hans.srt:lang=cmn-Hans:name=Mandarin (Simplified)' -add 'magic.crystal.cmn-Hant.srt:lang=cmn-Hant:name=Mandarin (Traditional)' -add 'magic.crystal.eng.srt:lang=en' -tmp ~/tmp/mp4box -brand mp42isom -ab dby1 -no-iod -enable 1 Magic.Crystal.1986.2160p.WEB-DL.AAC2.0.DV.HDR.H.265-ECLiPSE.mp4
IsoMedia import magic.crystal.mp4 - track ID 1 - Video (size 3840 x 2160)
IsoMedia import magic.crystal.mp4 - track ID 2 - Audio (SR 48000 - 2 channels)
Track Importing Timed Text - Text track 3840 x 2160 font Serif (size 18) layer 0
The given code is not a valid one: yue-Hant, using 'und' as 3-letter code
Track Importing Timed Text - Text track 3840 x 2160 font Serif (size 18) layer 0
The given code is not a valid one: cmn-Hans, using 'und' as 3-letter code
Track Importing Timed Text - Text track 3840 x 2160 font Serif (size 18) layer 0
The given code is not a valid one: cmn-Hant, using 'und' as 3-letter code
Track Importing Timed Text - Text track 3840 x 2160 font Serif (size 18) layer 0
0.500 secs Interleaving
```
```
❯ mp4box -version
MP4Box - GPAC version 2.1-DEV-rev223-ge4df874e7-master
(c) 2000-2022 Telecom Paris distributed under LGPL v2.1+ - http://gpac.io
Please cite our work in your research:
GPAC Filters: https://doi.org/10.1145/3339825.3394929
GPAC: https://doi.org/10.1145/1291233.1291452
GPAC Configuration: --prefix=/usr/local/stow/gpac
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_JP2 GPAC_HAS_THEORA GPAC_HAS_VORBIS GPAC_HAS_XVID GPAC_HAS_LINUX_DVB GPAC_DISABLE_3D
```
**EDIT**: Seems like it works if I use `zh-{cmn,yue}-{Hans,Hant,CN,TW}`. | Some BCP 47 language codes not recognized | https://api.github.com/repos/gpac/gpac/issues/2210/comments | 1 | 2022-06-25T11:18:46Z | 2022-06-27T07:07:12Z | https://github.com/gpac/gpac/issues/2210 | 1,284,554,961 | 2,210 |
[
"gpac",
"gpac"
] | Issue:
Calling `mp4box -splits` doesn't distribute chapter marks onto the split files.
Example:
10min mp4 video with a chapter that starts at 9 minutes. After splitting, the first part contains the chapter mark even though that mark points to a section that is in another split file.
Command used:
`mp4box v.mp4 -splits 1024 -out v_$num%03d$.mp4`
Explanation:
While trying to split mp4 files by size (-splits option) I noticed, that chapter information is simply copied to ~~the first split while all other splits don't contain any chapter information at all~~ all splits without rebasing. This results in broken chapters, since chapters may point to times after the first split file.
Expected behaviour:
Chapter marks are distributed to the according split files (and rebased since every split video starts at 0 time again).
System info:
MP4Box - GPAC version 2.1-DEV-rev193-g7370ab0b-master
Windows 10 Pro 20H2
| mp4box split option doesn't handle chapter data | https://api.github.com/repos/gpac/gpac/issues/2209/comments | 5 | 2022-06-24T15:55:58Z | 2022-07-22T18:15:20Z | https://github.com/gpac/gpac/issues/2209 | 1,283,915,429 | 2,209 |
[
"gpac",
"gpac"
] | Error compiling on OSX system
in maths.h line 117:
typedef Float Fixed;
error:Typedef redefinition with different types ('Float' (aka 'float') vs 'SInt32' (aka 'int'))
SInt32 is OSX typedef
in setup.h
#ifndef Bool
/*! boolean value*/
typedef enum {
GF_FALSE = 0,
GF_TRUE
} Bool;
#endif
error:Typedef redefinition with different types ('enum Bool' vs 'int') | Typedef redefinition with different types | https://api.github.com/repos/gpac/gpac/issues/2208/comments | 5 | 2022-06-22T07:34:25Z | 2022-09-28T17:02:10Z | https://github.com/gpac/gpac/issues/2208 | 1,279,698,641 | 2,208 |
[
"gpac",
"gpac"
] | 
The final solution was to move all c99 variable definitions in the for loop outside the loop, and then upgrade gcc to 4.9. Compilation succeeded.
I want to make a suggestion, I hope the official can verify it on different systems before releasing the code, thank you!!! | Under centos7, compiling Mp4box failed. | https://api.github.com/repos/gpac/gpac/issues/2207/comments | 3 | 2022-06-20T15:16:29Z | 2022-06-23T15:47:10Z | https://github.com/gpac/gpac/issues/2207 | 1,277,079,428 | 2,207 |
[
"gpac",
"gpac"
] | This may come off as a dumb question to ask but I need to include it in my project report. I did not find what GPAC stands for on the internet so maybe the contributors may help. On Wikipedia it says GPAC is a recursive acronym.
Can someone tell me what GPAC stands for? | GPAC full form | https://api.github.com/repos/gpac/gpac/issues/2205/comments | 1 | 2022-06-12T12:59:02Z | 2022-06-21T12:23:38Z | https://github.com/gpac/gpac/issues/2205 | 1,268,573,997 | 2,205 |
[
"gpac",
"gpac"
] | Hello, I apologize if this is not the right place, but I was hoping for some guidance on how I could best approach this problem and if GPAC/MP4Box is the right tool for the job.
What I would like to do is convert an mpegts file that contains a single video stream and a single KLV data stream to CMAF according to [MISB ST1910](https://nsgreg.nga.mil/doc/view?i=5097). What I'm most interested in is mapping the KLV metadata packets into EMSG boxes in the output CMAF. There is a demo [DASH manifest](https://www.mistandards.org/demo/cmaf/data/ST1910.1/H264/cmafsample.mpd) that looks like it was created with GPAC that gives me some hope, but I'm not really sure where to start. | Producing MISB ST1910 CMAF from MPEGTS | https://api.github.com/repos/gpac/gpac/issues/2204/comments | 7 | 2022-06-08T20:47:14Z | 2023-06-15T22:37:10Z | https://github.com/gpac/gpac/issues/2204 | 1,265,290,335 | 2,204 |
[
"gpac",
"gpac"
] | Terminal 1:
```
$ gpac -i avgen reframer:rt=on -o http://127.0.0.1:9000/live.m3u8:dmode=dynamic:hlsc:tsb=-1
[Dasher] AS-1 Rep 1 segment 7 done TOO LATE by 34 ms
[Dasher] AS-1 Rep 2 segment 7 done TOO LATE by 64 ms
gpac: filters/out_http.c:2953: httpout_close_input: Assertion `sess->nb_bytes' failed.
Abort
```
Terminal 2:
```
curl http://127.0.0.1:9000/live.m3u8
``` | httpout_close_input: Assertion `sess->nb_bytes' failed. | https://api.github.com/repos/gpac/gpac/issues/2202/comments | 1 | 2022-06-06T20:30:47Z | 2022-06-08T14:06:55Z | https://github.com/gpac/gpac/issues/2202 | 1,262,380,396 | 2,202 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
Hello,
Previously it was possible to use the symbol " * " as a wildcard to dump all raw and srt files embedded in a mp4, see https://github.com/gpac/gpac/issues/925
Example :
`MP4Box.exe -dump-cover -dump-chap-ogg -raw * -srt * File.mp4`
I have not tested this since a while but seems that this doesn't work anymore, it returns an error message in both powershell and cmd :

removing the "-raw*" and "-srt*" removes the error message.
Thanks a lot.
| MP4Box: symbol " * " used as wildcard doesn't work anymore | https://api.github.com/repos/gpac/gpac/issues/2201/comments | 4 | 2022-05-21T15:41:17Z | 2022-06-29T15:29:32Z | https://github.com/gpac/gpac/issues/2201 | 1,244,006,578 | 2,201 |
[
"gpac",
"gpac"
] | @jeanlf,
- [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [X] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
MP4BOX/GPAC version: MP4Box - GPAC version 2.1-DEV-rev173-g82dd6d2b-master
vvencapp version: 1.4.0
OS: Windows 11
My github action & encoded .266 file: https://github.com/MartinEesmaa/fixmyissueofGPAC/actions/runs/2351776705
Run log: https://github.com/MartinEesmaa/fixmyissueofGPAC/runs/6506624031?check_suite_focus=true
Steps reproduced:
1: I converted from mp4 to yuv
2: Converted from YUV 8-bit to VVC 10-bit using code: `vvencapp -i bbbbeforenw.yuv -s 1280x720 -r 24 --preset fast --qp 35 --tier high -o gpactestvvc.266`
3: After converting, I checked .266 file in mp4box and I got an error:
```
mp4box -info gpactestvvc.266.266
Import probing results for gpactestvvc.266.266:
File has no selectable tracks
``` | VVC does not read profile high by MP4BOX after vvc encoding | https://api.github.com/repos/gpac/gpac/issues/2200/comments | 1 | 2022-05-19T12:01:24Z | 2022-05-19T12:14:18Z | https://github.com/gpac/gpac/issues/2200 | 1,241,667,704 | 2,200 |
[
"gpac",
"gpac"
] | I hope that makes sense. Unless I am missing something, there appears to be no way to generate an HLS M3U8 with absolute paths. It definitely shouldn't be a default option (Apple recommends relative paths but allows for both), yet having a way to enable it for edge cases that require it would be nice.
```mp4box -dash 10000 file.mp4 -segment-name "$File$_dash$FS$$Number%02d$" -frag-rap -base-url "https://some.url/some/folder/" -mpd-info-url "https://files.catbox.moe/om3tcw.webm" -mpd-title "Mikoboat (2020)" -mem-frags -out Mikoboat.mpd:dual```
The output .mpd does have the base-URL as expected. The m3u8 always just has segment names.
```
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="file_dashinit.mp4"
#EXTINF:10.00,
file_dash01.m4s
#EXTINF:10.00,
file_dash02.m4s
#EXTINF:10.00,
file_dash03.m4s
```
Whereas it would be nice to output m3u8 directly (without batch Find/Replace-ing in a text editor) that looked like:
```
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="https://some.url/some/folder/file_dashinit.mp4"
#EXTINF:10.00,
https://some.url/some/folder/file_dash01.m4s
#EXTINF:10.00,
https://some.url/some/folder/file_dash02.m4s
#EXTINF:10.00,
https://some.url/some/folder/file_dash03.m4s
```
I tried adding `-base-url` again after the `-out` filename, but that changed nothing. It looks like there's already an option for doing the reverse: forcing URLs to be included when generating an MPD from HLS?
> **-url-template-sim**: use SegmentTemplate simulation while converting HLS to MPD
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.
**As well as I could!**
- [ ✓ ] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
`MP4Box - GPAC version 2.1-DEV-rev156-g105d6798-master`
- [ ✓ ] 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 hope so?**
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
| MP4Box/dasher Feature Request (?): Allow passing -base-url and/or :BaseURL= through to HLS playlists as absolute paths | https://api.github.com/repos/gpac/gpac/issues/2199/comments | 2 | 2022-05-17T21:09:16Z | 2022-05-18T21:24:08Z | https://github.com/gpac/gpac/issues/2199 | 1,239,160,441 | 2,199 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
Actually i'm editing MPD file after creation to add file.vtt to load it with dash.js:
```
<AdaptationSet id="3" contentType="text" mimeType="text/vtt" lang="fre" startWithSAP="1">
<Label>Français forcés</Label>
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="forced-subtitle"/>
<Representation id="3" bandwidth="256">
<BaseURL>3_fre.vtt</BaseURL>
</Representation>
</AdaptationSet>
```
I was hopping MP4Box can do it from command line, for example:
```
MP4Box -dash 4000 -frag 4000 -rap -fps 24 \
test.mp4#trackID=1:id=video \
test.mp4#trackID=2:id=fre \
/path/to/3_fre.vtt#subtitle:id=3:asID=3:role=forced-subtitle:desc_as='<Label>Français forcés</Label>' \
-out index.mpd
```
Thank you.
| Feature request: possibility to add a file.vtt to MPD from command line | https://api.github.com/repos/gpac/gpac/issues/2197/comments | 2 | 2022-05-17T07:55:37Z | 2022-05-18T11:58:40Z | https://github.com/gpac/gpac/issues/2197 | 1,238,227,704 | 2,197 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [x] I looked for a similar issue and couldn't find any.
- [x] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
From my understanding :asID=VALUE add an ID to the AdaptationSet parent of the Representation.
Using this command line:
```
MP4Box -dash 10000 -profile dashavc264:onDemand test.mp4#trackID=1:id=video test.mp4#trackID=2:id=fre test.mp4#trackID=3:id=eng test.mp4#trackID=6:id=fr_forced:asID=fr_forced:role=forced-subtitle test.mp4#trackID=7:id=fr_full:asID=fr_full:role=subtitle -out index.mpd
```
I was expecting this result (truncated):
```
<AdaptationSet id="fr_forced" segmentAlignment="true" lang="fra" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="forced-subtitle"/>
<Representation id="fr_forced" mimeType="application/mp4" codecs="wvtt" bandwidth="25">
<BaseURL>test_dash_track6_init.mp4</BaseURL>
<SegmentBase indexRangeExact="true" indexRange="965-8904">
<Initialization range="0-804"/>
</SegmentBase>
</Representation>
</AdaptationSet>
```
But **id="fr_forced"** is not added to the AdaptationSet | How to properly use :asID=VALUE with MP4Box | https://api.github.com/repos/gpac/gpac/issues/2196/comments | 2 | 2022-05-17T07:32:12Z | 2022-05-23T08:54:58Z | https://github.com/gpac/gpac/issues/2196 | 1,238,202,004 | 2,196 |
[
"gpac",
"gpac"
] | POC: https://drive.google.com/file/d/1uLF_tyNgwhZWBBPnOq1TEOU-2h4CWLc0/view?usp=sharing
```
Description
Use After Free in gpac
Proof of Concept
MP4Box -bt POC1
ASAN
==74043==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000003fd0 at pc 0x7f0c5374e845 bp 0x7ffcfc56f2b0 sp 0x7ffcfc56f2a8
READ of size 8 at 0x604000003fd0 thread T0
#0 0x7f0c5374e844 in gf_node_try_destroy /home/wjh/gpac/src/scenegraph/base_scenegraph.c:668:24
#1 0x7f0c537623c1 in gf_sg_command_del /home/wjh/gpac/src/scenegraph/commands.c:120:3
#2 0x7f0c53f10d1c in gf_sm_au_del /home/wjh/gpac/src/scene_manager/scene_manager.c:113:4
#3 0x7f0c53f0dcd8 in gf_sm_reset_stream /home/wjh/gpac/src/scene_manager/scene_manager.c:126:3
#4 0x7f0c53f0dcd8 in gf_sm_delete_stream /home/wjh/gpac/src/scene_manager/scene_manager.c:133:2
#5 0x7f0c53f0dcd8 in gf_sm_del /home/wjh/gpac/src/scene_manager/scene_manager.c:147:3
#6 0x505572 in dump_isom_scene /home/wjh/gpac/applications/mp4box/filedump.c:220:2
#7 0x4f3e66 in mp4box_main /home/wjh/gpac/applications/mp4box/mp4box.c:6227:7
#8 0x7f0c52e34082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
#9 0x42ac0d in _start (/home/wjh/gpac/bin/gcc/MP4Box+0x42ac0d)
0x604000003fd0 is located 0 bytes inside of 48-byte region [0x604000003fd0,0x604000004000)
freed by thread T0 here:
#0 0x4a49fd in free (/home/wjh/gpac/bin/gcc/MP4Box+0x4a49fd)
#1 0x7f0c5374a1cf in gf_node_unregister /home/wjh/gpac/src/scenegraph/base_scenegraph.c:763:3
#2 0x7f0c5374e7dc in gf_node_try_destroy /home/wjh/gpac/src/scenegraph/base_scenegraph.c:669:9
#3 0x7f0c53f10d1c in gf_sm_au_del /home/wjh/gpac/src/scene_manager/scene_manager.c:113:4
#4 0x7f0c53f0dcd8 in gf_sm_reset_stream /home/wjh/gpac/src/scene_manager/scene_manager.c:126:3
#5 0x7f0c53f0dcd8 in gf_sm_delete_stream /home/wjh/gpac/src/scene_manager/scene_manager.c:133:2
#6 0x7f0c53f0dcd8 in gf_sm_del /home/wjh/gpac/src/scene_manager/scene_manager.c:147:3
previously allocated by thread T0 here:
#0 0x4a4c7d in malloc (/home/wjh/gpac/bin/gcc/MP4Box+0x4a4c7d)
#1 0x7f0c5377e2db in Group_Create /home/wjh/gpac/src/scenegraph/mpeg4_nodes.c:7579:2
#2 0x7f0c5377e2db in gf_sg_mpeg4_node_new /home/wjh/gpac/src/scenegraph/mpeg4_nodes.c:36809:10
SUMMARY: AddressSanitizer: heap-use-after-free /home/wjh/gpac/src/scenegraph/base_scenegraph.c:668:24 in gf_node_try_destroy
Shadow bytes around the buggy address:
0x0c087fff87a0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff87b0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff87c0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff87d0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff87e0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
=>0x0c087fff87f0: fa fa 00 00 00 00 02 fa fa fa[fd]fd fd fd fd fd
0x0c087fff8800: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
0x0c087fff8810: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
0x0c087fff8820: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff8830: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff8840: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd 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
==74043==ABORTING
Impact
can cause a program to crash, use unexpected values, or execute code.
Occurrences
base_scenegraph.c L668
``` | Use After Free | https://api.github.com/repos/gpac/gpac/issues/2194/comments | 0 | 2022-05-16T14:05:03Z | 2022-05-18T09:53:40Z | https://github.com/gpac/gpac/issues/2194 | 1,237,213,419 | 2,194 |
[
"gpac",
"gpac"
] | [48fa9cedf6](https://github.com/gpac/gpac/commit/48fa9cedf6043c5975a6fb05f580a53c2cbf91cd) added a function declaration inside a function `unload_compositor()` in applications/gpac/compositor_tools.c,
```
#ifdef WIN32
static void close_console();
close_console();
#endif
```
This leads to a build failure on MinGW64 / GCC 11: `error: invalid storage class for function 'close_console'`
Indeed, 6.7.1.5 of C99 states
`The declaration of an identifier for a function that has block scope shall have no explicit storage-class specifier other than extern.`
It should be moved outside. Thanks. | Illegal function declaration prevents compilation | https://api.github.com/repos/gpac/gpac/issues/2193/comments | 0 | 2022-05-15T14:51:30Z | 2022-05-16T07:09:08Z | https://github.com/gpac/gpac/issues/2193 | 1,236,309,644 | 2,193 |
[
"gpac",
"gpac"
] | Hi,
I'm trying to use DASH segmentation to remux a TS video into a DASH.
But I can't get sepparated streams (video/audio).
When I use one of the input modifiers (#audio, #video or #trackID), for example:
MP4Box -dash 1000 -profile live -segment-name file_ input.ts#audio -out output.mpd
those modifiers are ignored, and the output alerts with the message:
**Arg tkid set but not used**
Always i get all the streams muxed in the same segment.m4s
It works ok if my input is encapsulated in a mp4.
I've tried with the version
GPAC version 1.1.0
and the last
GPAC version 2.0-revrelease
with same result.
It's possible to use the modifiers when opening a TS file?
Thank you very much
| MP4Box dash can't use input modifiers when opening a TS file | https://api.github.com/repos/gpac/gpac/issues/2192/comments | 2 | 2022-05-13T15:49:05Z | 2022-05-18T14:24:16Z | https://github.com/gpac/gpac/issues/2192 | 1,235,414,701 | 2,192 |
[
"gpac",
"gpac"
] | Hi,
I would like to know if it's doable to force the sampling rate during audio stream import within MP4Box...because I would like to mux h264 video and opus audio streams but sometimes my audio streams have sampling rate @ 44.100 KHz.
Import opus streams to mp4 forces the sampling rate @ 48000 Hz. So, my question is : is it possible to put the sampling rate @ 44.100 KHz for such streams within MP4Box ?
Thanks in advance.
| How to force audio sampling rate w/ mp4box | https://api.github.com/repos/gpac/gpac/issues/2191/comments | 4 | 2022-05-12T15:09:47Z | 2022-05-17T14:43:43Z | https://github.com/gpac/gpac/issues/2191 | 1,234,131,646 | 2,191 |
[
"gpac",
"gpac"
] | Hi, I intend to use libgpac filter to process video contents stored in memory in my project in the form of SDK. But I looked through the gpac project and noticed that the APIs seem to be designed for file, url or memory file.
Are there any APIs for my scenario? | Use libgpac api to process data stored in memory | https://api.github.com/repos/gpac/gpac/issues/2190/comments | 3 | 2022-05-12T09:04:42Z | 2022-05-18T09:26:45Z | https://github.com/gpac/gpac/issues/2190 | 1,233,685,212 | 2,190 |
[
"gpac",
"gpac"
] | Hello,
I have used Kvazaar to split a 360-degree video (YUV format) into 3x3 tiles and make a .hvc file. I then used the .hvc file to package within a container via MP4Box `$ MP4Box -add video_tiled.hvc:split_tiles -fps 30 -new video_tiled.mp4`
Later I used the generated file to create an MPD file using the following command `$ MP4Box -dash 1000 -rap -frag-rap -profile live -out dash_tiled.mpd video_tiled.mp4`
Although the manifest file is playing on Osmo4, the tiles have been split and I can observe the splitting in the video, but it seems to be still in YUV format. Also, I am not able to play the video on my Exoplayer application. The lines in the manifest file seem to be okay. (Attaching it here for reference). Can someone point out what am I missing?

[dash_tiled.txt](https://github.com/gpac/gpac/files/8664164/dash_tiled.txt)
| Issue with streaming manifest file on Exoplayer | https://api.github.com/repos/gpac/gpac/issues/2189/comments | 3 | 2022-05-10T18:45:11Z | 2022-10-10T16:43:31Z | https://github.com/gpac/gpac/issues/2189 | 1,231,555,661 | 2,189 |
[
"gpac",
"gpac"
] | Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
- [ x] I looked for a similar issue and couldn't find any.
- [x ] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ x] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
Hello,
I am working with a task of be able to view clips of video that happened during the day, triggered by motion detection from a camera. And be able to stream these video in a single player, for example shaka player.
I've thought of creating a virtual 24 hours video of, for example, 10 clips of different duration, and make a viable manifest file which kan display this video and information on a 24 hour timeline?
Or is it some other way I can create a manifest which will use all of these small videos?
Thanks in advance. | Can I use MP4Box to virtually create a 24 hour video with several video clips. | https://api.github.com/repos/gpac/gpac/issues/2188/comments | 6 | 2022-05-10T12:41:54Z | 2022-05-13T07:54:32Z | https://github.com/gpac/gpac/issues/2188 | 1,231,097,508 | 2,188 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.