All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Haoran Wang" <haoranwangsec@gmail.com>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH] vringh: validate user address in the IOTLB use_va read helper
Date: Thu, 15 Oct 2026 09:37:57 +0000	[thread overview]
Message-ID: <sashiko-outbox-172581@kernel.org> (raw)
In-Reply-To: <6ad09d48.81b1ab59.3da7fb.9fc9@mx.google.com>

> From c165d81ad210155e0ac8eff7a571d9e525c00113 Mon Sep 17 00:00:00 2001
> From: Haoran Wang <haoranwangsec@gmail.com>
> Date: Thu, 15 Oct 2026 16:59:32 +0800
> Subject: [PATCH] vringh: validate user address in the IOTLB use_va read helper
> 
> getu16_iotlb() reads a 2-byte value from the address returned by
> iotlb_translate() using __get_user(), which skips access_ok().
> iotlb_translate() only performs an IOTLB interval lookup and does not
> validate the address as a user pointer.  In the vhost-vdpa + vdpa_sim
> use_va path, vdpa_sim's default passthrough IOTLB identity-maps the
> whole address space and vdpasim_set_vq_address() stores the
> controller-supplied vring address verbatim, so a controller with
> CAP_NET_ADMIN can point the vring avail_user_addr at a kernel address.
> On a vq kick the worker then dereferences that kernel address via
> __get_user(), leaking 2 bytes of kernel memory per read; the value is
> disclosed to dmesg by vringh_bad().
> 
> get_user() is access_ok() + __get_user(), use it instead so a kernel
> address is rejected with -EFAULT rather than dereferenced.
> 
> 
> Signed-off-by: Haoran Wang <haoranwangsec@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/6ad09d48.81b1ab59.3da7fb.9fc9@mx.google.com?part=1


      reply	other threads:[~2026-10-15  9:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15  9:30 [PATCH] vringh: validate user address in the IOTLB use_va read helper Haoran Wang
2026-10-15  9:37 ` sashiko-bot [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=sashiko-outbox-172581@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=haoranwangsec@gmail.com \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --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.