]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: Fix bounds checking in ioapic indirect register reads (CVE-2013-1798)
authorAndy Honig <ahonig@google.com>
Wed, 20 Feb 2013 22:49:16 +0000 (14:49 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Apr 2013 04:23:48 +0000 (21:23 -0700)
commit17f13c27702d90899081bf70134132ed5f25158e
tree7681aaf5322644c2bd2056b5769beb42968024d9
parentdf0ed3450c217a1cd571c0d4efa4dc6c458894a9
KVM: Fix bounds checking in ioapic indirect register reads (CVE-2013-1798)

commit a2c118bfab8bc6b8bb213abfc35201e441693d55 upstream.

If the guest specifies a IOAPIC_REG_SELECT with an invalid value and follows
that with a read of the IOAPIC_REG_WINDOW KVM does not properly validate
that request.  ioapic_read_indirect contains an
ASSERT(redir_index < IOAPIC_NUM_PINS), but the ASSERT has no effect in
non-debug builds.  In recent kernels this allows a guest to cause a kernel
oops by reading invalid memory.  In older kernels (pre-3.3) this allows a
guest to read from large ranges of host memory.

Tested: tested against apic unit tests.

Signed-off-by: Andrew Honig <ahonig@google.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
virt/kvm/ioapic.c