#35916 fuzz: improve ipc fuzz coverage
https://github.com/bitcoin/bitcoin/pull/35916 · · +292/-13 in 3 files, 4 commits · labels: Fuzzing
Goal
- Catch bugs in inter-process communication by fuzzing malformed payloads and bidirectional callbacks
- Ensures process separation safely rejects corrupted inputs without crashing
This pull request expands the IPC fuzz target introduced in #35118. It adds server-side assertions to ensure arguments arrive intact, exercises bidirectional communication using callbacks, and introduces raw Cap'n Proto requests and responses to test client and server deserialization of malformed transaction and UniValue payloads.
Problem: The original IPC fuzz target only exercised round-trip calls with valid data serialized through libmultiprocess, leaving deserialization of malformed inputs and bidirectional callback mechanics untested.
Category: IPC / multiprocess (#9 of 20)
P3 · test coverage
- P3 because expanding IPC fuzz coverage supports the long-term reliability of process separation
- It enhances test coverage rather than addressing an active bug or altering production APIs
Expanding fuzz coverage for libmultiprocess deserialization and callback handling is worthwhile for the long-term reliability of process separation. It does not address an urgent bug or alter production IPC APIs.
Membership: Modifies src/ipc/test/fuzz/ to test libmultiprocess Cap'n Proto proxying, callback dispatch, and serialization hooks.
Factors: security/stability 1, bug 0, performance 0, user value 0, leverage 1
Reviewability: Ready
- Ready for review
- CI is passing and earlier review questions have been resolved
CI is clean, rebase is not needed, and the author addressed reviewer feedback with code comments.
Author status: active, promptly answered reviewer questions and updated comments
Resolved concerns:
- Eunovo asked why arbitrary random bytes are used rather than structured generators like ConsumeTransaction; enirox001 clarified that raw bytes intentionally test rejection of invalid payloads during deserialization, adding clarifying comments in code.
Agreement: Strong
- Strong support noting it fulfills earlier requests for expanded fuzzing (jeanpablojp)
- Question on using raw bytes instead of structured data was resolved with code comments (Eunovo)
Strong support from jeanpablojp; author clarified malformed payload design in response to Eunovo
jeanpablojp tested and ACKed earlier commits noting it fulfills the follow-up requested in #35118. Eunovo's question regarding random byte inputs was resolved by the author explaining that malformed payloads are necessary to test deserialization rejection.
- jeanpablojp: 'tACK ... All green, and it matches the follow-up #35118 asked for.'
- Eunovo queried using random byte vectors over structured transactions; enirox001 explained it tests rejection of malformed responses, which normal serialization cannot produce.
Review verdicts (DrahtBot): 0 (+1)
- Stale ACK: jeanpablojp
Dependencies
Enables:
Files
0 lines under test/bench/ci.
- src/ipc/test/fuzz/ipc.cpp +205/-7
- src/ipc/test/fuzz/ipc_fuzz.h +78/-6
- src/ipc/test/fuzz/ipc_fuzz.capnp +9/-0
Card
PR #35916 expands the IPC fuzz target to test bidirectional callback handling, server-side argument integrity, and client/server deserialization of malformed transaction and UniValue payloads. It strengthens test coverage for libmultiprocess error paths as part of the multiprocess fuzzing roadmap in #23015. Review is in good shape, with previous tested support from jeanpablojp and author clarification on reviewer questions regarding raw payload fuzzing.