Re: [PATCH v1 0/2] KVM: x86: cr8 reserved bit check
From: Sean Christopherson
Date: Mon Sep 21 2026 - 10:19:22 EST
On Tue, 08 Sep 2026 23:04:24 +0700, Tharit Tangkijwanichakul wrote:
> kvm_is_valid_sregs() validates the incoming CR0, CR4, and efer values on
> KVM_SET_SREGS but never checks CR8. When userspace passes a CR8 value with
> any reserved bit [63:4] set, __set_sregs_common() forwards it to
> kvm_set_cr8(), which rejects the reserved bits and returns early. That
> return value is not checked, so the ioctl reports success while the
> requested value is silently dropped, and a subsequent KVM_GET_SREGS then
> returns a CR8 different from the one userspace believed it had written.
>
> [...]
Applied to kvm-x86 misc, thanks!
[1/2] KVM: x86: Reject reserved CR8 bits in KVM_SET_SREGS
https://github.com/kvm-x86/linux/commit/3e7a842fe533
[2/2] KVM: selftests: Add CR8 reserved-bit checks to set_sregs_test
https://github.com/kvm-x86/linux/commit/2b0e0aa54fa2
--
https://github.com/kvm-x86/linux/tree/next