Skip to content

ccnp server panicked if quote is not returned correctly #84

@ruomengh

Description

@ruomengh

What happened?

When quote is not returned successfully (in this case, PCCS is not running), CCNP server panicked with below log:
thread 'tokio-runtime-worker' panicked at /usr/local/cargo/git/checkouts/cc-trusted-api-784f6f5e91567e30/3b0ab7d/common/rust/cctrusted_base/src/tdx/quote.rs:512:22:
range end index 48 out of range for slice of length 0

What did you expect to happen?

CCNP returns error about quote length is not correct other than crashed.

How can we reproduce it (as minimally and precisely as possible)?

Stop PCCS/QGS on host and run ccnp example pod to get quote.

Anything else we need to know?

No response

Kubernetes version

Details
$ kubectl version
# paste output here

Client Version: v1.29.4+k3s1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.4+k3s1

Cloud provider or bare metal

Details bare metal

OS version

Details
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

Ubuntu 24.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions