linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: sam hao <ssesamhao@gmail.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com
Subject: Re: Slab-of-out-bounds in search_memslots() in kvm_host.h
Date: Fri, 17 Apr 2020 07:48:48 -0700	[thread overview]
Message-ID: <20200417144848.GA13233@linux.intel.com> (raw)
In-Reply-To: <CANhq1J6AJvkXUVZtbYgZubepU8xL88Q56UrcDprmG_eDapmXtA@mail.gmail.com>

On Fri, Apr 17, 2020 at 09:24:10PM +0800, sam hao wrote:
> Hi,
> 
> I've found possible out of bounds access in search_memslots() in kvm_host.h.

...

> if (start < slots->used_slots && gfn >= memslots[start].base_gfn &&
>             gfn < memslots[start].base_gfn + memslots[start].npages) {
>                 atomic_set(&slots->lru_slot, start);
>                 return &memslots[start];
> }

Fixed (with this exact check) by commit b6467ab142b7 ("KVM: Check validity
of resolved slot when searching memslots").  Syzbot found this one very
quickly :-)  Thanks!

      reply	other threads:[~2020-04-17 14:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 13:24 Slab-of-out-bounds in search_memslots() in kvm_host.h sam hao
2020-04-17 14:48 ` Sean Christopherson [this message]

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=20200417144848.GA13233@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=ssesamhao@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).