linux_dsm_epyc7002/arch/x86/kvm/vmx
Nick Desaulniers 428b8f1d9f KVM: VMX: don't allow memory operands for inline asm that modifies SP
THUNK_TARGET defines [thunk_target] as having "rm" input constraints
when CONFIG_RETPOLINE is not set, which isn't constrained enough for
this specific case.

For inline assembly that modifies the stack pointer before using this
input, the underspecification of constraints is dangerous, and results
in an indirect call to a previously pushed flags register.

In this case `entry`'s stack slot is good enough to satisfy the "m"
constraint in "rm", but the inline assembly in
handle_external_interrupt_irqoff() modifies the stack pointer via
push+pushf before using this input, which in this case results in
calling what was the previous state of the flags register, rather than
`entry`.

Be more specific in the constraints by requiring `entry` be in a
register, and not a memory operand.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Reported-by: syzbot+3f29ca2efb056a761e38@syzkaller.appspotmail.com
Debugged-by: Alexander Potapenko <glider@google.com>
Debugged-by: Paolo Bonzini <pbonzini@redhat.com>
Debugged-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Message-Id: <20200323191243.30002-1-ndesaulniers@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-03-23 15:40:51 -04:00
..
capabilities.h KVM: nVMX: clear PIN_BASED_POSTED_INTR from nested pinbased_ctls only when apicv is globally disabled 2020-02-21 18:05:35 +01:00
evmcs.c x86/kvm/hyper-v: don't allow to turn on unsupported VMX controls for nested guests 2020-02-05 15:55:26 +01:00
evmcs.h x86/kvm/hyper-v: don't allow to turn on unsupported VMX controls for nested guests 2020-02-05 15:55:26 +01:00
nested.c KVM: nVMX: avoid NULL pointer dereference with incorrect EVMCS GPAs 2020-03-14 12:49:27 +01:00
nested.h KVM: nVMX: Refactor IO bitmap checks into helper function 2020-02-23 10:14:40 +01:00
ops.h KVM: VMX: Add error handling to VMREAD helper 2019-09-25 15:30:09 +02:00
pmu_intel.c KVM: x86: Fix perfctr WRMSR for running counters 2020-02-05 16:01:15 +01:00
vmcs12.c KVM: nVMX: Move vmcs12 code to dedicated files 2018-12-14 12:34:30 +01:00
vmcs12.h KVM/arm updates for 5.3 2019-07-11 15:14:16 +02:00
vmcs_shadow_fields.h KVM: Fix some out-dated function names in comment 2020-01-21 13:57:27 +01:00
vmcs.h KVM: VMX: Leave preemption timer running when it's disabled 2019-06-18 17:10:46 +02:00
vmenter.S x86/asm: Change all ENTRY+ENDPROC to SYM_FUNC_* 2019-10-18 11:58:33 +02:00
vmx.c KVM: VMX: don't allow memory operands for inline asm that modifies SP 2020-03-23 15:40:51 -04:00
vmx.h KVM: nVMX: Emulate MTF when performing instruction emulation 2020-02-23 09:36:23 +01:00