diff mbox series

[FFmpeg-devel,OSS-Fuzz] Have you considered enabling memory sanitizer?

Message ID CABPLASRrX4VvgfYfui=MxiGkg7DQYOSf-UecMjuC8nmqAr3utg@mail.gmail.com
State New
Headers show
Series [FFmpeg-devel,OSS-Fuzz] Have you considered enabling memory sanitizer? | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/configure_x86 warning Failed to apply patch

Commit Message

Kacper Michajlow June 26, 2024, 7:07 p.m. UTC
Hi,

Like in the topic. I think it would be useful to enable MSAN on
OSS-Fuzz. We get some tiny issues and it would be probably good to
have them tracked upstream. All infra is here, so enabling it is as
simple as adding it to the project.yaml. Except libbz2.so and libz.so
would have to be built inline instead, looking at the build.sh, they
are prebuilt. The rest should just work (TM), but needs to be tested.
You can set an "experimental' flag to have it not create issues on
monorail, initially.

Thanks,
Kacper

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Comments

Michael Niedermayer June 26, 2024, 10:45 p.m. UTC | #1
On Wed, Jun 26, 2024 at 09:07:42PM +0200, Kacper Michajlow wrote:
> Hi,
> 
> Like in the topic. I think it would be useful to enable MSAN on
> OSS-Fuzz. We get some tiny issues and it would be probably good to
> have them tracked upstream. All infra is here, so enabling it is as
> simple as adding it to the project.yaml. Except libbz2.so and libz.so
> would have to be built inline instead, looking at the build.sh, they
> are prebuilt. The rest should just work (TM), but needs to be tested.
> You can set an "experimental' flag to have it not create issues on
> monorail, initially.

I assumed ossfuzz would enable all sanitizers by default

If msan has been tested and if it works and the whole behaves sanely,
it should obviously be enabled

thx

[...]
Kacper Michajlow June 27, 2024, 12:50 a.m. UTC | #2
On Thu, 27 Jun 2024 at 00:45, Michael Niedermayer
<michael@niedermayer.cc> wrote:
>
> On Wed, Jun 26, 2024 at 09:07:42PM +0200, Kacper Michajlow wrote:
> > Hi,
> >
> > Like in the topic. I think it would be useful to enable MSAN on
> > OSS-Fuzz. We get some tiny issues and it would be probably good to
> > have them tracked upstream. All infra is here, so enabling it is as
> > simple as adding it to the project.yaml. Except libbz2.so and libz.so
> > would have to be built inline instead, looking at the build.sh, they
> > are prebuilt. The rest should just work (TM), but needs to be tested.
> > You can set an "experimental' flag to have it not create issues on
> > monorail, initially.
>
> I assumed ossfuzz would enable all sanitizers by default

They do not do that by default, because MSAN requires all dependencies
to be instrumented too. See
https://google.github.io/oss-fuzz/getting-started/new-project-guide/#sanitizers

Looking at build.sh for ffmpeg, it should be fine to enable it.
Obviously I have not tested everything, but I was running some tests
locally with MSAN and also tested it with mpv oss-fuzz builds where we
build ffmpeg too with MSAN.

- Kacper
diff mbox series

Patch

diff --git a/projects/ffmpeg/project.yaml b/projects/ffmpeg/project.yaml
index fe510402f..7aba17cc5 100644
--- a/projects/ffmpeg/project.yaml
+++ b/projects/ffmpeg/project.yaml
@@ -12,6 +12,10 @@  auto_ccs:
- "twsmith@mozilla.com"
- "kempfjb@gmail.com"
- "jordyzomer@google.com"
+sanitizers:
+ - address
+ - memory
+ - undefined
fuzzing_engines:
- afl
- honggfuzz
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel