Repository navigation
fix(sev-snp-qvl): borrow kernel certificate table entries instead of copying them - #1248
Merged
Merged
Conversation
This was referenced Sep 20, 2026
Merged
kvinwang
force-pushed
the
fix/parser-input-bounds
branch
from
September 24, 2026 08:39
2e2cfd1 to
aeafdf6
Compare
kvinwang
added a commit
that referenced
this pull request
Sep 25, 2026
Extend the SEV-SNP case with the certificate-table, empty-report, guest feature, rootfs-hash and page-budget tests (#1248, #1279, #1275, #1252), and the cloud TPM case with the PCR bank, duplicate index, quoted event log, collateral budget and host allowlist tests (#1275, #1267, #1338, Signed-off-by: Kevin Wang <wy721@qq.com> #1238, #1404).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
parse_kernel_cert_table(sev-snp-qvl) copied every entry's range into a newVec. Entries may overlap, so a table where each 24-byte entry names the whole blob decodes tolen/24copies of it, all held at once: 179 MB from a 64 KiB auxblob, ~46 GiB from 1 MiB.QuoteVerifier::verifyruns this oncert_chain[0]of an unverified SNP attestation, before any signature check, and release builds abort on allocation failure.Fix
Return borrowed slices from
parse_kernel_cert_tableand copy only the ASK and VCEK that are actually used. Memory is now bounded by the input, with no entry-count limit.Verification
cargo test -p sev-snp-qvl: 16 passed. fmt and clippy clean.