Skip to content

Commit d59d51f

Browse files
Andrew Honigrkrcmar
authored andcommitted
KVM: VMX: remove I/O port 0x80 bypass on Intel hosts
This fixes CVE-2017-1000407. KVM allows guests to directly access I/O port 0x80 on Intel hosts. If the guest floods this port with writes it generates exceptions and instability in the host kernel, leading to a crash. With this change guest writes to port 0x80 on Intel will behave the same as they currently behave on AMD systems. Prevent the flooding by removing the code that sets port 0x80 as a passthrough port. This is essentially the same as upstream patch 99f85a2, except that patch was for AMD chipsets and this patch is for Intel. Signed-off-by: Andrew Honig <[email protected]> Signed-off-by: Jim Mattson <[email protected]> Fixes: fdef3ad ("KVM: VMX: Enable io bitmaps to avoid IO port 0x80 VMEXITs") Cc: <[email protected]> Signed-off-by: Radim Krčmář <[email protected]>
1 parent 6ab0b9f commit d59d51f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

arch/x86/kvm/vmx.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6755,12 +6755,7 @@ static __init int hardware_setup(void)
67556755
memset(vmx_vmread_bitmap, 0xff, PAGE_SIZE);
67566756
memset(vmx_vmwrite_bitmap, 0xff, PAGE_SIZE);
67576757

6758-
/*
6759-
* Allow direct access to the PC debug port (it is often used for I/O
6760-
* delays, but the vmexits simply slow things down).
6761-
*/
67626758
memset(vmx_io_bitmap_a, 0xff, PAGE_SIZE);
6763-
clear_bit(0x80, vmx_io_bitmap_a);
67646759

67656760
memset(vmx_io_bitmap_b, 0xff, PAGE_SIZE);
67666761

0 commit comments

Comments
 (0)