Skip to content

[oss-fuzz 42538403] Direct Leak in vlc_frame_Alloc (from ps.c)

Ref: https://oss-fuzz.com/testcase-detail/4889764220698624

xeon ~/work/git/vlc/build-asan $ ./test/vlc-demux-dec-run /home/tom/Downloads/clusterfuzz-testcase-minimized-vlc-demux-dec-libfuzzer-4889764220698624 

=================================================================
==2952557==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x7fee624f4c77 in malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7fee61ff5e3b in vlc_frame_New ../../src/misc/frame.c:81
    #2 0x7fee61ff5f00 in vlc_frame_heap_Alloc ../../src/misc/frame.c:277
    #3 0x7fee61ff5f65 in vlc_frame_Alloc ../../src/misc/frame.c:139
    #4 0x7fee61f879b8 in vlc_stream_Block ../../src/input/stream.c:932
    #5 0x7fee5becbc5f in ps_pkt_read ../../modules/demux/mpeg/ps.c:955
    #6 0x7fee5becc85b in Demux ../../modules/demux/mpeg/ps.c:468
    #7 0x7fee61f19c45 in demux_Demux ../../src/input/demux.c:223
    #8 0x55ec204513a9 in demux_process_stream ../../test/src/input/demux-run.c:306
    #9 0x55ec20451668 in vlc_demux_process_url ../../test/src/input/demux-run.c:348
    #10 0x55ec20451707 in vlc_demux_process_path ../../test/src/input/demux-run.c:362
    #11 0x55ec20450559 in main ../../test/vlc-demux-run.c:50
    #12 0x7fee61bdcd67 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Indirect leak of 8320 byte(s) in 1 object(s) allocated from:
    #0 0x7fee624f40d8 in aligned_alloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:113
    #1 0x7fee61ff5f4e in vlc_frame_Alloc ../../src/misc/frame.c:131
    #2 0x7fee61f879b8 in vlc_stream_Block ../../src/input/stream.c:932
    #3 0x7fee5becbc5f in ps_pkt_read ../../modules/demux/mpeg/ps.c:955
    #4 0x7fee5becc85b in Demux ../../modules/demux/mpeg/ps.c:468
    #5 0x7fee61f19c45 in demux_Demux ../../src/input/demux.c:223
    #6 0x55ec204513a9 in demux_process_stream ../../test/src/input/demux-run.c:306
    #7 0x55ec20451668 in vlc_demux_process_url ../../test/src/input/demux-run.c:348
    #8 0x55ec20451707 in vlc_demux_process_path ../../test/src/input/demux-run.c:362
    #9 0x55ec20450559 in main ../../test/vlc-demux-run.c:50
    #10 0x7fee61bdcd67 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: 8408 byte(s) leaked in 2 allocation(s).

Sample: clusterfuzz-testcase-minimized-vlc-demux-dec-libfuzzer-4889764220698624

Edited by Thomas Guillem
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information