Skip to main content

Module fragmentation

Module fragmentation 

Source

Structs§

CryptoFrame
Represents a single chunk of a fragmented logical packet
FragmentAssembler

Constants§

MAX_CONCURRENT_ASSEMBLIES
Maximum number of in-flight (incomplete) assemblies tracked at once. Caps the memory an attacker can pin by spraying chunks across many distinct (session_id, packet_id) keys without ever completing a packet. The worst-case resident memory is therefore bounded by MAX_CONCURRENT_ASSEMBLIES * MAX_REASSEMBLED_LEN (≈ 64 MiB).
MAX_REASSEMBLED_LEN
Largest logical packet the assembler will reassemble. Bounds the memory a single (session_id, packet_id) assembly can pin: at most MAX_TOTAL_CHUNKS chunks of MAX_UDP_PAYLOAD bytes each.
MAX_TOTAL_CHUNKS
Maximum fragments per logical packet, derived from the reassembled-size cap. A frame declaring more than this (up to the u16::MAX the wire allows) is dropped, so an attacker cannot force a 65 535-entry chunk map.

Functions§

fragment_payload
Split a large payload into CryptoFrame chunks