public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.4 0/1] KVM: backport fix for CVE-2021-38198
@ 2021-08-11 15:46 Ovidiu Panait
  2021-08-11 15:46 ` [PATCH 5.4 1/1] KVM: X86: MMU: Use the correct inherited permissions to get shadow page Ovidiu Panait
  2021-08-13  8:51 ` [PATCH 5.4 0/1] KVM: backport fix for CVE-2021-38198 Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Ovidiu Panait @ 2021-08-11 15:46 UTC (permalink / raw)
  To: stable; +Cc: pbonzini, laijs

The backport was validated by running the kvm-unit-tests testcase [1] mentioned
in the commit message.

Before the patch
----------------
root@intel-x86-64:~# modprobe kvm_intel ept=0
root@intel-x86-64:~# cat /sys/module/kvm_intel/parameters/ept
N
root@intel-x86-64:~# ./access
BUILD_HEAD=ba3c9773
timeout -k 1s --foreground 3600 /usr/bin/qemu-system-x86_64 --no-reboot -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel /tmp/tmp.V6ME9Ebamh -smp 1 -cpu max # -initrd /tmp/tmp.DycLfAySkL
enabling apic
starting test

run
CR4.PKE not available, disabling PKE tests
..........................................................................................
test pte.p pte.rw pte.user pte.a pte.d pde.p pde.rw pde.user pde.a pdpte.ro user write: FAIL: unexpected access
Dump mapping: address: 0x1234c0200000
------L4: 5d72027
------L3: 5d71025
------L2: 5d74027
------L1: 2000067
check_effective_sp_permissions: write access at4 should fail

5898246 tests, 1 failures
FAIL access

After the patch
---------------
root@intel-x86-64:~# modprobe kvm_intel ept=0
root@intel-x86-64:~# cat /sys/module/kvm_intel/parameters/ept
N
root@intel-x86-64:~# ./access
BUILD_HEAD=ba3c9773
timeout -k 1s --foreground 3600 /usr/bin/qemu-system-x86_64 --no-reboot -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel /tmp/tmp.UmWsRrn6l0 -smp 1 -cpu max # -initrd /tmp/tmp.Up02J8RkHY
enabling apic
starting test

run
CR4.PKE not available, disabling PKE tests
..........................................................................................
5898246 tests, 0 failures
PASS access

[1] https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/commit/47fd6bc54674fb1d8a29c55305042689e8692522

Lai Jiangshan (1):
  KVM: X86: MMU: Use the correct inherited permissions to get shadow
    page

 Documentation/virt/kvm/mmu.txt |  4 ++--
 arch/x86/kvm/paging_tmpl.h     | 14 +++++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-13  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-11 15:46 [PATCH 5.4 0/1] KVM: backport fix for CVE-2021-38198 Ovidiu Panait
2021-08-11 15:46 ` [PATCH 5.4 1/1] KVM: X86: MMU: Use the correct inherited permissions to get shadow page Ovidiu Panait
2021-08-13  7:36   ` Paolo Bonzini
2021-08-13  8:51 ` [PATCH 5.4 0/1] KVM: backport fix for CVE-2021-38198 Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox