Open
Conversation
vgmstream is a C library for decoding ~447 streamed audio formats used in video games. Each demuxer in src/meta/* is an independent format parser that consumes attacker-controlled bytes from a file. This adds a single libFuzzer harness that exercises the full demuxer dispatch table via init_vgmstream(), a 160-entry dictionary biased toward Sony PS BNK headers, and a build-time seed corpus generator. Sanitizers: ASan + UBSan. Engines: libFuzzer, AFL, honggfuzz.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Sheri98 is integrating a new project: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is vgmstream
vgmstream is a C/C++ library for decoding ~447 streamed audio formats used in video games. It is the back end for the foobar2000 vgmstream component, the audacious plugin, the XMPlay plugin, and the standalone
vgmstream-cliandvgmstream123tools. Each demuxer insrc/meta/*is an independent format parser that consumes untrusted bytes from a file.Why fuzz vgmstream
init_vgmstream).SECURITY.mdthat invites private vulnerability reports.Coverage
Measured with
llvm-cov(clang-18, ASan + libFuzzer instrumentation, 320-file mutated corpus from a 60-minute campaign):src/meta/(parser surface)The harness enters 50% of all parser functions in
src/meta/from a single dispatch call. Line coverage is moderate because each parser bails early on unrecognized magic bytes. Sustained fuzzing on OSS-Fuzz infrastructure will drive depth significantly as the corpus evolves to bypass those initial checks.What this PR adds
Harness design
vgmstream_fuzz_bnk.cwrites the fuzzer-supplied buffer to a tmp file in/dev/shm, callsinit_vgmstream(), and frees.init_vgmstream()walks the full demuxer dispatch table internally, so a single harness exercises every parser in the library. Per-iteration cost is one mkstemp + one tmpfs write + one dispatch + one close + one unlink. No real disk I/O.The
_bnksuffix reflects the seed corpus and dictionary bias toward Sony PS BNK headers (the format family with the highest manually-verified bug density). The harness itself is format-agnostic.Sanitizer config
Initial PR ships with ASan + UBSan. MSan is held back because vgmstream depends on uninstrumented libc calls (
fread,memcpy,iconv). Happy to add it in a follow-up if preferred.Optional codec backends
The build deliberately disables libmpg123 / libvorbis / FFmpeg / libg7221 / libg719 / libcelt / libspeex / libatrac9. The parser surface in
src/meta/*is fully reachable without them. Re-enabling them is a one-linebuild.shchange for a follow-up PR.Author
shravankumarsheri39@gmail.com