]> git.baikalelectronics.ru Git - kernel.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)
committerMarcelo Tosatti <mtosatti@redhat.com>
Tue, 19 Mar 2013 17:20:21 +0000 (14:20 -0300)
commit5ea7e59db2a4c84be29a7d5113c9b0fe5c8b0d98
tree39261e300db388699d388d98afa4aca107258571
parent51e2ef500f150e2d16cdc23c08523e491bfb4443
KVM: Fix bounds checking in ioapic indirect register reads (CVE-2013-1798)

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>
virt/kvm/ioapic.c