diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-07-16 16:51:14 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-07-16 16:51:14 +0300 |
commit | f4501e8bc88db2548b37afe100506358f1bf7504 (patch) | |
tree | 573b27707a299214923fb130335581c42f67eb59 /arch/x86 | |
parent | 1c5a0b55abeb6d99ed0962c6a6fa611821949523 (diff) | |
parent | ebbdf37ce9abb597015fa85df6630ebfa7d0a97f (diff) | |
download | linux-f4501e8bc88db2548b37afe100506358f1bf7504.tar.xz |
Merge tag 'kvm-x86-fixes-6.10-11' of https://github.com/kvm-x86/linux into HEAD
KVM Xen:
Fix a bug where KVM fails to check the validity of an incoming userspace
virtual address and tries to activate a gfn_to_pfn_cache with a kernel address.
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/xen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/xen.c b/arch/x86/kvm/xen.c index f65b35a05d91..67bb4e89c399 100644 --- a/arch/x86/kvm/xen.c +++ b/arch/x86/kvm/xen.c @@ -741,7 +741,7 @@ int kvm_xen_hvm_set_attr(struct kvm *kvm, struct kvm_xen_hvm_attr *data) } else { void __user * hva = u64_to_user_ptr(data->u.shared_info.hva); - if (!PAGE_ALIGNED(hva) || !access_ok(hva, PAGE_SIZE)) { + if (!PAGE_ALIGNED(hva)) { r = -EINVAL; } else if (!hva) { kvm_gpc_deactivate(&kvm->arch.xen.shinfo_cache); |