Skip to content

UBSan: null pointer passed as argument in dav1d_apply_grain_10bpc() src/film_grain_tmpl.c

Reproduced with commit 82404efb

Steps to reproduce:

  1. build with undefined behavior sanitizer (-fsanitize=undefined)
  2. replay testcase with ./dav1d_fuzzer testcase.ivf

testcase.ivf

src/film_grain_tmpl.c:528:20: runtime error: null pointer passed as argument 1, which is declared to never be null
/usr/include/string.h:43:28: note: nonnull attribute specified here
    #0 0x832db3 in dav1d_apply_grain_10bpc src/film_grain_tmpl.c:528:13
    #1 0x52f32d in output_image src/lib.c:202:9
    #2 0x52ec3e in dav1d_get_picture src/lib.c
    #3 0x526792 in LLVMFuzzerTestOneInput tests/libfuzzer/dav1d_fuzzer.c:117:19
    #4 0x52719a in main tests/libfuzzer/main.c:116:13
    #5 0x7fb192c9ab96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
    #6 0x41aa19 in _start (dav1d_fuzzer+0x41aa19)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information