linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Zheng Zhang <zheng.zhang@email.ucr.edu>,
	linux-hardening@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	Matthew Wilcox <willy@infradead.org>
Subject: Re: [BUG]: bad usercopy in kvm_stats_read in mm/usercopy.c
Date: Tue, 11 Jul 2023 09:26:38 -0700	[thread overview]
Message-ID: <202307110925.CBAF286C0A@keescook> (raw)
In-Reply-To: <ZK2ABPwCke32Kh0q@google.com>

On Tue, Jul 11, 2023 at 09:15:00AM -0700, Sean Christopherson wrote:
> On Mon, Jul 10, 2023, Andrew Morton wrote:
> > On Sun, 9 Jul 2023 14:32:09 -0700 Zheng Zhang <zheng.zhang@email.ucr.edu> wrote:
> > 
> > > Kees, Andrew, and  to whom it may concern:
> > > 
> > > Hello! We have found a bug in the Linux kernel version 6.2.0 by syzkaller
> > > with our own templates. It also produces a POC.
> > > Attached is the report, log, and reproducers generated by syzkaller
> > > Please let me know if there is any additional information that I can
> > > provide to help debug this issue.
> > > Thanks!
> > 
> > Let's cc the kvm mailing list.
> > 
> > Original email is at
> > https://lkml.kernel.org/r/CAC_GQSr3xzZaeZt85k_RCBd5kfiOve8qXo7a81Cq53LuVQ5r=Q@mail.gmail.com
> 
> Yeaaaah.  We failed kernel programming 101.  KVM installs file descriptors to
> let userspace read VM and vCPU stats, but doesn't grab a reference to the VM to
> ensure the VM and its vCPUs are kept alive until the stats fds are closed.  I'll
> send a patch.

Thanks! Another victory for hardened usercopy. :)

-- 
Kees Cook


  reply	other threads:[~2023-07-11 16:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-09 21:32 [BUG]: bad usercopy in kvm_stats_read in mm/usercopy.c Zheng Zhang
2023-07-10 20:34 ` Andrew Morton
2023-07-11 16:15   ` Sean Christopherson
2023-07-11 16:26     ` Kees Cook [this message]
2023-07-11 19:08       ` Zheng Zhang

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=202307110925.CBAF286C0A@keescook \
    --to=keescook@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=seanjc@google.com \
    --cc=willy@infradead.org \
    --cc=zheng.zhang@email.ucr.edu \
    /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).