Motivation
BUILD_ROADMAP §7 freezes the IPC wire format as one of the four ABI surfaces, with the canonical spec at docs/abi/ipc-wire.md. §6.2 lists matrix dimensions for the nightly grant/deny permutations but the negative-path coverage there is capability-shaped, not wire-shaped: there is no test asserting how the kernel responds when a sender hands the IPC subsystem a malformed frame (truncated header, oversized declared length, unknown opcode, reserved-bit set).
Today the existing ipc_bounds host gate (wired in #514/#515) covers bounds on a well-formed frame; syscall_entry_stub covers the syscall boundary. The wire-format error model itself is documented but not pinned by a dedicated negative-path test.
This is the smallest defensible slice that pins the frozen wire format under §7 and feeds the §6.2 matrix.
Scope
Add a host-fixture test that hands the kernel IPC entry point a parameterised set of malformed frames and asserts every one returns the documented error code from docs/abi/ipc-wire.md (e.g. IPC_ERR_BAD_HEADER, IPC_ERR_BAD_LENGTH, IPC_ERR_UNKNOWN_OPCODE) without panicking, leaking state, or modifying receiver mailboxes. No kernel API changes — this is a test-only slice that exercises today's error model and pins it against drift.
Acceptance criteria / done-when
Dependencies / related
Out of scope
- Any change to the IPC error code enum itself (the slice pins today's contract)
- Capability-shaped negative paths (covered separately by
cap_* tests and docs/abi/capability-deny-contract.md)
Motivation
BUILD_ROADMAP §7 freezes the IPC wire format as one of the four ABI surfaces, with the canonical spec at
docs/abi/ipc-wire.md. §6.2 lists matrix dimensions for the nightly grant/deny permutations but the negative-path coverage there is capability-shaped, not wire-shaped: there is no test asserting how the kernel responds when a sender hands the IPC subsystem a malformed frame (truncated header, oversized declared length, unknown opcode, reserved-bit set).Today the existing
ipc_boundshost gate (wired in #514/#515) covers bounds on a well-formed frame;syscall_entry_stubcovers the syscall boundary. The wire-format error model itself is documented but not pinned by a dedicated negative-path test.This is the smallest defensible slice that pins the frozen wire format under §7 and feeds the §6.2 matrix.
Scope
Add a host-fixture test that hands the kernel IPC entry point a parameterised set of malformed frames and asserts every one returns the documented error code from
docs/abi/ipc-wire.md(e.g.IPC_ERR_BAD_HEADER,IPC_ERR_BAD_LENGTH,IPC_ERR_UNKNOWN_OPCODE) without panicking, leaking state, or modifying receiver mailboxes. No kernel API changes — this is a test-only slice that exercises today's error model and pins it against drift.Acceptance criteria / done-when
tests/ipc_wire_malformed_test.ccovers at minimum:docs/abi/ipc-wire.md)TEST:PASS:ipc_wire_malformed:truncated_header_returns_bad_headerTEST:PASS:ipc_wire_malformed:oversized_length_returns_bad_lengthTEST:PASS:ipc_wire_malformed:underflow_length_returns_bad_lengthTEST:PASS:ipc_wire_malformed:unknown_opcode_returns_unknown_opcodeTEST:PASS:ipc_wire_malformed:reserved_bits_set_rejectedTEST:PASS:ipc_wire_malformedbuild/scripts/test_ipc_wire_malformed.sh(+.ps1peer per AGENTS.md) and wired intobuild/scripts/test.sh ipc_wire_malformedvalidate_bundle.shTEST_TARGETS(parity withipc_boundsfrom ci(bundle): wire netlib_url_scheme/syscall_entry_stub/ipc_bounds/harness_defense into TEST_TARGETS (substrate host gates) #514)docs/abi/ipc-wire.md:Dependencies / related
ipc_bounds+syscall_entry_stubwired into bundle), ci(abi): validate_abi_stamps strict mode — promote 'no_stamp_line' SKIP to FAIL so future ABI docs cannot silently bypass #297 #470 (strict ABI stamp gate)docs/abi/ipc-wire.md(BUILD_ROADMAP §7)Out of scope
cap_*tests anddocs/abi/capability-deny-contract.md)