Re: [PATCH 0/2] KVM: Fix a lurking bug in kvm_clear_guest()
From: Sean Christopherson
Date: Tue Sep 10 2024 - 00:56:58 EST
On Thu, 29 Aug 2024 12:14:11 -0700, Sean Christopherson wrote:
> Fix a bug in kvm_clear_guest() where it would write beyond the target
> page _if_ handed a gpa+len that would span multiple pages. Luckily, the
> bug is unhittable in the current code base as all users ensure the
> gpa+len is bound to a single page.
>
> Patch 2 hardens the underlying single page APIs to guard against a bad
> offset+len, e.g. so that bugs like the one in kvm_clear_guest() are noisy
> and don't escalate to an out-of-bounds access.
>
> [...]
Applied to kvm-x86 generic, thanks!
[1/2] KVM: Write the per-page "segment" when clearing (part of) a guest page
https://github.com/kvm-x86/linux/commit/ec495f2ab122
[2/2] KVM: Harden guest memory APIs against out-of-bounds accesses
https://github.com/kvm-x86/linux/commit/025dde582bbf
--
https://github.com/kvm-x86/linux/tree/next