test(decompiler): Rec 34 #34-9 — fuzz_ipc_schema harness for the FlatBuffers IPC decoders#227
Merged
Merged
Conversation
…IPC decoders (#34-9) With the worker-side codecs complete (#34-4..#34-6), add a libFuzzer harness in cpp/fuzz/ that exercises the schema decode contract. It feeds one fuzzer buffer to every decode_*_request / decode_*_response across the four codec headers (request, response, lifecycle, config) and relies on the verify-before-read property: any input — null, garbage, or truncated — must return false rather than read out of bounds or trip a sanitizer. Header-only: the codecs are inline over the vendored FlatBuffers runtime, so the target links no decompiler object files. Makefile.fuzz gains a FLATBUF_INCLUDE path and the fuzz_ipc_schema rule; the fuzz README and docs/security/OSS_FUZZ.md harness + seed tables gain its row. This is the in-tree continuation of Rec 13's fuzz set. The OSS-Fuzz upstream submission was rejected (google/oss-fuzz#15545: forks of Ghidra are not a structural fit), so the harness stands on its own and runs locally / via our own CI rather than OSS-Fuzz. Validated locally against 200k+ malformed inputs (empty, all single bytes, OOB root offset, truncation ramps, random buffers) under g++ -fsanitize=address,undefined with zero findings. clang/libFuzzer is absent on the build box, so the committed target builds under Makefile.fuzz with clang; the source compiles clean under g++ (full object codegen). Test-only and inert, like the rest of #34-4..#34-6: nothing in the production decompiler links the harness. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Closes #226.
With the worker-side schema codecs complete (
#34-4..#34-6), the v1 IPCdecoders are the new attacker-facing parse surface — the FlatBuffers replacement
for the marshal/XML parsers that
fuzz_marshal/fuzz_xmlalready cover. Thisadds the in-tree libFuzzer harness for them (Rec 13 fuzz set).
What it does.
fuzz_ipc_schema.ccfeeds one fuzzer buffer to everydecode_*_request/decode_*_responseacross the four codec headers (request,response, lifecycle, config) and relies on the verify-before-read property: any
input — null, garbage, or truncated — must return false rather than read out of
bounds or trip a sanitizer.
Build shape. Header-only — the codecs are inline over the vendored
FlatBuffers runtime, so the target links no decompiler object files.
Makefile.fuzzgains aFLATBUF_INCLUDEpath and thefuzz_ipc_schemarule;the fuzz
READMEanddocs/security/OSS_FUZZ.mdharness + seed tables gain itsrow.
In-tree only. The OSS-Fuzz upstream submission was rejected
(google/oss-fuzz#15545: forks of
Ghidra are not a structural fit), so the harness stands on its own and runs
locally / via our own CI.
Test-only and inert. Nothing in the production decompiler links the harness;
no CI workflow or the main/unit build compiles
cpp/fuzz/.Test plan
-fsyntax-onlyand-cboth clean)g++ -fsanitize=address,undefined— zero findings:cppRaiiAuditgreen (228 protected files clean; the new file is correctly out of the audit's non-recursive cpp-root scope)Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/