[oss-fuzz 5562516509097984] leak in subsvtt.c
Ref.:
- https://oss-fuzz.com/testcase-detail/5562516509097984
- https://oss-fuzz.com/testcase-detail/6555504807837696 (similar leaks and a few more)
=================================================================
==402==ERROR: LeakSanitizer: detected memory leaks
Indirect leak of 80 byte(s) in 1 object(s) allocated from:
#0 0x5988d6c853d9 in __interceptor_calloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:74:3
#1 0x5988d7299072 in text_style_Create /src/vlc/src/misc/text_style.c:215:29
#2 0x5988d6e573dd in ApplyCSSRules /src/vlc/modules/codec/webvtt/subsvtt.c:1772:31
#3 0x5988d6e573dd in RenderRegions /src/vlc/modules/codec/webvtt/subsvtt.c:1794:5
#4 0x5988d6e55e15 in Render /src/vlc/modules/codec/webvtt/subsvtt.c:1951:9
#5 0x5988d6e55e15 in DecodeBlock /src/vlc/modules/codec/webvtt/subsvtt.c:2169:5
#6 0x5988d6ccbeb0 in test_decoder_process /src/vlc/test/src/input/decoder.c:253:23
#7 0x5988d6cca353 in EsOutSend /src/vlc/test/src/input/demux-run.c:115:9
#8 0x5988d6e47f39 in es_out_Send /src/vlc/include/vlc_es_out.h:157:12
#9 0x5988d6e47f39 in Demux /src/vlc/modules/demux/webvtt.c:584:13
#10 0x5988d6cc99fb in demux_process_stream /src/vlc/test/src/input/demux-run.c:312:19
#11 0x5988d6cc90ef in LLVMFuzzerTestOneInput /src/vlc/test/vlc-demux-libfuzzer.c:63:5
#12 0x5988d6b668bd in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:619:13
#13 0x5988d6b51632 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:329:6
#14 0x5988d6b57500 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:865:9
#15 0x5988d6b83032 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
#16 0x7f632e508082 in __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/libc-start.c:308:16
Indirect leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x5988d6c853d9 in __interceptor_calloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:74:3
#1 0x5988d6e5455e in webvtt_dom_tag_New /src/vlc/modules/codec/webvtt/subsvtt.c:520:32
#2 0x5988d6e5455e in CreateDomNodes /src/vlc/modules/codec/webvtt/subsvtt.c:1287:44
#3 0x5988d6e5455e in ProcessCue /src/vlc/modules/codec/webvtt/subsvtt.c:1354:22
#4 0x5988d6e5455e in ProcessISOBMFF /src/vlc/modules/codec/webvtt/subsvtt.c:1993:29
#5 0x5988d6e5455e in DecodeBlock /src/vlc/modules/codec/webvtt/subsvtt.c:2166:5
#6 0x5988d6ccbeb0 in test_decoder_process /src/vlc/test/src/input/decoder.c:253:23
#7 0x5988d6cca353 in EsOutSend /src/vlc/test/src/input/demux-run.c:115:9
#8 0x5988d6e47f39 in es_out_Send /src/vlc/include/vlc_es_out.h:157:12
#9 0x5988d6e47f39 in Demux /src/vlc/modules/demux/webvtt.c:584:13
#10 0x5988d6cc99fb in demux_process_stream /src/vlc/test/src/input/demux-run.c:312:19
#11 0x5988d6cc90ef in LLVMFuzzerTestOneInput /src/vlc/test/vlc-demux-libfuzzer.c:63:5
#12 0x5988d6b668bd in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:619:13
#13 0x5988d6b51632 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:329:6
#14 0x5988d6b57500 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:865:9
#15 0x5988d6b83032 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
#16 0x7f632e508082 in __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/libc-start.c:308:16
Indirect leak of 32 byte(s) in 1 object(s) allocated from:
#0 0x5988d6c853d9 in __interceptor_calloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:74:3
#1 0x5988d6e54230 in webvtt_dom_text_New /src/vlc/modules/codec/webvtt/subsvtt.c:509:33
#2 0x5988d6e54230 in CreateDomNodes /src/vlc/modules/codec/webvtt/subsvtt.c:1334:41
#3 0x5988d6e54230 in ProcessCue /src/vlc/modules/codec/webvtt/subsvtt.c:1354:22
#4 0x5988d6e54230 in ProcessISOBMFF /src/vlc/modules/codec/webvtt/subsvtt.c:1993:29
#5 0x5988d6e54230 in DecodeBlock /src/vlc/modules/codec/webvtt/subsvtt.c:2166:5
#6 0x5988d6ccbeb0 in test_decoder_process /src/vlc/test/src/input/decoder.c:253:23
#7 0x5988d6cca353 in EsOutSend /src/vlc/test/src/input/demux-run.c:115:9
#8 0x5988d6e47f39 in es_out_Send /src/vlc/include/vlc_es_out.h:157:12
#9 0x5988d6e47f39 in Demux /src/vlc/modules/demux/webvtt.c:584:13
#10 0x5988d6cc99fb in demux_process_stream /src/vlc/test/src/input/demux-run.c:312:19
#11 0x5988d6cc90ef in LLVMFuzzerTestOneInput /src/vlc/test/vlc-demux-libfuzzer.c:63:5
#12 0x5988d6b668bd in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:619:13
#13 0x5988d6b51632 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:329:6
#14 0x5988d6b57500 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:865:9
#15 0x5988d6b83032 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
#16 0x7f632e508082 in __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/libc-start.c:308:16
Indirect leak of 6 byte(s) in 1 object(s) allocated from:
#0 0x5988d6c85214 in __interceptor_malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:67:3
#1 0x5988d6bfbedc in ___interceptor_strndup /src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:450:3
#2 0x5988d6e54b1d in NDuplicateUnescaped /src/vlc/modules/codec/webvtt/subsvtt.c:1246:15
#3 0x5988d6e54b1d in CreateDomNodes /src/vlc/modules/codec/webvtt/subsvtt.c:1295:45
#4 0x5988d6e54b1d in ProcessCue /src/vlc/modules/codec/webvtt/subsvtt.c:1354:22
#5 0x5988d6e54b1d in ProcessISOBMFF /src/vlc/modules/codec/webvtt/subsvtt.c:1993:29
#6 0x5988d6e54b1d in DecodeBlock /src/vlc/modules/codec/webvtt/subsvtt.c:2166:5
#7 0x5988d6ccbeb0 in test_decoder_process /src/vlc/test/src/input/decoder.c:253:23
#8 0x5988d6cca353 in EsOutSend /src/vlc/test/src/input/demux-run.c:115:9
#9 0x5988d6e47f39 in es_out_Send /src/vlc/include/vlc_es_out.h:157:12
#10 0x5988d6e47f39 in Demux /src/vlc/modules/demux/webvtt.c:584:13
#11 0x5988d6cc99fb in demux_process_stream /src/vlc/test/src/input/demux-run.c:312:19
#12 0x5988d6cc90ef in LLVMFuzzerTestOneInput /src/vlc/test/vlc-demux-libfuzzer.c:63:5
#13 0x5988d6b668bd in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:619:13
#14 0x5988d6b51632 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:329:6
#15 0x5988d6b57500 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:865:9
#16 0x5988d6b83032 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
#17 0x7f632e508082 in __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/libc-start.c:308:16
Indirect leak of 2 byte(s) in 1 object(s) allocated from:
#0 0x5988d6c6b89a in __interceptor_strdup /src/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:596:3
#1 0x5988d6e54290 in DuplicateUnescaped /src/vlc/modules/codec/webvtt/subsvtt.c:1238:15
#2 0x5988d6e54290 in CreateDomNodes /src/vlc/modules/codec/webvtt/subsvtt.c:1337:36
#3 0x5988d6e54290 in ProcessCue /src/vlc/modules/codec/webvtt/subsvtt.c:1354:22
#4 0x5988d6e54290 in ProcessISOBMFF /src/vlc/modules/codec/webvtt/subsvtt.c:1993:29
#5 0x5988d6e54290 in DecodeBlock /src/vlc/modules/codec/webvtt/subsvtt.c:2166:5
#6 0x5988d6ccbeb0 in test_decoder_process /src/vlc/test/src/input/decoder.c:253:23
#7 0x5988d6cca353 in EsOutSend /src/vlc/test/src/input/demux-run.c:115:9
#8 0x5988d6e47f39 in es_out_Send /src/vlc/include/vlc_es_out.h:157:12
#9 0x5988d6e47f39 in Demux /src/vlc/modules/demux/webvtt.c:584:13
#10 0x5988d6cc99fb in demux_process_stream /src/vlc/test/src/input/demux-run.c:312:19
#11 0x5988d6cc90ef in LLVMFuzzerTestOneInput /src/vlc/test/vlc-demux-libfuzzer.c:63:5
#12 0x5988d6b668bd in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:619:13
#13 0x5988d6b51632 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:329:6
#14 0x5988d6b57500 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:865:9
#15 0x5988d6b83032 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
#16 0x7f632e508082 in __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/libc-start.c:308:16
Indirect leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x5988d6c85214 in __interceptor_malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:67:3
#1 0x5988d6bfbedc in ___interceptor_strndup /src/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:450:3
#2 0x5988d6e54acc in NDuplicateUnescaped /src/vlc/modules/codec/webvtt/subsvtt.c:1246:15
#3 0x5988d6e54acc in CreateDomNodes /src/vlc/modules/codec/webvtt/subsvtt.c:1293:39
#4 0x5988d6e54acc in ProcessCue /src/vlc/modules/codec/webvtt/subsvtt.c:1354:22
#5 0x5988d6e54acc in ProcessISOBMFF /src/vlc/modules/codec/webvtt/subsvtt.c:1993:29
#6 0x5988d6e54acc in DecodeBlock /src/vlc/modules/codec/webvtt/subsvtt.c:2166:5
#7 0x5988d6ccbeb0 in test_decoder_process /src/vlc/test/src/input/decoder.c:253:23
#8 0x5988d6cca353 in EsOutSend /src/vlc/test/src/input/demux-run.c:115:9
#9 0x5988d6e47f39 in es_out_Send /src/vlc/include/vlc_es_out.h:157:12
#10 0x5988d6e47f39 in Demux /src/vlc/modules/demux/webvtt.c:584:13
#11 0x5988d6cc99fb in demux_process_stream /src/vlc/test/src/input/demux-run.c:312:19
#12 0x5988d6cc90ef in LLVMFuzzerTestOneInput /src/vlc/test/vlc-demux-libfuzzer.c:63:5
#13 0x5988d6b668bd in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:619:13
#14 0x5988d6b51632 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:329:6
#15 0x5988d6b57500 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:865:9
#16 0x5988d6b83032 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
#17 0x7f632e508082 in __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/libc-start.c:308:16
SUMMARY: AddressSanitizer: 185 byte(s) leaked in 6 allocation(s).
Samples:
Edited by Steve Lhomme