]> Git Repo - J-linux.git/commit
KVM: Validate hva in kvm_gpc_activate_hva() to fix __kvm_gpc_refresh() WARN
authorPei Li <[email protected]>
Thu, 27 Jun 2024 15:03:56 +0000 (08:03 -0700)
committerSean Christopherson <[email protected]>
Fri, 28 Jun 2024 15:31:46 +0000 (08:31 -0700)
commitebbdf37ce9abb597015fa85df6630ebfa7d0a97f
tree03e311b026e64aa8a378e7d3b19e676ea7b17e0d
parentdee67a94d4c6cbd05b8f6e1181498e94caa33334
KVM: Validate hva in kvm_gpc_activate_hva() to fix __kvm_gpc_refresh() WARN

Check that the virtual address is "ok" when activating a gfn_to_pfn_cache
with a host VA to ensure that KVM never attempts to use a bad address.

This fixes a bug where KVM fails to check the incoming address when
handling KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVA in kvm_xen_vcpu_set_attr().

Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=fd555292a1da3180fc82
Tested-by: [email protected]
Signed-off-by: Pei Li <[email protected]>
Reviewed-by: Paul Durrant <[email protected]>
Reviewed-by: David Woodhouse <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[sean: rewrite changelog with --verbose]
Signed-off-by: Sean Christopherson <[email protected]>
arch/x86/kvm/xen.c
virt/kvm/pfncache.c
This page took 0.043999 seconds and 4 git commands to generate.