Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions projects/assimp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,51 @@ if [ -d "../test/models/STL" ]; then
(cd ../test/models/STL && zip -q -r $OUT/assimp_fuzzer_stl_seed_corpus.zip .)
fi
cp ../fuzz/assimp_fuzzer.dict $OUT/assimp_fuzzer_stl.dict || true


# 8. 3DS Fuzzer
build_fuzzer "assimp_fuzzer_3ds" "../fuzz/assimp_fuzzer_3ds.cc"
if [ -d "../test/models/3DS" ]; then
(cd ../test/models/3DS && zip -q -r $OUT/assimp_fuzzer_3ds_seed_corpus.zip .)
fi
cp ../fuzz/assimp_fuzzer.dict $OUT/assimp_fuzzer_3ds.dict || true


# 9. 3MF Fuzzer
build_fuzzer "assimp_fuzzer_3mf" "../fuzz/assimp_fuzzer_3mf.cc"
if [ -d "../test/models/3MF" ]; then
(cd ../test/models/3MF && zip -q -r $OUT/assimp_fuzzer_3mf_seed_corpus.zip .)
fi
cp ../fuzz/assimp_fuzzer.dict $OUT/assimp_fuzzer_3mf.dict || true


# 10. AMF Fuzzer
build_fuzzer "assimp_fuzzer_amf" "../fuzz/assimp_fuzzer_amf.cc"
if [ -d "../test/models/AMF" ]; then
(cd ../test/models/AMF && zip -q -r $OUT/assimp_fuzzer_amf_seed_corpus.zip .)
fi
cp ../fuzz/assimp_fuzzer.dict $OUT/assimp_fuzzer_amf.dict || true


# 11. ASE Fuzzer
build_fuzzer "assimp_fuzzer_ase" "../fuzz/assimp_fuzzer_ase.cc"
if [ -d "../test/models/ASE" ]; then
(cd ../test/models/ASE && zip -q -r $OUT/assimp_fuzzer_ase_seed_corpus.zip .)
fi
cp ../fuzz/assimp_fuzzer.dict $OUT/assimp_fuzzer_ase.dict || true


# 12. BLEND Fuzzer
build_fuzzer "assimp_fuzzer_blend" "../fuzz/assimp_fuzzer_blend.cc"
if [ -d "../test/models/BLEND" ]; then
(cd ../test/models/BLEND && zip -q -r $OUT/assimp_fuzzer_blend_seed_corpus.zip .)
fi
cp ../fuzz/assimp_fuzzer.dict $OUT/assimp_fuzzer_blend.dict || true


# 13. IFC Fuzzer
build_fuzzer "assimp_fuzzer_ifc" "../fuzz/assimp_fuzzer_ifc.cc"
if [ -d "../test/models/IFC" ]; then
(cd ../test/models/IFC && zip -q -r $OUT/assimp_fuzzer_ifc_seed_corpus.zip .)
fi
cp ../fuzz/assimp_fuzzer.dict $OUT/assimp_fuzzer_ifc.dict || true
2 changes: 1 addition & 1 deletion projects/vlc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

FROM gcr.io/oss-fuzz-base/base-builder:ubuntu-24-04
RUN apt-get update && apt-get install -y make autoconf automake libtool \
pkg-config cmake flex bison gettext libglu1-mesa-dev ninja-build \
pkg-config cmake flex bison gettext autopoint gperf libglu1-mesa-dev ninja-build \
python3-pip nasm yasm
RUN pip3 install meson
RUN git clone --depth 1 https://code.videolan.org/videolan/vlc.git vlc
Expand Down
26 changes: 24 additions & 2 deletions projects/vlc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ sed -i 's|LDFLAGS="$(VPX_LDFLAGS)" CROSS=$(VPX_CROSS)|LDFLAGS="$(VPX_LDFLAGS)" L
make V=1 -j$(nproc) \
.flac \
.libxml2 \
.ffmpeg
.ffmpeg \
.freetype2 \
.fribidi \
.harfbuzz \
.fontconfig
# libass's dependency chain (freetype2/fribidi/harfbuzz/fontconfig) is built
# here, uninstrumented: fribidi/fontconfig compile build-time codegen tools
# (e.g. gen-unicode-version) that fail to link under -fsanitize=fuzzer when the
# sanitizer runtime isn't pulled in. Only libass itself (.ass) is built with
# instrumentation below, since the SSA/ASS parser is the actual fuzz target.

cd ../../

Expand Down Expand Up @@ -78,7 +87,20 @@ make V=1 -j$(nproc) \
.vorbis \
.speex \
.speexdsp \
.dvbpsi
.dvbpsi \
.modplug \
.faad2 \
.jpeg \
.png \
.ass \
.kate

# libgme's CMake compiles with -fno-rtti, which is incompatible with the
# -fsanitize=vptr check implied by SANITIZER=undefined ("invalid argument
# '-fsanitize=vptr' not allowed with '-fno-rtti'"). Build it with that single
# UBSan sub-check disabled; this is a no-op under the address sanitizer.
CFLAGS="$CFLAGS -fno-sanitize=vptr" CXXFLAGS="$CXXFLAGS -fno-sanitize=vptr" \
make V=1 -j$(nproc) .gme
cd ../../

# Use OSS-Fuzz environment rather than hardcoded setup.
Expand Down
34 changes: 24 additions & 10 deletions projects/vlc/fuzzing-modules.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/test/Makefile.am b/test/Makefile.am
index 7eb4ab5..cdbd28a 100644
index 613cfab..e977d39 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -480,8 +480,18 @@ libvlc_demux_run_la_LIBADD += \
@@ -495,8 +495,20 @@ libvlc_demux_run_la_LIBADD += \
../modules/libpacketizer_mpegaudio_plugin.la \
../modules/libpacketizer_mpegvideo_plugin.la \
../modules/libpacketizer_vc1_plugin.la \
Expand All @@ -18,10 +18,12 @@ index 7eb4ab5..cdbd28a 100644
+ ../modules/libdemux_stl_plugin.la \
+ ../modules/libhx_plugin.la \
+ ../modules/libdmxmus_plugin.la \
+ ../modules/libmod_plugin.la \
+ ../modules/libgme_plugin.la \
../modules/libfilesystem_plugin.la \
../modules/libxml_plugin.la \
../modules/libogg_plugin.la \
@@ -522,13 +532,28 @@ libvlc_demux_dec_run_la_LIBADD += \
@@ -537,13 +549,33 @@ libvlc_demux_dec_run_la_LIBADD += \
../modules/libsubsusf_plugin.la \
../modules/libsvcdsub_plugin.la \
../modules/libtextst_plugin.la \
Expand All @@ -37,7 +39,12 @@ index 7eb4ab5..cdbd28a 100644
+ ../modules/libdav1d_plugin.la \
+ ../modules/libvpx_plugin.la \
+ ../modules/libmpg123_plugin.la \
+ ../modules/liboggspots_plugin.la
+ ../modules/liboggspots_plugin.la \
+ ../modules/libfaad_plugin.la \
+ ../modules/libjpeg_plugin.la \
+ ../modules/libpng_plugin.la \
+ ../modules/liblibass_plugin.la \
+ ../modules/libkate_plugin.la
if HAVE_ZVBI
libvlc_demux_dec_run_la_LIBADD += ../modules/libzvbi_plugin.la
endif
Expand All @@ -50,12 +57,12 @@ index 7eb4ab5..cdbd28a 100644
+endif
endif
EXTRA_LTLIBRARIES += libvlc_demux_dec_run.la

diff --git a/test/src/input/demux-run.c b/test/src/input/demux-run.c
index c71afa2..c4c2ebd 100644
index 92a5d92..1486f79 100644
--- a/test/src/input/demux-run.c
+++ b/test/src/input/demux-run.c
@@ -417,7 +417,18 @@ int vlc_demux_process_memory(const struct vlc_run_args *args,
@@ -417,7 +417,23 @@ int vlc_demux_process_memory(const struct vlc_run_args *args,
f(codec_subsusf) \
f(codec_svcdsub) \
f(codec_textst) \
Expand All @@ -71,11 +78,16 @@ index c71afa2..c4c2ebd 100644
+ f(codec_dav1d) \
+ f(codec_vpx) \
+ f(codec_mpg123) \
+ f(codec_oggspots)
+ f(codec_oggspots) \
+ f(codec_faad) \
+ f(codec_jpeg) \
+ f(codec_png) \
+ f(codec_ass) \
+ f(codec_kate)
#else
#define DECODER_PLUGINS(f)
#endif
@@ -464,11 +477,29 @@ int vlc_demux_process_memory(const struct vlc_run_args *args,
@@ -464,11 +480,31 @@ int vlc_demux_process_memory(const struct vlc_run_args *args,
f(packetizer_mpegaudio) \
f(packetizer_mpegvideo) \
f(packetizer_vc1) \
Expand All @@ -92,10 +104,12 @@ index c71afa2..c4c2ebd 100644
+ f(demux_demux_stl) \
+ f(demux_hx) \
+ f(demux_dmxmus) \
+ f(demux_mod) \
+ f(demux_gme) \
f(demux_ogg) \
+ PLUGIN_AVCODEC(f) \
DECODER_PLUGINS(f)

+#ifdef HAVE_AVCODEC
+# define PLUGIN_AVCODEC(f) f(codec_avcodec_avcodec)
+#else
Expand Down
Loading
Loading