-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Malfunctioning SEV-SNP device results in nil-pointer exception #89
Comments
Release v0.9.1 includes a fix for this. Apologies for the breakage. |
Hey @deeglaze, Essentially, the current way of handling this in v0.9.1 wouldn't return an error, but might return an incomplete / invalid report struct, which leads to other errors in the library. While this could certainly be handled in go-tpm-tools as well, I would like to hear your opinion on handling this in go-sev-guest directly. Thank you and sorry for interrupting again with this! |
Would you mind sharing your cpuid_0000_0001_EAX value you get in the guest? I would expect for a Milan-B0 it should be 0x00a00f10. Edit: Milan-B1 would be 0x00a00f11. |
Thanks for the fast reply! I will conduct a test tomorrow an let you know. We currently suspect a problem with the CSP's hypervisor that causes corrupted {Reports, CPUID responses}, but didn't yet check the exact value. I will let you know here as soon as i figure something out. |
That wouldn't surprise me. We have a big file of hardcoded CPUID values to use for VMs depending on CPU make/model. |
Hey @deeglaze , Sorry for the confusion. I've managed to clear this out now. The CPUID EAX was actually |
Hey there!
If
abi.SevProduct()
is called in a guest with a malfunctioning SEV-SNP device, this results in thecpuid()
call to error with a nil-pointer exception as follows (line numbers based onv0.8.0
this library):While I still need to figure out what in
cpuid
exactly causes this failure (haven't got to read into the spec ofCPUID
yet), I think an easy approach would be to recover from the panic and return an error in that case that could be passed on to the caller, which would lead to an early failure and thus be my personal favorite. Otherwise, falling back to theDefaultSevProduct
might be an option too if the function's signature should be kept as is.Feel free to let me know your thoughts on this and I will be happy to implement it!
The text was updated successfully, but these errors were encountered: