You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarification on duplicate SMDataID elements and secured message version negotiation #3934
We are testing KEY_EXCHANGE requests containing multiple opaque data elements and would like to clarify how duplicate SMDataID values should be handled.
In our test, multiple DMTF opaque elements have the same ID (0x00), VendorIDLen (0), SMDataVersion (0x01), and SMDataID (0x01, supported secured message versions). Each element contains a SecuredMsgVers structure with one version in its VersionsList.
In an earlier libspdm-based integration, the request was accepted and the last matching element was used. After an update, the first matching element was used instead. The current main implementation of libspdm_get_sm_data_element_from_opaque_data() also appears to return the first matching element.
We have two questions:
1. Should duplicate SMDataID elements be rejected?
Within the same DMTF opaque data namespace and SMDataVersion, is it valid for a single KEY_EXCHANGE request to contain multiple elements with SMDataID = 0x01?
If this is not allowed, should the responder reject the request, for example with InvalidRequest, rather than use the first or last matching element?
2. If duplicates are allowed, are these two representations equivalent?
The following examples are schematic; lengths and padding are omitted. All elements use the common header values described above.
Case A — One element containing multiple versions:
Activity
jyao1 commentedon Sep 24, 2026
Good question. I think we need to file a spec issue to clarify (see https://github.com/DMTF/SPDM-WG/issues/4818)
jyao1 commentedon Oct 15, 2026
The conclusion is to reject the message if there is duplication.
We should add such check in libspdm.
jyao1 commentedon Oct 15, 2026
@JeonJinil, Do you want to propose a patch?