From 5b9de5b7b343cbaaf86fc0361bab61cd2041d87f Mon Sep 17 00:00:00 2001 From: RARelph <44270374+RARelph@users.noreply.github.com> Date: Tue, 3 Mar 2026 10:15:23 -0600 Subject: [PATCH] igvm: Ignore unknown values past end of known VMSA --- igvm/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/igvm/src/lib.rs b/igvm/src/lib.rs index 9a52865..436dbe0 100644 --- a/igvm/src/lib.rs +++ b/igvm/src/lib.rs @@ -1863,11 +1863,8 @@ impl IgvmDirectiveHeader { // Copy the VMSA bytes into the VMSA, and validate the remaining bytes are 0. // todo: zerocopy: as of 0.8, can recover from allocation failure let mut vmsa = SevVmsa::new_box_zeroed().unwrap(); - let (vmsa_slice, remaining) = data.split_at(size_of::()); + let (vmsa_slice, _remaining) = data.split_at(size_of::()); vmsa.as_mut_bytes().copy_from_slice(vmsa_slice); - if remaining.iter().any(|b| *b != 0) { - return Err(BinaryHeaderError::InvalidVmsa); - } IgvmDirectiveHeader::SnpVpContext { gpa: header.gpa.into(),