[Copilot Review] Include versioned TDX Module date in ServTD TCB date

Open
#1,048 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp, rust
Domain
security

Research direction

Start with servtd_set_quote_supplemental_data() in qve.cpp and the versioned-module matching logic in qve_logic.cpp; compare its date handling with EvaluateTcb.cpp and the date consumed in src/migtd/src/mig_policy.rs. Done means the ServTD effective tcb_date includes the matched versioned TDX Module identity date, with coverage for a module date older than both platform and QE dates.

Written by the indexing model from the issue text.

Description

Summary

MigTD's ServTD quote supplemental data calculates the effective tcb_date as
min(platform_tcb_date, qe_tcb_date). For versioned TDX Modules
(TEE_TCB_SVN[1] > 0), the platform TCB-level lookup intentionally compares
only TEE_TCB_SVN[2..15]; the module SVN in TEE_TCB_SVN[0] is evaluated
separately through tdxModuleIdentities. The matched module level's tcbDate
is not included in the date returned to MigTD.

As a result, MigTD can receive an effective TCB date later than the oldest
applicable platform, TDX Module, and QE TCB dates.

Details

intel/MigTD@19315a5d pins:

  • linux-sgx@3ab6a6bdb97adc76f690c0083c618bb98992fde7
  • DCAP 64b78f3766e7196d3d2c60e401540f0f853b2deb
  • QVL d12717e3f1f2ab81313f88001fd902b5ef5f9c8c

The MigTD build links libservtd_attest.a:

The ServTD supplemental-data path selects a platform TCB level and copies its
date:

It then calculates the effective date using only the platform and QE dates:

The TDX Module SVN is evaluated only afterward:

For versioned modules, getMatchingTcbLevel() skips indices 0 and 1 and
compares only the platform TDX components beginning at index 2:

The generic QVL evaluation does include the matched TDX Module date:

However, servtd_set_quote_supplemental_data() reconstructs the 822-byte
ServTD result instead of using the generic QVL's converged date. MigTD then
reads that reconstructed date:

Intel PCS specification

The official Intel TDX TCB Info V4 documentation
specifies:

  1. Compare TEE_TCB_SVN[0..15] with tdxtcbcomponents when index 1 is zero,
    or compare only [2..15] when index 1 is nonzero.
  2. When index 1 is at least one, separately select TDX_<version> from
    tdxModuleIdentities and compare its isvsvn with TEE_TCB_SVN[0].

Each TDX Module identity TCB level has its own tcbDate. That date should
therefore participate in the effective date for a versioned module, as it does
in generic QVL.

Suggested fix

For TEE_TCB_SVN[1] > 0, include the matched TDX Module identity level's
tcbDate when calculating the ServTD effective tcb_date, or populate the
ServTD result from the generic QVL's already-converged collateral information.
Add coverage where the module date is older than both the platform and QE
dates.

Dominant language
Rust
Stars
58
Forks
43
Avg merge
2d 18h
Merged PRs (30d)
41

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intel/MigTD

All issues in intel/MigTD

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.