Skip to content

attestation: make platform metadata best-effort for azure evidence - #2

Open
samlaf wants to merge 1 commit into
mainfrom
azure-platform-metadata-fallback
Open

attestation: make platform metadata best-effort for azure evidence#2
samlaf wants to merge 1 commit into
mainfrom
azure-platform-metadata-fallback

Conversation

@samlaf

@samlaf samlaf commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Using this PR for now but should eventually upstream this.
Created an issue upstream for this: Easy-TEE/attest#24

Description

Azure marketplace kernels (linux-azure, linux-azure-fde) do not ship
CONFIG_DMI_SYSFS, and where dmi-sysfs does exist its raw entries are
readable only by root, so azure evidence generation on a stock Azure CVM
fails with "Cannot retrieve platform metadata: I/O: No such file or
directory".

No verifier consults ram_bytes/num_disks for azure evidence — they exist
for the portable image-hash policies on DCAP/GCP platforms — so collect
them best-effort: use SMBIOS when available, otherwise fall back to
/proc/meminfo for RAM and a /sys/block count for disks.

The disk count holds to what platform::metadata_for would have returned:
one named list of virtual device prefixes, the same set
is_virtual_block_device excludes, and the Azure resource disk subtracted
the way metadata_for subtracts it. A LUKS node carries dm-* devices, so a
filter blind to those would over-count on exactly the machines this
fallback exists for.

The proper home for all of this is attest-measure's
platform::metadata_for, where a /proc/meminfo fallback would cover every
platform and caller; a TODO marks the added block for deletion once that
lands in easy-tee/attest and the attest pin picks it up.

Azure marketplace kernels (linux-azure, linux-azure-fde) do not ship
CONFIG_DMI_SYSFS, and where dmi-sysfs does exist its raw entries are
readable only by root, so azure evidence generation on a stock Azure CVM
fails with "Cannot retrieve platform metadata: I/O: No such file or
directory".

No verifier consults ram_bytes/num_disks for azure evidence — they exist
for the portable image-hash policies on DCAP/GCP platforms — so collect
them best-effort: use SMBIOS when available, otherwise fall back to
/proc/meminfo for RAM and a /sys/block count for disks.

The disk count holds to what platform::metadata_for would have returned:
one named list of virtual device prefixes, the same set
is_virtual_block_device excludes, and the Azure resource disk subtracted
the way metadata_for subtracts it. A LUKS node carries dm-* devices, so a
filter blind to those would over-count on exactly the machines this
fallback exists for.

The proper home for all of this is attest-measure's
platform::metadata_for, where a /proc/meminfo fallback would cover every
platform and caller; a TODO marks the added block for deletion once that
lands in easy-tee/attest and the attest pin picks it up.
@samlaf
samlaf force-pushed the azure-platform-metadata-fallback branch from 4335649 to 2ce0fee Compare August 19, 2026 14:45
samlaf added a commit to SeismicSystems/enclave that referenced this pull request Aug 19, 2026
flashbots/attested-tls#78 — portable azure vTPM quote verification and
the azure-attester/azure-verifier feature split — merged upstream, so
the fork rebases onto upstream main and the pin follows it to
SeismicSystems/attested-tls#2. The fork stays a single commit ahead of
upstream, which is what keeps it cheap to drop once its patch lands
there.

The new base carries three upstream changes with it:

- dcap-qvl resolves from crates.io 0.5.2 rather than a Phala git rev.
- attest moves to 8206cd1, which also excludes dm-* and md* devices when
counting disks; the fork's azure fallback follows the same filter, so a
LUKS node is not over-counted.
- pccs reports a missing rustls crypto provider instead of panicking.
attestation-service installs aws-lc-rs at startup, so this repo never
hit that panic and nothing here changes.

Cargo.lock moves with the pin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant