]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Catch potential overrun in MCE setup
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 23 Oct 2009 07:37:00 +0000 (09:37 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Wed, 4 Nov 2009 14:42:35 +0000 (12:42 -0200)
commita9e38c3e01ad242fe2a625354cf065c34b01e3aa
tree4ea957d97f8d7399f1f58cfce2470f703f6d1a58
parent51bb296b09a83ee1aae025778db38f9d2cc7bb1a
KVM: x86: Catch potential overrun in MCE setup

We only allocate memory for 32 MCE banks (KVM_MAX_MCE_BANKS) but we
allow user space to fill up to 255 on setup (mcg_cap & 0xff), corrupting
kernel memory. Catch these overflows.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/x86.c