[Copilot Review] Include versioned TDX Module date in ServTD TCB date
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
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:
- Compare
TEE_TCB_SVN[0..15]withtdxtcbcomponentswhen index 1 is zero,
or compare only[2..15]when index 1 is nonzero. - When index 1 is at least one, separately select
TDX_<version>from
tdxModuleIdentitiesand compare itsisvsvnwithTEE_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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from intel/MigTD
-
MigTD should check SVN2 == SVNPossibly taken @MichalTarnacki claimed this 2 days ago. Open
Difficulty 3/5 Half a day Newbie friendliness 48/100
intel/MigTD#1093 · 1 assignee ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 Half a day Newbie friendliness 55/100
intel/MigTD#1092 · 1 comment ·
Maintainers usually reply within 2 days
-
consider removing policy SVN checkPossibly taken @MichalTarnacki claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
intel/MigTD#1091 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
Support non-zero SERVTD_ATTR?Possibly taken @jyao1 claimed this 15 days ago. Open
intel/MigTD#1086 · 1 assignee ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 1-2 days Newbie friendliness 38/100
intel/MigTD#1076 · 2 comments ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
max-sixty/worktrunk#4727 · 7 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
carrick-sh/carrick#1859 ·
Maintainers usually reply within 1 day
-
crate: spate-kafka documentation priority: medium
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day