Skip to content

cmcp_verify.tcg_event_log: _parse_spec_id and parse_event_log accept duplicate algorithm IDs, mismatched digest sizes for known algorithms, and trailing Spec ID bytes #812

Open

Description

@drk-ram

Summary

  1. _parse_spec_id in src/cmcp_verify/tcg_event_log.py accepts duplicate alg_id declarations, digest_size == 0, and wrong digest_size values for known algorithms (ALG_SHA1, ALG_SHA256, ALG_SHA384, ALG_SHA512), allowing a crafted Spec ID header to declare e.g. ALG_SHA256 with digest_size = 4.
  2. _parse_spec_id does not validate the trailing vendorInfoSize byte and vendorInfo length (offset + 1 + vendor_info_size == len(event_data)).
  3. parse_event_log accepts duplicate alg_id entries within a single TCG_PCR_EVENT2 digest list (silently overwriting earlier digests for the same algorithm) and does not reject non-bytes data.

Activity

  1. github-actions commented on Oct 25, 2026

    @github-actions
    Contributor

    🟡 Contributor Check: MEDIUM

    Check Result
    Profile MEDIUM
    Credential LOW
    Overall MEDIUM

    Automated check by AgenTrust Contributor Check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions