Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Unable to Generate Attestation Document - Response code value: 0x2d5

Open
#7 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
aws, linux, rust
Domain
cloud, security

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

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.

Similar issues

More Cloud issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.