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
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: In the test of the binary mp42ts instrumented with ASAN. There are some inputs causing heap-buffer-overflow. Here is the ASAN mode output: ==10897==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000ec3c at pc 0x0000004a9771 bp 0x7fffffffb150 sp 0x7fffffffb140 READ of size 4 at 0x60300000ec3c thread T0 #0 0x4a9770 in AP4_BitReader::SkipBits(unsigned int) /root/Bento4/Source/C++/Core/Ap4Utils.cpp:564 #1 0x53f5c5 in AP4_Dac4Atom::AP4_Dac4Atom(unsigned int, unsigned char const*) /root/Bento4/Source/C++/Core/Ap4Dac4Atom.cpp:396 #2 0x543230 in AP4_Dac4Atom::Create(unsigned int, AP4_ByteStream&) /root/Bento4/Source/C++/Core/Ap4Dac4Atom.cpp:58 #3 0x4f7503 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:776 #4 0x4fc596 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #5 0x51cd08 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #6 0x4826d1 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:115 #7 0x4826d1 in AP4_AudioSampleEntry::AP4_AudioSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:420 #8 0x5d736d in AP4_EncaSampleEntry::AP4_EncaSampleEntry(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4Protection.cpp:74 #9 0x4f4a3c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:298 #10 0x4fc596 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #11 0x614618 in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:101 #12 0x615fc0 in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:57 #13 0x4f838e in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:458 #14 0x4fc596 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #15 0x51ac42 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #16 0x51ac42 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #17 0x51b986 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #18 0x4f5833 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #19 0x4fc596 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #20 0x51ac42 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #21 0x51ac42 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #22 0x51b986 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #23 0x4f5833 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #24 0x4fc596 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #25 0x51ac42 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #26 0x51ac42 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #27 0x51b986 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #28 0x4f5833 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #29 0x4fc596 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #30 0x51ac42 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #31 0x51ac42 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #32 0x49cfb2 in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4TrakAtom.cpp:165 #33 0x4f7709 in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4TrakAtom.h:58 #34 0x4f7709 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:413 #35 0x4fc596 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #36 0x51ac42 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #37 0x51ac42 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #38 0x430fac in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4MoovAtom.cpp:80 #39 0x4f5430 in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4MoovAtom.h:56 #40 0x4f5430 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:393 #41 0x4fb65a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #42 0x4fb65a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #43 0x41c6af in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /root/Bento4/Source/C++/Core/Ap4File.cpp:104 #44 0x41c6af in AP4_File::AP4_File(AP4_ByteStream&, bool) /root/Bento4/Source/C++/Core/Ap4File.cpp:78 #45 0x404446 in main /root/Bento4/Source/C++/Apps/Mp42Ts/Mp42Ts.cpp:511 #46 0x7ffff61bb83f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f) #47 0x40ae38 in _start (/root/Bento4/mp42ts+0x40ae38) 0x60300000ec3c is located 0 bytes to the right of 28-byte region [0x60300000ec20,0x60300000ec3c) allocated by thread T0 here: #0 0x7ffff6f03712 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99712) #1 0x419645 in AP4_DataBuffer::ReallocateBuffer(unsigned int) /root/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:210 #2 0x419645 in AP4_DataBuffer::SetBufferSize(unsigned int) /root/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:136 SUMMARY: AddressSanitizer: heap-buffer-overflow /root/Bento4/Source/C++/Core/Ap4Utils.cpp:564 AP4_BitReader::SkipBits(unsigned int) Shadow bytes around the buggy address: 0x0c067fff9d30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9d40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9d50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c067fff9d80: fa fa fa fa 00 00 00[04]fa fa 00 00 00 02 fa fa 0x0c067fff9d90: 00 00 00 02 fa fa 00 00 00 fa fa fa 00 00 00 fa 0x0c067fff9da0: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x0c067fff9db0: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x0c067fff9dc0: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x0c067fff9dd0: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 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 ==10897==ABORTING ### Crash input https://github.com/17ssDP/fuzzer_crashes/blob/main/Bento4/mp42ts-hbo-00 ### Validation steps git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp42ts mp42ts-hbo-00 /dev/null ### Environment Ubuntu 16.04 Clang 10.0.1 gcc 5.5
Heap-buffer-overflow with ASAN in mp42ts
https://api.github.com/repos/axiomatic-systems/Bento4/issues/764/comments
0
2022-09-19T06:24:55Z
2022-09-19T06:24:55Z
https://github.com/axiomatic-systems/Bento4/issues/764
1,377,462,592
764
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: In the test of the binary mp42aac instrumented with ASAN. There are some inputs causing memory leaks. Here is the ASAN mode output: ================================================================= ==19530==ERROR: LeakSanitizer: detected memory leaks Direct leak of 80 byte(s) in 1 object(s) allocated from: #0 0x7ffff6f03592 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99592) #1 0x5ad493 in AP4_DescriptorFactory::CreateDescriptorFromStream(AP4_ByteStream&, AP4_Descriptor*&) /root/Bento4/Source/C++/Core/Ap4DescriptorFactory.cpp:85 Indirect leak of 112 byte(s) in 2 object(s) allocated from: #0 0x7ffff6f03592 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99592) #1 0x5ad7a9 in AP4_DescriptorFactory::CreateDescriptorFromStream(AP4_ByteStream&, AP4_Descriptor*&) /root/Bento4/Source/C++/Core/Ap4DescriptorFactory.cpp:127 Indirect leak of 72 byte(s) in 3 object(s) allocated from: #0 0x7ffff6f03592 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99592) #1 0x604f8b in AP4_List<AP4_Descriptor>::Add(AP4_Descriptor*) /root/Bento4/Source/C++/Core/Ap4List.h:160 #2 0x604f8b in AP4_ObjectDescriptor::AP4_ObjectDescriptor(AP4_ByteStream&, unsigned char, unsigned int, unsigned int) /root/Bento4/Source/C++/Core/Ap4ObjectDescriptor.cpp:103 Indirect leak of 32 byte(s) in 1 object(s) allocated from: #0 0x7ffff6f03592 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99592) #1 0x5ad532 in AP4_DescriptorFactory::CreateDescriptorFromStream(AP4_ByteStream&, AP4_Descriptor*&) /root/Bento4/Source/C++/Core/Ap4DescriptorFactory.cpp:115 Indirect leak of 25 byte(s) in 2 object(s) allocated from: #0 0x7ffff6f03712 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99712) #1 0x415b81 in AP4_DataBuffer::ReallocateBuffer(unsigned int) /root/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:210 #2 0x415b81 in AP4_DataBuffer::SetDataSize(unsigned int) /root/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:151 SUMMARY: AddressSanitizer: 321 byte(s) leaked in 9 allocation(s). ### Crash Input https://github.com/17ssDP/fuzzer_crashes/blob/main/Bento4/mp42aac-ml-00 ### Verification steps: git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp42aac mp42aac-ml-00 /dev/null ### Environment Ubuntu 16.04 Clang 10.0.1 gcc 5.5
Memory leaks with ASAN in mp42aac
https://api.github.com/repos/axiomatic-systems/Bento4/issues/763/comments
0
2022-09-19T06:18:05Z
2022-09-19T06:18:05Z
https://github.com/axiomatic-systems/Bento4/issues/763
1,377,456,877
763
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: Thanks for your fix of issue #751 In the test of the binary mp42aac instrumented with ASAN. There are some inputs causing heap-buffer-overflow. Here is the ASAN mode output: ==27304==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000ed28 at pc 0x0000005a64d9 bp 0x7fffffffb290 sp 0x7fffffffb280 READ of size 1 at 0x60300000ed28 thread T0 #0 0x5a64d8 in AP4_Dec3Atom::AP4_Dec3Atom(unsigned int, unsigned char const*) /root/Bento4/Source/C++/Core/Ap4Dec3Atom.cpp:161 #1 0x5a6a62 in AP4_Dec3Atom::Create(unsigned int, AP4_ByteStream&) /root/Bento4/Source/C++/Core/Ap4Dec3Atom.cpp:56 #2 0x508887 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:769 #3 0x50ecb6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #4 0x579928 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #5 0x480e69 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:115 #6 0x480e69 in AP4_AudioSampleEntry::AP4_AudioSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:420 #7 0x480e69 in AP4_Eac3SampleEntry::AP4_Eac3SampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:752 #8 0x508d6b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:338 #9 0x50ecb6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #10 0x490228 in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:101 #11 0x491bd0 in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:57 #12 0x50aaae in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:458 #13 0x50ecb6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #14 0x577862 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #15 0x577862 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #16 0x5785a6 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #17 0x507f53 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #18 0x50ecb6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #19 0x5aea82 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84 #20 0x5aeff7 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50 #21 0x509882 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:580 #22 0x50ecb6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #23 0x577862 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #24 0x577862 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #25 0x5785a6 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #26 0x507f53 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #27 0x50ecb6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #28 0x577862 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #29 0x577862 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #30 0x5785a6 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #31 0x507f53 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #32 0x50ecb6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #33 0x577862 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #34 0x577862 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #35 0x5785a6 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #36 0x507f53 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #37 0x50dd7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #38 0x50dd7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #39 0x418daf in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /root/Bento4/Source/C++/Core/Ap4File.cpp:104 #40 0x418daf in AP4_File::AP4_File(AP4_ByteStream&, bool) /root/Bento4/Source/C++/Core/Ap4File.cpp:78 #41 0x4040d7 in main /root/Bento4/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:250 #42 0x7ffff61bb83f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f) #43 0x408508 in _start (/root/Bento4/mp42aac+0x408508) 0x60300000ed28 is located 0 bytes to the right of 24-byte region [0x60300000ed10,0x60300000ed28) allocated by thread T0 here: #0 0x7ffff6f03712 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99712) #1 0x4147b5 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) /root/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:55 #2 0x17 (<unknown module>) SUMMARY: AddressSanitizer: heap-buffer-overflow /root/Bento4/Source/C++/Core/Ap4Dec3Atom.cpp:161 AP4_Dec3Atom::AP4_Dec3Atom(unsigned int, unsigned char const*) Shadow bytes around the buggy address: 0x0c067fff9d50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa 00 00 00 fa =>0x0c067fff9da0: fa fa 00 00 00[fa]fa fa 00 00 00 fa fa fa 00 00 0x0c067fff9db0: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x0c067fff9dc0: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x0c067fff9dd0: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x0c067fff9de0: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x0c067fff9df0: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 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 ==27304==ABORTING ### Crash input https://github.com/17ssDP/fuzzer_crashes/blob/main/Bento4/mp42aac-hbo-00 ### Validation steps git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp42aac mp42aac-hbo-00 /dev/null ### Environment Ubuntu 16.04 Clang 10.0.1 gcc 5.5
Heap-buffer-overflow with ASAN in mp42aac
https://api.github.com/repos/axiomatic-systems/Bento4/issues/762/comments
0
2022-09-19T06:13:40Z
2022-09-19T06:18:56Z
https://github.com/axiomatic-systems/Bento4/issues/762
1,377,452,573
762
[ "axiomatic-systems", "Bento4" ]
Hello,I use the fuzzer(AFL) to fuzz binary mp42avc and got some crashes which show that allocator is out of memory trying to allocate 0xXXXXXXXX bytes when method new is called. The following is the details. ### Bug1 #### ./mp42avc ~/out/crashes/id\:000017\,sig\:06\,src\:000925+000617\,op\:splice\,rep\:128 3.avc ================================================================= ==4126303==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0xc4b26d23 bytes #0 0x549287 in operator new[](unsigned long) (/root/Bento4/cmakebuild/mp42avc+0x549287) #1 0x558418 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) /root/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:55:16 #2 0x5ec12a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:513:20 #3 0x5e7b66 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #4 0x6563c0 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #5 0x6559d7 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #6 0x5ec3a5 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:580:20 #7 0x5e7b66 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /root/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #8 0x62e6b0 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #9 0x62e48b in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /root/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 ==4126303==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory (/root/Bento4/cmakebuild/mp42avc+0x549287) in operator new[](unsigned long) ==4126303==ABORTING ### Bug 2 #### [root@iZ8vb29flmohv2ga6wdtfbZ cmakebuild]# ./mp42avc ~/out/crashes/id\:000018\,sig\:06\,src\:000606\,op\:havoc\,rep\:4 3.avc ================================================================= ==4126299==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x7d727b02 bytes #0 0x549287 in operator new[](unsigned long) (/root/Bento4/cmakebuild/mp42avc+0x549287) #1 0x6637c0 in AP4_HdlrAtom::AP4_HdlrAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /root/Bento4/Source/C++/Core/Ap4HdlrAtom.cpp:88:18 ==4126299==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory (/root/Bento4/cmakebuild/mp42avc+0x549287) in operator new[](unsigned long) ==4126299==ABORTING **Ap4HdlrAtom.cpp:88 and Ap4HdlrAtom.cpp will call new[Big size] and then crash.** ### Bug3 #### ./AFL/afl-fuzz -i ./seed2/ -o ./out3 -d -m none ./Bento4/cmakebuild/aac2mp4 @@ 3.mp4 #### After testing, the above problems also occur in acc2mp4 function. #### **The following is the details.** #### [root@iZ8vb29flmohv2ga6wdtfbZ cmakebuild]# ./aac2mp4 ~/out3/crashes/id\:000008\,sig\:06\,src\:000074\,op\:havoc\,rep\:4 3.mp4 #### AAC frame [000000]: size = -7, 96000 kHz, 0 ch ================================================================= ==3788615==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0xfffffff9 bytes #0 0x54a287 in operator new[](unsigned long) (/root/Bento4/cmakebuild/aac2mp4+0x54a287) #1 0x55b578 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) /root/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:55:16 ==3788615==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory (/root/Bento4/cmakebuild/aac2mp4+0x54a287) in operator new[](unsigned long) ==3788615==ABORTING ### input [input.zip](https://github.com/axiomatic-systems/Bento4/files/9595618/input.zip) ### Crashes [crashes.zip](https://github.com/axiomatic-systems/Bento4/files/9595619/crashes.zip) **Report of the Information Security Laboratory of Ocean University of China @OUC_ISLOUC @OUC_Blue_Whale**
Out of memory in Ap4DataBuffer:new AP4_Byte[buffer_size]
https://api.github.com/repos/axiomatic-systems/Bento4/issues/761/comments
0
2022-09-19T00:56:17Z
2023-05-29T02:53:19Z
https://github.com/axiomatic-systems/Bento4/issues/761
1,377,242,122
761
[ "axiomatic-systems", "Bento4" ]
A heap-buffer-overflow has occurred when running program mp42hls. Here is the reproducing command: `./mp42hls poc3` (unzip first) POC: [poc3.zip](https://github.com/axiomatic-systems/Bento4/files/9591908/poc3.zip) Here is the reproduce trace reported by ASAN: ``` ==2860209==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000234 at pc 0x00000046dd2e bp 0x7ffd53e98cd0 sp 0x7ffd53e98cc8READ of size 1 at 0x602000000234 thread T0 #0 0x46dd2d in AP4_Mp4AudioDecoderConfig::Parse(unsigned char const*, unsigned int) (/fuzzmp42hls/quchong/mp42hls+0x46dd2d) #1 0x5c5763 in AP4_Mpeg2TsAudioSampleStream::WriteSample(AP4_Sample&, AP4_DataBuffer&, AP4_SampleDescription*, bool, AP4_ByteStream&) (/fuzzmp42hls/quchong/mp42hls+0x5c5763) #2 0x4439c8 in main (/fuzzmp42hls/quchong/mp42hls+0x4439c8) #3 0x7f6949c52c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) #4 0x407dd9 in _start (/fuzzmp42hls/quchong/mp42hls+0x407dd9) 0x602000000234 is located 0 bytes to the right of 4-byte region [0x602000000230,0x602000000234) allocated by thread T0 here: #0 0x9dbf50 in malloc /llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145 #1 0x7f694aa8e297 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x93297) #2 0x5c5763 in AP4_Mpeg2TsAudioSampleStream::WriteSample(AP4_Sample&, AP4_DataBuffer&, AP4_SampleDescription*, bool, AP4_ByteStream&) (/fuzzmp42hls/quchong/mp42hls+0x5c5763) #3 0x4439c8 in main (/fuzzmp42hls/quchong/mp42hls+0x4439c8) #4 0x7f6949c52c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) SUMMARY: AddressSanitizer: heap-buffer-overflow (/fuzzmp42hls/quchong/mp42hls+0x46dd2d) in AP4_Mp4AudioDecoderConfig::Parse(unsigned char const*, unsigned int)Shadow bytes around the buggy address: 0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff8000: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa fd fd 0x0c047fff8010: fa fa 04 fa fa fa fd fd fa fa 00 05 fa fa 04 fa 0x0c047fff8020: fa fa 00 fa fa fa fd fd fa fa 04 fa fa fa fd fa 0x0c047fff8030: fa fa fd fa fa fa 01 fa fa fa 00 00 fa fa 00 00=>0x0c047fff8040: fa fa 04 fa fa fa[04]fa fa fa fa fa fa fa fa fa 0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa faShadow 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 ==2860209==ABORTING ```
heap-buffer-overflow in mp42hls (AP4_Mp4AudioDecoderConfig::Parse(unsigned char const*, unsigned int)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/760/comments
1
2022-09-17T14:42:34Z
2022-09-18T22:50:34Z
https://github.com/axiomatic-systems/Bento4/issues/760
1,376,791,202
760
[ "axiomatic-systems", "Bento4" ]
I use AFL when fuzzing and got some crashes. ================================================================= ==3780==ERROR: LeakSanitizer: detected memory leaks Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x4c470d in operator new(unsigned long) (/home/hjsz/Bento4/cmakebuild/mp4fragment+0x4c470d) #1 0x653b06 in AP4_StdcFileByteStream::Create(AP4_FileByteStream*, char const*, AP4_FileByteStream::Mode, AP4_ByteStream*&) /home/hjsz/Bento4/Source/C++/System/StdC/Ap4StdCFileByteStream.cpp:279:14 SUMMARY: AddressSanitizer: 48 byte(s) leaked in 1 allocation(s). ================================================================= [crash](https://github.com/yangfar/Image/blob/main/crash.zip) **Report of the Information Security Laboratory of Ocean University of China @OUC_ISLOUC @OUC_Blue_Whale**
There are memory leaks in mp4fragment
https://api.github.com/repos/axiomatic-systems/Bento4/issues/759/comments
0
2022-09-17T08:19:32Z
2023-05-29T02:53:19Z
https://github.com/axiomatic-systems/Bento4/issues/759
1,376,705,591
759
[ "axiomatic-systems", "Bento4" ]
Hi there, I use my fuzzer for fuzzing the binary mp4decrypt, and this binary crashes with the following: ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==24087==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000702ee8 bp 0x7ffcf40a75f0 sp 0x7ffcf40a73b0 T0) ==24087==The signal is caused by a READ memory access. ==24087==Hint: address points to the zero page. #0 0x702ee8 in AP4_StszAtom::WriteFields(AP4_ByteStream&) (/fuzztest/mp4decrypt/mp4decrypt+0x702ee8) #1 0x82facf in AP4_AtomListWriter::Action(AP4_Atom*) const (/fuzztest/mp4decrypt/mp4decrypt+0x82facf) #2 0x4fc423 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/fuzztest/mp4decrypt/mp4decrypt+0x4fc423) #3 0x82facf in AP4_AtomListWriter::Action(AP4_Atom*) const (/fuzztest/mp4decrypt/mp4decrypt+0x82facf) #4 0x4fc423 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/fuzztest/mp4decrypt/mp4decrypt+0x4fc423) #5 0x82facf in AP4_AtomListWriter::Action(AP4_Atom*) const (/fuzztest/mp4decrypt/mp4decrypt+0x82facf) #6 0x4fc423 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/fuzztest/mp4decrypt/mp4decrypt+0x4fc423) #7 0x82facf in AP4_AtomListWriter::Action(AP4_Atom*) const (/fuzztest/mp4decrypt/mp4decrypt+0x82facf) #8 0x4fc423 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/fuzztest/mp4decrypt/mp4decrypt+0x4fc423) #9 0x82facf in AP4_AtomListWriter::Action(AP4_Atom*) const (/fuzztest/mp4decrypt/mp4decrypt+0x82facf) #10 0x4fc423 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/fuzztest/mp4decrypt/mp4decrypt+0x4fc423) #11 0x82facf in AP4_AtomListWriter::Action(AP4_Atom*) const (/fuzztest/mp4decrypt/mp4decrypt+0x82facf) #12 0x62cea7 in AP4_Processor::Process(AP4_ByteStream&, AP4_ByteStream&, AP4_ByteStream*, AP4_Processor::ProgressListener*, AP4_AtomFactory&) (/fuzztest/mp4decrypt/mp4decrypt+0x62cea7) #13 0x412846 in main (/fuzztest/mp4decrypt/mp4decrypt+0x412846) #14 0x7fcaa49f1c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) #15 0x407c99 in _start (/fuzztest/mp4decrypt/mp4decrypt+0x407c99) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/fuzztest/mp4decrypt/mp4decrypt+0x702ee8) in AP4_StszAtom::WriteFields(AP4_ByteStream&) ==24087==ABORTING ``` ### System Details Test Machine: Ubuntu 18.04 (docker) Project Name: mp4decrypt (Bento4-1.6.0-639) ### Command ./mp4decrypt mp4decrypt.demo /dev/null ### Poc [mp4decrypt_Poc.zip](https://github.com/axiomatic-systems/Bento4/files/9591036/mp4decrypt_Poc.zip) ### Credit Wanying Cao(NCNIPC of China), (Zhongguancun Laboratory) Han Zheng (NCNIPC of China, [Hexhive](http://hexhive.epfl.ch/)), (Zhongguancun Laboratory)
SEGV error
https://api.github.com/repos/axiomatic-systems/Bento4/issues/758/comments
0
2022-09-17T06:02:37Z
2023-06-26T09:41:06Z
https://github.com/axiomatic-systems/Bento4/issues/758
1,376,678,566
758
[ "axiomatic-systems", "Bento4" ]
Hi There, I tested the binary mp42ts with my fuzzer, and a crash incurred, i.e., SEGV on an unknown address error. Here are the details: ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==6287==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000007021ab bp 0x7fff9e86cb50 sp 0x7fff9e86c5f0 T0) ==6287==The signal is caused by a READ memory access. ==6287==Hint: address points to the zero page. #0 0x7021ab in AP4_StszAtom::GetSampleSize(unsigned int, unsigned int&) (/fuzztest/mp42ts/mp42ts+0x7021ab) #1 0x5754fc in AP4_AtomSampleTable::GetSample(unsigned int, AP4_Sample&) (/fuzztest/mp42ts/mp42ts+0x5754fc) #2 0x40d0cb in TrackSampleReader::ReadSample(AP4_Sample&, AP4_DataBuffer&) (/fuzztest/mp42ts/mp42ts+0x40d0cb) #3 0x418342 in main (/fuzztest/mp42ts/mp42ts+0x418342) #4 0x7f9ae1a41c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) #5 0x407c99 in _start (/fuzztest/mp42ts/mp42ts+0x407c99) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/fuzztest/mp42ts/mp42ts+0x7021ab) in AP4_StszAtom::GetSampleSize(unsigned int, unsigned int&) ==6287==ABORTING ``` ### System Details Test Machine: Ubuntu 18.04 (docker) Project Name: mp42ts (Bento4-1.6.0-639) ### Command ./mp42ts mp42ts.demo /dev/null ### Poc [mp42ts_Poc.zip](https://github.com/axiomatic-systems/Bento4/files/9590796/mp42ts_Poc.zip) ### Credit Wanying Cao (NCNIPC of China), (Zhongguancun Laboratory) Han Zheng (NCNIPC of China, [Hexhive](http://hexhive.epfl.ch/)), (Zhongguancun Laboratory)
SEGV at AP4_StszAtom::GetSampleSize(unsigned int, unsigned int&) in binary mp42ts
https://api.github.com/repos/axiomatic-systems/Bento4/issues/757/comments
2
2022-09-17T03:04:47Z
2023-06-26T09:40:27Z
https://github.com/axiomatic-systems/Bento4/issues/757
1,376,646,543
757
[ "axiomatic-systems", "Bento4" ]
Hello, I use fuzzer to test bianry mp4split, and found some vulnerabilities,the following is the details. # Bug1 ``` root@c511e4bf49bc:/mp4split/mp4split# ./mp4split FishFuzz/crashes/id:000000,sig:06,src:000011,op:flip1,pos:31240,1216870 ================================================================= ==2589461==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000cfdb21 at pc 0x0000009a6c6c bp 0x7ffec6ff0d60 sp 0x7ffec6ff0510 READ of size 237 at 0x000000cfdb21 thread T0 #0 0x9a6c6b in __interceptor_fwrite.part.57 /llvm/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1143 #1 0x7ab8fa in AP4_StdcFileByteStream::WritePartial(void const*, unsigned int, unsigned int&) (/mp4split/mp4split/mp4split+0x7ab8fa) #2 0x471cf7 in AP4_ByteStream::Write(void const*, unsigned int) (/mp4split/mp4split/mp4split+0x471cf7) #3 0x4d1be1 in AP4_HdlrAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x4d1be1) #4 0x41378f in AP4_AtomListWriter::Action(AP4_Atom*) const (/mp4split/mp4split/mp4split+0x41378f) #5 0x483213 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x483213) #6 0x41378f in AP4_AtomListWriter::Action(AP4_Atom*) const (/mp4split/mp4split/mp4split+0x41378f) #7 0x483213 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x483213) #8 0x41378f in AP4_AtomListWriter::Action(AP4_Atom*) const (/mp4split/mp4split/mp4split+0x41378f) #9 0x483213 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x483213) #10 0x40d872 in main (/mp4split/mp4split/mp4split+0x40d872) #11 0x7f7ce8910c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310 #12 0x407689 in _start (/mp4split/mp4split/mp4split+0x407689) 0x000000cfdb21 is located 63 bytes to the left of global variable 'AP4_GlobalOptions::g_Entries' defined in '/Bento4-1.5.1-629/Source/C++/Core/Ap4Utils.cpp:37:56' (0xcfdb60) of size 8 0x000000cfdb21 is located 0 bytes to the right of global variable 'AP4_String::EmptyString' defined in '/Bento4-1.5.1-629/Source/C++/Core/Ap4String.cpp:39:18' (0xcfdb20) of size 1 'AP4_String::EmptyString' is ascii string '' SUMMARY: AddressSanitizer: global-buffer-overflow /llvm/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1143 in __interceptor_fwrite.part.57 Shadow bytes around the buggy address: 0x000080197b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080197b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f9 0x000080197b30: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 00 00 f9 0x000080197b40: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 f9 f9 f9 0x000080197b50: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 f9 f9 f9 =>0x000080197b60: f9 f9 f9 f9[01]f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 0x000080197b70: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 00 00 00 0x000080197b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080197b90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080197ba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080197bb0: 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 ==2589461==ABORTING ``` # Bug2 ``` root@c511e4bf49bc:/mp4split/mp4split# ./mp4split FishFuzz/crashes/id:000001,sig:06,src:000011,op:flip1,pos:31415,1226899 AddressSanitizer:DEADLYSIGNAL ================================================================= ==2659777==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000096b50a bp 0x7ffda4354030 sp 0x7ffda4353e70 T0) ==2659777==The signal is caused by a READ memory access. ==2659777==Hint: address points to the zero page. #0 0x96b50a in AP4_DescriptorListWriter::Action(AP4_Descriptor*) const (/mp4split/mp4split/mp4split+0x96b50a) #1 0x88e625 in AP4_EsDescriptor::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x88e625) #2 0x896a7f in AP4_Expandable::Write(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x896a7f) #3 0x4bdbcd in AP4_EsdsAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x4bdbcd) #4 0x41378f in AP4_AtomListWriter::Action(AP4_Atom*) const (/mp4split/mp4split/mp4split+0x41378f) #5 0x61dbf8 in AP4_SampleEntry::Write(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x61dbf8) #6 0x41378f in AP4_AtomListWriter::Action(AP4_Atom*) const (/mp4split/mp4split/mp4split+0x41378f) #7 0x676f0b in AP4_StsdAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x676f0b) #8 0x41378f in AP4_AtomListWriter::Action(AP4_Atom*) const (/mp4split/mp4split/mp4split+0x41378f) #9 0x483213 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x483213) #10 0x41378f in AP4_AtomListWriter::Action(AP4_Atom*) const (/mp4split/mp4split/mp4split+0x41378f) #11 0x483213 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x483213) #12 0x41378f in AP4_AtomListWriter::Action(AP4_Atom*) const (/mp4split/mp4split/mp4split+0x41378f) #13 0x483213 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x483213) #14 0x41378f in AP4_AtomListWriter::Action(AP4_Atom*) const (/mp4split/mp4split/mp4split+0x41378f) #15 0x483213 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x483213) #16 0x41378f in AP4_AtomListWriter::Action(AP4_Atom*) const (/mp4split/mp4split/mp4split+0x41378f) #17 0x483213 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x483213) #18 0x40d872 in main (/mp4split/mp4split/mp4split+0x40d872) #19 0x7f1636a2cc86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310 #20 0x407689 in _start (/mp4split/mp4split/mp4split+0x407689) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/mp4split/mp4split/mp4split+0x96b50a) in AP4_DescriptorListWriter::Action(AP4_Descriptor*) const ==2659777==ABORTING ``` # poc [crash.zip](https://github.com/axiomatic-systems/Bento4/files/9565816/crash.zip) # environment Ubuntu 18.04(docker) # credit Yuhang Huang ([NCNIPC of China](http://www.nipc.org.cn/)),(Zhongguancun Laboratory) Han Zheng ([NCNIPC of China](http://www.nipc.org.cn/), [Hexhive](http://hexhive.epfl.ch/)),(Zhongguancun Laboratory) Thansk for your time!
there are some vulnerabilities in binary mp4split
https://api.github.com/repos/axiomatic-systems/Bento4/issues/756/comments
2
2022-09-14T11:20:27Z
2023-06-26T06:40:26Z
https://github.com/axiomatic-systems/Bento4/issues/756
1,372,814,057
756
[ "axiomatic-systems", "Bento4" ]
# summary Hello, I use my fuzzer to fuzz binary mp4tag mp4split and mp42hevc, the three binary all crashede, and shows that allocator is out of memory trying to allocate 0xxxxxxx bytes. The version of Bento4 is the latest and the operation system is Ubuntu 18.04(docker). The following is the details. # Bug1 ``` root@c511e4bf49bc:/mp42hevc/mp42hevc# ./mp42hevc seed.demo out.hevc ================================================================= ==92089==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x54ba37b78 bytes #0 0xa1b020 in malloc /llvm/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145 #1 0x7fe65b2d6297 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x93297) #2 0x6c1b9b in AP4_CttsAtom::Create(unsigned int, AP4_ByteStream&) (/mp42hevc/mp42hevc/mp42hevc+0x6c1b9b) #3 0x5cf24c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/mp42hevc/mp42hevc/mp42hevc+0x5cf24c) #4 0x5dcbb6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/mp42hevc/mp42hevc/mp42hevc+0x5dcbb6) #5 0x6bd7a5 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/mp42hevc/mp42hevc/mp42hevc+0x6bd7a5) #6 0x6bc7f9 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/mp42hevc/mp42hevc/mp42hevc+0x6bc7f9) #7 0x5d5f65 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/mp42hevc/mp42hevc/mp42hevc+0x5d5f65) #8 0x5dcbb6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/mp42hevc/mp42hevc/mp42hevc+0x5dcbb6) #9 0x6bd7a5 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/mp42hevc/mp42hevc/mp42hevc+0x6bd7a5) #10 0x6bcf4a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/mp42hevc/mp42hevc/mp42hevc+0x6bcf4a) #11 0x5d5abc in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/mp42hevc/mp42hevc/mp42hevc+0x5d5abc) #12 0x5dcbb6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/mp42hevc/mp42hevc/mp42hevc+0x5dcbb6) #13 0x6bd7a5 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/mp42hevc/mp42hevc/mp42hevc+0x6bd7a5) #14 0x6bfa61 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/mp42hevc/mp42hevc/mp42hevc+0x6bfa61) ==92089==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory /llvm/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145 in malloc ==92089==ABORTING my test case: ``` # Bug2 ``` root@c511e4bf49bc:/mp42hevc/mp42hevc# /mp4box/mp4tag/mp4tag /mp4box/mp4tag/seed.demo ================================================================= ==843687==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x3a35b4320 bytes #0 0xa38ee0 in malloc /llvm/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145 #1 0x7f9f81086297 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x93297) #2 0x4ae28b in AP4_CttsAtom::Create(unsigned int, AP4_ByteStream&) (/mp4box/mp4tag/mp4tag+0x4ae28b) #3 0x45f0fc in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/mp4box/mp4tag/mp4tag+0x45f0fc) #4 0x46ca96 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/mp4box/mp4tag/mp4tag+0x46ca96) #5 0x4a9e92 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/mp4box/mp4tag/mp4tag+0x4a9e92) #6 0x4ac151 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/mp4box/mp4tag/mp4tag+0x4ac151) ==843687==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory /llvm/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145 in malloc ==843687==ABORTING ``` # Bug3 ``` root@c511e4bf49bc:/mp4split/mp4split# ./mp4split FishFuzz/crashes/id:000025,sig:06,src:000215,op:flip1,pos:31468,26038495 ================================================================= ==3151765==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x400000068 bytes #0 0xa19d40 in malloc /llvm/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145 #1 0x7f8d59cb9297 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x93297) #2 0x48fc9b in AP4_CttsAtom::Create(unsigned int, AP4_ByteStream&) (/mp4split/mp4split/mp4split+0x48fc9b) #3 0x440aec in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/mp4split/mp4split/mp4split+0x440aec) #4 0x44e46b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/mp4split/mp4split/mp4split+0x44e46b) #5 0x48b8a5 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/mp4split/mp4split/mp4split+0x48b8a5) #6 0x48b04a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/mp4split/mp4split/mp4split+0x48b04a) #7 0x44735c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/mp4split/mp4split/mp4split+0x44735c) #8 0x44e46b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/mp4split/mp4split/mp4split+0x44e46b) #9 0x48b8a5 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/mp4split/mp4split/mp4split+0x48b8a5) #10 0x48b04a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/mp4split/mp4split/mp4split+0x48b04a) #11 0x44735c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/mp4split/mp4split/mp4split+0x44735c) #12 0x44e46b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/mp4split/mp4split/mp4split+0x44e46b) #13 0x48b8a5 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/mp4split/mp4split/mp4split+0x48b8a5) #14 0x48b04a in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/mp4split/mp4split/mp4split+0x48b04a) #15 0x44735c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/mp4split/mp4split/mp4split+0x44735c) #16 0x44e46b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/mp4split/mp4split/mp4split+0x44e46b) #17 0x48b8a5 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/mp4split/mp4split/mp4split+0x48b8a5) #18 0x48db61 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/mp4split/mp4split/mp4split+0x48db61) ==3151765==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory /llvm/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145 in malloc ==3151765==ABORTING ``` # POC [MP42hevc_crash.zip](https://github.com/axiomatic-systems/Bento4/files/9564409/MP42hevc_crash.zip) [MP4tag_crash.zip](https://github.com/axiomatic-systems/Bento4/files/9564445/MP4tag_crash.zip) [mp4split_crash.zip](https://github.com/axiomatic-systems/Bento4/files/9565667/mp4split_crash.zip) # Credit Yuhang Huang ([NCNIPC of China](http://www.nipc.org.cn/)),(Zhongguancun Laboratory) Han Zheng ([NCNIPC of China](http://www.nipc.org.cn/), [Hexhive](http://hexhive.epfl.ch/)),(Zhongguancun Laboratory) Thank you for your time!
Out of memory in AP4_CttsAtom::Create(unsigned int, AP4_ByteStream&)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/755/comments
2
2022-09-14T08:47:21Z
2023-06-26T06:39:50Z
https://github.com/axiomatic-systems/Bento4/issues/755
1,372,600,841
755
[ "axiomatic-systems", "Bento4" ]
I added the bento4 to my lambda docker image like this: ``` # Install Bento4 COPY Bento4-SDK-1-6-0-639.x86_64-unknown-linux.zip . RUN unzip -q Bento4-SDK-1-6-0-639.x86_64-unknown-linux.zip RUN mkdir -p /usr/bin/../utils RUN mv Bento4-SDK-1-6-0-639.x86_64-unknown-linux/bin/* /usr/bin RUN mv Bento4-SDK-1-6-0-639.x86_64-unknown-linux/utils/mp4-dash.py /usr/bin/../utils RUN mv Bento4-SDK-1-6-0-639.x86_64-unknown-linux/utils/mp4-hls.py /usr/bin/../utils RUN mv Bento4-SDK-1-6-0-639.x86_64-unknown-linux/utils/* /usr/bin/../utils ``` It was working fine with x86 architecture but when I switched to arm64 it is not working with the same code. I'm getting this error: ``` OSError: [Errno 8] Exec format error: 'mp4fragment' ``` I can not find a specific bento4 build for arm64 or a way to to add it to aws lambda with arm64 architecture
Not working on AWS Lambda with arm64 architecture (Linux)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/754/comments
1
2022-09-12T09:37:02Z
2022-09-18T22:59:33Z
https://github.com/axiomatic-systems/Bento4/issues/754
1,369,573,359
754
[ "axiomatic-systems", "Bento4" ]
Hi team, We found in the Apple HLS spec, https://developer.apple.com/documentation/http_live_streaming/http_live_streaming_hls_authoring_specification_for_apple_devices There is a statement regarding `ludt`: ``` 2.19. In fMP4 files, you SHOULD provide loudness information by way of a loudness box ('ludt'). When present, the loudness box takes precedence over any loudness information in the audio stream. ``` But seems Bento4 doesn't support `ludt` yet. I tried to dump atoms of a xHE-AAC encoded mp4 file with mp4dump, but didn't find `ludt`. So does Bento4 support `ludt`? If yes, could you share an example mp4 file with `ludt` data? Thanks!
About loudness atom 'ludt'
https://api.github.com/repos/axiomatic-systems/Bento4/issues/753/comments
2
2022-09-09T02:47:22Z
2022-09-19T03:06:52Z
https://github.com/axiomatic-systems/Bento4/issues/753
1,367,209,291
753
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: In the test of the binary mp42aac instrumented with ASAN. There are some inputs causing heap-buffer-overflow. Here is the ASAN mode output: ================================================================= ==4695==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6190000027a0 at pc 0x7ffff6ef6964 bp 0x7fffffffdea0 sp 0x7fffffffd648 WRITE of size 4294967288 at 0x6190000027a0 thread T0 #0 0x7ffff6ef6963 in __asan_memcpy (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8c963) #1 0x409ed4 in AP4_MemoryByteStream::WritePartial(void const*, unsigned int, unsigned int&) /home/ferry/dp/Bento4/Source/C++/Core/Ap4ByteStream.cpp:785 #2 0x40d9e3 in AP4_ByteStream::Write(void const*, unsigned int) /home/ferry/dp/Bento4/Source/C++/Core/Ap4ByteStream.cpp:77 #3 0x4eb601 in AP4_Atom::Write(AP4_ByteStream&) /home/ferry/dp/Bento4/Source/C++/Core/Ap4Atom.cpp:229 #4 0x4eb601 in AP4_Atom::Clone() /home/ferry/dp/Bento4/Source/C++/Core/Ap4Atom.cpp:316 #5 0x446d7a in AP4_SampleDescription::AP4_SampleDescription(AP4_SampleDescription::Type, unsigned int, AP4_AtomParent*) /home/ferry/dp/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:138 #6 0x461a8f in AP4_GenericAudioSampleDescription::AP4_GenericAudioSampleDescription(unsigned int, unsigned int, unsigned short, unsigned short, AP4_AtomParent*) /home/ferry/dp/Bento4/Source/C++/Core/Ap4SampleDescription.h:259 #7 0x461a8f in AP4_AudioSampleEntry::ToSampleDescription() /home/ferry/dp/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:630 #8 0x48ca03 in AP4_StsdAtom::GetSampleDescription(unsigned int) /home/ferry/dp/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:181 #9 0x4040b6 in main /home/ferry/dp/Bento4/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:268 #10 0x7ffff61bb83f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f) #11 0x408338 in _start (/home/ferry/dp/Bento4/mp42aac+0x408338) 0x6190000027a0 is located 0 bytes to the right of 1056-byte region [0x619000002380,0x6190000027a0) allocated by thread T0 here: #0 0x7ffff6f03712 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99712) #1 0x414c8e in AP4_DataBuffer::ReallocateBuffer(unsigned int) /home/ferry/dp/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:210 #2 0x414c8e in AP4_DataBuffer::SetBufferSize(unsigned int) /home/ferry/dp/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:136 #3 0x414c8e in AP4_DataBuffer::Reserve(unsigned int) /home/ferry/dp/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:107 SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 __asan_memcpy Shadow bytes around the buggy address: 0x0c327fff84a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff84b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff84c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff84d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff84e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c327fff84f0: 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff8500: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff8510: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff8520: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff8530: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff8540: 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 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 ==4695==ABORTING ### Crash input https://github.com/17ssDP/fuzzer_crashes/blob/main/Bento4/input2 ### Validation steps ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp42aac input2 /dev/null ``` ### Environment Ubuntu 16.04 Clang 10.0.1 gcc 5.5
Heap-buffer-overflow with ASAN in mp42aac
https://api.github.com/repos/axiomatic-systems/Bento4/issues/751/comments
0
2022-09-07T02:21:29Z
2022-09-18T23:10:27Z
https://github.com/axiomatic-systems/Bento4/issues/751
1,364,000,633
751
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: In the test of the binary mp42ts instrumented with ASAN. There are some inputs causing memory leaks. Here is the ASAN mode output: ================================================================= ==18321==ERROR: LeakSanitizer: detected memory leaks Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7ffff6f03592 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99592) #1 0x4c871d in AP4_StdcFileByteStream::Create(AP4_FileByteStream*, char const*, AP4_FileByteStream::Mode, AP4_ByteStream*&) /home/ferry/dp/chunkfuzzer-evaluation/unibench-latest/Bento4/Source/C++/System/StdC/Ap4StdCFileByteStream.cpp:279 #2 0x4c871d in AP4_FileByteStream::Create(char const*, AP4_FileByteStream::Mode, AP4_ByteStream*&) /home/ferry/dp/chunkfuzzer-evaluation/unibench-latest/Bento4/Source/C++/System/StdC/Ap4StdCFileByteStream.cpp:439 Indirect leak of 72 byte(s) in 1 object(s) allocated from: #0 0x7ffff6f03592 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99592) #1 0x404286 in main /home/ferry/dp/chunkfuzzer-evaluation/unibench-latest/Bento4/Source/C++/Apps/Mp42Ts/Mp42Ts.cpp:511 #2 0x7ffff61bb83f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f) Indirect leak of 64 byte(s) in 1 object(s) allocated from: #0 0x7ffff6f03592 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99592) #1 0x4f57d1 in AP4_RtpAtom::Create(unsigned int, AP4_ByteStream&) /home/ferry/dp/chunkfuzzer-evaluation/unibench-latest/Bento4/Source/C++/Core/Ap4RtpAtom.h:53 #2 0x4f57d1 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/ferry/dp/chunkfuzzer-evaluation/unibench-latest/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:689 Indirect leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7ffff6f03592 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99592) #1 0x4d2591 in AP4_List<AP4_Atom>::Add(AP4_Atom*) /home/ferry/dp/chunkfuzzer-evaluation/unibench-latest/Bento4/Source/C++/Core/Ap4List.h:160 #2 0x4d2591 in AP4_AtomParent::AddChild(AP4_Atom*, int) /home/ferry/dp/chunkfuzzer-evaluation/unibench-latest/Bento4/Source/C++/Core/Ap4Atom.cpp:532 SUMMARY: AddressSanitizer: 208 byte(s) leaked in 4 allocation(s). ### **Crash Input** https://github.com/17ssDP/fuzzer_crashes/blob/main/Bento4/input1 ### Verification steps: ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp42ts input1 /dev/null ``` ### Environment Ubuntu 16.04 Clang 10.0.1 gcc 5.5
Memory leaks with ASAN in mp42ts
https://api.github.com/repos/axiomatic-systems/Bento4/issues/750/comments
0
2022-09-06T14:00:13Z
2023-05-29T02:53:17Z
https://github.com/axiomatic-systems/Bento4/issues/750
1,363,336,565
750
[ "axiomatic-systems", "Bento4" ]
Is there any tool available to know VMAF score of Live 24x7 HEVC Stream (HLS and DASH) ? Please let me know
how to calculate VMAF SSIM score for Live stream
https://api.github.com/repos/axiomatic-systems/Bento4/issues/749/comments
2
2022-08-30T07:42:52Z
2022-09-05T02:00:46Z
https://github.com/axiomatic-systems/Bento4/issues/749
1,355,315,556
749
[ "axiomatic-systems", "Bento4" ]
Hi, i find a allocation-size-too-big error in mp4dump. I saved all my test files [here](https://github.com/WorldExecute/files/tree/main/Bento4) Here are the details. For **mp4dump** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp4dump/allocation-size-too-big/test_1): ``` test_1: ================================================================= ==47797==ERROR: AddressSanitizer: requested allocation size 0xfffffffffb000001 (0xfffffffffb001008 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T0) #0 0x4c573d in operator new[](unsigned long) (/Bento4/install-asan/bin/mp4dump+0x4c573d) #1 0x56a240 in AP4_RtpAtom::AP4_RtpAtom(unsigned int, AP4_ByteStream&) /Bento4/Source/C++/Core/Ap4RtpAtom.cpp:49:21 ==47797==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: allocation-size-too-big (/Bento4/install-asan/bin/mp4dump+0x4c573d) in operator new[](unsigned long) ==47797==ABORTING ``` You can use the following setp to reproduce all the problems. ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check && cd check cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j git clone https://github.com/WorldExecute/files.git ./mp4dump ./files/Bento4/mp4dump/allocation-size-too-big/test_1 ``` Thanks for your time!
allocation-size-too-big in mp4dump
https://api.github.com/repos/axiomatic-systems/Bento4/issues/748/comments
0
2022-08-28T08:02:59Z
2023-05-29T02:53:16Z
https://github.com/axiomatic-systems/Bento4/issues/748
1,353,279,098
748
[ "axiomatic-systems", "Bento4" ]
Hi, i find 3 out-of-memory errors in Bento4. I saved all my test files [here](https://github.com/WorldExecute/files/tree/main/Bento4) Here are the details. For **mp4audioclip** with [test input](https://github.com/WorldExecute/files/tree/main/Bento4/mp4audioclip/out-of-memory): ``` test_1: ================================================================= ==6930==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0xffffff1e0 bytes #0 0x4c560d in operator new(unsigned long) (/Bento4/install-asan/bin/mp4audioclip+0x4c560d) #1 0x5dce28 in AP4_Array<AP4_TrunAtom::Entry>::EnsureCapacity(unsigned int) /Bento4/Source/C++/Core/Ap4Array.h:172:25 #2 0x5dce28 in AP4_Array<AP4_TrunAtom::Entry>::SetItemCount(unsigned int) /Bento4/Source/C++/Core/Ap4Array.h:210:25 #3 0x5dce28 in AP4_TrunAtom::AP4_TrunAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /Bento4/Source/C++/Core/Ap4TrunAtom.cpp:127:15 #4 0x5dc1f9 in AP4_TrunAtom::Create(unsigned int, AP4_ByteStream&) /Bento4/Source/C++/Core/Ap4TrunAtom.cpp:51:16 #5 0x50e852 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:438:20 #6 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #7 0x5240d7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #8 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #9 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #10 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #11 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #12 0x5240d7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #13 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #14 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #15 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #16 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #17 0x541dd9 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #18 0x5416e8 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #19 0x50e924 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:580:20 #20 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #21 0x523ea7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #22 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #23 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #24 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #25 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #26 0x5240d7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #27 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #28 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #29 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #30 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #31 0x541dd9 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #32 0x5416e8 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #33 0x50e924 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:580:20 #34 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #35 0x523ea7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 ==6930==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory (/Bento4/install-asan/bin/mp4audioclip+0x4c560d) in operator new(unsigned long) ==6930==ABORTING test_2: ================================================================= ==56759==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0xc5d400b8 bytes #0 0x4c571d in operator new[](unsigned long) (/Bento4/install-asan/bin/mp4audioclip+0x4c571d) #1 0x53dd69 in AP4_DataBuffer::ReallocateBuffer(unsigned int) /Bento4/Source/C++/Core/Ap4DataBuffer.cpp:210:28 #2 0x53dd69 in AP4_DataBuffer::SetDataSize(unsigned int) /Bento4/Source/C++/Core/Ap4DataBuffer.cpp:151:33 ==56759==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory (/Bento4/install-asan/bin/mp4audioclip+0x4c571d) in operator new[](unsigned long) ==56759==ABORTING ``` For **mp4dump** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp4dump/out-of-memory/test_1): ``` ================================================================= ==108091==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0xf500000a0 bytes #0 0x4c562d in operator new(unsigned long) (/Bento4/install-asan/bin/mp4dump+0x4c562d) #1 0x5c35f8 in AP4_Array<AP4_TrunAtom::Entry>::EnsureCapacity(unsigned int) /Bento4/Source/C++/Core/Ap4Array.h:172:25 #2 0x5c35f8 in AP4_Array<AP4_TrunAtom::Entry>::SetItemCount(unsigned int) /Bento4/Source/C++/Core/Ap4Array.h:210:25 #3 0x5c35f8 in AP4_TrunAtom::AP4_TrunAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /Bento4/Source/C++/Core/Ap4TrunAtom.cpp:127:15 #4 0x5c29c9 in AP4_TrunAtom::Create(unsigned int, AP4_ByteStream&) /Bento4/Source/C++/Core/Ap4TrunAtom.cpp:51:16 #5 0x4e5252 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:438:20 #6 0x4e24b9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #7 0x4f8667 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #8 0x4f7733 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #9 0x4f7733 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #10 0x4e46d2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #11 0x4e24b9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #12 0x4f8667 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #13 0x4f7733 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #14 0x4f7733 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #15 0x4e46d2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #16 0x4e24b9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #17 0x516429 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #18 0x515d38 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #19 0x4e5324 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:580:20 #20 0x4e24b9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #21 0x4f8437 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #22 0x4f7733 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #23 0x4f7733 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #24 0x4e46d2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #25 0x4e24b9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #26 0x4f8667 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #27 0x4f7733 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #28 0x4f7733 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #29 0x4e46d2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #30 0x4e24b9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #31 0x4f8667 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #32 0x4f7733 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #33 0x4f7733 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #34 0x4e46d2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #35 0x4e24b9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #36 0x516429 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84:16 ==108091==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory (/Bento4/install-asan/bin/mp4dump+0x4c562d) in operator new(unsigned long) ==108091==ABORTING ``` You can use the following setp to reproduce all the problems. ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check && cd check cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j git clone https://github.com/WorldExecute/files.git ./mp4audioclip ./files/Bento4/mp4audioclip/out-of-memory/test_1 /dev/null ./mp4dump ./files/Bento4/mp4dump/out-of-memory/test_1 ``` Thanks for your time!
out-of-memory
https://api.github.com/repos/axiomatic-systems/Bento4/issues/747/comments
0
2022-08-28T07:58:44Z
2023-05-29T02:53:16Z
https://github.com/axiomatic-systems/Bento4/issues/747
1,353,278,230
747
[ "axiomatic-systems", "Bento4" ]
Hi, i find a memory leaked in mp4audioclip. I saved all my test files [here](https://github.com/WorldExecute/files/tree/main/Bento4) Here are the details. For **mp4audioclip** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp4audioclip/memory%20leaked/test_1): ``` ERROR: cannot parse input (0) ================================================================= ==8852==ERROR: LeakSanitizer: detected memory leaks Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x4c44bd in operator new(unsigned long) (/Bento4/check/mp4audioclip+0x4c44bd) #1 0x4eb29f in AP4_StdcFileByteStream::Create(AP4_FileByteStream*, char const*, AP4_FileByteStream::Mode, AP4_ByteStream*&) (/Bento4/check/mp4audioclip+0x4eb29f) SUMMARY: AddressSanitizer: 48 byte(s) leaked in 1 allocation(s). ``` You can use the following setp to reproduce all the problems. ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check && cd check cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j git clone https://github.com/WorldExecute/files.git ./mp4audioclip ./files/Bento4/mp4audioclip/memory\ leaked/test_1 /dev/null ``` Thanks for your time!
memory leaked
https://api.github.com/repos/axiomatic-systems/Bento4/issues/746/comments
0
2022-08-28T07:48:07Z
2023-05-29T02:53:15Z
https://github.com/axiomatic-systems/Bento4/issues/746
1,353,276,173
746
[ "axiomatic-systems", "Bento4" ]
Hi, i find 17 heap-buffer-overflow errors in Bento4. I saved all my test files [here](https://github.com/WorldExecute/files/tree/main/Bento4) Here are the details for mp4audioclip. For **mp4audioclip** with [test input](https://github.com/WorldExecute/files/tree/main/Bento4/mp4audioclip/heap-buffer-overflow): ``` test_1: ================================================================= ==68556==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000116 at pc 0x00000054f5ce bp 0x7fffffffd170 sp 0x7fffffffd168 READ of size 1 at 0x603000000116 thread T0 #0 0x54f5cd in AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*) ./Bento4/Source/C++/Core/Ap4HvccAtom.cpp:282:24 #1 0x54914d in AP4_HvccAtom::Create(unsigned int, AP4_ByteStream&) ./Bento4/Source/C++/Core/Ap4HvccAtom.cpp:90:16 #2 0x50e63f in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:518:20 #3 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #4 0x50b1eb in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154:12 #5 0x4c97fe in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:104:12 #6 0x4c9e5d in AP4_File::AP4_File(AP4_ByteStream&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:78:5 #7 0x4c8509 in main ./Bento4/Source/C++/Apps/Mp4AudioClip/Mp4AudioClip.cpp:122:14 #8 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #9 0x41d75d in _start (./Bento4/install-asan/bin/mp4audioclip+0x41d75d) 0x603000000116 is located 0 bytes to the right of 22-byte region [0x603000000100,0x603000000116) allocated by thread T0 here: #0 0x4c571d in operator new[](unsigned long) (./Bento4/install-asan/bin/mp4audioclip+0x4c571d) #1 0x53d226 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) ./Bento4/Source/C++/Core/Ap4DataBuffer.cpp:55:16 SUMMARY: AddressSanitizer: heap-buffer-overflow ./Bento4/Source/C++/Core/Ap4HvccAtom.cpp:282:24 in AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*) Shadow bytes around the buggy address: 0x0c067fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c067fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c067fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c067fff8000: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x0c067fff8010: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa =>0x0c067fff8020: 00 00[06]fa fa fa 00 00 06 fa fa fa fa fa fa fa 0x0c067fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8070: 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 ==68556==ABORTING test_2: ================================================================= ==45877==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000006f1 at pc 0x000000435a81 bp 0x7fffffff9fb0 sp 0x7fffffff9778 WRITE of size 5031 at 0x6020000006f1 thread T0 #0 0x435a80 in fread (./Bento4/install-asan/bin/mp4audioclip+0x435a80) #1 0x4f416c in AP4_StdcFileByteStream::ReadPartial(void*, unsigned int, unsigned int&) ./Bento4/Source/C++/System/StdC/Ap4StdCFileByteStream.cpp:342:14 #2 0x51b4ee in AP4_ByteStream::Read(void*, unsigned int) ./Bento4/Source/C++/Core/Ap4ByteStream.cpp:54:29 #3 0x58cbba in AP4_RtpAtom::AP4_RtpAtom(unsigned int, AP4_ByteStream&) ./Bento4/Source/C++/Core/Ap4RtpAtom.cpp:50:16 #4 0x50ed30 in AP4_RtpAtom::Create(unsigned int, AP4_ByteStream&) ./Bento4/Source/C++/Core/Ap4RtpAtom.h:53:20 #5 0x50ed30 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:689:20 #6 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #7 0x5240d7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #8 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #9 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #10 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #11 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #12 0x5240d7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #13 0x523d16 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #14 0x4dcb72 in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4TrakAtom.cpp:165:5 #15 0x50e79f in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4TrakAtom.h:58:20 #16 0x50e79f in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:413:20 #17 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #18 0x5240d7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #19 0x523d16 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #20 0x4d0085 in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4MoovAtom.cpp:79:5 #21 0x50ea2e in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4MoovAtom.h:56:20 #22 0x50ea2e in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:393:20 #23 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #24 0x541dd9 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #25 0x5416e8 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #26 0x50e924 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:580:20 #27 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #28 0x523ea7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #29 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #30 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #31 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #32 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #33 0x541dd9 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #34 0x5416e8 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #35 0x50e924 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:580:20 #36 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #37 0x523ea7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #38 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #39 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #40 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #41 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #42 0x5240d7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #43 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #44 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #45 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #46 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #47 0x541dd9 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #48 0x5416e8 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #49 0x50e924 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:580:20 #50 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #51 0x523ea7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #52 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #53 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #54 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #55 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #56 0x50b1eb in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154:12 #57 0x4c97fe in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:104:12 #58 0x4c9e5d in AP4_File::AP4_File(AP4_ByteStream&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:78:5 #59 0x4c8509 in main ./Bento4/Source/C++/Apps/Mp4AudioClip/Mp4AudioClip.cpp:122:14 #60 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #61 0x41d75d in _start (./Bento4/install-asan/bin/mp4audioclip+0x41d75d) 0x6020000006f1 is located 0 bytes to the right of 1-byte region [0x6020000006f0,0x6020000006f1) allocated by thread T0 here: #0 0x4c571d in operator new[](unsigned long) (./Bento4/install-asan/bin/mp4audioclip+0x4c571d) #1 0x58cba0 in AP4_RtpAtom::AP4_RtpAtom(unsigned int, AP4_ByteStream&) ./Bento4/Source/C++/Core/Ap4RtpAtom.cpp:49:21 SUMMARY: AddressSanitizer: heap-buffer-overflow (./Bento4/install-asan/bin/mp4audioclip+0x435a80) in fread Shadow bytes around the buggy address: 0x0c047fff8080: fa fa fd fa fa fa 01 fa fa fa 04 fa fa fa 00 fa 0x0c047fff8090: fa fa 01 fa fa fa fd fa fa fa fd fa fa fa 06 fa 0x0c047fff80a0: fa fa 00 fa fa fa fd fa fa fa 04 fa fa fa fd fd 0x0c047fff80b0: fa fa 04 fa fa fa fd fa fa fa 00 02 fa fa fd fd 0x0c047fff80c0: fa fa 04 fa fa fa fd fa fa fa 01 fa fa fa 01 fa =>0x0c047fff80d0: fa fa 00 fa fa fa 04 fa fa fa 04 fa fa fa[01]fa 0x0c047fff80e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff80f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8120: 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 ==45877==ABORTING test_3: ================================================================= ==93925==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60400000047c at pc 0x000000518e26 bp 0x7fffffffa890 sp 0x7fffffffa888 READ of size 1 at 0x60400000047c thread T0 #0 0x518e25 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:168:31 #1 0x515f53 in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:95:16 #2 0x50e7dc in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:513:20 #3 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #4 0x523ea7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #5 0x5a6442 in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4SampleEntry.cpp:884:5 #6 0x580260 in AP4_EncvSampleEntry::AP4_EncvSampleEntry(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4Protection.cpp:173:5 #7 0x50cd13 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:302:24 #8 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #9 0x5be627 in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4StsdAtom.cpp:101:13 #10 0x5bca0b in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4StsdAtom.cpp:57:16 #11 0x50e0f5 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:458:20 #12 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #13 0x523ea7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #14 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #15 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #16 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #17 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #18 0x541dd9 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #19 0x5416e8 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #20 0x50e924 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:580:20 #21 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #22 0x523ea7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #23 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #24 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #25 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #26 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #27 0x5240d7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #28 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #29 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #30 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #31 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #32 0x541dd9 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84:16 #33 0x5416e8 in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50:16 #34 0x50e924 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:580:20 #35 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #36 0x523ea7 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194:12 #37 0x5231a3 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139:5 #38 0x5231a3 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) ./Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88:20 #39 0x50dcd2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816:20 #40 0x50bab9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #41 0x50b1eb in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154:12 #42 0x4c97fe in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:104:12 #43 0x4c9e5d in AP4_File::AP4_File(AP4_ByteStream&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:78:5 #44 0x4c8509 in main ./Bento4/Source/C++/Apps/Mp4AudioClip/Mp4AudioClip.cpp:122:14 #45 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #46 0x41d75d in _start (./Bento4/install-asan/bin/mp4audioclip+0x41d75d) 0x60400000047c is located 0 bytes to the right of 44-byte region [0x604000000450,0x60400000047c) allocated by thread T0 here: #0 0x4c571d in operator new[](unsigned long) (./Bento4/install-asan/bin/mp4audioclip+0x4c571d) #1 0x53d226 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) ./Bento4/Source/C++/Core/Ap4DataBuffer.cpp:55:16 SUMMARY: AddressSanitizer: heap-buffer-overflow ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:168:31 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) Shadow bytes around the buggy address: 0x0c087fff8030: fa fa 00 00 00 00 00 00 fa fa fd fd fd fd fd fd 0x0c087fff8040: fa fa 00 00 00 00 00 04 fa fa 00 00 00 00 00 00 0x0c087fff8050: fa fa fd fd fd fd fd fa fa fa 00 00 00 00 00 fa 0x0c087fff8060: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00 00 0x0c087fff8070: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd =>0x0c087fff8080: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 00[04] 0x0c087fff8090: fa fa 00 00 00 00 00 04 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 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 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 ==93925==ABORTING ``` There are many similar information for other programs: for **mp4dump** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp4dump/heap-buffer-overflow) for **mp4info** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp4info/heap-buffer-overflow) for **mp4tag** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp4tag/heap-buffer-overflow) for **mp4toaac** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp42aac/heap-buffer-overflow) for **mp42avc** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp42avc/heap-buffer-overflow) for **mp42hls** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp42hls/heap-buffer-overflow) for **mp42ts** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp42ts/heap-buffer-overflow) You can use the following setp to reproduce all the problems. ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check && cd check cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_BUILD_TYPE=Release make -j git clone https://github.com/WorldExecute/files.git ./mp42ts ./files/Bento4/mp42ts/heap-buffer-overflow ./out ./mp4dump ./files/Bento4/mp4dump/heap-buffer-overflow ./mp4tag ./files/Bento4/mp4tag/heap-buffer-overflow ./mp42aac ./files/Bento4/mp42aac/heap-buffer-overflow ./out ./mp42avc ./files/Bento4/mp42avc/heap-buffer-overflow ./out ./mp42hls ./files/Bento4/mp42hls/heap-buffer-overflow ./mp42ts ./files/Bento4/mp42ts/heap-buffer-overflow ./out ``` Thanks for your time!
heap-buffer-overflow
https://api.github.com/repos/axiomatic-systems/Bento4/issues/745/comments
0
2022-08-27T11:49:30Z
2023-05-29T02:53:15Z
https://github.com/axiomatic-systems/Bento4/issues/745
1,353,024,715
745
[ "axiomatic-systems", "Bento4" ]
We plan on Serving DASH without splitting segments, and we would also like to use Wildewine DRM with it. So this means byte range request would be serving segments. How does DRM play in to this kind of workflow ? Would DRM encryption need to be applied at the time after reading the byte range request content for the specific segment from file or would the entire file be encrypted? https://www.bento4.com/developers/dash/#serving-dash-without-splitting-segments https://www.bento4.com/developers/dash/encryption_and_drm/#widevine-drm
Serving DASH without splitting segments and DRM encryption
https://api.github.com/repos/axiomatic-systems/Bento4/issues/744/comments
0
2022-08-24T17:28:44Z
2022-08-24T17:28:44Z
https://github.com/axiomatic-systems/Bento4/issues/744
1,349,796,574
744
[ "axiomatic-systems", "Bento4" ]
Hi there, I've been trying to fix an issue when playing certain streams in Kodi with inputstream.adaptive and I'm starting to get a bit stuck. (related issue - https://github.com/xbmc/inputstream.adaptive/issues/1007) In the attached sample files when trying to create a `CencSampleInfoTable` it runs into an issue that eventually leads to a crash. The `saiz` box holds a default sample info size of 30 which seems to be at odds with the actual content of the `senc` box: ![image](https://user-images.githubusercontent.com/11909320/185789461-9bc46b6b-5570-4b67-9da3-f8a7df195367.png) ![image](https://user-images.githubusercontent.com/11909320/185789448-fe44995d-9e5d-4a28-be22-b55b5a7b64d2.png) So yes it appears the source video is 'wrong', however other players seem to handle it fine. One though I had was to do a more step-by-step reading of the aux info data instead of trusting the default length here: https://github.com/axiomatic-systems/Bento4/blob/df9ba99a3d7f37547ab610c84166239fde012cdf/Source/C%2B%2B/Core/Ap4CommonEncryption.cpp#L2915-L2938 Something like (psuedo code): * if per sample IV, read IV * read subsample count * for each subsample read clear bytes, encrypted bytes If however I'm wrong by any measure please advise, I know a little about this library but not much. Grateful for your help on this Thanks Glenn [cbcs.zip](https://github.com/axiomatic-systems/Bento4/files/9388988/cbcs.zip)
Not handling (seemingly) incorrect DefaultSampleInfoSize
https://api.github.com/repos/axiomatic-systems/Bento4/issues/742/comments
8
2022-08-21T11:57:23Z
2022-09-05T22:31:08Z
https://github.com/axiomatic-systems/Bento4/issues/742
1,345,466,941
742
[ "axiomatic-systems", "Bento4" ]
Hi, i find 7 SEGV errors in Bento4. I saved all my test files [here](https://github.com/WorldExecute/files/tree/main/Bento4) Here are the details. For **mp4audioclip** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp4audioclip/SEGV/test_1): ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==92670==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x000000495422 bp 0x7fffffffadb0 sp 0x7fffffffa568 T0) ==92670==The signal is caused by a READ memory access. ==92670==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 0x495422 in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) (./bin/mp4audioclip+0x495422) #1 0x495383 in __asan_memcpy (./bin/mp4audioclip+0x495383) #2 0x53e055 in AP4_DataBuffer::SetData(unsigned char const*, unsigned int) ./Bento4/Source/C++/Core/Ap4DataBuffer.cpp:175:5 #3 0x5187a1 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:163:41 /*** Annotate some information ***/ #45 0x4c9e5d in AP4_File::AP4_File(AP4_ByteStream&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:78:5 #46 0x4c8509 in main ./Bento4/Source/C++/Apps/Mp4AudioClip/Mp4AudioClip.cpp:122:14 #47 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #48 0x41d75d in _start (./bin/mp4audioclip+0x41d75d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (./bin/mp4audioclip+0x495422) in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) ==92670==ABORTING ``` for **mp4dump** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp4dump/SEGV/test_1) ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==78919==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x000000495442 bp 0x7fffffffa590 sp 0x7fffffff9d48 T0) ==78919==The signal is caused by a READ memory access. ==78919==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 0x495442 in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) (./bin/mp4dump+0x495442) #1 0x4953a3 in __asan_memcpy (./bin/mp4dump+0x4953a3) #2 0x5126a5 in AP4_DataBuffer::SetData(unsigned char const*, unsigned int) ./Bento4/Source/C++/Core/Ap4DataBuffer.cpp:175:5 #3 0x4ecd31 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:163:41 /*** Annotate some information ***/ #52 0x4e1beb in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154:12 #53 0x4ca399 in main ./Bento4/Source/C++/Apps/Mp4Dump/Mp4Dump.cpp:342:25 #54 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #55 0x41d77d in _start (./bin/mp4dump+0x41d77d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (./bin/mp4dump+0x495442) in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) ==78919==ABORTING ``` for **mp4tag** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp4tag/SEGV/test_1) ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==19436==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x0000004954e2 bp 0x7fffffffcef0 sp 0x7fffffffc6a8 T0) ==19436==The signal is caused by a READ memory access. ==19436==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 0x4954e2 in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) (./bin/mp4tag+0x4954e2) #1 0x495443 in __asan_memcpy (./bin/mp4tag+0x495443) #2 0x517f25 in AP4_DataBuffer::SetData(unsigned char const*, unsigned int) ./Bento4/Source/C++/Core/Ap4DataBuffer.cpp:175:5 #3 0x4f25b1 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:163:41 #4 0x4efd63 in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:95:16 #5 0x4ea9cc in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:513:20 #6 0x4e7ca9 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #7 0x4e73db in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154:12 #8 0x520c3e in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:104:12 #9 0x52129d in AP4_File::AP4_File(AP4_ByteStream&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:78:5 #10 0x4cb38c in main ./Bento4/Source/C++/Apps/Mp4Tag/Mp4Tag.cpp:821:20 #11 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #12 0x41d81d in _start (./bin/mp4tag+0x41d81d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (./bin/mp4tag+0x4954e2) in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) ==19436==ABORTING ``` for **mp4toaac** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp42aac/SEGV/test_1) ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==57952==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x000000495422 bp 0x7fffffff8f30 sp 0x7fffffff86e8 T0) ==57952==The signal is caused by a READ memory access. ==57952==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 0x495422 in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) (./bin/mp42aac+0x495422) #1 0x495383 in __asan_memcpy (./bin/mp42aac+0x495383) #2 0x4d1235 in AP4_DataBuffer::SetData(unsigned char const*, unsigned int) ./Bento4/Source/C++/Core/Ap4DataBuffer.cpp:175:5 #3 0x559ad1 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:163:41 /*** Annotate some information ***/ #73 0x4d241d in AP4_File::AP4_File(AP4_ByteStream&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:78:5 #74 0x4c847f in main ./Bento4/Source/C++/Apps/Mp42Aac/Mp42Aac.cpp:250:22 #75 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #76 0x41d75d in _start (./bin/mp42aac+0x41d75d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (./bin/mp42aac+0x495422) in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) ==57952==ABORTING ``` for **mp42avc** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp42avc/SEGV/test_1) ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==101515==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x000000495422 bp 0x7fffffffcf70 sp 0x7fffffffc728 T0) ==101515==The signal is caused by a READ memory access. ==101515==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 0x495422 in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) (./bin/mp42avc+0x495422) #1 0x495383 in __asan_memcpy (./bin/mp42avc+0x495383) #2 0x4d2205 in AP4_DataBuffer::SetData(unsigned char const*, unsigned int) ./Bento4/Source/C++/Core/Ap4DataBuffer.cpp:175:5 #3 0x55aaa1 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:163:41 #4 0x558253 in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:95:16 #5 0x550b9c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:513:20 #6 0x54de79 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234:14 #7 0x54d5ab in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) ./Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154:12 #8 0x4d2d8e in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:104:12 #9 0x4d33ed in AP4_File::AP4_File(AP4_ByteStream&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:78:5 #10 0x4c82eb in main ./Bento4/Source/C++/Apps/Mp42Avc/Mp42Avc.cpp:307:32 #11 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #12 0x41d75d in _start (./bin/mp42avc+0x41d75d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (./bin/mp42avc+0x495422) in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) ==101515==ABORTING ``` for **mp42hls** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp42hls/SEGV/test_1) ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==16936==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x0000004954a2 bp 0x7fffffff8650 sp 0x7fffffff7e08 T0) ==16936==The signal is caused by a READ memory access. ==16936==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 0x4954a2 in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) (./bin/mp42hls+0x4954a2) #1 0x495403 in __asan_memcpy (./bin/mp42hls+0x495403) #2 0x5282d5 in AP4_DataBuffer::SetData(unsigned char const*, unsigned int) ./Bento4/Source/C++/Core/Ap4DataBuffer.cpp:175:5 #3 0x502961 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:163:41 /*** Annotate some information ***/ #45 0x53164d in AP4_File::AP4_File(AP4_ByteStream&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:78:5 #46 0x4cd218 in main ./Bento4/Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:1894:32 #47 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #48 0x41d7dd in _start (./bin/mp42hls+0x41d7dd) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (./bin/mp42hls+0x4954a2) in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) ==16936==ABORTING ``` for **mp42ts** with [test input](https://github.com/WorldExecute/files/blob/main/Bento4/mp42ts/SEGV/test_1) ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==84943==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x000000495432 bp 0x7fffffffa7f0 sp 0x7fffffff9fa8 T0) ==84943==The signal is caused by a READ memory access. ==84943==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 0x495432 in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) (./bin/mp42ts+0x495432) #1 0x495393 in __asan_memcpy (./bin/mp42ts+0x495393) #2 0x4d3d75 in AP4_DataBuffer::SetData(unsigned char const*, unsigned int) ./Bento4/Source/C++/Core/Ap4DataBuffer.cpp:175:5 #3 0x54f481 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) ./Bento4/Source/C++/Core/Ap4AvccAtom.cpp:163:41 /*** Annotate some information ***/ #45 0x4d4d1d in AP4_File::AP4_File(AP4_ByteStream&, bool) ./Bento4/Source/C++/Core/Ap4File.cpp:78:5 #46 0x4c88de in main ./Bento4/Source/C++/Apps/Mp42Ts/Mp42Ts.cpp:511:32 #47 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #48 0x41d76d in _start (./bin/mp42ts+0x41d76d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (./bin/mp42ts+0x495432) in __asan::QuickCheckForUnpoisonedRegion(unsigned long, unsigned long) ==84943==ABORTING ``` You can use the following setp to reproduce all the problems. ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check && cd check cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j git clone https://github.com/WorldExecute/files.git ./mp42ts ./files/Bento4/mp42ts/SEGV/test_1 ./out ./mp4dump ./files/Bento4/mp4dump/SEGV/test_1 ./mp4tag ./files/Bento4/mp4tag/SEGV/test_1 ./mp42aac ./files/Bento4/mp42aac/SEGV/test_1 ./out ./mp42avc ./files/Bento4/mp42avc/SEGV/test_1 ./out ./mp42hls ./files/Bento4/mp42hls/SEGV/test_1 ./mp42ts ./files/Bento4/mp42ts/SEGV/test_1 ./out ``` Thanks for your time!
SEGV error
https://api.github.com/repos/axiomatic-systems/Bento4/issues/741/comments
0
2022-08-20T00:58:11Z
2023-05-29T02:53:14Z
https://github.com/axiomatic-systems/Bento4/issues/741
1,345,008,684
741
[ "axiomatic-systems", "Bento4" ]
Hi, i find a `heap-use-after-free` in mp4ts with the [input](https://user-images.githubusercontent.com/110105969/185295922-f2da25ac-cdb2-4255-aeaa-6bdfb790847f.mp4) file, the output are as follows. ```bash ================================================================= ==36710==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000001498 at pc 0x0000004d9856 bp 0x7fffffffd6e0 sp 0x7f READ of size 8 at 0x604000001498 thread T0 #0 0x4d9855 in AP4_LinearReader::Advance(bool) (./Bento4/check_build/mp42ts+0x4d9855) #1 0x4d9d8f in AP4_LinearReader::ReadNextSample(unsigned int, AP4_Sample&, AP4_DataBuffer&) (./Bento4/check #2 0x4c8ec6 in main (./Bento4/check_build/mp42ts+0x4c8ec6) #3 0x7ffff7a70082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16 #4 0x41c61d in _start (./Bento4/check_build/mp42ts+0x41c61d) 0x604000001498 is located 8 bytes inside of 48-byte region [0x604000001490,0x6040000014c0) freed by thread T0 here: #0 0x4c4d2d in operator delete(void*) (./Bento4/check_build/mp42ts+0x4c4d2d) #1 0x4d9596 in AP4_LinearReader::Advance(bool) (./Bento4/check_build/mp42ts+0x4d9596) previously allocated by thread T0 here: #0 0x4c44cd in operator new(unsigned long) (./Bento4/check_build/mp42ts+0x4c44cd) #1 0x4d90b7 in AP4_LinearReader::Advance(bool) (./Bento4/check_build/mp42ts+0x4d90b7) SUMMARY: AddressSanitizer: heap-use-after-free (./Bento4/check_build/mp42ts+0x4d9855) in AP4_LinearReader::Adva Shadow bytes around the buggy address: 0x0c087fff8240: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa 0x0c087fff8250: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa 0x0c087fff8260: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa 0x0c087fff8270: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa 0x0c087fff8280: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa =>0x0c087fff8290: fa fa fd[fd]fd fd fd fd fa fa fd fd fd fd fd fa 0x0c087fff82a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c087fff82b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c087fff82c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c087fff82d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c087fff82e0: 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 ==36710==ABORTING ``` You can use the following setp to reproduce the problem. ```bash git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check && cd check cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp42ts ./cur_input.mp4 ./out ``` Thanks for your time!
heap-use-after-free in mp42ts
https://api.github.com/repos/axiomatic-systems/Bento4/issues/740/comments
0
2022-08-18T04:47:47Z
2023-05-29T02:53:14Z
https://github.com/axiomatic-systems/Bento4/issues/740
1,342,556,160
740
[ "axiomatic-systems", "Bento4" ]
is there a way to decrypt a file (i think the mp4 file is bad) the correct way which has multiple Sample Description / fourcc. Or is it possible to modify the mp4 to remove the Sample Descriptions? On some video player apps the picture freezes for some seconds... <details> <summary>mp4info log:</summary> ``` File: major brand: dash minor version: 0 compatible brand: dash compatible brand: iso6 fast start: yes Movie: duration: 0 (media timescale units) duration: 0 (ms) time scale: 24000 fragments: yes Found 1 Tracks Track 1: flags: 7 ENABLED IN-MOVIE IN-PREVIEW id: 1 type: Video duration: 0 ms language: und media: sample count: 0 timescale: 24000 duration: 0 (media timescale units) duration: 0 (ms) bitrate (computed): 14442.470 Kbps sample count with fragments: 215301 duration with fragments: 215516301 duration with fragments: 8979846 (ms) display width: 3840.000000 display height: 1600.000000 Sample Description 0 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c1776f9890 } Width: 3840 Height: 1600 Depth: 24 Sample Description 1 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c1609ddbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 2 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c160cddbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 3 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c16085dbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 4 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c161f76f9890 } Width: 3840 Height: 1600 Depth: 24 Sample Description 5 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c161576f9890 } Width: 3840 Height: 1600 Depth: 24 Sample Description 6 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c161376f9890 } Width: 3840 Height: 1600 Depth: 24 Sample Description 7 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c161b76f9890 } Width: 3840 Height: 1600 Depth: 24 Sample Description 8 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c1608ddbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 9 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c161176f9890 } Width: 3840 Height: 1600 Depth: 24 Sample Description 10 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c160b5dbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 11 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c1635dbe6240 } Width: 3840 Height: 1600 Depth: 24 Sample Description 12 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c163ddbe6240 } Width: 3840 Height: 1600 Depth: 24 Sample Description 13 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c16776f989 } Width: 3840 Height: 1600 Depth: 24 Sample Description 14 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c1625dbe6240 } Width: 3840 Height: 1600 Depth: 24 Sample Description 15 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c162ddbe6240 } Width: 3840 Height: 1600 Depth: 24 Sample Description 16 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c16576f989 } Width: 3840 Height: 1600 Depth: 24 Sample Description 17 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c161976f9890 } Width: 3840 Height: 1600 Depth: 24 Sample Description 18 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c161776f9890 } Width: 3840 Height: 1600 Depth: 24 Sample Description 19 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c161d76f9890 } Width: 3840 Height: 1600 Depth: 24 Sample Description 20 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c16095dbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 21 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c169dbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 22 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c16ddbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 23 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c16476f989 } Width: 3840 Height: 1600 Depth: 24 Sample Description 24 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c16676f989 } Width: 3840 Height: 1600 Depth: 24 Sample Description 25 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c160a5dbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 26 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c160bddbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 27 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c1621dbe6240 } Width: 3840 Height: 1600 Depth: 24 Sample Description 28 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c160c5dbe624 } Width: 3840 Height: 1600 Depth: 24 Sample Description 29 [ENCRYPTED] Coding: encv Scheme Type: cenc Scheme Version: 65536 Scheme URI: Coding: hev1 (H.265) Codec String: hev1.2.4.L150.90 HEVC Profile Space: 0 HEVC Profile: 2 (Main 10) HEVC Profile Compat: 20000000 HEVC Level: 5.0 HEVC Tier: 0 HEVC Chroma Format: 1 (4:2:0) HEVC Chroma Bit Depth: 10 HEVC Luma Bit Depth: 10 HEVC Average Frame Rate: 0 HEVC Constant Frame Rate: 0 HEVC NALU Length Size: 4 HEVC Sequences: { Array Completeness=0 Type=32 (VPS_NUT - Video parameter set) 40010c01ffff022000000300900000030000030096958a0240 } { Array Completeness=0 Type=33 (SPS_NUT - Sequence parameter set) 420101022000000300900000030000030096a001e0200641365958ab90846bc05a84880482000007d20000bb80c029a4bc0001c9c3800017d78640 } { Array Completeness=0 Type=34 (PPS_NUT - Picture parameter set) 4401c160addbe624 } Width: 3840 Height: 1600 Depth: 24 ``` </details> mkvmerge gives this warning when muxing the mp4 to mkv: ``` Warning: Quicktime/MP4 reader: Track ID 0 has more than one FourCC. Only using the first one (0x68657631 "hev1": MPEG-H/HEVC/H.265) and not this one (0x68657631 "hev1": MPEG-H/HEVC/H.265). } ```
mp4 decrypt multiple Sample Description / fourcc
https://api.github.com/repos/axiomatic-systems/Bento4/issues/739/comments
0
2022-08-06T17:58:58Z
2022-08-06T17:58:58Z
https://github.com/axiomatic-systems/Bento4/issues/739
1,330,811,060
739
[ "axiomatic-systems", "Bento4" ]
**Hi, developers of Bento4:** Thank you very much for fixing my previous issue(#732 #734 )! I retested these today and the previous erro are well fixed! But unfortunately, there are new error of Memory leak in both programs(**mp4audioclip, mp42hls**). I'm not sure if this memory leak is causing some critical problems, so I submit this new issue. **mp4audioclip:** ``` ================================================================= ==69303==ERROR: LeakSanitizer: detected memory leaks Direct leak of 104 byte(s) in 1 object(s) allocated from: #0 0x5605678a674d in operator new(unsigned long) (/workspace/test/Bento4/check_build/mp4audioclip+0x11f74d) (BuildId: 61f9251b3c3ba231a4d8bd7bfc29e672bc80e24c) #1 0x5605678a907c in main (/workspace/test/Bento4/check_build/mp4audioclip+0x12207c) (BuildId: 61f9251b3c3ba231a4d8bd7bfc29e672bc80e24c) #2 0x7fb56df68d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: 89c3cb85f9e55046776471fed05ec441581d1969) SUMMARY: AddressSanitizer: 104 byte(s) leaked in 1 allocation(s). ``` **mp4hls:** ``` ================================================================= ==116847==ERROR: LeakSanitizer: detected memory leaks Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x5574e39f87fd in operator new(unsigned long) (/workspace/test/Bento4/check_build/mp42hls+0x1247fd) (BuildId: 7338e58ee75d4380e69e3a339b50ff0afeed42f7) #1 0x5574e3aff8ad in AP4_StdcFileByteStream::Create(AP4_FileByteStream*, char const*, AP4_FileByteStream::Mode, AP4_ByteStream*&) (/workspace/test/Bento4/check_build/mp42hls+0x22b8ad) (BuildId: 7338e58ee75d4380e69e3a339b50ff0afeed42f7) SUMMARY: AddressSanitizer: 48 byte(s) leaked in 1 allocation(s). ``` ### Crash input: same as #732 #734 ### Verification steps: ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp42hls ./crash_input ./mp4audioclip ./crash_input ./output ``` enviroment: Ubuntu 22.04 LTS Linux lab-pro 4.15.0-147-generic gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Ubuntu clang version 14.0.6 **Thanks & Best regards !**
Memory Leaks with ASAN in mp4audioclip and mp42hls
https://api.github.com/repos/axiomatic-systems/Bento4/issues/738/comments
0
2022-08-01T10:33:46Z
2023-05-29T02:53:13Z
https://github.com/axiomatic-systems/Bento4/issues/738
1,324,198,698
738
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: I found a strange error when I was testing mp4split: For some of my input, the program will get stuck and can only be ended by Ctrl+C. For my crash input, program will get stuck for a while and then killed by OS. Then when I run the program again with the same crash input, it may incur a error, information is here: (I'm sorry that now I can't reproduce this error steadily) ``` ================================================================= ==79908==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0xfb00000a0 bytes #0 0x55d5bdbfc83d in operator new(unsigned long) (/workspace/test/Bento4/check_build/mp4split+0x11f83d) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #1 0x55d5bdcbc90d in AP4_TrunAtom::AP4_TrunAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) (/workspace/test/Bento4/check_build/mp4split+0x1df90d) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #2 0x55d5bdcbc33b in AP4_TrunAtom::Create(unsigned int, AP4_ByteStream&) (/workspace/test/Bento4/check_build/mp4split+0x1df33b) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #3 0x55d5bdc0fc52 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x132c52) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #4 0x55d5bdc0ec6a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x131c6a) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #5 0x55d5bdc1fef0 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/Bento4/check_build/mp4split+0x142ef0) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #6 0x55d5bdc1f214 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/Bento4/check_build/mp4split+0x142214) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #7 0x55d5bdc1041d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x13341d) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #8 0x55d5bdc0ec6a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x131c6a) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #9 0x55d5bdc1fef0 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/Bento4/check_build/mp4split+0x142ef0) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #10 0x55d5bdc1f214 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/Bento4/check_build/mp4split+0x142214) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #11 0x55d5bdc1041d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x13341d) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #12 0x55d5bdc0ec6a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x131c6a) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #13 0x55d5bdc393d6 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/Bento4/check_build/mp4split+0x15c3d6) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #14 0x55d5bdc38e1b in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/Bento4/check_build/mp4split+0x15be1b) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #15 0x55d5bdc10dfc in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x133dfc) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #16 0x55d5bdc0ec6a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x131c6a) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #17 0x55d5bdc1fd22 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/Bento4/check_build/mp4split+0x142d22) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #18 0x55d5bdc1f214 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/Bento4/check_build/mp4split+0x142214) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #19 0x55d5bdc1041d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x13341d) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #20 0x55d5bdc0ec6a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x131c6a) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #21 0x55d5bdc1fef0 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/Bento4/check_build/mp4split+0x142ef0) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #22 0x55d5bdc1f214 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/Bento4/check_build/mp4split+0x142214) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #23 0x55d5bdc1041d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x13341d) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #24 0x55d5bdc0ec6a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x131c6a) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #25 0x55d5bdc1fef0 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/Bento4/check_build/mp4split+0x142ef0) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #26 0x55d5bdc1f214 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/Bento4/check_build/mp4split+0x142214) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #27 0x55d5bdc1041d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x13341d) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #28 0x55d5bdc0ec6a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4split+0x131c6a) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) #29 0x55d5bdc1fef0 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/Bento4/check_build/mp4split+0x142ef0) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) ==79908==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory (/workspace/test/Bento4/check_build/mp4split+0x11f83d) (BuildId: 8923b6b39aee6947dbdc279d5b8a7957b217196f) in operator new(unsigned long) ==79908==ABORTING ``` ### Crash input: https://github.com/Yhcrown/fuzzing-crashes/blob/main/validated/mp4split/1 ### hang input: https://github.com/Yhcrown/fuzzing-crashes/blob/main/validated/mp4split/0 ### Verification steps: ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp4split ./crash_input ``` enviroment: Ubuntu 22.04 LTS Linux lab-pro 4.15.0-147-generic gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Ubuntu clang version 14.0.6 **Thanks & Best regards !**
Out-of-Memory with ASAN in mp4split
https://api.github.com/repos/axiomatic-systems/Bento4/issues/737/comments
1
2022-08-01T09:29:59Z
2023-05-29T02:53:13Z
https://github.com/axiomatic-systems/Bento4/issues/737
1,324,116,788
737
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: I noticed that there are lots of heap-buffer-overflow error issues (#534 #629 #677 #707 ). I also meet this error in **mp4info**, so this problem have occured in **mp4dump, mp4tag, mp42aac, mp4info** . They are all from function **AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*)**, and the information is here: ``` ================================================================= ==32854==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000116 at pc 0x56043180306e bp 0x7ffe8a7deff0 sp 0x7ffe8a7defe8 READ of size 1 at 0x603000000116 thread T0 #0 0x56043180306d in AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*) (/workspace/test/Bento4/check_build/mp4info+0x18f06d) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #1 0x5604317fef90 in AP4_HvccAtom::Create(unsigned int, AP4_ByteStream&) (/workspace/test/Bento4/check_build/mp4info+0x18af90) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #2 0x5604317cc4e6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4info+0x1584e6) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #3 0x5604317cb6aa in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4info+0x1576aa) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #4 0x5604317caed4 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4info+0x156ed4) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #5 0x5604317fa1bb in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) (/workspace/test/Bento4/check_build/mp4info+0x1861bb) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #6 0x5604317fa66a in AP4_File::AP4_File(AP4_ByteStream&, bool) (/workspace/test/Bento4/check_build/mp4info+0x18666a) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #7 0x5604317a2139 in main (/workspace/test/Bento4/check_build/mp4info+0x12e139) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #8 0x7fcdc2bc6d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: 89c3cb85f9e55046776471fed05ec441581d1969) #9 0x7fcdc2bc6e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: 89c3cb85f9e55046776471fed05ec441581d1969) #10 0x5604316e1b44 in _start (/workspace/test/Bento4/check_build/mp4info+0x6db44) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) 0x603000000116 is located 0 bytes to the right of 22-byte region [0x603000000100,0x603000000116) allocated by thread T0 here: #0 0x56043179f86d in operator new[](unsigned long) (/workspace/test/Bento4/check_build/mp4info+0x12b86d) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #1 0x5604317f1d94 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) (/workspace/test/Bento4/check_build/mp4info+0x17dd94) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #2 0x5604317cc4e6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4info+0x1584e6) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #3 0x5604317cb6aa in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4info+0x1576aa) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #4 0x5604317caed4 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) (/workspace/test/Bento4/check_build/mp4info+0x156ed4) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #5 0x5604317fa1bb in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) (/workspace/test/Bento4/check_build/mp4info+0x1861bb) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #6 0x5604317fa66a in AP4_File::AP4_File(AP4_ByteStream&, bool) (/workspace/test/Bento4/check_build/mp4info+0x18666a) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #7 0x5604317a2139 in main (/workspace/test/Bento4/check_build/mp4info+0x12e139) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) #8 0x7fcdc2bc6d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: 89c3cb85f9e55046776471fed05ec441581d1969) SUMMARY: AddressSanitizer: heap-buffer-overflow (/workspace/test/Bento4/check_build/mp4info+0x18f06d) (BuildId: 3c6e9c0c294b9dd4c01979220b14c84c2dc35b64) in AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*) Shadow bytes around the buggy address: 0x0c067fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c067fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c067fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c067fff8000: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x0c067fff8010: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa =>0x0c067fff8020: 00 00[06]fa fa fa 00 00 06 fa fa fa fa fa fa fa 0x0c067fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8070: 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 ==32854==ABORTING ``` ### Crash input: https://github.com/Yhcrown/fuzzing-crashes/blob/main/validated/mp4info/0 ### Verification steps: ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp4info ./crash_input ``` enviroment: Ubuntu 22.04 LTS Linux lab-pro 4.15.0-147-generic gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Ubuntu clang version 14.0.6 **Thanks & Best regards !**
Heap-Buffer-Overflow with ASAN in mp4info (AP4_HvccAtom)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/736/comments
0
2022-08-01T04:25:38Z
2023-05-29T02:53:12Z
https://github.com/axiomatic-systems/Bento4/issues/736
1,323,797,072
736
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: In the test of the binary **mp4hls** instrumented with ASAN. There are some input causing heap-buffer-overflow in function **AP4_Mp4AudioDecoderConfig::ParseExtension(AP4_Mp4AudioDsiParser&)**. Here is the asan mode output: ``` ================================================================= ==33387==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000234 at pc 0x5622652f1f60 bp 0x7ffd29059d30 sp 0x7ffd29059d28 READ of size 1 at 0x602000000234 thread T0 #0 0x5622652f1f5f in AP4_Mp4AudioDecoderConfig::ParseExtension(AP4_Mp4AudioDsiParser&) (/workspace/test/validate/Bento4/check_build/mp42hls+0x139f5f) (BuildId: 5b3926cf6a812b14754d91115945185b870473da) #1 0x5622652f3594 in AP4_Mp4AudioDecoderConfig::Parse(unsigned char const*, unsigned int) (/workspace/test/validate/Bento4/check_build/mp42hls+0x13b594) (BuildId: 5b3926cf6a812b14754d91115945185b870473da) #2 0x562265355c7f in AP4_Mpeg2TsAudioSampleStream::WriteSample(AP4_Sample&, AP4_DataBuffer&, AP4_SampleDescription*, bool, AP4_ByteStream&) (/workspace/test/validate/Bento4/check_build/mp42hls+0x19dc7f) (BuildId: 5b3926cf6a812b14754d91115945185b870473da) #3 0x5622652ea28c in main (/workspace/test/validate/Bento4/check_build/mp42hls+0x13228c) (BuildId: 5b3926cf6a812b14754d91115945185b870473da) #4 0x7fe0d15e4d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: 89c3cb85f9e55046776471fed05ec441581d1969) #5 0x7fe0d15e4e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: 89c3cb85f9e55046776471fed05ec441581d1969) #6 0x56226521ebe4 in _start (/workspace/test/validate/Bento4/check_build/mp42hls+0x66be4) (BuildId: 5b3926cf6a812b14754d91115945185b870473da) 0x602000000234 is located 0 bytes to the right of 4-byte region [0x602000000230,0x602000000234) allocated by thread T0 here: #0 0x5622652dc90d in operator new[](unsigned long) (/workspace/test/validate/Bento4/check_build/mp42hls+0x12490d) (BuildId: 5b3926cf6a812b14754d91115945185b870473da) #1 0x562265327a08 in AP4_DataBuffer::AP4_DataBuffer(void const*, unsigned int) (/workspace/test/validate/Bento4/check_build/mp42hls+0x16fa08) (BuildId: 5b3926cf6a812b14754d91115945185b870473da) #2 0x562265355c7f in AP4_Mpeg2TsAudioSampleStream::WriteSample(AP4_Sample&, AP4_DataBuffer&, AP4_SampleDescription*, bool, AP4_ByteStream&) (/workspace/test/validate/Bento4/check_build/mp42hls+0x19dc7f) (BuildId: 5b3926cf6a812b14754d91115945185b870473da) #3 0x5622652ea28c in main (/workspace/test/validate/Bento4/check_build/mp42hls+0x13228c) (BuildId: 5b3926cf6a812b14754d91115945185b870473da) #4 0x7fe0d15e4d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: 89c3cb85f9e55046776471fed05ec441581d1969) SUMMARY: AddressSanitizer: heap-buffer-overflow (/workspace/test/validate/Bento4/check_build/mp42hls+0x139f5f) (BuildId: 5b3926cf6a812b14754d91115945185b870473da) in AP4_Mp4AudioDecoderConfig::ParseExtension(AP4_Mp4AudioDsiParser&) Shadow bytes around the buggy address: 0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff8000: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa fd fd 0x0c047fff8010: fa fa 04 fa fa fa fd fd fa fa 00 05 fa fa 04 fa 0x0c047fff8020: fa fa 00 fa fa fa fd fd fa fa 04 fa fa fa fd fa 0x0c047fff8030: fa fa fd fa fa fa 01 fa fa fa 00 00 fa fa 00 00 =>0x0c047fff8040: fa fa 04 fa fa fa[04]fa fa fa fa fa fa fa fa fa 0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8090: 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 ==33387==ABORTING ``` ### Crash input: https://github.com/Yhcrown/fuzzing-crashes/blob/main/validated/mp4hls/0 ### Verification steps: ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp42hls ./crash_input ``` enviroment: Ubuntu 22.04 LTS Linux lab-pro 4.15.0-147-generic gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Ubuntu clang version 14.0.6 **Thanks & Best regards !**
Heap-Buffer-Overflow with ASAN in mp42hls
https://api.github.com/repos/axiomatic-systems/Bento4/issues/734/comments
0
2022-07-31T04:07:15Z
2022-07-31T17:55:03Z
https://github.com/axiomatic-systems/Bento4/issues/734
1,323,356,109
734
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: I tested the binary **mp4tag** instrumented with ASAN. It also incured SEGV on unknown address error. Here is information: ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==124326==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7f85be68161b bp 0x7ffdf5a4b640 sp 0x7ffdf5a4adc8 T0) ==124326==The signal is caused by a READ memory access. ==124326==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 0x7f85be68161b in AddressIsPoisoned ../../../../src/libsanitizer/asan/asan_mapping.h:407 #1 0x7f85be68161b in QuickCheckForUnpoisonedRegion ../../../../src/libsanitizer/asan/asan_interceptors_memintrinsics.h:31 #2 0x7f85be682283 in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827 #3 0x55ac0ab66f34 in AP4_DataBuffer::SetData(unsigned char const*, unsigned int) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x32f34) #4 0x55ac0ab5d027 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x29027) #5 0x55ac0ab5d2cb in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x292cb) #6 0x55ac0ab5a777 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x26777) #7 0x55ac0ab5b24b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2724b) #8 0x55ac0ab602c1 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c2c1) #9 0x55ac0ab86291 in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x52291) #10 0x55ac0ab7a679 in AP4_EncvSampleEntry::AP4_EncvSampleEntry(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x46679) #11 0x55ac0ab5a12d in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2612d) #12 0x55ac0ab5b24b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2724b) #13 0x55ac0ab8d207 in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x59207) #14 0x55ac0ab8d54d in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x5954d) #15 0x55ac0ab598a2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x258a2) #16 0x55ac0ab5b24b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2724b) #17 0x55ac0ab602c1 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c2c1) #18 0x55ac0ab60642 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c642) #19 0x55ac0ab58f81 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x24f81) #20 0x55ac0ab5b24b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2724b) #21 0x55ac0ab602c1 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c2c1) #22 0x55ac0ab60642 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c642) #23 0x55ac0ab58f81 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x24f81) #24 0x55ac0ab5b24b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2724b) #25 0x55ac0ab602c1 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c2c1) #26 0x55ac0ab60642 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c642) #27 0x55ac0ab58f81 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x24f81) #28 0x55ac0ab5b24b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2724b) #29 0x55ac0ab602c1 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c2c1) #30 0x55ac0ab603db in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c3db) #31 0x55ac0ab93722 in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x5f722) #32 0x55ac0ab5955b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2555b) #33 0x55ac0ab5b24b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2724b) #34 0x55ac0ab602c1 in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c2c1) #35 0x55ac0ab603db in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x2c3db) #36 0x55ac0ab720ff in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x3e0ff) #37 0x55ac0ab5a857 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x26857) #38 0x55ac0ab5afa7 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x26fa7) #39 0x55ac0ab6973d in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x3573d) #40 0x55ac0ab6992f in AP4_File::AP4_File(AP4_ByteStream&, bool) (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x3592f) #41 0x55ac0ab53116 in main (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x1f116) #42 0x7f85be116d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) #43 0x7f85be116e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) #44 0x55ac0ab53634 in _start (/workspace/test/validate/Bento4/cmakebuild/mp4tag+0x1f634) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ../../../../src/libsanitizer/asan/asan_mapping.h:407 in AddressIsPoisoned ==124326==ABORTING ``` ### Crash input: https://github.com/Yhcrown/fuzzing-crashes/blob/main/validated/mp4tag/0 ### Verification steps: ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp4tag ./crash_input ``` enviroment: Ubuntu 22.04 LTS Linux lab-pro 4.15.0-147-generic gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Ubuntu clang version 14.0.6 **Thanks & Best regards !**
SEGV with ASAN in mp4tag
https://api.github.com/repos/axiomatic-systems/Bento4/issues/733/comments
0
2022-07-31T03:53:44Z
2022-07-31T18:07:12Z
https://github.com/axiomatic-systems/Bento4/issues/733
1,323,354,338
733
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: I also test the binary **mp4audioclip** instrumented with ASAN. There are two input incuring two different function call stack of SEGV error. The information is as follows: For https://github.com/Yhcrown/fuzzing-crashes/blob/main/validated/mp4audioclip/0: ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==4241==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x556421b987bc bp 0x7ffd605fbf60 sp 0x7ffd605fbe28 T0) ==4241==The signal is caused by a READ memory access. ==4241==Hint: address points to the zero page. #0 0x556421b987bc in AP4_Track::GetSampleIndexForTimeStampMs(unsigned int, unsigned int&) (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x227bc) #1 0x556421b93f27 in main (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x1df27) #2 0x7fd0a09a8d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) #3 0x7fd0a09a8e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) #4 0x556421b94544 in _start (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x1e544) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x227bc) in AP4_Track::GetSampleIndexForTimeStampMs(unsigned int, unsigned int&) ==4241==ABORTING ``` For https://github.com/Yhcrown/fuzzing-crashes/blob/main/validated/mp4audioclip/4 ``` ==3902==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x557efa43c2ce bp 0x000000000000 sp 0x7ffe91f96d90 T0) ==3902==The signal is caused by a READ memory access. ==3902==Hint: address points to the zero page. #0 0x557efa43c2ce in AP4_StsdAtom::AP4_StsdAtom(AP4_SampleTable*) (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x602ce) #1 0x557efa438079 in AP4_SampleTable::GenerateStblAtom(AP4_ContainerAtom*&) (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x5c079) #2 0x557efa3fec70 in AP4_TrakAtom::AP4_TrakAtom(AP4_SampleTable*, unsigned int, char const*, unsigned int, unsigned long long, unsigned long long, unsigned long long, unsigned int, unsigned long long, unsigned short, char const*, unsigned int, unsigned int, unsigned short, unsigned short, int const*) (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x22c70) #3 0x557efa3fdcc7 in AP4_Track::AP4_Track(AP4_Track::Type, AP4_SampleTable*, unsigned int, unsigned int, unsigned long long, unsigned int, unsigned long long, char const*, unsigned int, unsigned int, unsigned long long, unsigned long long) (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x21cc7) #4 0x557efa3fa0a0 in main (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x1e0a0) #5 0x7f921535ed8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) #6 0x7f921535ee3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) #7 0x557efa3fa544 in _start (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x1e544) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/workspace/test/validate/Bento4/cmakebuild/mp4audioclip+0x602ce) in AP4_StsdAtom::AP4_StsdAtom(AP4_SampleTable*) ==3902==ABORTING ``` ### Verification steps: ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./mp4audioclip ./crash_input ``` enviroment: Ubuntu 22.04 LTS Linux lab-pro 4.15.0-147-generic gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Ubuntu clang version 14.0.6 **Thanks & Best regards !**
SEGV with ASAN in mp4audioclip
https://api.github.com/repos/axiomatic-systems/Bento4/issues/732/comments
0
2022-07-31T03:32:08Z
2022-07-31T18:29:56Z
https://github.com/axiomatic-systems/Bento4/issues/732
1,323,351,878
732
[ "axiomatic-systems", "Bento4" ]
Hi, developers of Bento4: I test the binary **avcinfo** instrumented with ASAN. Unfortunately, it incurred a crash with the following error information. Any help would be greatly appreciated from you: ``` ================================================================= ==105621==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000014 at pc 0x7f6ffd9b4397 bp 0x7ffc5d804f40 sp 0x7ffc5d8046e8 READ of size 8 at 0x602000000014 thread T0 #0 0x7f6ffd9b4396 in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827 #1 0x564248aba9dc in AP4_BitStream::WriteBytes(unsigned char const*, unsigned int) (/workspace/test/validate/Bento4/cmakebuild/avcinfo+0x69dc) #2 0x564248ab673e in main (/workspace/test/validate/Bento4/cmakebuild/avcinfo+0x273e) #3 0x7f6ffd448d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) #4 0x7f6ffd448e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) #5 0x564248ab6904 in _start (/workspace/test/validate/Bento4/cmakebuild/avcinfo+0x2904) 0x602000000014 is located 0 bytes to the right of 4-byte region [0x602000000010,0x602000000014) allocated by thread T0 here: #0 0x7f6ffda30337 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:102 #1 0x564248abb579 in AP4_DataBuffer::SetDataSize(unsigned int) (/workspace/test/validate/Bento4/cmakebuild/avcinfo+0x7579) SUMMARY: AddressSanitizer: heap-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827 in __interceptor_memcpy Shadow bytes around the buggy address: 0x0c047fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c047fff8000: fa fa[04]fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8050: 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 ==105621==ABORTING ``` ### **Crash input:** https://github.com/Yhcrown/fuzzing-crashes/blob/main/validated/avcinfo/1 ### **Verification steps:** ``` git clone https://github.com/axiomatic-systems/Bento4 cd Bento4/ mkdir check_build && cd check_build cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=Release make -j ./avcinfo ./crash_input ``` ### **enviroment:** Ubuntu 22.04 LTS Linux lab-pro 4.15.0-147-generic gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Ubuntu clang version 14.0.6 **Thanks & Best regards !**
Heap-Buffer-Overflow with ASAN in avcinfo
https://api.github.com/repos/axiomatic-systems/Bento4/issues/731/comments
0
2022-07-31T03:08:28Z
2023-05-29T02:53:12Z
https://github.com/axiomatic-systems/Bento4/issues/731
1,323,348,825
731
[ "axiomatic-systems", "Bento4" ]
Hi all, I'm running into a issue with MP4's with Dolby Atmos When I run these commands, `mp4fragment './media/Universe_Fury2.mp4' './media/Universe_Fury2.mp4-f.mp4'` `mp4-dash.py './media/Universe_Fury2-f.mp4' --hls --profile='on-demand' -o'./packaged/'` I get the following console log error. ``` ERROR: 'atmos' Parsing media file 1: ./media/Universe_Fury2-f.mp4 Extracting track 2 from ./media/Universe_Fury2-f.mp4 Extracting track 1 from ./media/Universe_Fury2-f.mp4 Parsing media file 1: tmp7d7rnngy = Extracted[track 2 from ./media/Universe_Fury2-f.mp4mp4] Parsing media file 2: tmppclu11qi = Extracted[track 1 from ./media/Universe_Fury2-f.mp4.mp4] Processing and Copying media file tmp7d7rnngy = Extracted[track 2 from ./media/Universe_Fury2-f.mp4.mp4] Processing and Copying media file tmppclu11qi = Extracted[track 1 from ./media/Universe_Fury2-f.mp4] [Finished in 5.5s with exit code 1] ``` The media used for this is a demo mp4 from Dolby tah can be found here https://developer.dolby.com/tools-media/sample-media/video-streams/hd-video-streams/ Running the code from the latest code from github (cloned 25 July 2022)
mp4-dash atmos error
https://api.github.com/repos/axiomatic-systems/Bento4/issues/730/comments
1
2022-07-25T14:27:58Z
2023-10-16T16:45:25Z
https://github.com/axiomatic-systems/Bento4/issues/730
1,316,924,605
730
[ "axiomatic-systems", "Bento4" ]
Hello team I would like to use the Mp4tag command but when I launch my order: Mp4tag - - show-tags test1.mp4 test2.mp4 nothing happens and no action and realizes it comes back just to the line Thank your for help
Help commande MP4tag
https://api.github.com/repos/axiomatic-systems/Bento4/issues/729/comments
1
2022-07-25T13:40:34Z
2023-05-29T02:54:54Z
https://github.com/axiomatic-systems/Bento4/issues/729
1,316,858,987
729
[ "axiomatic-systems", "Bento4" ]
Hello, can somebody please provide an example on how to package HLS streams for Widevine. I'm aware that a specific command often relies on the DRM provider. I need some kind of example to understand how Widevine packaging works. I'm explicitly asking for a command that can be used with mp4encrypt. Thanks in advance
How to use mp4encrypt to package HLS for Widevine?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/728/comments
0
2022-07-20T12:22:23Z
2022-07-20T12:22:23Z
https://github.com/axiomatic-systems/Bento4/issues/728
1,310,989,620
728
[ "axiomatic-systems", "Bento4" ]
I decrypt some videos and then got the error "ERROR: failed to process the file (-10)" and that video did not complete the decrypting. For example, the video is 45 minutes length but can only decrypt 36 minutes. I have tried many times and no success. Please check this bugs for me ![Screenshot 2022-06-30 203724](https://user-images.githubusercontent.com/50206148/179761627-2f40e12a-f71c-465f-a298-92276ed10ad6.png)
ERROR: failed to process the file (-10) when decrypt with mp4decrypt
https://api.github.com/repos/axiomatic-systems/Bento4/issues/727/comments
0
2022-07-19T13:26:40Z
2022-07-19T13:27:08Z
https://github.com/axiomatic-systems/Bento4/issues/727
1,309,522,632
727
[ "axiomatic-systems", "Bento4" ]
Hello, I'm not sure where to get started. I want to protect my HLS streams using DRM. The problem is that I'm not able to find out what scheme to use to protect my media. Currently, all HLS streams getting packed as fragmented mp4 files (.m4s segments), where I have the following codecs in use: AVC, HEVC, AAC, HE-AAC, HE-AAC-V2 and E-AC3. I've now checked onto many JS players and either they don't support fmp4 with encryption or they don't support fmp4 at all. The problem for me here is: If I can't play fmp4 segments I also can't play HEVC nor 4K nor HDR content ... Can somebody maybe share his experience from where to get started now? Thanks in advance
Kinda lost with encryption and playback
https://api.github.com/repos/axiomatic-systems/Bento4/issues/726/comments
5
2022-07-18T18:53:09Z
2022-07-19T08:51:17Z
https://github.com/axiomatic-systems/Bento4/issues/726
1,308,380,571
726
[ "axiomatic-systems", "Bento4" ]
Trying to open mp4 file: mp4dump.exe myfile.mp4 and get this error "cannot open input (-4)"
cannot open input (-4)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/725/comments
2
2022-07-17T13:13:00Z
2022-07-18T13:24:20Z
https://github.com/axiomatic-systems/Bento4/issues/725
1,307,094,169
725
[ "axiomatic-systems", "Bento4" ]
Hey folks, I'm using ffmpeg to build my HLS stream, sadly ffmpeg does not support fmp4 encryption, at least not for m4s segments, only for .ts segments. Anyway, I would like to know if bento4 is able to help me out here. I have a master.m3u8 file and lots of folders for ABR playback, is bento4 able to do the encryption here for me instead of ffmpeg? So basically the flow would be to first use ffmpeg to create the HLS stream and then use bento4 to encrypt the segments generated previously by ffmpeg. Thanks in advance
Stuck with ffmpeg fmp4 encryption
https://api.github.com/repos/axiomatic-systems/Bento4/issues/724/comments
5
2022-07-11T21:38:47Z
2022-07-16T22:43:22Z
https://github.com/axiomatic-systems/Bento4/issues/724
1,301,255,173
724
[ "axiomatic-systems", "Bento4" ]
Hello, I am trying to using Mp4Info to add mutiple avc1 to mp4. But something went wrong..and I dont know where is it.I would appreciate if you could help me. I want change the structure of mp4 FROM : ![20220711-144924](https://user-images.githubusercontent.com/34226411/178205394-681302c8-3cd2-40cb-bbe8-a2e9226e75c4.jpg) TO: ![飞书20220711-144953](https://user-images.githubusercontent.com/34226411/178205355-5d25b4f8-3fd0-40f2-8bae-2f8844f775d4.jpg) Actually I just add a avc1 box to stsd and then change the sample description index in stsc box. This is my source code Mp4Fix.txt But I get a corrupt file, after checking file ,I find mdat box changed ,I donnt know why. Could you please tell me why mdat box will be changed when I modify other box? In my understanding, mdat is only used to store data. I will appricate it very much if someone could give me some advices
Add multiple avc1 to MP4
https://api.github.com/repos/axiomatic-systems/Bento4/issues/723/comments
2
2022-07-11T06:57:28Z
2022-07-12T03:06:18Z
https://github.com/axiomatic-systems/Bento4/issues/723
1,300,290,270
723
[ "axiomatic-systems", "Bento4" ]
Muxing AC4 is not working properly. The output from mp4mux for full length movie, only half duration of runtime is playing properly and for remaining half duration video is stuck and audio is loop from that particular half duration to few seconds. Also for ec3 ,video is playing is for full duration but audio is muted for last 25% of full length movie. But using same sample and muxing using Dolbymp4base muxer it working fine. So kindly rectify the issue of Dolby codec in bento4 and update mp4mux. Thank you.
Dolby codec not muxing properly!
https://api.github.com/repos/axiomatic-systems/Bento4/issues/721/comments
0
2022-07-01T12:20:21Z
2022-07-01T12:24:57Z
https://github.com/axiomatic-systems/Bento4/issues/721
1,291,338,370
721
[ "axiomatic-systems", "Bento4" ]
Hi, I have a file that I can decrypt successfully using `mp4decrypt.exe` binary from Bento4 1.5.1.0, but the one in Bento4 1.6 or in `master` (downloaded from [CI](https://github.com/axiomatic-systems/Bento4/actions/runs/2440340426)) will generate broken file that I can't play. Trying to remux with ffmpeg cannot fix it (actually, ffmpeg will complain and drop the video stream entirely). The file is attached. [enc_test.zip](https://github.com/axiomatic-systems/Bento4/files/9007716/enc_test.zip) The key is `b35ba32acf43e2865cb0771219af08d5:989d4b0938b6902471a10d77c0db753b`. My command is ```bash mp4decrypt.exe --key "b35ba32acf43e2865cb0771219af08d5:989d4b0938b6902471a10d77c0db753b" "enc_test.mp4" "dec.mp4" ```
mp4decrypt regression: Bento4 1.6 can no longer output correct file while Bento4 1.5.1.0 works
https://api.github.com/repos/axiomatic-systems/Bento4/issues/720/comments
6
2022-06-29T06:11:22Z
2023-07-13T09:52:13Z
https://github.com/axiomatic-systems/Bento4/issues/720
1,288,219,540
720
[ "axiomatic-systems", "Bento4" ]
I'm using DRM for Fairplay system and able to generate encrypted segments using **mp4hls** using the below command and it also works as expected for multilingual tracks. `mp4hls --verbose \ --master-playlist-name=hls.m3u8 \ --encryption-mode=SAMPLE-AES \ --encryption-key=cb75f1394a3e13a5cbfb95f347350d335a8b7e330fea45d4765b6a89c9559331 \ --encryption-iv-mode=fps \ --encryption-key-format=com.apple.streamingkeydelivery \ --encryption-key-uri=skd://80ceb435d360174a6b94f232b5ed4f7c \ --output-dir=/Users/ramanpandey/Desktop/testvideos/hls_enc \ --audio-format=ts \ --segment-duration 10 /Users/ramanpandey/Desktop/testvideos/sample_trl_videos/sample_trl_vid_950x540.mp4 ` I need to embed subtitles as sidecar but I couldn't find any way to add subtitles in the track. please help me with the solution to add subtitles as a sidecar. I tried using mp4dash as well but it's failing with an error. ERROR: file /Users/ramanpandey/Desktop/testvideos/multilingual/test_eng_5_1_vid_1920x1080.mp4 is not fragmented (use mp4fragment to fragment it) below is the mp4dash command i tried. `mp4dash --verbose \ --hls \ --hls-master-playlist-name=hls.m3u8 \ --encryption-key=2018bb3ee84ae9c6b95900d277eb4ae7:5e7a2bb3dd6e25a87185cc262db1b9bd \ --encryption-cenc-scheme=cbcs \ --fairplay-key-uri=skd://28fcb76031d755491db54ff97372cf19 \ --output-dir=/Users/ramanpandey/Desktop/testvideos/hls_mp4dash_enc /Users/ramanpandey/Desktop/testvideos/multilingual/test_eng_5_1_vid_1920x1080.mp4` Please someone suggest how can I add a subtitle sidecar for HLS playback?
How to add subtitle sidecar with mp4hls for HLS ?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/719/comments
0
2022-06-20T08:41:20Z
2022-06-20T08:41:20Z
https://github.com/axiomatic-systems/Bento4/issues/719
1,276,575,833
719
[ "axiomatic-systems", "Bento4" ]
The option --hls-key-url is broken when combined with --widevine-header= or --widevine . It is likely overriden. It just doesn't put the hls-key-url into the m3u8 itself.
MP4Dash option --hls-key-url not working when combined with --widevine-header or --widevine
https://api.github.com/repos/axiomatic-systems/Bento4/issues/718/comments
0
2022-06-17T13:48:28Z
2022-06-17T13:48:28Z
https://github.com/axiomatic-systems/Bento4/issues/718
1,275,054,739
718
[ "axiomatic-systems", "Bento4" ]
Hey folks, as FFmpeg in version 5.0.1 (Currently latest) does not support fmp4 HLS encryption, process will end with "Encrypted fmp4 not yet supported", I would like to know If I could use bento4 as a workaround to encrypt my fmp4 hls segments here? Currently, my setup takes a single mp4 input file, analysis this using ffprobe and generates multiple bit rate versions in HLS fmp4 format. So far so good, but how can I now protect these segments using encryption. As far as I've understood Bento4 SDK it expected to repack the file itself into HLS format from a single mp4. Is that true, or can I use Bento4 to reencrypt my segments here myself? Thanks in advance
Stuck with fmp4 output from ffmpeg I want to encrypt
https://api.github.com/repos/axiomatic-systems/Bento4/issues/717/comments
1
2022-06-15T09:38:58Z
2022-07-17T16:30:50Z
https://github.com/axiomatic-systems/Bento4/issues/717
1,271,957,500
717
[ "axiomatic-systems", "Bento4" ]
I'm using Bento4 in an Android app to split videos from my camera, and it's working fine. However, they are not compressed, so the video segments are larger than I want them to be. For example, a 6 second clip is about 38MB (using MPEG2-TS). I'm not a C++ coder, so I don't know how to change the bitrate or video resolution in Bento4. Can someone help me? The respective files I'm using are: [/Source/C++/Apps/Mp4Split/TransportStream.cpp](https://www.dropbox.com/s/v18l19zyfld23vi/TransportStream.cpp?dl=0) [/Source/C++/Core/Ap4Mpeg2Ts.cpp](https://www.dropbox.com/s/fmmbvuy0x9xqjc3/Ap4Mpeg2Ts.cpp?dl=0) [/Source/C++/Core/Ap4Mpeg2Ts.h](https://www.dropbox.com/s/swz13z2wr8o6pkt/Ap4Mpeg2Ts.h?dl=0) Thanks
How to reduce video file size in Bento4?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/714/comments
1
2022-06-03T16:27:09Z
2022-07-17T16:31:12Z
https://github.com/axiomatic-systems/Bento4/issues/714
1,260,119,705
714
[ "axiomatic-systems", "Bento4" ]
# Vulnerability description **version:** Bento4-1.6.0-639 **command:** ./mp42aac $POC /dev/null **Download:** [poc](https://github.com/0xdd96/PoC/raw/main/Bento4/AP4_SgpdAtom::AP4_SgpdAtom-out-of-memory) Here is the trace reported by ASAN: ``` $ mp42aac poc /dev/null AddressSanitizer: Out of memory. The process has exhausted 65536MB for size class 48. ================================================================= ==29843==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x18 bytes #0 0x7ffff769b947 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0x10f947) #1 0x555555911f52 in AP4_List<AP4_DataBuffer>::Add(AP4_DataBuffer*) /path_to_Bento4/Source/C++/Core/Ap4List.h:160 #2 0x5555559114bd in AP4_SgpdAtom::AP4_SgpdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /path_to_Bento4/Source/C++/Core/Ap4SgpdAtom.cpp:111 #3 0x555555910da4 in AP4_SgpdAtom::Create(unsigned int, AP4_ByteStream&) /path_to_Bento4/Source/C++/Core/Ap4SgpdAtom.cpp:54 #4 0x55555589399c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:729 #5 0x555555890224 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:233 #6 0x5555558b9c5f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #7 0x5555558b96c2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #8 0x5555558b9229 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #9 0x555555893d26 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:796 #10 0x555555890224 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:233 #11 0x5555558c7b47 in AP4_DrefAtom::AP4_DrefAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /path_to_Bento4/Source/C++/Core/Ap4DrefAtom.cpp:84 #12 0x5555558c768b in AP4_DrefAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /path_to_Bento4/Source/C++/Core/Ap4DrefAtom.cpp:50 #13 0x555555892ccd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:560 #14 0x555555890224 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:233 #15 0x5555558b9c5f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #16 0x5555558b96c2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #17 0x5555558b9229 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #18 0x555555893d26 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:796 #19 0x555555890224 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:233 #20 0x5555558b9c5f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #21 0x5555558b96c2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #22 0x5555558b9229 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #23 0x555555893d26 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:796 #24 0x555555890224 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:233 #25 0x5555558b9c5f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #26 0x5555558b96c2 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #27 0x5555558b9229 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /path_to_Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #28 0x555555893d26 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:796 #29 0x555555890224 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /path_to_Bento4/Source/C++/Core/Ap4AtomFactory.cpp:233 ==29843==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory (/lib/x86_64-linux-gnu/libasan.so.5+0x10f947) in operator new(unsigned long) ==29843==ABORTING ``` # Vulnerability analysis https://github.com/axiomatic-systems/Bento4/blob/0735fe81819fd5f6501e6649b6e0d4b2b7874d8f/Source/C%2B%2B/Core/Ap4SgpdAtom.cpp#L89-L114 ``` pwndbg> p entry_count $1 = 4278190081 pwndbg> p m_DefaultLength $2 = 20 pwndbg> p m_Version $3 = 1 '\001' pwndbg> p bytes_available $4 = 20 ``` The possible cause of this issue is that a crafted input can set `entry_count` to a large value (4,278,190,081) in line 90. Such a long loop (line 95-114) will allocate a lot of memory in line 106 and line 111, which eventually exhausts the memory. Since the return value of `stream.Read` is not checked in line 109, the loop will not terminate at the end of the input file.
Possible memory exhuastion in AP4_SgpdAtom::AP4_SgpdAtom(). The process has exhausted 65536MB memory.
https://api.github.com/repos/axiomatic-systems/Bento4/issues/712/comments
0
2022-05-31T14:44:43Z
2022-06-04T17:16:23Z
https://github.com/axiomatic-systems/Bento4/issues/712
1,253,977,287
712
[ "axiomatic-systems", "Bento4" ]
I only need to use mp4decrypt but I'm getting this error. I'm on Windows 10 32Bit......I'm guessing it's the 32 bit that's causing the problem? Which is confusing since the zip file name has x86 and win32 in its file name.
"not compatible with this version of windows"
https://api.github.com/repos/axiomatic-systems/Bento4/issues/711/comments
0
2022-05-24T11:04:19Z
2022-05-24T11:04:19Z
https://github.com/axiomatic-systems/Bento4/issues/711
1,246,373,912
711
[ "axiomatic-systems", "Bento4" ]
Hello, there is a specific reason for not adding the --output-encryption-key option also to mp4-dash.py as in mp4-hls.py ? I'm referring to these lines: https://github.com/axiomatic-systems/Bento4/blob/d02ef8230a8fee4904a750eb912521c5f1c74e0b/Source/Python/utils/mp4-hls.py#L254-L256 I trying to use mp4-dash.py instead of mp4-hls.py to integrate subtitles management and this option would make the scripts migration easy. For testing purpose I'm using the --hls-key-url to point to a url with a test key and all works correct, just wondering if I'm missing the reason for not having the same behavior Thanks
key.bin creation in mp4-dash.py?
https://api.github.com/repos/axiomatic-systems/Bento4/issues/710/comments
5
2022-05-12T03:16:02Z
2022-06-17T14:10:36Z
https://github.com/axiomatic-systems/Bento4/issues/710
1,233,390,936
710
[ "axiomatic-systems", "Bento4" ]
SUMMARY: AddressSanitizer: heap-buffer-overflow in /Source/C++/Core/Ap4Utils.h:114 - Version ``` $ ./mp4dump MP4 File Dumper - Version 1.2 (Bento4 Version 1.6.0.0) (c) 2002-2011 Axiomatic Systems, LLC ``` branch [d02ef82](https://github.com/axiomatic-systems/Bento4/commit/d02ef8230a8fee4904a750eb912521c5f1c74e0b) - Platform ``` $ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ uname -r 5.13.0-40-generic $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal ``` - Steps to reproduce ``` $ mkdir build $ cd build $ cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" $ make $ ./mp4dump poc ``` - Asan ``` $ ./mp4dump poc [ftyp] size=8+16 major_brand = mp42 minor_version = 12a007e compatible_brand = mp42 compatible_brand = isom [free] size=8+0 [mdat] size=8+397 ================================================================= ==2507635==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000091 at pc 0x5654d5620942 bp 0x7ffc8764b030 sp 0x7ffc8764b020 READ of size 1 at 0x602000000091 thread T0 #0 0x5654d5620941 in AP4_BytesToUInt16BE(unsigned char const*) /home/wulearn/Bento4/Source/C++/Core/Ap4Utils.h:114 #1 0x5654d56b4423 in AP4_Stz2Atom::AP4_Stz2Atom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4Stz2Atom.cpp:128 #2 0x5654d56b3a4e in AP4_Stz2Atom::Create(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4Stz2Atom.cpp:52 #3 0x5654d5618b86 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:483 #4 0x5654d56165ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #5 0x5654d562961d in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #6 0x5654d5629080 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #7 0x5654d5661a6c in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4MoovAtom.cpp:80 #8 0x5654d561b3bb in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/wulearn/Bento4/build/mp4dump+0x3243bb) #9 0x5654d56184b8 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:393 #10 0x5654d56165ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #11 0x5654d5615bbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #12 0x5654d5608115 in main /home/wulearn/Bento4/Source/C++/Apps/Mp4Dump/Mp4Dump.cpp:342 #13 0x7f19b534d0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) #14 0x5654d56068ed in _start (/home/wulearn/Bento4/build/mp4dump+0x30f8ed) 0x602000000091 is located 0 bytes to the right of 1-byte region [0x602000000090,0x602000000091) allocated by thread T0 here: #0 0x7f19b5976787 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:107 #1 0x5654d56b3fa7 in AP4_Stz2Atom::AP4_Stz2Atom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4Stz2Atom.cpp:101 #2 0x5654d56b3a4e in AP4_Stz2Atom::Create(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4Stz2Atom.cpp:52 #3 0x5654d5618b86 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:483 #4 0x5654d56165ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #5 0x5654d562961d in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #6 0x5654d5629080 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #7 0x5654d5661a6c in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4MoovAtom.cpp:80 #8 0x5654d561b3bb in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/wulearn/Bento4/build/mp4dump+0x3243bb) #9 0x5654d56184b8 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:393 #10 0x5654d56165ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #11 0x5654d5615bbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #12 0x5654d5608115 in main /home/wulearn/Bento4/Source/C++/Apps/Mp4Dump/Mp4Dump.cpp:342 #13 0x7f19b534d0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/wulearn/Bento4/Source/C++/Core/Ap4Utils.h:114 in AP4_BytesToUInt16BE(unsigned char const*) Shadow bytes around the buggy address: 0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff8000: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00 =>0x0c047fff8010: fa fa[01]fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8060: 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 ==2507635==ABORTING ``` poc: [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8647388/poc.zip) Thanks!
heap-buffer-overflow in /Source/C++/Core/Ap4Utils.h:114
https://api.github.com/repos/axiomatic-systems/Bento4/issues/709/comments
0
2022-05-08T16:29:02Z
2022-05-08T16:29:02Z
https://github.com/axiomatic-systems/Bento4/issues/709
1,228,930,131
709
[ "axiomatic-systems", "Bento4" ]
SUMMARY: AddressSanitizer: SEGV on unknown address 0x000000000000 in /Source/C++/Core/Ap4DataBuffer.cpp:175 - Version ``` $ ./mp4dump MP4 File Dumper - Version 1.2 (Bento4 Version 1.6.0.0) (c) 2002-2011 Axiomatic Systems, LLC ``` branch [d02ef82](https://github.com/axiomatic-systems/Bento4/commit/d02ef8230a8fee4904a750eb912521c5f1c74e0b) - Platform ``` $ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ uname -r 5.13.0-40-generic $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal ``` - Steps to reproduce ``` $ mkdir build $ cd build $ cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" $ make $ ./mp4dump poc ``` - Asan ``` $ ./mp4dump poc [ftyp] size=8+16 major_brand = mk24 minor_version = 24017c compatible_brand = yl73 compatible_brand = oxsh [free] size=8+0 [mdat] size=8+397 AddressSanitizer:DEADLYSIGNAL ================================================================= ==2476501==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f73f2e09321 bp 0x7fffe8de6b70 sp 0x7fffe8de62e0 T0) ==2476501==The signal is caused by a READ memory access. ==2476501==Hint: address points to the zero page. #0 0x7f73f2e09320 in AddressIsPoisoned ../../../../src/libsanitizer/asan/asan_mapping.h:396 #1 0x7f73f2e09320 in QuickCheckForUnpoisonedRegion ../../../../src/libsanitizer/asan/asan_interceptors_memintrinsics.h:30 #2 0x7f73f2e09320 in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:790 #3 0x55719b16636b in AP4_DataBuffer::SetData(unsigned char const*, unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:175 #4 0x55719b14744a in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) /home/wulearn/Bento4/Source/C++/Core/Ap4AvccAtom.cpp:176 #5 0x55719b1464ab in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4AvccAtom.cpp:95 #6 0x55719b140dc6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:513 #7 0x55719b13e5ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #8 0x55719b15161d in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #9 0x55719b1bfeea in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:115 #10 0x55719b1c46f0 in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:884 #11 0x55719b1c5c2a in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:1136 #12 0x55719b13f203 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:319 #13 0x55719b13e5ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #14 0x55719b1d5c90 in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:101 #15 0x55719b1d550f in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:57 #16 0x55719b1409a6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:458 #17 0x55719b13e5ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #18 0x55719b15161d in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #19 0x55719b151080 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #20 0x55719b150be7 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #21 0x55719b142358 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #22 0x55719b13e5ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #23 0x55719b15161d in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #24 0x55719b151080 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #25 0x55719b150be7 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #26 0x55719b142358 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #27 0x55719b13e5ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #28 0x55719b15161d in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #29 0x55719b151080 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #30 0x55719b150be7 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #31 0x55719b142358 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #32 0x55719b13e5ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #33 0x55719b15161d in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #34 0x55719b151080 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #35 0x55719b1eb610 in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4TrakAtom.cpp:165 #36 0x55719b143429 in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/wulearn/Bento4/build/mp4dump+0x324429) #37 0x55719b14063f in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:413 #38 0x55719b13e5ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #39 0x55719b15161d in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #40 0x55719b151080 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #41 0x55719b189a6c in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4MoovAtom.cpp:80 #42 0x55719b1433bb in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/wulearn/Bento4/build/mp4dump+0x3243bb) #43 0x55719b1404b8 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:393 #44 0x55719b13e5ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #45 0x55719b13dbbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #46 0x55719b130115 in main /home/wulearn/Bento4/Source/C++/Apps/Mp4Dump/Mp4Dump.cpp:342 #47 0x7f73f28540b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) #48 0x55719b12e8ed in _start (/home/wulearn/Bento4/build/mp4dump+0x30f8ed) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ../../../../src/libsanitizer/asan/asan_mapping.h:396 in AddressIsPoisoned ==2476501==ABORTING ``` poc: [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8647385/poc.zip) Thanks!
SEGV on unknown address 0x000000000000 in /Source/C++/Core/Ap4DataBuffer.cpp:175
https://api.github.com/repos/axiomatic-systems/Bento4/issues/708/comments
0
2022-05-08T16:25:44Z
2022-05-08T16:25:44Z
https://github.com/axiomatic-systems/Bento4/issues/708
1,228,929,453
708
[ "axiomatic-systems", "Bento4" ]
SUMMARY: AddressSanitizer: heap-buffer-overflow in /Source/C++/Core/Ap4HvccAtom.cpp:282 - Version ``` $ ./mp4dump MP4 File Dumper - Version 1.2 (Bento4 Version 1.6.0.0) (c) 2002-2011 Axiomatic Systems, LLC ``` branch [d02ef82](https://github.com/axiomatic-systems/Bento4/commit/d02ef8230a8fee4904a750eb912521c5f1c74e0b) - Platform ``` $ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ uname -r 5.13.0-40-generic $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal ``` - Steps to reproduce ``` $ mkdir build $ cd build $ cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" $ make $ ./mp4dump poc ``` - Asan ``` $ ./mp4dump poc ================================================================= ==2382787==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6030000000e6 at pc 0x562f8af4a0a7 bp 0x7ffca9b2f1e0 sp 0x7ffca9b2f1d0 READ of size 1 at 0x6030000000e6 thread T0 #0 0x562f8af4a0a6 in AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*) /home/wulearn/Bento4/Source/C++/Core/Ap4HvccAtom.cpp:282 #1 0x562f8af47394 in AP4_HvccAtom::Create(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4HvccAtom.cpp:90 #2 0x562f8af14fa6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:539 #3 0x562f8af125ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #4 0x562f8af11bbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #5 0x562f8af04115 in main /home/wulearn/Bento4/Source/C++/Apps/Mp4Dump/Mp4Dump.cpp:342 #6 0x7f0dcc1e30b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) #7 0x562f8af028ed in _start (/home/wulearn/Bento4/build/mp4dump+0x30f8ed) 0x6030000000e6 is located 0 bytes to the right of 22-byte region [0x6030000000d0,0x6030000000e6) allocated by thread T0 here: #0 0x7f0dcc80c787 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:107 #1 0x562f8af399f7 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:55 #2 0x562f8af47327 in AP4_HvccAtom::Create(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4HvccAtom.cpp:86 #3 0x562f8af14fa6 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:539 #4 0x562f8af125ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #5 0x562f8af11bbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #6 0x562f8af04115 in main /home/wulearn/Bento4/Source/C++/Apps/Mp4Dump/Mp4Dump.cpp:342 #7 0x7f0dcc1e30b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/wulearn/Bento4/Source/C++/Core/Ap4HvccAtom.cpp:282 in AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*) Shadow bytes around the buggy address: 0x0c067fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c067fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c067fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c067fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c067fff8000: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 =>0x0c067fff8010: 00 fa fa fa 00 00 00 fa fa fa 00 00[06]fa fa fa 0x0c067fff8020: 00 00 06 fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8060: 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 ==2382787==ABORTING ``` poc: [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8647366/poc.zip) Thanks!
heap-buffer-overflow in /Source/C++/Core/Ap4HvccAtom.cpp:282
https://api.github.com/repos/axiomatic-systems/Bento4/issues/707/comments
0
2022-05-08T16:18:46Z
2022-05-08T16:18:46Z
https://github.com/axiomatic-systems/Bento4/issues/707
1,228,927,927
707
[ "axiomatic-systems", "Bento4" ]
SUMMARY: AddressSanitizer: heap-buffer-overflow in /Source/C++/Core/Ap4AvccAtom.cpp:168 - Version ``` $ ./mp42hls MP4 To HLS File Converter - Version 1.2 (Bento4 Version 1.6.0.0) (c) 2002-2018 Axiomatic Systems, LLC ``` branch [d02ef82](https://github.com/axiomatic-systems/Bento4/commit/d02ef8230a8fee4904a750eb912521c5f1c74e0b) - Platform ``` $ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ uname -r 5.13.0-40-generic $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal ``` - Steps to reproduce ``` $ mkdir build $ cd build $ cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" $ make $ ./mp42hls poc ``` - Asan ``` $ ./mp42hls poc ================================================================= ==1040249==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6060000000b4 at pc 0x5559ee4acc57 bp 0x7ffc91cb9740 sp 0x7ffc91cb9730 READ of size 1 at 0x6060000000b4 thread T0 #0 0x5559ee4acc56 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) /home/wulearn/Bento4/Source/C++/Core/Ap4AvccAtom.cpp:168 #1 0x5559ee4abde9 in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4AvccAtom.cpp:95 #2 0x5559ee4a6752 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:513 #3 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #4 0x5559ee4b6a2f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #5 0x5559ee5310d4 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:115 #6 0x5559ee5358da in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:884 #7 0x5559ee536e14 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:1136 #8 0x5559ee4a4b8f in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:319 #9 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #10 0x5559ee546e7a in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:101 #11 0x5559ee5466f9 in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:57 #12 0x5559ee4a6332 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:458 #13 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #14 0x5559ee4b6a2f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #15 0x5559ee4b6492 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #16 0x5559ee4b5ff9 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #17 0x5559ee4a7ce4 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #18 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #19 0x5559ee4b6a2f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #20 0x5559ee4b6492 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #21 0x5559ee4b5ff9 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #22 0x5559ee4a7ce4 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #23 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #24 0x5559ee4b6a2f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #25 0x5559ee4b6492 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #26 0x5559ee4b5ff9 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #27 0x5559ee4a7ce4 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #28 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #29 0x5559ee4b6a2f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #30 0x5559ee4b6492 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #31 0x5559ee55c6c8 in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4TrakAtom.cpp:165 #32 0x5559ee4a8db5 in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/wulearn/Bento4/build/mp42hls+0x352db5) #33 0x5559ee4a5fcb in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:413 #34 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #35 0x5559ee4b6a2f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #36 0x5559ee4b6492 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #37 0x5559ee4f51aa in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4MoovAtom.cpp:80 #38 0x5559ee4a8d47 in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/wulearn/Bento4/build/mp42hls+0x352d47) #39 0x5559ee4a5e44 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:393 #40 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #41 0x5559ee4a3549 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #42 0x5559ee4d4392 in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /home/wulearn/Bento4/Source/C++/Core/Ap4File.cpp:104 #43 0x5559ee4d3fe0 in AP4_File::AP4_File(AP4_ByteStream&, bool) /home/wulearn/Bento4/Source/C++/Core/Ap4File.cpp:78 #44 0x5559ee48eb38 in main /home/wulearn/Bento4/Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:1894 #45 0x7f40ea9d40b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) #46 0x5559ee48296d in _start (/home/wulearn/Bento4/build/mp42hls+0x32c96d) 0x6060000000b4 is located 0 bytes to the right of 52-byte region [0x606000000080,0x6060000000b4) allocated by thread T0 here: #0 0x7f40eaffd787 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:107 #1 0x5559ee4cac65 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:55 #2 0x5559ee4abb53 in AP4_AvccAtom::Create(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4AvccAtom.cpp:69 #3 0x5559ee4a6752 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:513 #4 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #5 0x5559ee4b6a2f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #6 0x5559ee5310d4 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:115 #7 0x5559ee5358da in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:884 #8 0x5559ee536e14 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:1136 #9 0x5559ee4a4b8f in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:319 #10 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #11 0x5559ee546e7a in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:101 #12 0x5559ee5466f9 in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:57 #13 0x5559ee4a6332 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:458 #14 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #15 0x5559ee4b6a2f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #16 0x5559ee4b6492 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #17 0x5559ee4b5ff9 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #18 0x5559ee4a7ce4 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #19 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #20 0x5559ee4b6a2f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #21 0x5559ee4b6492 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #22 0x5559ee4b5ff9 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #23 0x5559ee4a7ce4 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #24 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #25 0x5559ee4b6a2f in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #26 0x5559ee4b6492 in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #27 0x5559ee4b5ff9 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) /home/wulearn/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #28 0x5559ee4a7ce4 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #29 0x5559ee4a3f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/wulearn/Bento4/Source/C++/Core/Ap4AvccAtom.cpp:168 in AP4_AvccAtom::AP4_AvccAtom(unsigned int, unsigned char const*) Shadow bytes around the buggy address: 0x0c0c7fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0c7fff8000: fa fa fa fa 00 00 00 00 00 00 00 fa fa fa fa fa =>0x0c0c7fff8010: 00 00 00 00 00 00[04]fa fa fa fa fa 00 00 00 00 0x0c0c7fff8020: 00 00 04 fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0c7fff8060: 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 ==1040249==ABORTING ``` poc: [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8647200/poc.zip) Thanks!
heap-buffer-overflow in /Source/C++/Core/Ap4AvccAtom.cpp:168
https://api.github.com/repos/axiomatic-systems/Bento4/issues/706/comments
0
2022-05-08T15:01:22Z
2022-05-08T15:01:22Z
https://github.com/axiomatic-systems/Bento4/issues/706
1,228,909,884
706
[ "axiomatic-systems", "Bento4" ]
SUMMARY: AddressSanitizer: heap-buffer-overflow in /Source/C++/Core/Ap4ByteStream.cpp:785 - Version ``` $ ./mp42hls MP4 To HLS File Converter - Version 1.2 (Bento4 Version 1.6.0.0) (c) 2002-2018 Axiomatic Systems, LLC ``` branch [d02ef82](https://github.com/axiomatic-systems/Bento4/commit/d02ef8230a8fee4904a750eb912521c5f1c74e0b) - Platform ``` $ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ uname -r 5.13.0-40-generic $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal ``` - Steps to reproduce ``` $ mkdir build $ cd build $ cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" $ make $ ./mp42hls poc ``` - Asan ``` $ ./mp42hls poc ================================================================= ==851941==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61900000099a at pc 0x7efc9af4758d bp 0x7fff2624ae30 sp 0x7fff2624a5d8 WRITE of size 4294967293 at 0x61900000099a thread T0 #0 0x7efc9af4758c in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:790 #1 0x5605eaa861fe in AP4_MemoryByteStream::WritePartial(void const*, unsigned int, unsigned int&) /home/wulearn/Bento4/Source/C++/Core/Ap4ByteStream.cpp:785 #2 0x5605eaa827bb in AP4_ByteStream::Write(void const*, unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4ByteStream.cpp:77 #3 0x5605eab760d0 in AP4_CencSampleEncryption::DoWriteFields(AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4CommonEncryption.cpp:3519 #4 0x5605eab0fa30 in AP4_SencAtom::WriteFields(AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4SencAtom.cpp:112 #5 0x5605eaa6ae1d in AP4_Atom::Write(AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4Atom.cpp:229 #6 0x5605eaa6b4dd in AP4_Atom::Clone() /home/wulearn/Bento4/Source/C++/Core/Ap4Atom.cpp:316 #7 0x5605eaafa2ba in AP4_SampleDescription::AP4_SampleDescription(AP4_SampleDescription::Type, unsigned int, AP4_AtomParent*) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:138 #8 0x5605eaafbb92 in AP4_AvcSampleDescription::AP4_AvcSampleDescription(unsigned int, unsigned short, unsigned short, unsigned short, char const*, AP4_AtomParent*) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:385 #9 0x5605eab09fcd in AP4_AvcSampleEntry::ToSampleDescription() /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:1152 #10 0x5605eab1aabd in AP4_StsdAtom::GetSampleDescription(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:181 #11 0x5605eab5d812 in AP4_AtomSampleTable::GetSampleDescription(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomSampleTable.cpp:207 #12 0x5605eab2e090 in AP4_Track::GetSampleDescription(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4Track.cpp:447 #13 0x5605eaa633bf in main /home/wulearn/Bento4/Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:2131 #14 0x7efc9a9920b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) #15 0x5605eaa5596d in _start (/home/wulearn/Bento4/build/mp42hls+0x32c96d) 0x61900000099a is located 0 bytes to the right of 1050-byte region [0x619000000580,0x61900000099a) allocated by thread T0 here: #0 0x7efc9afbb787 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:107 #1 0x5605eaa9e778 in AP4_DataBuffer::ReallocateBuffer(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:210 #2 0x5605eaa9e3cc in AP4_DataBuffer::SetBufferSize(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:136 #3 0x5605eaa9e21d in AP4_DataBuffer::Reserve(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4DataBuffer.cpp:107 #4 0x5605eaa86001 in AP4_MemoryByteStream::WritePartial(void const*, unsigned int, unsigned int&) /home/wulearn/Bento4/Source/C++/Core/Ap4ByteStream.cpp:765 #5 0x5605eaa827bb in AP4_ByteStream::Write(void const*, unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4ByteStream.cpp:77 #6 0x5605eaa82d9c in AP4_ByteStream::WriteUI24(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4ByteStream.cpp:160 #7 0x5605eab75f8b in AP4_CencSampleEncryption::DoWriteFields(AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4CommonEncryption.cpp:3507 #8 0x5605eab0fa30 in AP4_SencAtom::WriteFields(AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4SencAtom.cpp:112 #9 0x5605eaa6ae1d in AP4_Atom::Write(AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4Atom.cpp:229 #10 0x5605eaa6b4dd in AP4_Atom::Clone() /home/wulearn/Bento4/Source/C++/Core/Ap4Atom.cpp:316 #11 0x5605eaafa2ba in AP4_SampleDescription::AP4_SampleDescription(AP4_SampleDescription::Type, unsigned int, AP4_AtomParent*) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:138 #12 0x5605eaafbb92 in AP4_AvcSampleDescription::AP4_AvcSampleDescription(unsigned int, unsigned short, unsigned short, unsigned short, char const*, AP4_AtomParent*) /home/wulearn/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:385 #13 0x5605eab09fcd in AP4_AvcSampleEntry::ToSampleDescription() /home/wulearn/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:1152 #14 0x5605eab1aabd in AP4_StsdAtom::GetSampleDescription(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:181 #15 0x5605eab5d812 in AP4_AtomSampleTable::GetSampleDescription(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomSampleTable.cpp:207 #16 0x5605eab2e090 in AP4_Track::GetSampleDescription(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4Track.cpp:447 #17 0x5605eaa633bf in main /home/wulearn/Bento4/Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:2131 #18 0x7efc9a9920b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) SUMMARY: AddressSanitizer: heap-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:790 in __interceptor_memcpy Shadow bytes around the buggy address: 0x0c327fff80e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff80f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff8100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff8110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff8120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c327fff8130: 00 00 00[02]fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff8140: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff8150: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff8160: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff8170: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff8180: 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 ==851941==ABORTING ``` poc: [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8647182/poc.zip) Thanks!
heap-buffer-overflow in /Source/C++/Core/Ap4ByteStream.cpp:785
https://api.github.com/repos/axiomatic-systems/Bento4/issues/705/comments
0
2022-05-08T14:54:33Z
2022-05-08T14:59:29Z
https://github.com/axiomatic-systems/Bento4/issues/705
1,228,908,313
705
[ "axiomatic-systems", "Bento4" ]
SUMMARY: AddressSanitizer: heap-buffer-overflow in /Source/C++/System/StdC/Ap4StdCFileByteStream.cpp:342 - Version ``` $ ./mp4dump MP4 File Dumper - Version 1.2 (Bento4 Version 1.6.0.0) (c) 2002-2011 Axiomatic Systems, LLC ``` branch [d02ef82](https://github.com/axiomatic-systems/Bento4/commit/d02ef8230a8fee4904a750eb912521c5f1c74e0b) - Platform ``` $ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ uname -r 5.13.0-40-generic $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal ``` - Steps to reproduce ``` $ mkdir build $ cd build $ cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" $ make $ ./mp4dump poc ``` - Asan ``` $ ./mp4dump poc [ftyp] size=8+16 major_brand = jk24 minor_version = 29017d compatible_brand = xi57 compatible_brand = nllr [tfdt] size=8+0 [mdat] size=8+397 ================================================================= ==2904681==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000091 at pc 0x7fdf4a26e59d bp 0x7ffde83ed0c0 sp 0x7ffde83ec868 WRITE of size 7 at 0x602000000091 thread T0 #0 0x7fdf4a26e59c in __interceptor_fread ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:989 #1 0x561f962c8759 in AP4_StdcFileByteStream::ReadPartial(void*, unsigned int, unsigned int&) /home/wulearn/Bento4/Source/C++/System/StdC/Ap4StdCFileByteStream.cpp:342 #2 0x561f961fcd33 in AP4_ByteStream::Read(void*, unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4ByteStream.cpp:54 #3 0x561f96262ec6 in AP4_RtpAtom::AP4_RtpAtom(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4RtpAtom.cpp:50 #4 0x561f961f65c1 in AP4_RtpAtom::Create(unsigned int, AP4_ByteStream&) (/home/wulearn/Bento4/build/mp4dump+0x3245c1) #5 0x561f961f4b4e in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:689 #6 0x561f961f15ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #7 0x561f961f0bbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #8 0x561f961e3115 in main /home/wulearn/Bento4/Source/C++/Apps/Mp4Dump/Mp4Dump.cpp:342 #9 0x7fdf49ce90b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) #10 0x561f961e18ed in _start (/home/wulearn/Bento4/build/mp4dump+0x30f8ed) 0x602000000091 is located 0 bytes to the right of 1-byte region [0x602000000090,0x602000000091) allocated by thread T0 here: #0 0x7fdf4a312787 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:107 #1 0x561f96262eac in AP4_RtpAtom::AP4_RtpAtom(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4RtpAtom.cpp:49 #2 0x561f961f65c1 in AP4_RtpAtom::Create(unsigned int, AP4_ByteStream&) (/home/wulearn/Bento4/build/mp4dump+0x3245c1) #3 0x561f961f4b4e in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:689 #4 0x561f961f15ee in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #5 0x561f961f0bbd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #6 0x561f961e3115 in main /home/wulearn/Bento4/Source/C++/Apps/Mp4Dump/Mp4Dump.cpp:342 #7 0x7fdf49ce90b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) SUMMARY: AddressSanitizer: heap-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:989 in __interceptor_fread Shadow bytes around the buggy address: 0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff8000: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00 =>0x0c047fff8010: fa fa[01]fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8060: 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 ==2904681==ABORTING ``` poc: [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8646748/poc.zip) Thanks!
heap-buffer-overflow in /Source/C++/System/StdC/Ap4StdCFileByteStream.cpp:342
https://api.github.com/repos/axiomatic-systems/Bento4/issues/704/comments
0
2022-05-08T09:46:31Z
2022-05-08T15:02:52Z
https://github.com/axiomatic-systems/Bento4/issues/704
1,228,842,488
704
[ "axiomatic-systems", "Bento4" ]
SUMMARY: AddressSanitizer: requested allocation size 0xfffffffffffffffd in /Source/C++/Core/Ap4RtpAtom.cpp:49 - Version ``` $ ./mp42hls MP4 To HLS File Converter - Version 1.2 (Bento4 Version 1.6.0.0) (c) 2002-2018 Axiomatic Systems, LLC ``` branch [d02ef82](https://github.com/axiomatic-systems/Bento4/commit/d02ef8230a8fee4904a750eb912521c5f1c74e0b) - Platform ``` $ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ uname -r 5.13.0-40-generic $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal ``` - Steps to reproduce ``` $ mkdir build $ cd build $ cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" $ make $ ./mp42hls poc ``` - Asan ``` $ ./mp42hls poc ================================================================= ==2656357==ERROR: AddressSanitizer: requested allocation size 0xfffffffffffffffd (0x800 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T0) #0 0x7f94774c8787 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:107 #1 0x55c100eee930 in AP4_RtpAtom::AP4_RtpAtom(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4RtpAtom.cpp:49 #2 0x55c100e75f4d in AP4_RtpAtom::Create(unsigned int, AP4_ByteStream&) (/home/wulearn/Bento4/build/mp42hls+0x352f4d) #3 0x55c100e744da in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:689 #4 0x55c100e70f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #5 0x55c100e70549 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #6 0x55c100ea1392 in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /home/wulearn/Bento4/Source/C++/Core/Ap4File.cpp:104 #7 0x55c100ea0fe0 in AP4_File::AP4_File(AP4_ByteStream&, bool) /home/wulearn/Bento4/Source/C++/Core/Ap4File.cpp:78 #8 0x55c100e5bb38 in main /home/wulearn/Bento4/Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:1894 #9 0x7f9476e9f0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) ==2656357==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: allocation-size-too-big ../../../../src/libsanitizer/asan/asan_new_delete.cc:107 in operator new[](unsigned long) ==2656357==ABORTING ``` poc: [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8646736/poc.zip) Thanks!
requested allocation size 0xfffffffffffffffd in /Source/C++/Core/Ap4RtpAtom.cpp:49
https://api.github.com/repos/axiomatic-systems/Bento4/issues/703/comments
0
2022-05-08T09:38:48Z
2022-05-08T09:38:48Z
https://github.com/axiomatic-systems/Bento4/issues/703
1,228,840,962
703
[ "axiomatic-systems", "Bento4" ]
SUMMARY: AddressSanitizer: allocator is out of memory in /Source/C++/Core/Ap4Array.h:172 - Version ``` $ ./mp42hls MP4 To HLS File Converter - Version 1.2 (Bento4 Version 1.6.0.0) (c) 2002-2018 Axiomatic Systems, LLC ``` branch [d02ef82](https://github.com/axiomatic-systems/Bento4/commit/d02ef8230a8fee4904a750eb912521c5f1c74e0b) - Platform ``` $ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ uname -r 5.13.0-40-generic $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal ``` - Steps to reproduce ``` $ mkdir build $ cd build $ cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" $ make $ ./mp42hls poc ``` - Asan ``` $ ./mp42hls poc ================================================================= ==2569847==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x64f7ff3b0 bytes #0 0x7f4dacc42587 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:104 #1 0x55b48862ff7c in AP4_Array<AP4_TrunAtom::Entry>::EnsureCapacity(unsigned int) (/home/wulearn/Bento4/build/mp42hls+0x40af7c) #2 0x55b48862fcf0 in AP4_Array<AP4_TrunAtom::Entry>::SetItemCount(unsigned int) /home/wulearn/Bento4/Source/C++/Core/Ap4Array.h:210 #3 0x55b48862e470 in AP4_TrunAtom::AP4_TrunAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4TrunAtom.cpp:127 #4 0x55b48862de8a in AP4_TrunAtom::Create(unsigned int, AP4_ByteStream&) /home/wulearn/Bento4/Source/C++/Core/Ap4TrunAtom.cpp:51 #5 0x55b4885751ab in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:438 #6 0x55b488572f7a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #7 0x55b488572549 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) /home/wulearn/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #8 0x55b4885a3392 in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) /home/wulearn/Bento4/Source/C++/Core/Ap4File.cpp:104 #9 0x55b4885a2fe0 in AP4_File::AP4_File(AP4_ByteStream&, bool) /home/wulearn/Bento4/Source/C++/Core/Ap4File.cpp:78 #10 0x55b48855db38 in main /home/wulearn/Bento4/Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:1894 #11 0x7f4dac6190b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2) ==2569847==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_new_delete.cc:104 in operator new(unsigned long) ==2569847==ABORTING ``` poc: [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8646733/poc.zip) Thanks!
allocator is out of memory in /Source/C++/Core/Ap4Array.h:172
https://api.github.com/repos/axiomatic-systems/Bento4/issues/702/comments
0
2022-05-08T09:35:50Z
2022-05-08T09:35:50Z
https://github.com/axiomatic-systems/Bento4/issues/702
1,228,840,395
702
[ "axiomatic-systems", "Bento4" ]
Dear @barbibulle, After you merged several security fixes, can you please tag a new version? See xbmc/inputstream.adaptive#967 for more information.
Please tag new version
https://api.github.com/repos/axiomatic-systems/Bento4/issues/701/comments
0
2022-05-07T10:10:41Z
2022-05-07T10:10:50Z
https://github.com/axiomatic-systems/Bento4/issues/701
1,228,588,968
701
[ "axiomatic-systems", "Bento4" ]
I noticed that when I try to dump samples from fragmented mp4 files using mp4dump, the track files will always be empty. I prepared a patch that allows dumping these samples using AP4_LinearReader. However, I don't know if this the best way to do it. I will open a PR for review.
mp4dump does not dump sample data from fragments (moof)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/699/comments
0
2022-05-05T12:53:56Z
2022-05-05T12:53:56Z
https://github.com/axiomatic-systems/Bento4/issues/699
1,226,634,805
699
[ "axiomatic-systems", "Bento4" ]
Zip containing input steams: https://drive.google.com/file/d/1-Z6xOAJPgcGzIk9MqdzIy6nuaFQLfn7y/view?usp=sharing Output file has audio end at 37 seconds. The video plays correctly for the full 56 seconds.
Audio of muxed file ending early
https://api.github.com/repos/axiomatic-systems/Bento4/issues/698/comments
2
2022-05-02T16:31:57Z
2022-08-23T12:38:40Z
https://github.com/axiomatic-systems/Bento4/issues/698
1,223,091,915
698
[ "axiomatic-systems", "Bento4" ]
Hi @barbibulle, I am facing playback issue in edge browser with Bento4 cbcs encryption. Have used the following packaging command, bento4/bin/mp4dash --encryption-cenc-scheme=cbcs --encryption-key=xxxx:xxxx:xxxx --use-segment-timeline --widevine --widevine-header=https://xxxx.com --playready --playready-version=4.3 --playready-header=https://xxxx.com --hls --fairplay-key-uri=skd://xxxx_token test.mf4 I am using Pallycon multi DRM services for license. As per Pallycon, - In the PlayReady pssh data of your DASH mpd, there is "CHECKSUM" value as below. - It should be removed to set the encryption mode (ALGID) as AESCBC. (refer to this document) - It seems to be a bug in bento4 mp4dash module. - <WRMHEADER xmlns="http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader" version="4.3.0.0"> <DATA> <PROTECTINFO> <KIDS> <KID ALGID="AESCBC" CHECKSUM="EoVkT+vitH0=" VALUE="J6k8clFDpaoc+tZVIC5wsw=="> </KID> </KIDS> </PROTECTINFO> </DATA> </WRMHEADER> Could you please look into this on priority? Thank You
Playback issue in EDGE browser with CBCS encryption i.e. Playready 4.3
https://api.github.com/repos/axiomatic-systems/Bento4/issues/697/comments
1
2022-04-25T07:17:13Z
2022-05-01T19:47:06Z
https://github.com/axiomatic-systems/Bento4/issues/697
1,214,076,370
697
[ "axiomatic-systems", "Bento4" ]
I just need this option in my segment playlist header. This is all. ``` #EXTM3U #EXT-X-TARGETDURATION:10 #EXT-X-ALLOW-CACHE:YES #EXT-X-PLAYLIST-TYPE:VOD #EXT-X-VERSION:3 #EXT-X-MEDIA-SEQUENCE:1 ```
Option to include '#EXT-X-ALLOW-CACHE:YES' in HLS SubtitlesPlaylist
https://api.github.com/repos/axiomatic-systems/Bento4/issues/693/comments
2
2022-04-21T18:08:11Z
2022-05-01T20:50:30Z
https://github.com/axiomatic-systems/Bento4/issues/693
1,211,386,342
693
[ "axiomatic-systems", "Bento4" ]
I transcoded the file in .mp4 format in Mediaconvert and trying to package it through bento4. During Video packaging I am getting below error, ERROR: 'ascii' codec can't encode characters in position 66-71: ordinal not in range(128) Am using below command, /root/bento4/Bento4-SDK-1-6-0-637.x86_64-unknown-linux/bin/mp4dash --force --verbose --hls --hls-master-playlist-name=index.m3u8 --encryption-cenc-scheme cbcs --encryption-key=965e4ff127a14b868d4d83060a5e51d0:ef9da875c749ce588da07d8516aaa116:965e4ff127a14b868d4d83060a5e51d0 --fairplay-key-uri=skd://965e4ff127a14b868d4d83060a5e51d0 360p_fragmp4.mp4 480p_fragmp4.mp4 576p_fragmp4.mp4 720lowp_fragmp4.mp4 720highp_fragmp4.mp4 1080lowp_fragmp4.mp4 1080highp_fragmp4.mp4 1440p_fragmp4.mp4 2160lowp_fragmp4.mp4 2160highp_fragmp4.mp4 -o Output_4K_CMAF_DRM -f
Getting ERROR while packaging 4K mp4 files using Bento4 'ascii' codec can't encode characters in position 66-71: ordinal not in range(128)
https://api.github.com/repos/axiomatic-systems/Bento4/issues/692/comments
1
2022-04-11T05:30:50Z
2022-05-01T19:49:32Z
https://github.com/axiomatic-systems/Bento4/issues/692
1,199,416,621
692
[ "axiomatic-systems", "Bento4" ]
SUMMARY: AddressSanitizer: SEGV /build/glibc-sMfBJT/glibc-2.31/string/../sysdeps/x86_64/multiarch/strlen-avx2.S:65 - Version ``` ➜ mp42hls_test git:(master) ✗ ./mp42hls MP4 To HLS File Converter - Version 1.2 (Bento4 Version 1.6.0.0) (c) 2002-2018 Axiomatic Systems, LLC ``` branch 4d8e1fc - Platform ``` ➜ gcc --version gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ➜ uname -r 5.4.0-91-generic ➜ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic ``` - Steps to reproduce ``` mkdir build cd build cmake .. -DCMAKE_CXX_FLAGS="-fsanitize=address -g" -DCMAKE_C_FLAGS="-fsanitize=address -g" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address" -DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address" make ./mp42hls --encryption-iv-mode fps ./poc ``` - Asan ``` ➜ build git:(master) ✗ ./mp42hls --encryption-iv-mode fps ./poc AddressSanitizer:DEADLYSIGNAL ================================================================= ==15594==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fd9e20834e5 bp 0x7ffe2c690150 sp 0x7ffe2c68f8c8 T0) ==15594==The signal is caused by a READ memory access. ==15594==Hint: address points to the zero page. #0 0x7fd9e20834e4 (/lib/x86_64-linux-gnu/libc.so.6+0x18b4e4) #1 0x7fd9e249c8fb (/lib/x86_64-linux-gnu/libasan.so.5+0x678fb) #2 0x557f40b2b5f3 in main /home/lin/Bento4/Source/C++/Apps/Mp42Hls/Mp42Hls.cpp:1853 #3 0x7fd9e1f1f0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2) #4 0x557f40b1f96d in _start (/home/lin/Bento4/build/mp42hls+0x32b96d) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x18b4e4) ==15594==ABORTING ``` poc: [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8459235/poc.zip) Thanks !!
AddressSanitizer: SEGV /build/glibc-sMfBJT/glibc-2.31/string/../sysdeps/x86_64/multiarch/strlen-avx2.S:65
https://api.github.com/repos/axiomatic-systems/Bento4/issues/691/comments
1
2022-04-10T14:50:23Z
2022-05-17T06:24:00Z
https://github.com/axiomatic-systems/Bento4/issues/691
1,199,061,348
691
[ "axiomatic-systems", "Bento4" ]
I have demuxed a 56 second dvhe.05.09 mp4 file into h265 and ec3 files. When I mux them together, I end up with a 56 min 12 s video file which has 56 seconds of audio. This is the command I am using: `./mp4mux --track out_1.h265#frame_rate=60,format=dvh1,dv_profile=5 --track out_2.ec3 output.mp4`
Duration of muxed mp4 video is too long
https://api.github.com/repos/axiomatic-systems/Bento4/issues/690/comments
4
2022-04-10T00:26:07Z
2022-05-01T22:51:27Z
https://github.com/axiomatic-systems/Bento4/issues/690
1,198,817,357
690
[ "axiomatic-systems", "Bento4" ]
I have 2 fragment files from a stream. I can decrypt 3.m4s but 4.m4s is not. `cat audio.m4s > t.mp4 && cat 4.m4s >> t.mp4 && mp4decrypt --key 2:7648d1bde1c3fcf0116fd8a13b3d09a0 t.mp4 x.mp4` I see that, 4.m4s has www.nielsen.com:id3:v1 before ![image](https://user-images.githubusercontent.com/10054833/162564285-82f67acd-f6eb-4480-88e2-ca83365683e0.png) and 3.m4s is not. 4.m4s is a metadata and watermark by Nielsen ![image](https://user-images.githubusercontent.com/10054833/162564326-9e5cb445-7365-4a67-b2b8-de7af15457d6.png) audio.m4s (init audio container) + 3.m4s + 4.m4s , you can find here: [](https://drive.google.com/file/d/1JMuq55iOcN4kYczKhKwAGT3OMDSYFegi/view?usp=sharing) https://drive.google.com/file/d/1JMuq55iOcN4kYczKhKwAGT3OMDSYFegi/view?usp=sharing
[MP4Decrypt] Cannot decrypt with www.nielsen.com:id3:v1
https://api.github.com/repos/axiomatic-systems/Bento4/issues/689/comments
1
2022-04-09T08:56:38Z
2022-05-01T21:02:53Z
https://github.com/axiomatic-systems/Bento4/issues/689
1,198,444,698
689
[ "axiomatic-systems", "Bento4" ]
Hi, I am doing some DRM POC for the current project and I have downloaded the fMP4 playlist, from which I obtained: - Initialization segment file - Segment #0 file If I fuse those two files together, I can successfully play it. ``` mp4encrypt --method MPEG-CBCS --show-progress --fragments-info ./init_segment.mp4 --key 35000256:139A70EC830300D5B36BA9141913D204:0000000000000000 segment0.mp4 encrypted.mp4 ``` The file encrypted here (I think) looks fine: ``` [moof] size=8+3578 [mfhd] size=12+4 sequence number = 64475237 [traf] size=8+3554 [tfhd] size=12+8, flags=20008 track ID = 35000256 default sample duration = 400000 [tfdt] size=12+8, version=1 base media decode time = 3868514160000000 [trun] size=12+1808, flags=e01 sample count = 150 data offset = 3594 [sdtp] size=8+154 [D4807EF2CA39-4695-8E54-26CB-9E46A79F] size=24+21 [414C237B4FAF-4E37-92F9-7923-E76BF03A] size=24+16 [6D1D9B0542D5-44E6-80E2-141D-AFF757B2] size=24+20 [saiz] size=12+155 default sample info size = 0 sample count = 150 [saio] size=12+8 entry_count = 1 [senc] size=12+1204, flags=2 sample info count = 150 [mdat] size=8+2249541 ``` But, this is where it gets interesting: ``` mp4decrypt --key 35000256:139A70EC830300D5B36BA9141913D204 --fragments-info ./init_segment.mp4 --show-progress encrypted.mp4 decrypted.mp4 ``` By doing this, `decrypted.mp4` ends up with the same filesize as `encrypted.mp4` and `mp4dump` outputs the same. If I omit `--fragments-info`, I end up with 0-bytes file. I must be doing something very odd and very silly, but I am failing to see what. :)
Unable to mp4decrypt segment encrypted via mp4encrypt
https://api.github.com/repos/axiomatic-systems/Bento4/issues/688/comments
4
2022-04-05T12:29:55Z
2022-04-07T08:49:50Z
https://github.com/axiomatic-systems/Bento4/issues/688
1,193,083,192
688
[ "axiomatic-systems", "Bento4" ]
Hi, I try to encrypt a content using MPEG CENC method with an IV of 16 hex (=> 8 bytes) as shown below (keyId and key have been removed) : mp4encrypt --method MPEG-CENC --property 1:KID:MY_KEYID --key 1:MY_KEY:0000000000000000 --pssh 9A04F07998404286AB92E65BE0885F95: --pssh EDEF8BA979D64ACEA3C827DCD51D21ED: input.mp4 output.mp4 The issue is that my tenc box shows a default_Per_Sample_IV_Size of 16 bytes instead of 8 bytes. [tenc] size=12+20 default_isProtected = 1 default_Per_Sample_IV_Size = 16 default_KID = [24 cd 16 99 e3 69 31 35 a2 9f 77 34 ab 58 9c 15] Thx for your support.
default_Per_Sample_IV_Size always equal to 16 whatever iv length provided
https://api.github.com/repos/axiomatic-systems/Bento4/issues/687/comments
4
2022-04-01T07:56:28Z
2022-05-09T08:50:15Z
https://github.com/axiomatic-systems/Bento4/issues/687
1,189,408,671
687
[ "axiomatic-systems", "Bento4" ]
is bento4 support dlb_mp4demux by Dolby lab? Is mp4extract in bento4 is same as dlb_mp4demux? How can I extract video and audio stream from MP4, which tool I need to use?
MP4 demux
https://api.github.com/repos/axiomatic-systems/Bento4/issues/686/comments
0
2022-03-29T13:03:19Z
2022-07-01T12:23:06Z
https://github.com/axiomatic-systems/Bento4/issues/686
1,184,839,291
686
[ "axiomatic-systems", "Bento4" ]
Please help me with below issue: Unable to see IV value in manifest file, Please help me with modifications in below command in bento4 (mp4hls packaging) /root/bento4/Bento4-SDK-1-6-0-637.x86_64-unknown-linux/bin/mp4hls --hls-version=5 --master-playlist-name=index.m3u8 --encryption-mode=SAMPLE-AES --encryption-iv-mode=fps --encryption-key=248bd83f78dcf7dd4e7b2fa7e9ed32d0773aa50de5174249acf4264e96f78b76 --encryption-key-format=com.apple.streamingkeydelivery --encryption-key-uri=skd://773aa50de5174249acf4264e96f78b76 96p_mp4.mp4 144p_mp4.mp4 240p_mp4.mp4 360p_mp4.mp4 480p_mp4.mp4 576p_mp4.mp4 720lowp_mp4.mp4 720highp_mp4.mp4 1080lowp_mp4.mp4 1080highp_mp4.mp4 -o KundaliBhagya_5/ -f
Bento4#unable to see IV (Initilization Vector value) in manifest
https://api.github.com/repos/axiomatic-systems/Bento4/issues/683/comments
2
2022-03-18T13:40:11Z
2022-09-04T03:39:47Z
https://github.com/axiomatic-systems/Bento4/issues/683
1,173,604,601
683
[ "axiomatic-systems", "Bento4" ]
@barbibulle This is bit serious. I have packaged the content with mp4dash with --hls key with cbcs encryption mode. Dash is playing fine but ubable to play hls content. I have tried with shaka player/bitmovin player/videojs custom player in mac safari but no luck. I used the below command to package bento4/bin/mp4dash --encryption-cenc-scheme=cbcs --encryption-key=xxxx:xxxx:xxxx --use-segment-template-number-padding --widevine --widevine-header=xxxx --playready --playready-version=4.3 --playready-header=xxx --hls --fairplay-key-uri=skd://xxxx_token Cinderella.mf4 Could you please respond to this in priority? Are we missing anything in command during packaging? It would be great if you can share a sample setup with any standard player like shaka/theo/bitmovin etc. We are getting following error on videojs player: _The media playback was aborted due to a corruption problem or because the media used features your browser did not support._ Bitmovin error screenshot ![Screenshot from 2022-03-15 12-01-28](https://user-images.githubusercontent.com/12328179/158320397-31fb81a4-7f70-449d-bf30-cddffe33567a.png) Thank You
Unable to play cbcs encrypted cmaf content in shaka player/bitmovin player/videojs custom player
https://api.github.com/repos/axiomatic-systems/Bento4/issues/682/comments
2
2022-03-15T05:54:31Z
2022-04-08T06:14:19Z
https://github.com/axiomatic-systems/Bento4/issues/682
1,169,217,705
682
[ "axiomatic-systems", "Bento4" ]
Hi, I am trying to use `mp4mux` to multiplex into a single MP4 file: - a pre-fragmented MP4 file carrying an unencrypted AAC audio track (audio.mp4) - a pre-fragmented MP4 file carrying an unencrypted AVC video track (video.mp4) Each input file was obtained by mere concatenation of a dash init and a dash media segment from an unencrypted live DASH stream. The output file's `ftyp` and `moov` box seem consistent. However, despite the presence of audio and video (playable) media data in the input files, the output file's `mdat` box remains empty. Is `mp4mux` lacking information about input samples ? Should I enrich the audio/video init segments with some information about the actual number of available samples to make this work ? (the `entry_count`, `sample_count`, `duration`, ... fields from input init segments are set to 0 because they are not known for live streams). Is there a simpler way to do this ? Thanks in advance for any guidance. ``` $ mp4mux --verbose --track video.mp4 --track audio.mp4 out.mp4 MP4 Import: importing all tracks from video.mp4 MP4 Import: importing all tracks from audio.mp4 $ mp4dump video.mp4 | grep mdat [mdat] size=8+427457 $ mp4dump audio.mp4 | grep mdat [mdat] size=8+23475 $ mp4dump out.mp4 | grep mdat [mdat] size=8+0 ``` https://user-images.githubusercontent.com/5099987/158215819-1b4a78d5-ebad-48aa-a035-003100551711.mp4 https://user-images.githubusercontent.com/5099987/158215823-cb692d09-e72b-4030-8331-cc6707285f26.mp4
mp4mux outputs empty mdat boxes
https://api.github.com/repos/axiomatic-systems/Bento4/issues/681/comments
4
2022-03-14T16:23:29Z
2022-03-30T10:40:20Z
https://github.com/axiomatic-systems/Bento4/issues/681
1,168,617,767
681
[ "axiomatic-systems", "Bento4" ]
I am trying to pack a 4K mp4 file with mp4hls tool. Its returning below error ERROR: audio codec not supported ERROR: binary tool failed with error 1 I have used ac4 audio format. Could you please check and share why this is not happening? I used mp4mux to mux ac4 audio which is well supported. For dash generation using mp4dash its working fine as well. But in case of mp4hls its failing. Appreciate your quick response on this. Thank You
AC4 audio not supported in mp4hls
https://api.github.com/repos/axiomatic-systems/Bento4/issues/680/comments
2
2022-03-14T06:02:48Z
2022-03-21T04:55:16Z
https://github.com/axiomatic-systems/Bento4/issues/680
1,167,926,503
680
[ "axiomatic-systems", "Bento4" ]
Hi, there is a stack memory exhaustion and program crash caused by an infinite recursion in the latest version of mp4info. This vulnerability that may cause an infinite recursion via a crafted file. Since each called function in a program allocates a stack frame on the stack, if a a function is recursively called so many times it can lead to stack memory exhaustion and program crash. As a result, a remote attacker can leverage this for a DoS attack. You can get the poc: [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8241422/poc.zip) This is the Asan report: ``` ./mp4info ./poc File: major brand: isom minor version: 200 compatible brand: isom compatible brand: iso2 compatible brand: avc1 compatible brand: mp41 fast start: no Movie: duration: 200 (media timescale units) duration: 200 (ms) time scale: 1000 fragments: no Found 1 Tracks Track 1: flags: 15 ENABLED IN-MOVIE IN-PREVIEW id: 1 type: Video duration: 200 ms language: und media: sample count: 6 timescale: 0 duration: 6 (media timescale units) duration: 0 (ms) bitrate (computed): 0.000 Kbps display width: 560.000000 display height: 320.000000 frame rate (computed): 0.000 Sample Description 0 Coding: avc1 (H.264) AddressSanitizer:DEADLYSIGNAL ================================================================= ==122421==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc3ceb1ff8 (pc 0x0000005bdad8 bp 0x7ffc3ceb2010 sp 0x7ffc3ceb2000 T0) #0 0x5bdad8 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:401 #1 0x5474f4 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4DvccAtom.cpp:171:17 #2 0x5bdc1a in AP4_AvcSampleDescription::GetCodecString(AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:405:22 #3 0x5474f4 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4DvccAtom.cpp:171:17 #4 0x5bdc1a in AP4_AvcSampleDescription::GetCodecString(AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:405:22 #5 0x5474f4 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4DvccAtom.cpp:171:17 #6 0x5bdc1a in AP4_AvcSampleDescription::GetCodecString(AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:405:22 #7 0x5474f4 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4DvccAtom.cpp:171:17 #8 0x5bdc1a in AP4_AvcSampleDescription::GetCodecString(AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:405:22 #9 0x5474f4 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4DvccAtom.cpp:171:17 #10 0x5bdc1a in AP4_AvcSampleDescription::GetCodecString(AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:405:22 ............... #246 0x5bdc1a in AP4_AvcSampleDescription::GetCodecString(AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:405:22 #247 0x5474f4 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4DvccAtom.cpp:171:17 #248 0x5bdc1a in AP4_AvcSampleDescription::GetCodecString(AP4_String&) /root/fuzz_workdir/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:405:22 ``` As you can see, this makes the program go into an infinite loop and cause a stack overflow. And it is compiled with: ``` make build && cd build export CC=clang export CXX=clang++ export CFLAGS="-fsanitize=address" export CXXFLAGS="-fsanitize=address" export LDFLAGS="-fsanitize=address" cmake .. make make install ``` If you compile it without Asan(use gcc/g++), it will also cause a Segmentation fault: ``` ./mp4info ./poc File: major brand: isom minor version: 200 compatible brand: isom compatible brand: iso2 compatible brand: avc1 compatible brand: mp41 fast start: no Movie: duration: 200 (media timescale units) duration: 200 (ms) time scale: 1000 fragments: no Found 1 Tracks Track 1: flags: 15 ENABLED IN-MOVIE IN-PREVIEW id: 1 type: Video duration: 200 ms language: und media: sample count: 6 timescale: 0 duration: 6 (media timescale units) duration: 0 (ms) bitrate (computed): 0.000 Kbps display width: 560.000000 display height: 320.000000 frame rate (computed): 0.000 Sample Description 0 Coding: avc1 (H.264) Segmentation fault ``` And gdb shows: ``` (gdb) bt #0 0x0000555555581d2e in AP4_AtomFinder::AP4_AtomFinder(unsigned int, unsigned int) () #1 0x000055555557f328 in AP4_AtomParent::GetChild(unsigned int, unsigned int) const () #2 0x00005555555b9c40 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #3 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #4 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #5 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #6 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #7 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #8 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #9 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #10 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #11 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #12 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #13 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #14 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #15 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #16 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #17 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #18 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #19 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #20 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #21 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #22 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #23 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #24 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #25 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #26 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () #27 0x0000555555595797 in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) () #28 0x00005555555b9c89 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) () ``` Test on: os: ubuntu 20.04 version: the master branch
Bug: Stack memory exhaustion and program crash caused by an infinite recursion
https://api.github.com/repos/axiomatic-systems/Bento4/issues/679/comments
0
2022-03-14T02:55:59Z
2022-03-20T22:45:59Z
https://github.com/axiomatic-systems/Bento4/issues/679
1,167,821,884
679
[ "axiomatic-systems", "Bento4" ]
## brief description There is a buffer overflow in WriteSample, can be triggered via mp42hevc + ASan. ## To reproduce ``` mkdir build && pushd build CC=clang CFLAGS="-fsanitize=address" CXX=clang CXXFLAGS="-fsanitize=address" cmake .. && make -j$(nproc) ./mp42hevc $POC /dev/null ``` ### output ``` Video Track: duration: 1000 ms sample count: 12 ================================================================= ==2553363==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000240 at pc 0x00000040e1ca bp 0x7ffce241f7f0 sp 0x7ffce241f7e0 READ of size 1 at 0x602000000240 thread T0 #0 0x40e1c9 in WriteSample(AP4_DataBuffer const&, AP4_DataBuffer&, unsigned int, AP4_ByteStream*) (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x40e1c9) #1 0x40a0fa in WriteSamples(AP4_Track*, AP4_SampleDescription*, AP4_ByteStream*) (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x40a0fa) #2 0x408cef in main (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x408cef) #3 0x7f9cb87390b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2) #4 0x40780d in _start (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x40780d) 0x602000000240 is located 0 bytes to the right of 16-byte region [0x602000000230,0x602000000240) allocated by thread T0 here: #0 0x8dc617 in operator new[](unsigned long) (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x8dc617) #1 0x4257f8 in AP4_DataBuffer::ReallocateBuffer(unsigned int) (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x4257f8) #2 0x4267bd in AP4_DataBuffer::SetDataSize(unsigned int) (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x4267bd) #3 0x452913 in AP4_Sample::ReadData(AP4_DataBuffer&, unsigned int, unsigned int) (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x452913) #4 0x451f6e in AP4_Sample::ReadData(AP4_DataBuffer&) (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x451f6e) #5 0x493bd9 in AP4_Track::ReadSample(unsigned int, AP4_Sample&, AP4_DataBuffer&) (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x493bd9) #6 0x409f78 in WriteSamples(AP4_Track*, AP4_SampleDescription*, AP4_ByteStream*) (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x409f78) #7 0x408cef in main (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x408cef) #8 0x7f9cb87390b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2) SUMMARY: AddressSanitizer: heap-buffer-overflow (/home/hzheng/workspace/fuzz/mp42hevc/mp42hevc+0x40e1c9) in WriteSample(AP4_DataBuffer const&, AP4_DataBuffer&, unsigned int, AP4_ByteStream*) Shadow bytes around the buggy address: 0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c047fff8000: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa fd fd 0x0c047fff8010: fa fa 04 fa fa fa 00 03 fa fa 00 fa fa fa 00 04 0x0c047fff8020: fa fa fd fd fa fa fd fa fa fa 04 fa fa fa fd fd 0x0c047fff8030: fa fa 00 03 fa fa fd fa fa fa fd fa fa fa fd fd =>0x0c047fff8040: fa fa fd fd fa fa 00 00[fa]fa fd fa fa fa fd fa 0x0c047fff8050: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa 0x0c047fff8060: fa fa fd fa fa fa fd fa fa fa fa fa fa fa fa fa 0x0c047fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff8090: 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 ==2553363==ABORTING ``` ## system Ubuntu 20.04 clang 12.0.1 Bento4 latest commit 46dd88c5cc0e20e1fc1b970aa87ce68645057f0e ## Acknowledgement [NCNIPC of China](http://www.nipc.org.cn/) ## POC [poc1.zip](https://github.com/axiomatic-systems/Bento4/files/8240487/poc1.zip)
[BUG] heap-buffer overflow in WriteSample, mp42hevc
https://api.github.com/repos/axiomatic-systems/Bento4/issues/678/comments
2
2022-03-13T19:49:59Z
2022-05-02T08:23:16Z
https://github.com/axiomatic-systems/Bento4/issues/678
1,167,676,138
678
[ "axiomatic-systems", "Bento4" ]
## brief description There is a buffer overflow in AP4_HvccAtom, can be triggered via mp4tag + ASan. ## To reproduce ``` mkdir build && pushd build CC=clang CFLAGS="-fsanitize=address" CXX=clang CXXFLAGS="-fsanitize=address" cmake .. && make -j$(nproc) ./mp4tag --list-symbols --list-keys --show-tags $POC ``` ### output ``` ================================================================= ==2542087==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6030000003e6 at pc 0x0000004cfa61 bp 0x7ffffec70440 sp 0x7ffffec70430 READ of size 1 at 0x6030000003e6 thread T0 #0 0x4cfa60 in AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x4cfa60) #1 0x4cc7e5 in AP4_HvccAtom::Create(unsigned int, AP4_ByteStream&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x4cc7e5) #2 0x446dc2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x446dc2) #3 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #4 0x47eccf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47eccf) #5 0x5779a8 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x5779a8) #6 0x58e0bb in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x58e0bb) #7 0x58f042 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x58f042) #8 0x44241c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x44241c) #9 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #10 0x5bbbb7 in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x5bbbb7) #11 0x5bafbd in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x5bafbd) #12 0x445b0e in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x445b0e) #13 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #14 0x47eccf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47eccf) #15 0x47f58d in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47f58d) #16 0x47df78 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47df78) #17 0x44c562 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x44c562) #18 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #19 0x47eccf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47eccf) #20 0x47f58d in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47f58d) #21 0x47df78 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47df78) #22 0x44c562 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x44c562) #23 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #24 0x47eccf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47eccf) #25 0x47f58d in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47f58d) #26 0x47df78 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47df78) #27 0x44c562 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x44c562) #28 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #29 0x47eccf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47eccf) #30 0x47f58d in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47f58d) #31 0x5f6668 in AP4_TrakAtom::AP4_TrakAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x5f6668) #32 0x7a7726 in AP4_TrakAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x7a7726) #33 0x444cfd in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x444cfd) #34 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #35 0x47eccf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47eccf) #36 0x47f58d in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47f58d) #37 0x50703e in AP4_MoovAtom::AP4_MoovAtom(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x50703e) #38 0x7a75e6 in AP4_MoovAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x7a75e6) #39 0x4446b7 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x4446b7) #40 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #41 0x44e49a in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x44e49a) #42 0x4baaee in AP4_File::ParseStream(AP4_ByteStream&, AP4_AtomFactory&, bool) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x4baaee) #43 0x4bc068 in AP4_File::AP4_File(AP4_ByteStream&, bool) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x4bc068) #44 0x4090ab in main (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x4090ab) #45 0x7f9977c8b0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2) #46 0x4078bd in _start (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x4078bd) 0x6030000003e6 is located 0 bytes to the right of 22-byte region [0x6030000003d0,0x6030000003e6) allocated by thread T0 here: #0 0x907b17 in operator new[](unsigned long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x907b17) #1 0x4a2314 in AP4_DataBuffer::AP4_DataBuffer(unsigned int) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x4a2314) #2 0x4cc5dc in AP4_HvccAtom::Create(unsigned int, AP4_ByteStream&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x4cc5dc) #3 0x446dc2 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x446dc2) #4 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #5 0x47eccf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47eccf) #6 0x5779a8 in AP4_SampleEntry::Read(AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x5779a8) #7 0x58e0bb in AP4_VisualSampleEntry::AP4_VisualSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x58e0bb) #8 0x58f042 in AP4_AvcSampleEntry::AP4_AvcSampleEntry(unsigned int, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x58f042) #9 0x44241c in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x44241c) #10 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #11 0x5bbbb7 in AP4_StsdAtom::AP4_StsdAtom(unsigned int, unsigned char, unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x5bbbb7) #12 0x5bafbd in AP4_StsdAtom::Create(unsigned int, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x5bafbd) #13 0x445b0e in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x445b0e) #14 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #15 0x47eccf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47eccf) #16 0x47f58d in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47f58d) #17 0x47df78 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47df78) #18 0x44c562 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x44c562) #19 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #20 0x47eccf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47eccf) #21 0x47f58d in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47f58d) #22 0x47df78 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47df78) #23 0x44c562 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x44c562) #24 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) #25 0x47eccf in AP4_ContainerAtom::ReadChildren(AP4_AtomFactory&, AP4_ByteStream&, unsigned long long) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47eccf) #26 0x47f58d in AP4_ContainerAtom::AP4_ContainerAtom(unsigned int, unsigned long long, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47f58d) #27 0x47df78 in AP4_ContainerAtom::Create(unsigned int, unsigned long long, bool, bool, AP4_ByteStream&, AP4_AtomFactory&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x47df78) #28 0x44c562 in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x44c562) #29 0x45123b in AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned long long&, AP4_Atom*&) (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x45123b) SUMMARY: AddressSanitizer: heap-buffer-overflow (/home/hzheng/workspace/fuzz/mp4tag/mp4tag+0x4cfa60) in AP4_HvccAtom::AP4_HvccAtom(unsigned int, unsigned char const*) Shadow bytes around the buggy address: 0x0c067fff8020: 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa 0x0c067fff8030: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 0x0c067fff8040: 00 fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 0x0c067fff8050: fd fd fd fa fa fa 00 00 04 fa fa fa 00 00 00 fa 0x0c067fff8060: fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa 00 00 =>0x0c067fff8070: 00 fa fa fa 00 00 00 fa fa fa 00 00[06]fa fa fa 0x0c067fff8080: 00 00 06 fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff80c0: 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 ==2542087==ABORTING ``` ## System Ubuntu 20.04 clang 12.0.1 Bento4 latest commit 46dd88c5cc0e20e1fc1b970aa87ce68645057f0e ## Credit Han Zheng ([NCNIPC of China](http://www.nipc.org.cn/), [Hexhive](http://hexhive.epfl.ch)) Yin Li, Xiaotong Jiao (NCNIPC of China) ## POC [poc.zip](https://github.com/axiomatic-systems/Bento4/files/8240178/poc.zip)
[BUG] Heap buffer overflow in AP4_HvccAtom, mp4tag
https://api.github.com/repos/axiomatic-systems/Bento4/issues/677/comments
2
2022-03-13T16:49:47Z
2022-08-25T07:59:03Z
https://github.com/axiomatic-systems/Bento4/issues/677
1,167,633,442
677
[ "axiomatic-systems", "Bento4" ]
Would it be possible to generate an HLS/DASH manifest from the JSON mp4dump output instead of having to have the full fmp4s on disk? This would make having to pull all the renditions from our storage bucket for a video less common. The idea would be to store the mp4dump output in a JSON file with the renditions and only pull that JSON when adding another rendition.
Ability to use mp4dump output to generate hls/dash manifests
https://api.github.com/repos/axiomatic-systems/Bento4/issues/676/comments
1
2022-03-12T12:37:10Z
2022-03-20T22:47:25Z
https://github.com/axiomatic-systems/Bento4/issues/676
1,167,277,404
676
[ "axiomatic-systems", "Bento4" ]
Hello, I was using the MPEG-CENC encryption method and notice the output was equal when giving an IV of 64-bit and 128-bit (while writing the ticket I notice this would happen even if padding 0s were not added). I used the commands: mp4encrypt --method MPEG-CENC --key 201:594b01e0aa0632b0aac7339d3703b2ce:**ecabaeaada0412d4** --property 201:KID:ac676b195d71347ba9ad77ea61d59ed7 --fragments-info Header.m4s video.m4s video_64bit.m4s mp4encrypt --method MPEG-CENC --key 201:594b01e0aa0632b0aac7339d3703b2ce:**ecabaeaada0412d49425d166ab49a263** --property 201:KID:ac676b195d71347ba9ad77ea61d59ed7 --fragments-info Header.m4s video.m4s video_128bit.m4s Taking a look into the senc box inside the segment I found the IV defined there was ecabaeaada0412d40000000000000000 for both outputs. From the mp4encrypt page it is written: _OMA-PDCF-CTR, ISMA-IAEC, PIFF-CTR, **MPEG-CENC**, MPEG-CENS: the <iv> should be a 64-bit hex string. If a 128-bit value is supplied, it will be truncated to 64-bit._ This part seems correct since it ignores the last 64bits of the IV, but than it seems to pad the IVs with 0s as if it was one of these methods: _OMA-PDCF-CBC, MARLIN-IPMP-ACBC, MARLIN-IPMP-ACGK, PIFF-CBC, MPEG-CBC1, MPEG-CBCS: the <iv> can be 64-bit or 128-bit If the IV is specified as a 64-bit value, it will be padded with zeros._ The 0s are forcing the IV to be 128bit all the time, which can break the decryption if it only supports 64bit IVs (I believe the truncating was because of that). Added both segment files so you can check. [video_128bit.zip](https://github.com/axiomatic-systems/Bento4/files/8178572/video_128bit.zip) Hope it helps.
mp4encrypt is padding 64-bit IVs with 0s on MPEG-CENC
https://api.github.com/repos/axiomatic-systems/Bento4/issues/675/comments
2
2022-03-03T14:31:39Z
2022-03-20T22:06:54Z
https://github.com/axiomatic-systems/Bento4/issues/675
1,158,480,736
675
[ "axiomatic-systems", "Bento4" ]
<img width="1001" alt="CleanShot 2022-02-24 at 01 17 12@2x" src="https://user-images.githubusercontent.com/64177573/155469056-35406a97-c3b7-4c67-ae94-4252729113c0.png">
i tried do mp4decrypt on my mac it said it cant find it, but its in the folder
https://api.github.com/repos/axiomatic-systems/Bento4/issues/674/comments
0
2022-02-24T06:19:48Z
2022-02-24T06:19:48Z
https://github.com/axiomatic-systems/Bento4/issues/674
1,148,906,363
674
[ "axiomatic-systems", "Bento4" ]
All the example in internet I find it need a lincense link, and a "X-AxDRM-Message" encrypted message as header request. But when I generate widevine encryption files, it don't provide me any sourse to generate the lincese link, it provides me KID and Key. What should I do with these two things? can I create the license link with php or python or js? or how can I get the link for free?
I can't understand bento4 widevine system.
https://api.github.com/repos/axiomatic-systems/Bento4/issues/673/comments
0
2022-02-18T03:45:18Z
2022-02-18T03:45:18Z
https://github.com/axiomatic-systems/Bento4/issues/673
1,142,291,077
673
[ "axiomatic-systems", "Bento4" ]
Hello, 1. how to create "fragments info" file, that is used as option "--fragments-info <filename>" for mp4decrypt tool. ? 2. is there a way to decrypt file in memory stream, instead of <output>, which usually is a file.? Thanks & Regards. Amit.K.
Decrypt in chunks for large file size.
https://api.github.com/repos/axiomatic-systems/Bento4/issues/672/comments
6
2022-02-16T21:49:33Z
2022-05-16T07:26:24Z
https://github.com/axiomatic-systems/Bento4/issues/672
1,140,620,149
672
[ "axiomatic-systems", "Bento4" ]
Hi I've tried to create a HLS fmp4 FairPlay stream but could not play it. Here's some information: Bento4 version: 2.0.0-637 DRM Server: Castlab's DRMToday Video codec: H264 & HEVC Audio codec: AAC Command: python mp4-dash.py --profiles=on-demand --no-split --hls --hls-master-playlist-name=playlist.m3u8 --hls-media-playlist-name=profile.m3u8 --encryption-cenc-scheme=cbcs --encryption-key=38dffe880e4144cdb24f80fb69072840:2fc82db180354074953f066ff433948f --fairplay-key-uri=skd://drmtoday?assetId=86af6166-18a0-4c8d-8228-8d2f70daff89 video_h264.mp4 video_hevc.mp4 audio_aac.mp4 -f -o HLS_packaged I don't know what's wrong with my command, cause it produce the stream successful but I could not play the stream on safari (Mac) and iOS using Shaka Player
Could not play HLS fmp4 FairPlay from mp4-dash
https://api.github.com/repos/axiomatic-systems/Bento4/issues/671/comments
1
2022-02-15T02:59:04Z
2022-12-22T16:21:18Z
https://github.com/axiomatic-systems/Bento4/issues/671
1,138,111,009
671
[ "axiomatic-systems", "Bento4" ]
Hi There, I am trying to convert an mp4 file with Dolby Atmos audio in it, into an TS file. Although, I am able to get the TS file in the output, but it doesn't have proper audio descriptors for an Atmos audio, as required in TS file. Samples are there in the below shared link. https://drive.google.com/drive/folders/1wpcO7gUfEQd3ChquIUwZBxaMaRXZJ-dJ?usp=sharing
mp42ts tool not translating Dolby Atmos audio in output TS file i.e. missing Atmos descriptor in TS
https://api.github.com/repos/axiomatic-systems/Bento4/issues/669/comments
1
2022-02-02T14:25:36Z
2022-02-03T08:49:51Z
https://github.com/axiomatic-systems/Bento4/issues/669
1,121,990,816
669
[ "axiomatic-systems", "Bento4" ]
Hi, We use Bento4 to package our content then we upload our content to AWS S3. We have recently been on support with AWS after trying to playback content and also insert ads using Mediatailor both were failing. They stated. **_We looked at the source manifest and found out that it doesn't contain the duration attribute which is the reason behind the failure. See below : Looking at the dash-IF[1] documents, we see that it is necessary for periods to include the duration attribute. A reference manifest can be seen here https://docs.aws.amazon.com/mediatailor/latest/ug/dash-manifest-vod.html_** Here is our manifest encoded with Bento4 ```xml <?xml version="1.0" ?> <MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" minBufferTime="PT2.00S" mediaPresentationDuration="PT1M46.517S" type="static"> <!-- Created with Bento4 mp4-dash.py, VERSION=2.0.0-639 --> <Period> <!-- Video --> <AdaptationSet mimeType="video/mp4" segmentAlignment="true" startWithSAP="1" maxWidth="1920" maxHeight="1080"> <SegmentTemplate timescale="15360" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1"> <SegmentTimeline> <S d="30720" r="52"/> <S d="7936"/> </SegmentTimeline> </SegmentTemplate> <Representation id="video/avc1/1" codecs="avc1.4D402A" width="1920" height="1080" scanType="progressive" frameRate="60" bandwidth="1544536"/> <Representation id="video/avc1/2" codecs="avc1.4D4020" width="1280" height="720" scanType="progressive" frameRate="60" bandwidth="1029836"/> <Representation id="video/avc1/3" codecs="avc1.4D401F" width="842" height="480" scanType="progressive" frameRate="60" bandwidth="625632"/> <Representation id="video/avc1/4" codecs="avc1.4D401F" width="640" height="360" scanType="progressive" frameRate="60" bandwidth="444305"/> <Representation id="video/avc1/5" codecs="avc1.4D401E" width="426" height="240" scanType="progressive" frameRate="60" bandwidth="198266"/> </AdaptationSet> <!-- Audio --> <AdaptationSet mimeType="audio/mp4" startWithSAP="1" segmentAlignment="true"> <SegmentTemplate timescale="48000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1"> <SegmentTimeline> <S d="96256"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="95232"/> <S d="96256" r="2"/> <S d="24440"/> </SegmentTimeline> </SegmentTemplate> <Representation id="audio/und/mp4a.40.2/1" codecs="mp4a.40.2" bandwidth="194349" audioSamplingRate="48000"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:mpegB:cicp:ChannelConfiguration" value="2"/> </Representation> <Representation id="audio/und/mp4a.40.2/2" codecs="mp4a.40.2" bandwidth="130248" audioSamplingRate="48000"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:mpegB:cicp:ChannelConfiguration" value="2"/> </Representation> <Representation id="audio/und/mp4a.40.2/3" codecs="mp4a.40.2" bandwidth="97200" audioSamplingRate="48000"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:mpegB:cicp:ChannelConfiguration" value="2"/> </Representation> <Representation id="audio/und/mp4a.40.2/4" codecs="mp4a.40.2" bandwidth="65397" audioSamplingRate="48000"> <AudioChannelConfiguration schemeIdUri="urn:mpeg:mpegB:cicp:ChannelConfiguration" value="2"/> </Representation> </AdaptationSet> </Period> </MPD> ``` Any suggestion on how to implement this.
No Period duration for DASH
https://api.github.com/repos/axiomatic-systems/Bento4/issues/668/comments
4
2022-01-26T11:23:08Z
2022-02-04T19:12:26Z
https://github.com/axiomatic-systems/Bento4/issues/668
1,114,910,079
668
[ "axiomatic-systems", "Bento4" ]
Hello, I'm trying to add subtitles in the conversion to fmp4 as follows; `mp4-dash.py --hls MP4/video.mp4 [+format=webvtt,+language=por]MP4/por.vtt [+format=webvtt,+language=forced]MP4/forced.vtt ` But I'm getting this error message and no subtitles are added, any solution? ``` Parsing media file 1: MP4/video.mp4 Splitting media file (audio) MP4/video.mp4 Splitting media file (audio) MP4/video.mp4 Splitting media file (video) MP4/video.mp4 Processing and Copying subtitles file MP4/por.vtt Processing and Copying subtitles file MP4/forced.vtt ERROR: local variable 'language_name' referenced before assignment ```
Subtitles with mp4-dash
https://api.github.com/repos/axiomatic-systems/Bento4/issues/667/comments
3
2022-01-26T04:05:16Z
2023-04-02T06:44:44Z
https://github.com/axiomatic-systems/Bento4/issues/667
1,114,605,170
667
[ "axiomatic-systems", "Bento4" ]
Hi guys, I am fairly new to this, I have downloaded the bento4 binaries for linux x86_64 platform from here (https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-639.x86_64-unknown-linux.zip) and trying to run mp4info tool (~/bin) on my centOS-8 VM. I am getting error "command not found...". How can I make those tools (mp4**) work on my centOS8 VM? If those pre-build tools are only valid for windows (since it is working on windows machine when I download the windows version of bento4), is there a procedure where I can build the similar tools for centOS-8? git clone https://github.com/axiomatic-systems/Bento4.git cd Bento4/ mkdir cmakebuild cd cmakebuild/ cmake -DCMAKE_BUILD_TYPE=Release .. make following errors: ``` ============ making lib ============= make[2]: Nothing to be done for 'all'. ============ making mp4dump ============= g++ -L. Mp4Dump.o -o mp4dump -lAP4 ./libAP4.a(Ap4AtomFactory.o): In function `AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream&, unsigned int, unsigned int, unsigned long long, AP4_Atom*&)': /root/.../Bento4/Build/Targets/x86_64-unknown-linux/Debug/../../../../Source/C++/Core/Ap4AtomFactory.cpp:534: undefined reference to `AP4_Av1cAtom::Create(unsigned int, AP4_ByteStream&)' ./libAP4.a(Ap4SampleDescription.o): In function `AP4_Av1SampleDescription::AP4_Av1SampleDescription(unsigned int, unsigned short, unsigned short, unsigned short, char const*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char const*, unsigned int)': /root/.../Bento4/Build/Targets/x86_64-unknown-linux/Debug/../../../../Source/C++/Core/Ap4SampleDescription.cpp:773: undefined reference to `AP4_Av1cAtom::AP4_Av1cAtom(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char const*, unsigned int)' ./libAP4.a(Ap4SampleDescription.o): In function `AP4_Av1SampleDescription::AP4_Av1SampleDescription(unsigned int, unsigned short, unsigned short, unsigned short, char const*, AP4_Av1cAtom const*)': /root/.../Bento4/Build/Targets/x86_64-unknown-linux/Debug/../../../../Source/C++/Core/Ap4SampleDescription.cpp:793: undefined reference to `AP4_Av1cAtom::AP4_Av1cAtom()' ./libAP4.a(Ap4SampleDescription.o): In function `AP4_Av1SampleDescription::AP4_Av1SampleDescription(unsigned int, unsigned short, unsigned short, unsigned short, char const*, AP4_AtomParent*)': /root/.../Bento4/Build/Targets/x86_64-unknown-linux/Debug/../../../../Source/C++/Core/Ap4SampleDescription.cpp:811: undefined reference to `typeinfo for AP4_Av1cAtom' /root/.../Bento4/Build/Targets/x86_64-unknown-linux/Debug/../../../../Source/C++/Core/Ap4SampleDescription.cpp:816: undefined reference to `AP4_Av1cAtom::AP4_Av1cAtom()' ./libAP4.a(Ap4SampleDescription.o): In function `AP4_Av1cAtom::AP4_Av1cAtom(AP4_Av1cAtom const&)': /root/.../Bento4/Build/Targets/x86_64-unknown-linux/Debug/../../../../Source/C++/Core/Ap4Av1cAtom.h:48: undefined reference to `vtable for AP4_Av1cAtom' collect2: error: ld returned 1 exit status make[2]: *** [../../../../Build/Makefiles/Mp4Dump.mak:34: mp4dump] Error 1 make[1]: *** [../../../../Build/Makefiles/TopLevel.mak:78: mp4dump] Error 2 make[1]: Leaving directory '/root/intertrust/Bento4/Build/Targets/x86_64-unknown-linux/Debug' make: *** [../../Makefiles/Bootstrap.mak:16: default] Error 2 ```
bento4 for centos8
https://api.github.com/repos/axiomatic-systems/Bento4/issues/666/comments
1
2022-01-25T11:30:14Z
2022-01-25T17:49:08Z
https://github.com/axiomatic-systems/Bento4/issues/666
1,113,774,340
666
[ "axiomatic-systems", "Bento4" ]
Hi, We have multiple audio with language as English, but contains audio from actor, narrator, directors cut, default audio and audio description for accessibility. Within the mpd I need to have title for each of those audio so that the player can parse the mpd/hls displays in my player as 1. Default Audio 2. Audio Description 3. Actor 4. Directors Cut 5. Narator Appreciate if you can let me know what attributes needs to be used to set audio's title. Thanks Aswin
Audio Title
https://api.github.com/repos/axiomatic-systems/Bento4/issues/665/comments
0
2022-01-19T15:26:35Z
2022-01-19T15:27:42Z
https://github.com/axiomatic-systems/Bento4/issues/665
1,108,237,967
665
[ "axiomatic-systems", "Bento4" ]
Hi When I package a video with --hls key so that I **could get both dash and hls video in same folder**, I could not able to play the output m3u8 file. The command I used is: **Error Snapshot when I try to play:** [https://ibb.co/VCYgrgB](url) **Command:** ` bento4/bin/mp4dash --hls --hls-key-url=skd://muvi_token --encryption-cenc-scheme=cbcs --encryption-key=45581206458484097617822896758747:17853123456153013562999000889748 --use-segment-template-number-padding --marlin --widevine --widevine-header=https://muvi.com --playready --playready-header=https://muvi.com --playready-version=4.3 big_buck_bunny_720p_5mb.mf4 big_buck_bunny_720p_5mb_480.mf4 big_buck_bunny_720p_5mb_240.mf4 big_buck_bunny_720p_5mb_144.mf4 ` **Output of the Command:** Encrypting track IDs [1, 2] in big_buck_bunny_720p_5mb.mf4 Encrypting track IDs [1, 2] in big_buck_bunny_720p_5mb_480.mf4 Encrypting track IDs [1, 2] in big_buck_bunny_720p_5mb_240.mf4 Encrypting track IDs [1, 2] in big_buck_bunny_720p_5mb_144.mf4 Parsing media file 1: tmp03y51ekz = Encrypted[big_buck_bunny_720p_5mb.mf4] Parsing media file 2: tmp07l1xd_t = Encrypted[big_buck_bunny_720p_5mb_480.mf4] Parsing media file 3: tmpnh450_t1 = Encrypted[big_buck_bunny_720p_5mb_240.mf4] Parsing media file 4: tmpvf6vr2wi = Encrypted[big_buck_bunny_720p_5mb_144.mf4] WARNING: video segment durations for "File 1#1" vary by more than 10% (consider using --use-segment-timeline) WARNING: video segment durations for "File 2#1" vary by more than 10% (consider using --use-segment-timeline) WARNING: video segment durations for "File 3#1" vary by more than 10% (consider using --use-segment-timeline) WARNING: video segment durations for "File 4#1" vary by more than 10% (consider using --use-segment-timeline) WARNING: audio segment durations for "File 1#2" vary by more than 10% (consider using --use-segment-timeline) Splitting media file (audio) tmp03y51ekz = Encrypted[big_buck_bunny_720p_5mb.mf4] Splitting media file (video) tmp03y51ekz = Encrypted[big_buck_bunny_720p_5mb.mf4] Splitting media file (video) tmp07l1xd_t = Encrypted[big_buck_bunny_720p_5mb_480.mf4] Splitting media file (video) tmpnh450_t1 = Encrypted[big_buck_bunny_720p_5mb_240.mf4] Splitting media file (video) tmpvf6vr2wi = Encrypted[big_buck_bunny_720p_5mb_144.mf4]
I am not able to play .m3u8 video when I package a video with "mp4dash --hls ..." command
https://api.github.com/repos/axiomatic-systems/Bento4/issues/664/comments
1
2022-01-10T03:46:33Z
2022-03-14T16:51:19Z
https://github.com/axiomatic-systems/Bento4/issues/664
1,097,425,356
664
[ "axiomatic-systems", "Bento4" ]
# Vulnerability description version: master ( commit https://github.com/axiomatic-systems/Bento4/commit/3dc8d58b0863b7058fc48a0d6583ffe2ae282ece ) command: ./mp4split $FILE Download: [poc](https://github.com/dandanxu96/PoC/raw/main/Bento4/AP4_HdlrAtom::WriteFields-global-buffer-overflow-poc) Here is the trace reported by ASAN: ``` root@d8a714203f6e:/path_to_bento4/build# ./mp4split poc WARNING: atom serialized to fewer bytes than declared size ================================================================= ==24075==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000001536321 at pc 0x000000438161 bp 0x7ffc7094d040 sp 0x7ffc7094c7e8 READ of size 243 at 0x000001536321 thread T0 #0 0x438160 in fwrite /tmp/final/llvm.src/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1092:16 #1 0x6e5939 in AP4_StdcFileByteStream::WritePartial(void const*, unsigned int, unsigned int&) /path_to_bento4/Source/C++/System/StdC/Ap4StdCFileByteStream.cpp:368:17 #2 0x527a76 in AP4_ByteStream::Write(void const*, unsigned int) /path_to_bento4/Source/C++/Core/Ap4ByteStream.cpp:77:29 #3 0x57d803 in AP4_HdlrAtom::WriteFields(AP4_ByteStream&) /path_to_bento4/Source/C++/Core/Ap4HdlrAtom.cpp:141:29 #4 0x4f5a6d in AP4_Atom::Write(AP4_ByteStream&) /path_to_bento4/Source/C++/Core/Ap4Atom.cpp:229:14 #5 0x4fd19c in AP4_AtomListWriter::Action(AP4_Atom*) const /path_to_bento4/Source/C++/Core/Ap4Atom.cpp:757:11 #6 0x537aab in AP4_List<AP4_Atom>::Apply(AP4_List<AP4_Atom>::Item::Operator const&) const /path_to_bento4/Source/C++/Core/Ap4List.h:353:12 #7 0x536d42 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) /path_to_bento4/Source/C++/Core/Ap4ContainerAtom.cpp:232:23 #8 0x4f5a6d in AP4_Atom::Write(AP4_ByteStream&) /path_to_bento4/Source/C++/Core/Ap4Atom.cpp:229:14 #9 0x4fd19c in AP4_AtomListWriter::Action(AP4_Atom*) const /path_to_bento4/Source/C++/Core/Ap4Atom.cpp:757:11 #10 0x537aab in AP4_List<AP4_Atom>::Apply(AP4_List<AP4_Atom>::Item::Operator const&) const /path_to_bento4/Source/C++/Core/Ap4List.h:353:12 #11 0x536d42 in AP4_ContainerAtom::WriteFields(AP4_ByteStream&) /path_to_bento4/Source/C++/Core/Ap4ContainerAtom.cpp:232:23 #12 0x4f5a6d in AP4_Atom::Write(AP4_ByteStream&) /path_to_bento4/Source/C++/Core/Ap4Atom.cpp:229:14 #13 0x4f0be5 in main /path_to_bento4/Source/C++/Apps/Mp4Split/Mp4Split.cpp:424:19 #14 0x7fbf123c283f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f) #15 0x41b918 in _start (/path_to_bento4/build/mp4split+0x41b918) ``` # Vulnerability analysis The global-buffer-overflow occurs in `Source/C++/System/StdC/Ap4StdCFileByteStream.cpp:368`, where 243 bytes (`bytesToWrite`) will be written from `buffer` to the output stream `m_File`. This function only checks whether `bytesToWrite` is 0 in line 367. ```C++ // Source/C++/System/StdC/Ap4StdCFileByteStream.cpp 360 AP4_Result 361 AP4_StdcFileByteStream::WritePartial(const void* buffer, 362 AP4_Size bytesToWrite, 363 AP4_Size& bytesWritten) 364 { 365 size_t nbWritten; 366 367 if (bytesToWrite == 0) return AP4_SUCCESS; 368 nbWritten = fwrite(buffer, 1, bytesToWrite, m_File); 369 .... 381 } ``` Further analysis of the upper layer call function `AP4_ByteStream::Write`, we find that this function writes the 243 bytes (`bytes_to_write`) from the buffer to the output stream through a loop. It also only checked whether `bytes_to_write` is 0 in line 72 and 79. ```C++ // Source/C++/Core/Ap4ByteStream.cpp:77 68 AP4_Result 69 AP4_ByteStream::Write(const void* buffer, AP4_Size bytes_to_write) 70 { 71 // shortcut 72 if (bytes_to_write == 0) return AP4_SUCCESS; 73 74 // write until failure 75 AP4_Size bytes_written; 76 while (bytes_to_write) { 77 AP4_Result result = WritePartial(buffer, bytes_to_write, bytes_written); 78 if (AP4_FAILED(result)) return result; 79 if (bytes_written == 0) return AP4_ERROR_INTERNAL; 80 AP4_ASSERT(bytes_written <= bytes_to_write); 81 bytes_to_write -= bytes_written; 82 buffer = (const void*)(((const AP4_Byte*)buffer)+bytes_written); 83 } 84 85 return AP4_SUCCESS; 86 } ``` Although `AP4_HdlrAtom::WriteFields` performs a boundary check ( line 137 ~ 143 ) before calling the `Write` function ( line 141 ), this boundary check is wrong and will still cause overflow. When `m_Size32<AP4_FULL_ATOM_HEADER_SIZE + 20`, no matter what the value of `name_size`, the condition of line 137 will always be satisfied, and the operation of line 138 will be executed, which will cause an integer overflow and cause the `name_size` to be larger than expected. Similarly, the `padding` will become exceptionally large (line 147), resulting in a large loop ( line 148) and possibly stall the program. ```C++ // Source/C++/Core/Ap4HdlrAtom.cpp 107 AP4_Result 108 AP4_HdlrAtom::WriteFields(AP4_ByteStream& stream) 109 { ... 123 AP4_UI08 name_size = (AP4_UI08)m_HandlerName.GetLength(); 124 if (m_QuickTimeMode) { ... 136 } else { 137 if (AP4_FULL_ATOM_HEADER_SIZE + 20 + name_size > m_Size32) { 138 name_size = (AP4_UI08)(m_Size32 - (AP4_FULL_ATOM_HEADER_SIZE + 20)); 139 } 140 if (name_size) { 141 result = stream.Write(m_HandlerName.GetChars(), name_size); 142 if (AP4_FAILED(result)) return result; 143 } 144 } 145 146 // pad with zeros if necessary 147 AP4_Size padding = m_Size32 - (AP4_FULL_ATOM_HEADER_SIZE + 20 + name_size); 148 while (padding--) stream.WriteUI08(0); 149 151 } ``` Take `m_Size32`=19 and `name_size`=0 ( at line 123 ) as an example. Such a value satisfies the condition of line 137, the `name_size` will be recalculated according to the expression of line 138. The calculation process and results are shown below. The `name_size` is 243, which exceeds the length of the buffer, and the `padding` is 0xfffffeff, which leads to 0xfffffeff loops. ``` pwndbg> p m_Size32 - (AP4_FULL_ATOM_HEADER_SIZE + 20) $11 = 4294967283 pwndbg> p (AP4_UI08)(m_Size32 - (AP4_FULL_ATOM_HEADER_SIZE + 20)) $12 = 243 '\363' pwndbg> p m_HandlerName $13 = { static EmptyString = 0 '\000', m_Chars = 0x4a1360 <AP4_String::EmptyString> "", m_Length = 0 } pwndbg> p padding $8 = 4294967039 ``` So how did `m_Size32` become 19? Through gdb debugging, we found that in the `AP4_AtomFactory::CreateAtomFromStream` function, 32 bytes are read from the input stream and stored in `size_32` (line 179). This function only performs some simple checks (line 197, 210, and 228) before calling `CreateAtomFromStream` to set `m_Size32`, so `m_Size32` can completely satisfy `m_Size32<AP4_FULL_ATOM_HEADER_SIZE + 20`. The detailed call chain of how m_Size32 is set is as follows. ```C++ // Source/C++/Core/Ap4AtomFactory.cpp 160 AP4_Result 161 AP4_AtomFactory::CreateAtomFromStream(AP4_ByteStream& stream, 162 AP4_LargeSize& bytes_available, 163 AP4_Atom*& atom) 164 { ... 177 // read atom size 178 AP4_UI32 size_32; 179 result = stream.ReadUI32(size_32); 180 if (AP4_FAILED(result)) { 181 stream.Seek(start); 182 return result; 183 } 184 AP4_UI64 size = size_32; ... 197 if (size == 0) { ... 210 } else if (size == 1) { ... 225 } 226 227 // check the size 228 if ((size > 0 && size < 8) || size > bytes_available) { 229 stream.Seek(start); 230 return AP4_ERROR_INVALID_FORMAT; 231 } 233 // create the atom 234 result = CreateAtomFromStream(stream, type, size_32, size, atom); ... 265 } ``` ``` pwndbg> backtrace #0 AP4_Atom::AP4_Atom (this=0xf4e590, type=1751411826, size=19, version=0 '\000', flags=0) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4Atom.cpp:108 #1 0x0000000000418489 in AP4_HdlrAtom::AP4_HdlrAtom (this=0xf4e590, size=19, version=<optimized out>, flags=<optimized out>, stream=...) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4HdlrAtom.cpp:77 #2 0x00000000004185d2 in AP4_HdlrAtom::Create (size=19, stream=...) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4HdlrAtom.cpp:52 #3 0x000000000040794d in AP4_AtomFactory::CreateAtomFromStream (this=0x7ffc43e8a8f0, stream=..., type=1751411826, size_32=19, size_64=19, atom=@0x7ffc43e8a598: 0x0) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:423 #4 0x00000000004093bc in AP4_AtomFactory::CreateAtomFromStream (this=this@entry=0x7ffc43e8a8f0, stream=..., bytes_available=@0x7ffc43e8a5a0: 574, atom=@0x7ffc43e8a598: 0x0) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #5 0x000000000040e20d in AP4_ContainerAtom::ReadChildren (size=<optimized out>, stream=..., atom_factory=..., this=0xf4e490) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #6 AP4_ContainerAtom::AP4_ContainerAtom (this=0xf4e490, type=<optimized out>, size=<optimized out>, force_64=<optimized out>, stream=..., atom_factory=...) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #7 0x000000000040e4bc in AP4_ContainerAtom::Create (type=type@entry=1835297121, size=size@entry=614, is_full=is_full@entry=false, force_64=<optimized out>, stream=..., atom_factory=...) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:88 #8 0x0000000000407a6b in AP4_AtomFactory::CreateAtomFromStream (this=0x7ffc43e8a8f0, stream=..., type=1835297121, size_32=614, size_64=614, atom=@0x7ffc43e8a758: 0x0) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:816 #9 0x00000000004093bc in AP4_AtomFactory::CreateAtomFromStream (this=this@entry=0x7ffc43e8a8f0, stream=..., bytes_available=@0x7ffc43e8a760: 614, atom=@0x7ffc43e8a758: 0x0) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #10 0x000000000040e20d in AP4_ContainerAtom::ReadChildren (size=<optimized out>, stream=..., atom_factory=..., this=0xf4ccf0) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:194 #11 AP4_ContainerAtom::AP4_ContainerAtom (this=0xf4ccf0, type=<optimized out>, size=<optimized out>, force_64=<optimized out>, stream=..., atom_factory=...) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:139 #12 0x00000000004409bf in AP4_TrakAtom::AP4_TrakAtom (this=0xf4ccf0, size=<optimized out>, stream=..., atom_factory=...) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4TrakAtom.cpp:165 #13 0x000000000040871c in AP4_TrakAtom::Create (atom_factory=..., stream=..., size=714) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4TrakAtom.h:58 #14 AP4_AtomFactory::CreateAtomFromStream (this=0x7ffc43e8a8f0, stream=..., type=<optimized out>, size_32=714, size_64=714, atom=@0x7ffc43e8a8e8: 0x0) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:413 #15 0x00000000004090d6 in AP4_AtomFactory::CreateAtomFromStream (atom=@0x7ffc43e8a8e8: 0x0, bytes_available=<synthetic pointer>, stream=..., this=0x7ffc43e8a8f0) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:234 #16 AP4_AtomFactory::CreateAtomFromStream (this=this@entry=0x7ffc43e8a8f0, stream=..., atom=@0x7ffc43e8a8e8: 0x0) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Core/Ap4AtomFactory.cpp:154 #17 0x00000000004018f1 in main (argc=argc@entry=2, argv=argv@entry=0x7ffc43e8ba78) at /root/tool/MemLock/evaluation/BUILD/bento4/Bento4/Source/C++/Apps/Mp4Split/Mp4Split.cpp:353 #18 0x00007f1ffe533840 in __libc_start_main (main=0x4012a0 <main(int, char**)>, argc=2, argv=0x7ffc43e8ba78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc43e8ba68) at ../csu/libc-start.c:291 #19 0x00000000004020d9 in _start () ```
Incorrect boundary check in AP4_HdlrAtom::WriteFields resulting in global-buffer-overflow
https://api.github.com/repos/axiomatic-systems/Bento4/issues/663/comments
2
2021-12-14T15:04:01Z
2022-03-25T07:47:35Z
https://github.com/axiomatic-systems/Bento4/issues/663
1,079,868,207
663
[ "axiomatic-systems", "Bento4" ]
Hello, I found a segmentation fault, System info: Ubuntu 20.04: clang 10.0.0 , gcc 9.3.0 Bento4 Version 1.6.0.0 ``` ./mp42hls poc ``` [poc.zip](https://github.com/axiomatic-systems/Bento4/files/7683148/poc.zip) result: ``` [2] 1481710 segmentation fault ``` gdb ``` Program received signal SIGSEGV, Segmentation fault. [----------------------------------registers-----------------------------------] RAX: 0x0 RBX: 0x555555636670 --> 0x0 RCX: 0x0 RDX: 0x4 RSI: 0x555555637810 --> 0x555555617158 --> 0x5555555835e0 (<AP4_MemoryByteStream::~AP4_MemoryByteStream()>: endbr64) RDI: 0x0 RBP: 0x555555637810 --> 0x555555617158 --> 0x5555555835e0 (<AP4_MemoryByteStream::~AP4_MemoryByteStream()>: endbr64) RSP: 0x7fffffffdf40 --> 0x5555556365e0 --> 0x55555561f5a0 --> 0x5555555d55c0 (<AP4_DecoderConfigDescriptor::~AP4_DecoderConfigDescriptor()>: endbr64) RIP: 0x5555555d5426 (<AP4_DecoderConfigDescriptor::WriteFields(AP4_ByteStream&)+118>: mov rax,QWORD PTR [rdi]) R8 : 0x555555637840 --> 0x555555617248 --> 0x55555558bcd0 (<AP4_DataBuffer::~AP4_DataBuffer()>: endbr64) R9 : 0x5555556191a0 --> 0x7ffff7fa4008 --> 0x7ffff7e79ba0 (<_ZN10__cxxabiv117__class_type_infoD2Ev>: endbr64) R10: 0x555555636730 --> 0x555555619688 --> 0x555555585ad0 (<AP4_ContainerAtom::~AP4_ContainerAtom()>: endbr64) R11: 0x7ffff7c60be0 --> 0x555555637890 --> 0x0 R12: 0x0 R13: 0x555555637810 --> 0x555555617158 --> 0x5555555835e0 (<AP4_MemoryByteStream::~AP4_MemoryByteStream()>: endbr64) R14: 0x555555636458 --> 0x55555561b850 --> 0x5555555a53d0 (<_ZThn40_N19AP4_EncaSampleEntryD1Ev>: endbr64) R15: 0x10 EFLAGS: 0x10202 (carry parity adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x5555555d5417 <AP4_DecoderConfigDescriptor::WriteFields(AP4_ByteStream&)+103>: nop WORD PTR [rax+rax*1+0x0] 0x5555555d5420 <AP4_DecoderConfigDescriptor::WriteFields(AP4_ByteStream&)+112>: mov rdi,QWORD PTR [rbx] 0x5555555d5423 <AP4_DecoderConfigDescriptor::WriteFields(AP4_ByteStream&)+115>: mov rsi,rbp => 0x5555555d5426 <AP4_DecoderConfigDescriptor::WriteFields(AP4_ByteStream&)+118>: mov rax,QWORD PTR [rdi] 0x5555555d5429 <AP4_DecoderConfigDescriptor::WriteFields(AP4_ByteStream&)+121>: call QWORD PTR [rax+0x10] 0x5555555d542c <AP4_DecoderConfigDescriptor::WriteFields(AP4_ByteStream&)+124>: mov rbx,QWORD PTR [rbx+0x8] 0x5555555d5430 <AP4_DecoderConfigDescriptor::WriteFields(AP4_ByteStream&)+128>: test rbx,rbx 0x5555555d5433 <AP4_DecoderConfigDescriptor::WriteFields(AP4_ByteStream&)+131>: jne 0x5555555d5420 <AP4_DecoderConfigDescriptor::WriteFields(AP4_ByteStream&)+112> [------------------------------------stack-------------------------------------] 0000| 0x7fffffffdf40 --> 0x5555556365e0 --> 0x55555561f5a0 --> 0x5555555d55c0 (<AP4_DecoderConfigDescriptor::~AP4_DecoderConfigDescriptor()>: endbr64) 0008| 0x7fffffffdf48 --> 0x5555556366b0 --> 0x5555556365e0 --> 0x55555561f5a0 --> 0x5555555d55c0 (<AP4_DecoderConfigDescriptor::~AP4_DecoderConfigDescriptor()>: endbr64) 0016| 0x7fffffffdf50 --> 0x5555556365e0 --> 0x55555561f5a0 --> 0x5555555d55c0 (<AP4_DecoderConfigDescriptor::~AP4_DecoderConfigDescriptor()>: endbr64) 0024| 0x7fffffffdf58 --> 0x5555555d6b6d (<AP4_Expandable::Write(AP4_ByteStream&)+269>: mov rax,QWORD PTR [rsp+0x8]) 0032| 0x7fffffffdf60 --> 0x11 0040| 0x7fffffffdf68 --> 0xfd2cec3ba1357000 0048| 0x7fffffffdf70 --> 0x555555637810 --> 0x555555617158 --> 0x5555555835e0 (<AP4_MemoryByteStream::~AP4_MemoryByteStream()>: endbr64) 0056| 0x7fffffffdf78 --> 0x0 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00005555555d5426 in AP4_DescriptorListWriter::Action (descriptor=0x0, this=<optimized out>) at /home/zxq/CVE_testing/sourceproject/Bento4/Source/C++/Core/Ap4Descriptor.h:108 108 return descriptor->Write(m_Stream); ```
Null Pointer Dereference in AP4_DescriptorListWriter::Action
https://api.github.com/repos/axiomatic-systems/Bento4/issues/662/comments
0
2021-12-09T07:52:19Z
2022-02-28T03:27:54Z
https://github.com/axiomatic-systems/Bento4/issues/662
1,075,258,697
662
[ "axiomatic-systems", "Bento4" ]
Hello, I found a assert failed, System info: + Ubuntu 20.04: clang 10.0.0 , gcc 9.3.0 + Bento4 Version 1.6.0.0 ``` ./mp42avc poc /dev/null ``` [poc.zip](https://github.com/axiomatic-systems/Bento4/files/7675932/poc.zip) ``` terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc [2] 3577672 abort ./mp42avc poc /dev/null ``` ASAN result: ``` ================================================================= ==3220457==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0xe80000000 bytes #0 0x7f43f8c59947 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0x10f947) #1 0x5579640c015a in AP4_Array<AP4_TrunAtom::Entry>::EnsureCapacity(unsigned int) /home/zxq/CVE_testing/noinstruementproj/newbento4/Bento4/Source/C++/Core/Ap4Array.h:172 #2 0x5579640c015a in AP4_Array<AP4_TrunAtom::Entry>::EnsureCapacity(unsigned int) /home/zxq/CVE_testing/noinstruementproj/newbento4/Bento4/Source/C++/Core/Ap4Array.h:166 #3 0x5579640c015a in AP4_Array<AP4_TrunAtom::Entry>::SetItemCount(unsigned int) /home/zxq/CVE_testing/noinstruementproj/newbento4/Bento4/Source/C++/Core/Ap4Array.h:210 ==3220457==HINT: if you don't care about these errors you may set allocator_may_return_null=1 SUMMARY: AddressSanitizer: out-of-memory (/lib/x86_64-linux-gnu/libasan.so.5+0x10f947) in operator new(unsigned long) ==3220457==ABORTING ```
assert failed in mp42avc
https://api.github.com/repos/axiomatic-systems/Bento4/issues/661/comments
0
2021-12-08T12:31:02Z
2021-12-08T12:31:02Z
https://github.com/axiomatic-systems/Bento4/issues/661
1,074,359,347
661
[ "axiomatic-systems", "Bento4" ]
If I run "mp4dash --no-split --use-segment-list", `ftyp` box is excluded from initialization segment. Generated mpd has this line: \<Initialization sourceURL="video-frag.mp4" range="36-746"/>, byte range starts from 36 and segment starts from `moov` box. I did: mp4fragment --fragment-duration 10000 source/video.mp4 video-frag.mp4 mp4dash --no-split --use-segment-list video-frag.mp4 Why `ftyp` box is excluded? I'm not facing problems playing the stream, but want to know the reason or purpose if I can understand. I tried ffmpeg (-single-file 1) and MP4Box (-single-file), range started from 0 and segment started from `ftyp` box.
[Question] mp4dash --no-split excludes ftyp box from initialization segment
https://api.github.com/repos/axiomatic-systems/Bento4/issues/660/comments
0
2021-11-30T00:51:17Z
2021-11-30T00:51:17Z
https://github.com/axiomatic-systems/Bento4/issues/660
1,066,662,696
660
[ "axiomatic-systems", "Bento4" ]
Got some errors when running mp4dash and the Subtitles (WebVTT) are missing in the master HLS playlist. How to reproduce: `Bento4-SDK-1-6-0-639.x86_64-unknown-linux/bin/mp4dash --profiles=live --hls --output-dir=/tmp/mp4dash-errors /tmp/F0110641_806kbps.fmp4 /tmp/F0110641_320kbps.fmp4 /tmp/F0110641_1312kbps.fmp4 /tmp/F0110641_2069kbps.fmp4 /tmp/F0110641_3100kbps.fmp4 [+format=webvtt,+language=swe,+language_name=Svenska]/var/packager-testfiles/F0110641/219714-13.vtt` Errors: ``` Line 1043: ERROR: local variable 'language_name' referenced before assignment # Might be fixed by changing line 1043 "language_name" to "subtitles_file.language_name" Line 1044: ERROR: 'SubtitlesFile' object has no attribute 'hls_autoselect' # Might be fixed by changing line 1044 "'YES' if subtitles_file.hls_autoselect else 'NO'," to "'YES' if hasattr(subtitles_file, 'hls_autoselect') and subtitles_file.hls_autoselect else 'NO'," ``` Suggested changes as a patch : ``` --- Bento4-SDK-1-6-0-639.x86_64-unknown-linux/utils/mp4-dash.py.orig 2021-11-09 14:04:47.698302013 +0100 +++ Bento4-SDK-1-6-0-639.x86_64-unknown-linux/utils/mp4-dash.py 2021-11-16 10:41:51.057855875 +0100 @@ -1040,8 +1040,8 @@ if default: default_selected = True master_playlist_file.write('#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subtitles",NAME="{}",AUTOSELECT={},DEFAULT={},LANGUAGE="{}",URI="{}/{}"\n'.format( - language_name, - 'YES' if subtitles_file.hls_autoselect else 'NO', + subtitles_file.language_name, + 'YES' if hasattr(subtitles_file, 'hls_autoselect') and subtitles_file.hls_autoselect else 'NO', 'YES' if default else 'NO', subtitles_file.language, media_subdir, ```
Subtitles (WebVTT) not added to HLS playlist when running mp4dash with --hls
https://api.github.com/repos/axiomatic-systems/Bento4/issues/659/comments
3
2021-11-16T10:06:52Z
2023-04-02T06:47:13Z
https://github.com/axiomatic-systems/Bento4/issues/659
1,054,685,254
659
[ "axiomatic-systems", "Bento4" ]
Hi, I am trying a custom packaging command using Bento4 mp4dash, the goal is to create a CMAF output and the command is shown below: mp4dash /home/ubuntu/input_files/fragmented_inputs/Sintel.mp4 --verbose -d -f -o ./output-dir --mpd-name=master.mpd --no-split false --hls --encryption-key=9f47908423e/*hidden*/2f987e179:2bb869/*hidden*/8dd419237c --encryption-cenc-scheme=cbcs --widevine --widevine-header=#AAAAV3Bzc2gAAAAA7e+/*hidden*/+YfheRoLYnV5ZHJta2V5b3MiEJ9HkIQj4UIosQRbcvmH4XkqAkhE --fairplay-key-uri=skd://9f47908423e/*hidden*/2f987e179 The issue with the above command is that it fails while processing the input and throws the error as shown below: <img width="1432" alt="Screenshot 2021-11-01 at 1 27 46 PM" src="https://user-images.githubusercontent.com/31466986/139641520-d1c45ec9-f0b2-454c-ae7c-ef248b74efe4.png"> The error shown is "Cannot open input file", but when I run mp4info command separately on the same file it works fine. Is there something I am missing? Request you to help me resolve the issue. Thanks.
CMAF mp4dash, mp4info cannot read input file error
https://api.github.com/repos/axiomatic-systems/Bento4/issues/657/comments
1
2021-11-01T08:14:54Z
2022-10-21T16:27:46Z
https://github.com/axiomatic-systems/Bento4/issues/657
1,040,897,278
657
[ "axiomatic-systems", "Bento4" ]
Basically when I build from Android Studio or the terminal, I get an `undefined reference to 'AP4_Ac4SampleDescription::_class_AP4_Ac4SampleDescription'` error. Please note that it builds fine with the regular cmake command (cmake -DCMAKE=Release ..). Note: An Android dev I know said to try this on Mac, as it works on Mac. I'm on Linux, so maybe that's an issue. Does anyone know why this happens? ![screenshot](https://user-images.githubusercontent.com/26193935/136713583-811cd9a6-ae8a-4c88-a51a-48eb25d9c868.png)
Android Studio - Undefined reference to 'AP4_Ac4SampleDescription::_class_AP4_Ac4SampleDescription'
https://api.github.com/repos/axiomatic-systems/Bento4/issues/653/comments
1
2021-10-10T21:32:45Z
2021-10-20T19:28:15Z
https://github.com/axiomatic-systems/Bento4/issues/653
1,022,097,434
653
[ "axiomatic-systems", "Bento4" ]
## System info Ubuntu 16.04 xenial, gcc (Ubuntu 5.5.0-12ubuntu1), `mp4info` (latest master `5922ba7`) ## **Command line** `./mp4info @@ /dev/null` ## Output ```bash *** Warning -1038 in Tables::ParseTables, line 1384, file tables.cpp *** Reason is: found invalid marker, probably a marker size is out of range *** Warning -1038 in Tables::ParseTables, line 1384, file tables.cpp *** Reason is: found invalid marker, probably a marker size is out of range *** Warning -1038 in Tables::ParseTables, line 1384, file tables.cpp *** Reason is: found invalid marker, probably a marker size is out of range *** Warning -1038 in Tables::ParseTables, line 1384, file tables.cpp *** Reason is: found invalid marker, probably a marker size is out of range *** Warning -1038 in Tables::ParseTables, line 1384, file tables.cpp *** Reason is: found invalid marker, probably a marker size is out of range *** Warning -1038 in Frame::StartParseHiddenScan, line 869, file frame.cpp *** Reason is: Start of Scan SOS marker missing *** Warning -1038 in Frame::ParseTrailer, line 1085, file frame.cpp *** Reason is: missing an EOI marker at the end of the stream *** Warning -1038 in Image::ParseTrailer, line 1464, file image.cpp *** Reason is: expecting an EOI marker at the end of the stream [1] 4496 segmentation fault ./jpeg -oz -h -s 1x1,2x2,2x2 /dev/null ``` ## AddressSanitizer output ```bash File: major brand: mp42 minor version: 12a007e compatible brand: mp4 compatible brand: fast start: no Movie: duration: 90000 (media timescale units) duration: 1000 (ms) time scale: 90000 fragments: no Found 1 Tracks Track 1: flags: 7 ENABLED IN-MOVIE IN-PREVIEW id: 1 type: Unknown [vmde] duration: 1000 ms language: eng media: sample count: 60050 timescale: 12 duration: 12 (media timescale units) duration: 1000 (ms) ASAN:SIGSEGV ================================================================= ==14253==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004 (pc 0x0000004c3648 bp 0x7ffeebfc91f0 sp 0x7ffeebfc91d0 T0) #0 0x4c3647 in AP4_Stz2Atom::GetSampleSize(unsigned int, unsigned int&) /bigdata/AlphaFuzz-Experiment/programs/programs-build-asan/bento4/Source/C++/Core/Ap4Stz2Atom.cpp:208 #1 0x4fb16d in AP4_AtomSampleTable::GetSample(unsigned int, AP4_Sample&) /bigdata/AlphaFuzz-Experiment/programs/programs-build-asan/bento4/Source/C++/Core/Ap4AtomSampleTable.cpp:162 #2 0x4cf21c in AP4_Track::GetSample(unsigned int, AP4_Sample&) /bigdata/AlphaFuzz-Experiment/programs/programs-build-asan/bento4/Source/C++/Core/Ap4Track.cpp:437 #3 0x409aa3 in ScanMedia /bigdata/AlphaFuzz-Experiment/programs/programs-build-asan/bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1270 #4 0x40a169 in ShowTrackInfo_Text /bigdata/AlphaFuzz-Experiment/programs/programs-build-asan/bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1331 #5 0x40af2e in ShowTrackInfo /bigdata/AlphaFuzz-Experiment/programs/programs-build-asan/bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1475 #6 0x40b54a in ShowTracks /bigdata/AlphaFuzz-Experiment/programs/programs-build-asan/bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1586 #7 0x40ceee in main /bigdata/AlphaFuzz-Experiment/programs/programs-build-asan/bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1868 #8 0x7fee9b9a383f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f) #9 0x401b28 in _start (/bigdata/AlphaFuzz-Experiment/results/crashes/mp4info/mp4info-asan+0x401b28) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /bigdata/AlphaFuzz-Experiment/programs/programs-build-asan/bento4/Source/C++/Core/Ap4Stz2Atom.cpp:208 AP4_Stz2Atom::GetSampleSize(unsigned int, unsigned int&) ==14253==ABORTING ``` ## POC [SEGV_GetSampleSize_Ap4Stz2Atom208.zip](https://github.com/axiomatic-systems/Bento4/files/7274348/SEGV_GetSampleSize_Ap4Stz2Atom208.zip)
SEGV_GetSampleSize_Ap4Stz2Atom208
https://api.github.com/repos/axiomatic-systems/Bento4/issues/652/comments
0
2021-10-03T18:46:50Z
2022-05-01T21:24:16Z
https://github.com/axiomatic-systems/Bento4/issues/652
1,014,490,443
652
[ "axiomatic-systems", "Bento4" ]
## System info Ubuntu 16.04 xenial, gcc (Ubuntu 5.5.0-12ubuntu1), `mp4info` (latest master `5922ba7`) ## **Command line** `./mp4info @@ /dev/null` ## Output ```bash File: major brand: mp42 minor version: 12a007e compatible brand: mp4 compatible brand: fast start: no Movie: duration: 90000 (media timescale units) duration: 1000 (ms) time scale: 90000 fragments: no Found 1 Tracks Track 1: flags: 7 ENABLED IN-MOVIE IN-PREVIEW id: 1 type: Unknown [vmde] duration: 1000 ms language: eng media: sample count: 0 timescale: 12 duration: 12 (media timescale units) duration: 1000 (ms) bitrate (computed): 0.000 Kbps display width: 48.000000 display height: 144.000000 Segmentation fault ``` ## AddressSanitizer output ```bash File: major brand: mp42 minor version: 12a007e compatible brand: mp4 compatible brand: fast start: no Movie: duration: 90000 (media timescale units) duration: 1000 (ms) time scale: 90000 fragments: no Found 1 Tracks Track 1: flags: 7 ENABLED IN-MOVIE IN-PREVIEW id: 1 type: Unknown [vmde] duration: 1000 ms language: eng media: sample count: 0 timescale: 12 duration: 12 (media timescale units) duration: 1000 (ms) bitrate (computed): 0.000 Kbps display width: 48.000000 display height: 144.000000 ASAN:SIGSEGV ================================================================= ==73638==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000004c3253 bp 0x7fff388c7140 sp 0x7fff388c7110 T0) #0 0x4c3252 in AP4_Stz2Atom::WriteFields(AP4_ByteStream&) ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4Stz2Atom.cpp:162 #1 0x421101 in AP4_Atom::Write(AP4_ByteStream&) ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4Atom.cpp:229 #2 0x42174f in AP4_Atom::Clone() ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4Atom.cpp:316 #3 0x43d3af in AP4_ContainerAtom::Clone() ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4ContainerAtom.cpp:172 #4 0x49fffe in AP4_SampleDescription::AP4_SampleDescription(AP4_SampleDescription::Type, unsigned int, AP4_AtomParent*) ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4SampleDescription.cpp:135 #5 0x4a1806 in AP4_AvcSampleDescription::AP4_AvcSampleDescription(unsigned int, unsigned short, unsigned short, unsigned short, char const*, AP4_AtomParent*) ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4SampleDescription.cpp:382 #6 0x4ae9d8 in AP4_AvcSampleEntry::ToSampleDescription() ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4SampleEntry.cpp:1152 #7 0x4bde65 in AP4_StsdAtom::GetSampleDescription(unsigned int) ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4StsdAtom.cpp:181 #8 0x4fb602 in AP4_AtomSampleTable::GetSampleDescription(unsigned int) ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4AtomSampleTable.cpp:207 #9 0x4cf2ca in AP4_Track::GetSampleDescription(unsigned int) ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4Track.cpp:447 #10 0x40a464 in ShowTrackInfo_Text ../programs/programs-build-asan/bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1351 #11 0x40af2e in ShowTrackInfo ../programs/programs-build-asan/bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1475 #12 0x40b54a in ShowTracks ../programs/programs-build-asan/bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1586 #13 0x40ceee in main ../programs/programs-build-asan/bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1868 #14 0x7f8bdbe6383f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f) #15 0x401b28 in _start (../results/crashes/mp4info/mp4info-asan+0x401b28) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ../programs/programs-build-asan/bento4/Source/C++/Core/Ap4Stz2Atom.cpp:162 AP4_Stz2Atom::WriteFields(AP4_ByteStream&) ==73638==ABORTING ``` ## POC [SEGV_WriteFields_Ap4Stz2Atom162.zip](https://github.com/axiomatic-systems/Bento4/files/7274338/SEGV_WriteFields_Ap4Stz2Atom162.zip)
SEGV_WriteFields_Ap4Stz2Atom162
https://api.github.com/repos/axiomatic-systems/Bento4/issues/651/comments
0
2021-10-03T18:36:14Z
2021-10-03T18:36:14Z
https://github.com/axiomatic-systems/Bento4/issues/651
1,014,487,495
651
[ "axiomatic-systems", "Bento4" ]
Can you please help me in creating a low latency HLS playlist using bento4? does bento4 supports it? Thanks
hls low latency playlist
https://api.github.com/repos/axiomatic-systems/Bento4/issues/650/comments
0
2021-09-30T08:01:06Z
2021-09-30T08:01:06Z
https://github.com/axiomatic-systems/Bento4/issues/650
1,011,848,509
650
[ "axiomatic-systems", "Bento4" ]
I am trying to troubleshoot iOS device playback errors of long audio files (audiobooks) created using mp4hls. One thing that the unplayable titles have in common are segments that are many times longer than that requested by the --segment-duration flag. For example, using this command: ``` mp4hls --output-dir=<output-dir> --output-single-file --segment-duration 60 --encryption-key-format=com.apple.streamingkeydelivery --hls-version=5 --master-playlist-name=master.m3u8 --encryption-mode=SAMPLE-AES --encryption-key-uri=<uri> --encryption-key=<key> --encryption-iv-mode=fps --encryption-key-format-versions=1 sourcefile.m4a ``` results in a playlist that starts with: ``` #EXTM3U #EXT-X-VERSION:5 #EXT-X-PLAYLIST-TYPE:VOD #EXT-X-TARGETDURATION:307 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:307.581995, #EXT-X-BYTERANGE:384649@0 media.aac #EXTINF:307.581995, #EXT-X-BYTERANGE:173057@384649 media.aac #EXTINF:60.000363, #EXT-X-BYTERANGE:978495@557706 media.aac #EXTINF:60.000363, #EXT-X-BYTERANGE:977947@1536201 media.aac ... ``` I understand that actual segment duration may not match the `--segment-duration` value exactly, but this difference seems excessive. Do you have any insight as to why the first 2 segments have a duration of 307.581995? And why does that exceed the EXT-X-TARGETDURATION value?
mp4hls --segment-duration vs actual segment lengths
https://api.github.com/repos/axiomatic-systems/Bento4/issues/649/comments
1
2021-09-27T16:45:42Z
2021-10-21T01:52:25Z
https://github.com/axiomatic-systems/Bento4/issues/649
1,008,369,090
649
[ "axiomatic-systems", "Bento4" ]
Hi, i am helping the development of the Kodi media player (https://kodi.tv/) we have this library implemented by previous developers (no longer active) unfortunately we have little knowledge of this utility we have this repo (my fork where i am working) this is one of a Kodi main plugin that embed this library, where you can see ours bento4 patches: https://github.com/CastagnaIT/inputstream.adaptive/commits/bento4_update please take a look of commits from: `Add additional methods/funtions and passing poolid` to `Renamed wrong filenames` (second to last) only we are wondering if some of these changes can be included directly in upstream, some are specific to our project so I already know they will be skipped, but others are only additional methods and/or fixes please if you can provide me some opinions on this
Ask for info to propose to include some changes
https://api.github.com/repos/axiomatic-systems/Bento4/issues/648/comments
2
2021-09-21T14:54:32Z
2021-11-29T12:23:47Z
https://github.com/axiomatic-systems/Bento4/issues/648
1,002,650,109
648
[ "axiomatic-systems", "Bento4" ]
``` mp4edit.exe --replace TSCM:1.tscm 1.trec 2.trec mp4edit.exe --insert TSCM:1.tscm 1.trec 2.trec ``` Original file info ``` [ftyp] size=8+16 major_brand = mp42 minor_version = 0 compatible_brand = mp42 compatible_brand = isom [free] size=8+128 [mdat] size=16+8994395 [moov] size=8+2634 [mvhd] size=12+108, version=1 timescale = 1000 duration = 12366 duration(ms) = 12366 [iods] size=12+12 [InitialObjectDescriptor] size=5+7 id = 1 include inline profile level flag = 0 OD profile level = ff scene profile level = ff audio profile level = ff visual profile level = ff graphics profile level = ff [trak] size=8+2482 [tkhd] size=12+92, version=1, flags=1 enabled = 1 id = 1 duration = 12366 width = 2560.000000 height = 1440.000000 [mdia] size=8+2351 [mdhd] size=12+32, version=1 timescale = 30 duration = 371 duration(ms) = 12366 language = und [hdlr] size=12+21 handler_type = vide handler_name = [minf] size=8+2266 [vmhd] size=12+8, flags=1 graphics_mode = 0 op_color = 0000,0000,0000 [dinf] size=8+28 [dref] size=12+16 [url ] size=12+0, flags=1 location = [local to file] [stbl] size=8+2202 [stsd] size=12+134 entry_count = 1 [tsc2] size=8+122 data_reference_index = 1 [stts] size=12+364 entry_count = 45 [stsz] size=12+1376 sample_size = 0 sample_count = 342 [stsc] size=12+124 entry_count = 10 [co64] size=12+108 entry_count = 13 [stss] size=12+24 entry_count = 5 [udta] size=8+11 [name] size=8+3 [free] size=8+128 [TSCR] size=16+64 [TSCM] size=16+13124 ``` new file ``` [ftyp] size=8+16 major_brand = mp42 minor_version = 0 compatible_brand = mp42 compatible_brand = isom [free] size=8+128 [moov] size=8+2634 [mvhd] size=12+108, version=1 timescale = 1000 duration = 12366 duration(ms) = 12366 [iods] size=12+12 [InitialObjectDescriptor] size=5+7 id = 1 include inline profile level flag = 0 OD profile level = ff scene profile level = ff audio profile level = ff visual profile level = ff graphics profile level = ff [trak] size=8+2482 [tkhd] size=12+92, version=1, flags=1 enabled = 1 id = 1 duration = 12366 width = 2560.000000 height = 1440.000000 [mdia] size=8+2351 [mdhd] size=12+32, version=1 timescale = 30 duration = 371 duration(ms) = 12366 language = und [hdlr] size=12+21 handler_type = vide handler_name = [minf] size=8+2266 [vmhd] size=12+8, flags=1 graphics_mode = 0 op_color = 0000,0000,0000 [dinf] size=8+28 [dref] size=12+16 [url ] size=12+0, flags=1 location = [local to file] [stbl] size=8+2202 [stsd] size=12+134 entry_count = 1 [tsc2] size=8+122 data_reference_index = 1 [stts] size=12+364 entry_count = 45 [stsz] size=12+1376 sample_size = 0 sample_count = 342 [stsc] size=12+124 entry_count = 10 [co64] size=12+108 entry_count = 13 [stss] size=12+24 entry_count = 5 [udta] size=8+11 [name] size=8+3 [free] size=8+128 [TSCR] size=16+64 ```
It destroys the original structure and does not add custom box
https://api.github.com/repos/axiomatic-systems/Bento4/issues/647/comments
1
2021-08-30T02:22:24Z
2022-07-09T12:01:48Z
https://github.com/axiomatic-systems/Bento4/issues/647
982,308,744
647