summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-06-07 15:13:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-21 09:21:17 +0100
commit07e3aff243cdcb70d1e81e515aea553df3080f43 (patch)
tree6d38c372a8a31c0046aa57f2483e9cafa28d2b75 /kernel
parentceb5c560e2e46266cb8fabb0de5a4975e2a0e354 (diff)
downloadlinux-stable-07e3aff243cdcb70d1e81e515aea553df3080f43.tar.gz
linux-stable-07e3aff243cdcb70d1e81e515aea553df3080f43.tar.bz2
linux-stable-07e3aff243cdcb70d1e81e515aea553df3080f43.zip
KVM: x86: fix singlestepping over syscall
commit c8401dda2f0a00cd25c0af6a95ed50e478d25de4 upstream. TF is handled a bit differently for syscall and sysret, compared to the other instructions: TF is checked after the instruction completes, so that the OS can disable #DB at a syscall by adding TF to FMASK. When the sysret is executed the #DB is taken "as if" the syscall insn just completed. KVM emulates syscall so that it can trap 32-bit syscall on Intel processors. Fix the behavior, otherwise you could get #DB on a user stack which is not nice. This does not affect Linux guests, as they use an IST or task gate for #DB. This fixes CVE-2017-7518. Reported-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> [bwh: Backported to 4.4: - kvm_vcpu_check_singlestep() sets some flags differently - Drop changes to kvm_skip_emulated_instruction()] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions