All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Linus Torvalds <torvalds@linuxfoundation.org>
Cc: "David Laight" <david.laight.linux@gmail.com>,
	"Haoran Wang" <haoranwangsec@gmail.com>,
	jasowangio@gmail.com, "KVM list" <kvm@vger.kernel.org>,
	virtualization@lists.linux.dev, Netdev <netdev@vger.kernel.org>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Security Officers" <security@kernel.org>
Subject: Re: [BUG] vhost/vringh: __get_user without access_ok leaks kernel memory via vDPA passthrough
Date: Sun, 18 Oct 2026 18:13:26 -0400	[thread overview]
Message-ID: <20261018181202-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAHk-=wjneFJ7XmZ6ux-LsHq4apDgANcKfERztmAG9sGVY_TxAg@mail.gmail.com>

On Sun, Oct 18, 2026 at 12:06:36PM -1000, Linus Torvalds wrote:
> >     > > +
> >     > > +           if (!access_ok(uaddr, sizeof(*p)))
> >     > > +                   return -EFAULT;
> >     > > +           ret = __get_user(tmp, uaddr);
> >     >
> >     > Can't that be a normal get_user() call?
> >     >
> >     > David
> 
> 
> >     Ugh, actually no. This is called under local_bh_disable.
> > 
> >     get_user would splat on might_sleep.


> I[ sorry for html - driving around ]
> 
> That's a separate bug, and you really shouldn't use __get_user to work around
> it just because it doesn't check. 
> 
> You should use pagefault_disable() around the access. And if there is still a
> sleep_on() complaint, that should be fixed. 
> 
>         Linus


Thanks Linus, will look into this.

-- 
MST


  parent reply	other threads:[~2026-10-18 22:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15  7:23 [BUG] vhost/vringh: __get_user without access_ok leaks kernel memory via vDPA passthrough Haoran Wang
2026-10-15  7:42 ` Eugenio Perez Martin
2026-10-17 21:59 ` David Laight
2026-10-18 19:24 ` Michael S. Tsirkin
2026-10-18 19:48   ` David Laight
2026-10-18 21:42     ` Michael S. Tsirkin
2026-10-18 21:57     ` Michael S. Tsirkin
     [not found]       ` <CAHk-=wjneFJ7XmZ6ux-LsHq4apDgANcKfERztmAG9sGVY_TxAg@mail.gmail.com>
2026-10-18 22:13         ` Michael S. Tsirkin [this message]
2026-10-18 23:12         ` Linus Torvalds
2026-10-18 20:34   ` Linus Torvalds
2026-10-18 21:11     ` Linus Torvalds
2026-10-18 21:41       ` Michael S. Tsirkin
2026-10-18 21:43     ` Michael S. Tsirkin
     [not found]       ` <376ef9d0-b03f-4f85-aee5-46cf20eb00ae@gmail.com>
2026-10-20  6:30         ` Michael S. Tsirkin
2026-10-20  6:51           ` Linus Torvalds
2026-10-20  7:25             ` Removing __get_user / __put_user for good Linus Torvalds
2026-10-20  9:33               ` Jani Nikula
2026-10-20  9:46               ` Michael S. Tsirkin
2026-10-20 13:19               ` Ingo Molnar
2026-10-20  7:27             ` [BUG] vhost/vringh: __get_user without access_ok leaks kernel memory via vDPA passthrough Michael S. Tsirkin
2026-10-20  9:21             ` David Laight
2026-10-20  9:22           ` Eugenio Perez Martin
2026-10-20  9:41             ` Michael S. Tsirkin

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=20261018181202-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=david.laight.linux@gmail.com \
    --cc=eperezma@redhat.com \
    --cc=haoranwangsec@gmail.com \
    --cc=jasowangio@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=security@kernel.org \
    --cc=torvalds@linuxfoundation.org \
    --cc=virtualization@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.