Skip to content
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

[Bug]: AMD SEV-SNP: SVSM-populated secrets fields not respected #10701

Open
2 of 5 tasks
deeglaze opened this issue Jan 30, 2025 · 0 comments
Open
2 of 5 tasks

[Bug]: AMD SEV-SNP: SVSM-populated secrets fields not respected #10701

deeglaze opened this issue Jan 30, 2025 · 0 comments
Labels
package:ovmfpkg priority:medium Moderate impact. Should be prioritized over lower priority issues. state:needs-maintainer-feedback state:needs-owner state:needs-triage type:bug Something isn't working

Comments

@deeglaze
Copy link
Contributor

Is there an existing issue for this?

  • I have searched existing issues

Bug Type

  • Firmware
  • Tool
  • Unit Test

Code first?

  • Yes

What packages are impacted?

OvmfPkg

Which targets are impacted by this bug?

DEBUG, NO-TARGET, NOOPT, RELEASE

Current Behavior

The PcdsFixedAtBuild-classified PcdOvmfSecSvsmCaaBase and PcdOvmfSecSvsmCaaSize as located at

0x00F000|0x001000
ought to instead be populated as

  • the 64-bit value at offset 0x150 of the AMD SEV secrets page
  • 0x1000

respectively [1]. Relatedly, the base/size values at offsets 0x140, 0x148 ought to define a reserved memory HOB. We can restrict these allocations to be within few pre-determined areas to ensure we know exactly which HOBs to break up.

[1] https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/specifications/58019.pdf table 1

Expected Behavior

The CAA_BASE can be set by the SVSM itself in the Secrets page, subject to some restrictions

Steps To Reproduce

Populate the CAA_BASE field in SVSM be somewhere else and try to communicate with SVSM at that address. If you're lucky it crashes. If you're unlucky, you corrupt memory.

Build Environment

- OS(s): Any
- Tool Chain(s): Any

Version Information

Current

Urgency

Medium

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

Maintainer feedback requested

Anything else?

Request feedback from Thomas Lendacky.

@deeglaze deeglaze added state:needs-triage type:bug Something isn't working labels Jan 30, 2025
@github-actions github-actions bot added package:ovmfpkg priority:medium Moderate impact. Should be prioritized over lower priority issues. state:needs-maintainer-feedback state:needs-owner labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ovmfpkg priority:medium Moderate impact. Should be prioritized over lower priority issues. state:needs-maintainer-feedback state:needs-owner state:needs-triage type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant