Skip to main content

forged_sender_send

Function forged_sender_send 

Source
pub fn forged_sender_send() -> Chunk
Expand description

Security regression sample: forged make_msg sender must not survive Send.

§What this proves

Invariant S1 from docs/security.md: structural Atomic Hop typing alone cannot stop a module from writing sender = 999 into a crate::Message. The scheduler overwrites that field on bytecode Send, so the serverÔÇÖs msg_sender / echoed payload reflects the real client flow id.

§Protocol

  1. main builds a request with forged sender 999 and Sends it.
  2. server reads the delivered hop, puts authenticated msg_sender into the reply payload, and answers.
  3. main returns that payload as Int.

Unit tests assert the returned id is not 999 (and is a plausible live flow id). Requires crate::std_native_table.