Skip to content

fix: accumulate MSG_IO_ERROR in multiplex reader#2441

Merged
oferchen merged 1 commit into
masterfrom
fix/msg-io-error-forwarding
Feb 22, 2026
Merged

fix: accumulate MSG_IO_ERROR in multiplex reader#2441
oferchen merged 1 commit into
masterfrom
fix/msg-io-error-forwarding

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • Add io_error: i32 accumulator to MultiplexReader that OR's incoming MSG_IO_ERROR payloads (upstream io.c:1521-1528)
  • Previously MSG_IO_ERROR messages were silently discarded in the catch-all _ => arm
  • Add take_io_error() to both MultiplexReader and ServerReader for retrieving accumulated I/O error flags
  • Add get_mut() to CompressedReader for the compressed variant to delegate
  • Payloads not exactly 4 bytes are silently ignored (matching upstream guard)

Closes #296

Test plan

  • multiplex_reader_accumulates_msg_io_error - verifies OR accumulation of multiple messages
  • multiplex_reader_io_error_wrong_payload_length_ignored - non-4-byte payloads ignored
  • server_reader_take_io_error_plain_returns_zero - plain mode returns 0
  • server_reader_take_io_error_multiplex_accumulates - ServerReader wrapper delegates
  • msg_io_error_round_trip_through_multiplex_layer - full end-to-end round trip
  • cargo fmt and cargo clippy pass clean

Add io_error accumulator to MultiplexReader that OR's incoming
MSG_IO_ERROR payloads (upstream io.c:1521-1528). Previously these
messages were silently discarded in the catch-all arm.

Add take_io_error() to both MultiplexReader and ServerReader for
the receiver to retrieve and forward accumulated I/O error flags.
@oferchen oferchen merged commit 2046994 into master Feb 22, 2026
9 checks passed
@github-actions github-actions Bot added the bug Something isn't working label Feb 22, 2026
@oferchen oferchen deleted the fix/msg-io-error-forwarding branch February 22, 2026 12:32
oferchen added a commit that referenced this pull request May 1, 2026
Add io_error accumulator to MultiplexReader that OR's incoming
MSG_IO_ERROR payloads (upstream io.c:1521-1528). Previously these
messages were silently discarded in the catch-all arm.

Add take_io_error() to both MultiplexReader and ServerReader for
the receiver to retrieve and forward accumulated I/O error flags.
oferchen added a commit that referenced this pull request May 5, 2026
Add io_error accumulator to MultiplexReader that OR's incoming
MSG_IO_ERROR payloads (upstream io.c:1521-1528). Previously these
messages were silently discarded in the catch-all arm.

Add take_io_error() to both MultiplexReader and ServerReader for
the receiver to retrieve and forward accumulated I/O error flags.
oferchen added a commit that referenced this pull request May 18, 2026
The vstring codec is exchanged during protocol 30+ capability negotiation,
well before authentication completes, making any panic in the reader a
pre-auth remote attack surface (FCV-3 audit, PR #4407).

Add a libFuzzer target that drives `read_vstring` through the public
`negotiate_capabilities` entry point, with a selector byte that fans out
across protocol versions and role flags so both the one-byte and two-byte
length encodings and the UTF-8 validation path are exercised. Register the
new bin in fuzz/Cargo.toml and seed the corpus with a known-good vstring.
oferchen added a commit that referenced this pull request May 18, 2026
The vstring codec is exchanged during protocol 30+ capability negotiation,
well before authentication completes, making any panic in the reader a
pre-auth remote attack surface (FCV-3 audit, PR #4407).

Add a libFuzzer target that drives `read_vstring` through the public
`negotiate_capabilities` entry point, with a selector byte that fans out
across protocol versions and role flags so both the one-byte and two-byte
length encodings and the UTF-8 validation path are exercised. Register the
new bin in fuzz/Cargo.toml and seed the corpus with a known-good vstring.
oferchen added a commit that referenced this pull request May 18, 2026
The vstring codec is exchanged during protocol 30+ capability negotiation,
well before authentication completes, making any panic in the reader a
pre-auth remote attack surface (FCV-3 audit, PR #4407).

Add a libFuzzer target that drives `read_vstring` through the public
`negotiate_capabilities` entry point, with a selector byte that fans out
across protocol versions and role flags so both the one-byte and two-byte
length encodings and the UTF-8 validation path are exercised. Register the
new bin in fuzz/Cargo.toml and seed the corpus with a known-good vstring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant