public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: P J P <ppandit@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	stable@vger.kernel.org, "Dmitry Vyukov" <dvyukov@google.com>,
	"Steve Rutherford" <srutherford@google.com>
Subject: Re: [PATCH] KVM: x86: fix out-of-bounds accesses of rtc_eoi map
Date: Thu, 24 Nov 2016 10:58:06 +0530 (IST)	[thread overview]
Message-ID: <alpine.LFD.2.20.1611241057110.15437@wniryva> (raw)
In-Reply-To: <b6981aa7-a1b4-a302-ae9e-1e4dbfbad737@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

+-- On Wed, 23 Nov 2016, Paolo Bonzini wrote --+
| On 23/11/2016 21:15, Radim Krčmář wrote:
| > KVM was using arrays of size KVM_MAX_VCPUS with vcpu_id, but ID can be
| > bigger that the maximal number of VCPUs, resulting in out-of-bounds
| > access.
| > 
| > Found by syzkaller:
| > 
| >   BUG: KASAN: slab-out-of-bounds in __apic_accept_irq+0xb33/0xb50 at addr [...]
| >   Write of size 1 by task a.out/27101
| >   CPU: 1 PID: 27101 Comm: a.out Not tainted 4.9.0-rc5+ #49
| >   Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
| >    [...]
| >   Call Trace:
| >    [...] __apic_accept_irq+0xb33/0xb50 arch/x86/kvm/lapic.c:905
| >    [...] kvm_apic_set_irq+0x10e/0x180 arch/x86/kvm/lapic.c:495
| >    [...] kvm_irq_delivery_to_apic+0x732/0xc10 arch/x86/kvm/irq_comm.c:86
| >    [...] ioapic_service+0x41d/0x760 arch/x86/kvm/ioapic.c:360
| >    [...] ioapic_set_irq+0x275/0x6c0 arch/x86/kvm/ioapic.c:222
| >    [...] kvm_ioapic_inject_all arch/x86/kvm/ioapic.c:235
| >    [...] kvm_set_ioapic+0x223/0x310 arch/x86/kvm/ioapic.c:670
| >    [...] kvm_vm_ioctl_set_irqchip arch/x86/kvm/x86.c:3668
| >    [...] kvm_arch_vm_ioctl+0x1a08/0x23c0 arch/x86/kvm/x86.c:3999
| >    [...] kvm_vm_ioctl+0x1fa/0x1a70 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3099
| 
| Prasad, this needs a CVE.

  Yes, I'm processing it. Thank you so much for CC'ing.

Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

  reply	other threads:[~2016-11-24  5:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 20:15 [PATCH] KVM: x86: fix out-of-bounds accesses of rtc_eoi map Radim Krčmář
2016-11-23 21:56 ` Paolo Bonzini
2016-11-24  5:28   ` P J P [this message]
2016-11-24 11:49 ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.20.1611241057110.15437@wniryva \
    --to=ppandit@redhat.com \
    --cc=dvyukov@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=srutherford@google.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox