linux-stable/arch/x86
Thomas Gleixner 187598fd82 KVM: x86: Cancel pvclock_gtod_work on module removal
commit 594b27e677 upstream.

Nothing prevents the following:

  pvclock_gtod_notify()
    queue_work(system_long_wq, &pvclock_gtod_work);
  ...
  remove_module(kvm);
  ...
  work_queue_run()
    pvclock_gtod_work()	<- UAF

Ditto for any other operation on that workqueue list head which touches
pvclock_gtod_work after module removal.

Cancel the work in kvm_arch_exit() to prevent that.

Fixes: 16e8d74d2d ("KVM: x86: notifier for clocksource changes")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Message-Id: <87czu4onry.ffs@nanos.tec.linutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 10:08:31 +02:00
..
boot
configs
crypto
entry
events x86/events/amd/iommu: Fix sysfs type mismatch 2021-05-14 09:44:26 +02:00
hyperv
ia32
include KVM: x86/mmu: Remove the defunct update_pte() paging hook 2021-05-19 10:08:20 +02:00
kernel x86/kprobes: Fix to check non boostable prefixes correctly 2021-05-14 09:44:23 +02:00
kvm KVM: x86: Cancel pvclock_gtod_work on module removal 2021-05-19 10:08:31 +02:00
lib
math-emu
mm
net
oprofile
pci
platform
power
purgatory
ras
realmode
tools
um
video
xen
.gitignore
Kbuild
Kconfig x86/platform/uv: Fix !KEXEC build failure 2021-05-14 09:44:22 +02:00
Kconfig.cpu
Kconfig.debug
Makefile x86/build: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS) 2021-05-11 14:04:06 +02:00
Makefile.um
Makefile_32.cpu