[oss-fuzz 42538541] Direct-leak in vlc_frame_Alloc (from svcdsub.c)
Ref:
- https://oss-fuzz.com/testcase-detail/6164916388560896
- https://oss-fuzz.com/testcase-detail/5671566313062400
xeon ~/work/git/vlc/build-asan $ ./test/vlc-demux-dec-run /home/tom/Downloads/clusterfuzz-testcase-minimized-vlc-demux-dec-libfuzzer-6164916388560896
=================================================================
==2924461==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 88 byte(s) in 1 object(s) allocated from:
#0 0x7f40178f4c77 in malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f40175f5e3b in vlc_frame_New ../../src/misc/frame.c:81
#2 0x7f40175f5f00 in vlc_frame_heap_Alloc ../../src/misc/frame.c:277
#3 0x7f40175f5f65 in vlc_frame_Alloc ../../src/misc/frame.c:139
#4 0x7f400a59c0c2 in vlc_frame_ChainGather ../../include/vlc_frame.h:563
#5 0x7f400a59c6fe in Reassemble ../../modules/codec/svcdsub.c:304
#6 0x7f400a59c953 in Packetize ../../modules/codec/svcdsub.c:197
#7 0x55f8fdf031cb in test_decoder_process ../../test/src/input/decoder.c:231
#8 0x55f8fdf01b70 in EsOutSend ../../test/src/input/demux-run.c:112
#9 0x7f401132a1b9 in es_out_Send ../../include/vlc_es_out.h:155
#10 0x7f401132a1b9 in Demux ../../modules/demux/mpeg/ps.c:686
#11 0x7f4017519c45 in demux_Demux ../../src/input/demux.c:223
#12 0x55f8fdf023a9 in demux_process_stream ../../test/src/input/demux-run.c:306
#13 0x55f8fdf02668 in vlc_demux_process_url ../../test/src/input/demux-run.c:348
#14 0x55f8fdf02707 in vlc_demux_process_path ../../test/src/input/demux-run.c:362
#15 0x55f8fdf01559 in main ../../test/vlc-demux-run.c:50
#16 0x7f401714dd67 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
Indirect leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x7f40178f40d8 in aligned_alloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:113
#1 0x7f40175f5f4e in vlc_frame_Alloc ../../src/misc/frame.c:131
#2 0x7f400a59c0c2 in vlc_frame_ChainGather ../../include/vlc_frame.h:563
#3 0x7f400a59c6fe in Reassemble ../../modules/codec/svcdsub.c:304
#4 0x7f400a59c953 in Packetize ../../modules/codec/svcdsub.c:197
#5 0x55f8fdf031cb in test_decoder_process ../../test/src/input/decoder.c:231
#6 0x55f8fdf01b70 in EsOutSend ../../test/src/input/demux-run.c:112
#7 0x7f401132a1b9 in es_out_Send ../../include/vlc_es_out.h:155
#8 0x7f401132a1b9 in Demux ../../modules/demux/mpeg/ps.c:686
#9 0x7f4017519c45 in demux_Demux ../../src/input/demux.c:223
#10 0x55f8fdf023a9 in demux_process_stream ../../test/src/input/demux-run.c:306
#11 0x55f8fdf02668 in vlc_demux_process_url ../../test/src/input/demux-run.c:348
#12 0x55f8fdf02707 in vlc_demux_process_path ../../test/src/input/demux-run.c:362
#13 0x55f8fdf01559 in main ../../test/vlc-demux-run.c:50
#14 0x7f401714dd67 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
SUMMARY: AddressSanitizer: 216 byte(s) leaked in 2 allocation(s).
Sample: clusterfuzz-testcase-minimized-vlc-demux-dec-libfuzzer-6164916388560896