Skip to content

test(decompiler): Rec 34 #34-9 — fuzz_ipc_schema harness for the FlatBuffers IPC decoders#227

Merged
CryptoJones merged 1 commit into
masterfrom
test/34-9-fuzz-ipc-schema
Jun 1, 2026
Merged

test(decompiler): Rec 34 #34-9 — fuzz_ipc_schema harness for the FlatBuffers IPC decoders#227
CryptoJones merged 1 commit into
masterfrom
test/34-9-fuzz-ipc-schema

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

Closes #226.

With the worker-side schema codecs complete (#34-4..#34-6), the v1 IPC
decoders are the new attacker-facing parse surface — the FlatBuffers replacement
for the marshal/XML parsers that fuzz_marshal / fuzz_xml already cover. This
adds the in-tree libFuzzer harness for them (Rec 13 fuzz set).

What it does. fuzz_ipc_schema.cc 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.

Build shape. 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.

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

  • Harness compiles clean under g++ (full object codegen; -fsyntax-only and -c both clean)
  • Ran a throwaway driver over 200k+ malformed inputs (empty, all single bytes, OOB root offset, truncation ramps, random buffers) under g++ -fsanitize=address,undefined — zero findings
  • :cppRaiiAudit green (228 protected files clean; the new file is correctly out of the audit's non-recursive cpp-root scope)
  • CI green on both forges (clang/libFuzzer build of the target is a local/own-CI step; not gated by the existing workflows)

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

…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>
@CryptoJones CryptoJones merged commit 4b6ae68 into master Jun 1, 2026
16 checks passed
@CryptoJones CryptoJones deleted the test/34-9-fuzz-ipc-schema branch June 1, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rec 34 (#34-9): fuzz_ipc_schema harness for the FlatBuffers IPC decoders

1 participant