-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Review Findings
- High / DoS risk (mod.rs –
MigtdTransport::receive): The loop that fills the vmcall header/body never breaks iftransport.readreturnsOk(0)(peer closed/EOF).recvdstays constant so the while-loop spins forever, blocking the SPDM stack and preventing any error path from running. The transport should detect0bytes, return an error, and let the caller tear down the session instead of looping indefinitely. - Medium / Framing integrity (mod.rs – same function):
payload_size + VMCALL_SPDM_MESSAGE_HEADER_SIZEis computed directly, so on 32‑bit builds a craftedlengthclose tou32::MAXwraps around and makes the check succeed even though the message doesn’t fit in the buffer. That allows the transport to accept a truncated packet while leaving the remainder on the wire, desynchronizing the stream (and potentially leading to panic on the next read). Use a checked add (or validatepayload_sizebefore the comparison) to prevent overflow-driven framing attacks.
Metadata
Metadata
Assignees
Labels
No labels