Unable to Generate Attestation Document - Response code value: 0x2d5
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start by reproducing the failure with sudo using nitro-tpm-attest on the documented Amazon Linux 2023, t3.small, and NitroTPM-enabled AMI setup. Inspect the nitro-tpm-attest entry point and the Esys_NV_DefineSpace operation associated with error 0x2d5. Done means either attestation generation succeeds with the reported options or the expected setup and cause are documented.
Written by the indexing model from the issue text.
Description
Hi,
I'm unable to generate a Nitro TPM attestation document using nitro-tpm-attest in any configuration I've tried. The attempts result in a TPM error indicating "structure is the wrong size" (error code 0x2d5).
Environment:
- OS: Amazon Linux 2023 (with kernel: 6.1.155-176.282.amzn2023.x86_64)
- Instance type: t3.small
- AMI: NitroTPM-enabled AMI created following this aws tutorial
After launching the instance, I can see the tpm devices.
$ ls /dev | grep tpm
tpm0
tpmrm0
Setting 1: using pre-installed binary in Amazon Linux 2023
- without sudo (permission denied)
$ /usr/bin/nitro-tpm-attest
ERROR:tcti:src/tss2-tcti/tcti-device.c:454:Tss2_Tcti_Device_Init() Failed to open specified TCTI device file /dev/tpm0: Permission denied
ERROR:tcti:src/tss2-tcti/tctildr-dl.c:169:tcti_from_file() Could not initialize TCTI file: device
ERROR:tcti:src/tss2-tcti/tctildr.c:430:Tss2_TctiLdr_Initialize_Ex() Failed to instantiate TCTI
Error: response code not recognized
Caused by:
0: response code not recognized
1: Response code value: 0xa000a
- with sudo (tpm error, structure size error)
$ sudo /usr/bin/nitro-tpm-attest
WARNING:esys:src/tss2-esys/api/Esys_NV_DefineSpace.c:345:Esys_NV_DefineSpace_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_NV_DefineSpace.c:121:Esys_NV_DefineSpace() Esys Finish ErrorCode (0x000002d5)
Error: structure is the wrong size (associated with parameter number 2)
Caused by:
0: structure is the wrong size (associated with parameter number 2)
1: Response code value: 0x2d5
Setting 2: using this repository and cargo
$ git clone <this repo>
$ cd NitroTPM-Tools/nitro-tpm-attest
$ cargo build --release
$ sudo ./target/release/nitro-tpm-attest
WARNING:esys:src/tss2-esys/api/Esys_NV_DefineSpace.c:345:Esys_NV_DefineSpace_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_NV_DefineSpace.c:121:Esys_NV_DefineSpace() Esys Finish ErrorCode (0x000002d5)
Error: structure is the wrong size (associated with parameter number 2)
Caused by:
0: structure is the wrong size (associated with parameter number 2)
1: Response code value: 0x2d5
Note that the same 0x2d5 error occurs when adding options like --public-key, --nonce, or --user-data.
I appreciate any guidance on resolving this issue or clarifying the expected setup.
Thanks in advance!
- Dominant language
- HTML
- Stars
- 7
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
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.
Similar issues
-
cloudflare: root entry eagerly imports `wrangler`, so `d1`/`r2`/`kvCache` cannot load without a Wrangler installPossibly taken @emdashbot claimed this today. Openarea/cloudflare bot:bug bot:needs-attention
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
emdash-cms/emdash#4232 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
auto-shift/autoshiftv2#282 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
voidzero-dev/void#463 ·
Maintainers usually reply within 1 day
-
type: cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
googleapis/google-cloud-swift#1477 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/sagemaker-python-sdk#6495 ·
Maintainers usually reply within 2 days