From: Dan Carpenter <dan.carpenter@linaro.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Cindy Lu <lulu@redhat.com>, Jason Wang <jasowang@redhat.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
Xie Yongji <xieyongji@bytedance.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Christian Brauner <brauner@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] vduse: Fix off by one in vduse_dev_mmap()
Date: Wed, 28 Feb 2024 20:42:52 +0300 [thread overview]
Message-ID: <81e2238e-3ed8-44dc-82fe-256155c271ba@moroto.mountain> (raw)
In-Reply-To: <20240227104743-mutt-send-email-mst@kernel.org>
On Tue, Feb 27, 2024 at 10:48:49AM -0500, Michael S. Tsirkin wrote:
> On Tue, Feb 27, 2024 at 06:21:46PM +0300, Dan Carpenter wrote:
> > The dev->vqs[] array has "dev->vq_num" elements. It's allocated in
> > vduse_dev_init_vqs(). Thus, this > comparison needs to be >= to avoid
> > reading one element beyond the end of the array.
> >
> > Fixes: 316ecd1346b0 ("vduse: Add file operation for mmap")
> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
>
>
> Oh wow and does this not come from userspace? If yes we
> need the speculation magic macro when using the index, do we not?
>
Yes, it does come from userspace.
To be honest, I'm not sure about speculation. The similar places in
this file protect against speculation so, probably? I'll resend the
patch.
regards,
dan carpenter
prev parent reply other threads:[~2024-02-28 17:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 15:21 Dan Carpenter
2024-02-27 15:48 ` Michael S. Tsirkin
2024-02-28 17:42 ` Dan Carpenter [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=81e2238e-3ed8-44dc-82fe-256155c271ba@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=brauner@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lulu@redhat.com \
--cc=maxime.coquelin@redhat.com \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xieyongji@bytedance.com \
--cc=xuanzhuo@linux.alibaba.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
all inboxes | Powered by JetHome®