All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: linux-block@vger.kernel.org, Xie Yongji <xieyongji@bytedance.com>,
	Christoph Hellwig <hch@lst.de>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	jasowang@redhat.com
Subject: Re: [PATCH v2] virtio-blk: limit seg_max to a safe value
Date: Mon, 24 May 2021 17:47:19 +0200	[thread overview]
Message-ID: <20210524154719.GA8498@lst.de> (raw)
In-Reply-To: <20210524154020.98195-1-stefanha@redhat.com>

On Mon, May 24, 2021 at 04:40:20PM +0100, Stefan Hajnoczi wrote:
> The struct virtio_blk_config seg_max value is read from the device and
> incremented by 2 to account for the request header and status byte
> descriptors added by the driver.
> 
> In preparation for supporting untrusted virtio-blk devices, protect
> against integer overflow and limit the value to a safe maximum.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2021-05-24 15:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 15:40 [PATCH v2] virtio-blk: limit seg_max to a safe value Stefan Hajnoczi
2021-05-24 15:47 ` Christoph Hellwig [this message]
2021-05-24 20:47 ` Michael S. Tsirkin
2021-06-03 14:59   ` Stefan Hajnoczi

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=20210524154719.GA8498@lst.de \
    --to=hch@lst.de \
    --cc=jasowang@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=xieyongji@bytedance.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 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.