Open steven-bellock opened 1 month ago
Good finding.
Read the spec, the LargeMessageSize is present when ChunkSeqNo is 0. But it is not considered on wrap case.
I think we should prevent wrap from happening.
The SPDM Working Group confirmed that it does not wrap. This will be made more explicit in the specification.
I'll take this.
I believe a reading of the Large SPDM message transfer mechanism implies that
ChunkSeqNo
should not wrap. Ie, if the message is too large for65536
chunks then it should not be sent. However libspdm assumes wrapping, for examplehttps://github.com/DMTF/libspdm/blob/30014a822710d58a0387afdce5bce4ec144bcd74/library/spdm_responder_lib/libspdm_rsp_chunk_get.c#L157
I filed https://github.com/DMTF/SPDM-WG/issues/3703 to increase the size of
ChunkSeqNo
so that we don't have to think about this for SPDM 1.4 and greater.