Re: [PATCH v2 0/6] KVM: SEV: sev_dbg_crypt() fix and overhaul
From: Sean Christopherson
Date: Mon May 18 2026 - 20:46:03 EST
On Fri, 01 May 2026 13:35:31 -0700, Sean Christopherson wrote:
> Disclaimer: I could have sworn I sent this last week, but obviously did not,
> and I can't remember _why_ I didn't send it. So don't be too surprised if
> there's some glaring flaw or boneheaded mistake.
>
> Ashutosh's fix for a heap OOB/UAF bug in the debug {de,en}crypt code, now
> with a selftest to detect the bug (and confirm the fix), and to validate the
> functionality.
>
> [...]
Applied to kvm-x86 sev, to get as much exposure in -next as possible.
[1/6] KVM: SVM: Fix page overflow in sev_dbg_crypt() for ENCRYPT path
https://github.com/kvm-x86/linux/commit/78ee2d50185a
[2/6] KVM: selftests: Add a test to verify SEV {en,de}crypt debug ioctls
https://github.com/kvm-x86/linux/commit/6edd35e77a42
[3/6] KVM: SEV: Explicitly validate the dst buffer for debug operations
https://github.com/kvm-x86/linux/commit/cb32e895546b
[4/6] KVM: SEV: Add helper function to pin/unpin a single page
https://github.com/kvm-x86/linux/commit/99694add4af3
[5/6] KVM: SEV: Rewrite logic to {de,en}crypt memory for debug
https://github.com/kvm-x86/linux/commit/8d6297a3e73e
[6/6] KVM: SEV: Allocate only as many bytes as needed for temp crypt buffers
https://github.com/kvm-x86/linux/commit/4c735bf1bc22
--
https://github.com/kvm-x86/linux/tree/next