Paolo Bonzini c8401dda2f KVM: x86: fix singlestepping over syscall
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.

Cc: stable@vger.kernel.org
Reported-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
2017-06-22 16:13:29 +02:00
..
2017-04-21 12:50:06 +02:00
2016-09-20 09:26:20 +02:00
2017-04-12 20:17:15 +02:00
2017-04-12 20:17:13 +02:00
2017-05-26 18:01:21 +02:00
2016-01-15 17:56:32 -08:00
2017-05-08 17:15:12 -07:00
2017-06-06 15:21:50 +02:00
2017-04-21 12:50:28 +02:00