diff options
author | 2018-07-26 10:05:02 +0000 | |
---|---|---|
committer | 2018-07-26 10:05:02 +0000 | |
commit | 9e131c2ee0bd5bad7bb53432aee0c8c77bb4cbf3 (patch) | |
tree | 33926abd26ec1c69981333084a997a464a385d45 | |
parent | tweak previous; ok espie (diff) | |
download | wireguard-openbsd-9e131c2ee0bd5bad7bb53432aee0c8c77bb4cbf3.tar.xz wireguard-openbsd-9e131c2ee0bd5bad7bb53432aee0c8c77bb4cbf3.zip |
Remove CPUID insn_length check
Don't allow unprivileged users to crash things from ring 3
Thanks to William McCall for the patch!
OK mlarkin@
-rw-r--r-- | sys/arch/amd64/amd64/vmm.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c index bbf88025f5b..a007e7272e5 100644 --- a/sys/arch/amd64/amd64/vmm.c +++ b/sys/arch/amd64/amd64/vmm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm.c,v 1.216 2018/07/12 10:16:41 mlarkin Exp $ */ +/* $OpenBSD: vmm.c,v 1.217 2018/07/26 10:05:02 job Exp $ */ /* * Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org> * @@ -5896,12 +5896,6 @@ vmm_handle_cpuid(struct vcpu *vcpu) return (EINVAL); } - if (insn_length != 2) { - DPRINTF("%s: CPUID with instruction length %lld not " - "supported\n", __func__, insn_length); - return (EINVAL); - } - rax = &vcpu->vc_gueststate.vg_rax; msr_store = (struct vmx_msr_store *)vcpu->vc_vmx_msr_exit_save_va; |