Skip to content

Duplicate and Conflicting Endorsement Entries in kvstore #324

@jeevan0920

Description

@jeevan0920

Hi Veraison Team,

I was testing the provisioning API by submitting endorsements from the PoC endorser for ARM CCA support. During this process, I observed a behaviour that may be problematic or unintended:

🔁 Submitting the same endorsement multiple times results in duplicate entries in the endorsement store database (kvstore).


🧪 Steps to Reproduce

These are the exact steps I followed to reproduce the issue:

✅ 1. Clone and build Veraison services

git clone https://github.com/veraison/services.git
cd services/deployments/docker
make
source env.bash

This builds the Docker images:

  • veraison/keycloak
  • veraison/vts
  • veraison/provisioning
  • veraison/verification
  • veraison/management

Start all services:

veraison start
veraison status  # confirm all are running

Reference: [Veraison Docker deployment guide](https://github.com/veraison/services/tree/main/deployments/docker)


✅ 2. Clone and build the PoC endorser

git clone https://git.codelinaro.org/linaro/dcap/cca-demos/poc-endorser.git
cd poc-endorser
make

🔧 Modify endorse.sh:

-api_server=https://provisioning-service:8888/endorsement-provisioning/v1/submit
+api_server=https://provisioning-service:9443/endorsement-provisioning/v1/submit

🔧 Modify Makefile:

-endorse: ; docker run --network=host $(TAG)
+endorse: ; docker run --network=veraison-net $(TAG)

✅ 3. Submit endorsements

Submit the original endorsements:

make endorse  # 1st time
make endorse  # 2nd time (same data)

Then, modify the BL1 measurement value in the input, and submit again:

# BL1 measurement changed in input cbor file (generated using evcli)
make endorse  # 3rd time (conflicting value)

🧾 4. Query the endorsement store (VTS)

docker exec vts-service sqlite3 /opt/veraison/stores/vts/en-store.sql \
  "SELECT * FROM kvstore;" | grep rC27mzsskJvCzIG7wdFeL5V2byU9vP+Orhqo=

Example output:

ARM_CCA://0/f0VMRgIBAQAAAAAAAAAAAAMAPgABAAAAUFgAAAAAAAA=| { ... "measurement-value": "micfKpFr..." }
ARM_CCA://0/f0VMRgIBAQAAAAAAAAAAAAMAPgABAAAAUFgAAAAAAAA=| { ... "measurement-value": "micfKpFr..." }
ARM_CCA://0/f0VMRgIBAQAAAAAAAAAAAAMAPgABAAAAUFgAAAAAAAA=| { ... "measurement-value": "dhanus/..." }

As seen above:

  • The same entry was stored twice for the same kv_key.
  • A third, conflicting value with the same kv_key was also accepted.

❓ Open Questions

This raises some concerns and requests for clarification:

1. Is this behavior expected?

  • Should the provisioning API deduplicate or overwrite endorsements for an existing key?
  • Should it reject conflicting entries?

2. How does verification handle this?

  • If multiple entries exist under the same key but with different measurement-value fields, how does the verifier choose which one to match against?
  • Is there a coalescing strategy or precedence rule?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions