Skip to content

libspdm 3.8.x cherry-pick candidates #3884

Open
0 of 1 issue completed
Open

Description

@steven-bellock

Tier 1 - recommended, applies cleanly

Memory safety and input validation

These are the highest-value backports. All bound or validate attacker-influenced lengths taken from received messages.

Commit Subject
4975ccc bound application_data_length by cipher header in secured decode
6eb89fc validate size before reading storage secured message fields
9bf82b7 bound opaque_length against response size before opaque check
49be793 check discovery response size before reading payload fields
ad6d939 reject secured messages with invalid descriptor count
fcdb6bb null digest_context_th after free in libspdm_append_message_k (use-after-free)
9bb426f erase the plain-text VDM message after processing it

Undefined behavior and alignment

Commit Subject
ff3d8d2 Fix: memory alignment issues
d293949 use unaligned accessors for received message fields
ee19eb6 make struct overlay packed
c07c20e cast rsp_session_id to uint32_t before shift
5f3d929 cast macro operands to prevent undefined behavior

Protocol correctness

Commit Subject
99a8bda CHUNK_SEND_ACK returns UnsupportedRequest when CHUNK_CAP is not negotiated
a88f4b2 CHUNK_SEND error no longer overwritten by UnsupportedRequest
a9d928d correct OPAQUE_DATA_FORMAT_MASK
83c6bf4 correct SPDM_MEASUREMENT_BLOCK_MEASUREMENT_TYPE_MASK
76c537f MeasurementSpecificationSel not set when MEL_CAP=1 and MEAS_CAP=0
93dc9af trim decoded message size to DataTransferSize
61f4460 Responder check for BasicMutAuthReq
6729440 validate SET_KEY_PAIR_INFO Operation up front
4a5816a check keypair capability macros
90d7817 allow setting NULL data in libspdm_com_context_data
333f71e reset non-session transcripts in reset_context

Tier 2 - library hunks apply cleanly, unit tests need adaptation

For each of these the conflict is confined to unit_test/; every hunk under library/ applies. They are worth taking, with the accompanying test changes reworked by hand.

Commit Subject Conflicting test file
7927a92 bound chunk_size against response size before chunk copy unit_test/test_spdm_requester/chunk_get.c
28a9390 check response size before reading key_pair_info fields unit_test/test_spdm_requester/get_key_pair_info.c
cdeb7fd do not read GET_CAPABILITIES flags in SPDM 1.0 unit_test/test_spdm_responder/capabilities.c
5345d71 large_response_size may be less than DataTransferSize when CHUNK_SEND_ACK exceeds it unit_test/test_spdm_requester/chunk_send.c
cb89d19 return InvalidRequest for an encapsulated GET_CERTIFICATE CMakeLists.txt, test_spdm_requester.c

7927a92 is a memory-safety fix and should be prioritized despite the test rework.

69dcd9b ("check only major secured version") belongs in tier 1 rather than tier 2: it conflicts only when applied in isolation, and applies cleanly once the tier-1 stack is in place.

Activity

  1. steven-bellock commented on Sep 21, 2026

    @steven-bellock
    ContributorAuthor

    @jyao1 would like

    • security fixes
    • specification violations
    • or other show-stoppers
  2. changed the title [-]libspdm 3.8.3 cherry-pick candidates[/-] [+]libspdm 3.8.x cherry-pick candidates[/+] on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions