From: Kevin Wolf <kwolf@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Peter Turschmid <peter.turschm@nutanix.com>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
Peter Lieven <pl@kamp.de>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"qemu-stable@nongnu.org" <qemu-stable@nongnu.org>,
Jon Maloy <jmaloy@redhat.com>,
Raphael Norwitz <raphael.norwitz@nutanix.com>,
Max Reitz <mreitz@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Felipe Franciosi <felipe@nutanix.com>,
Paolo Bonzini <pbonzini@redhat.com>, P J P <ppandit@redhat.com>
Subject: Re: [PATCH] iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711)
Date: Tue, 28 Jan 2020 13:42:20 +0100 [thread overview]
Message-ID: <20200128124220.GE6431@linux.fritz.box> (raw)
In-Reply-To: <bfb7c669-19dc-5693-8afe-1f70b61c48f3@redhat.com>
Am 28.01.2020 um 13:30 hat Philippe Mathieu-Daudé geschrieben:
> Hi guys,
>
> (Cc'ing Jon)
>
> On 1/23/20 5:59 PM, Kevin Wolf wrote:
> > Am 23.01.2020 um 13:44 hat Felipe Franciosi geschrieben:
> > > When querying an iSCSI server for the provisioning status of blocks (via
> > > GET LBA STATUS), Qemu only validates that the response descriptor zero's
> > > LBA matches the one requested. Given the SCSI spec allows servers to
> > > respond with the status of blocks beyond the end of the LUN, Qemu may
> > > have its heap corrupted by clearing/setting too many bits at the end of
> > > its allocmap for the LUN.
> > >
> > > A malicious guest in control of the iSCSI server could carefully program
> > > Qemu's heap (by selectively setting the bitmap) and then smash it.
> > >
> > > This limits the number of bits that iscsi_co_block_status() will try to
> > > update in the allocmap so it can't overflow the bitmap.
> > >
> > > Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
> > > Signed-off-by: Peter Turschmid <peter.turschm@nutanix.com>
> > > Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
> >
> > Thanks, applied to the block branch.
>
> We are trying to reproduce this, do you already have some code that
> triggered this issue?
I don't, maybe Felipe has a reproducer that would crash QEMU.
> I am new to the block API, I noticed the block/blkdebug.c file with
> 'blkdebug' option, is it helpful to reproduce this issue via HMP?
>
> Any suggestion what would be the easier/quicker way to test this?
On the QEMU side, you just need to connect to an iscsi backend. The
malicious response must come from the server, which is not part of QEMU.
So no, blkdebug won't help you.
> Looking for iotests examples I see tests/qemu-iotests/147 providing a
> BuiltinNBD class. Is it the recommended way to go, to mock a iSCSI server?
That BuiltinNBD class doesn't implement an NBD server, but it just
starts the built-in NBD server in QEMU and runs some tests against it.
QEMU doesn't have a built-in iscsi server.
Kevin
next prev parent reply other threads:[~2020-01-28 12:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 12:44 [PATCH] iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711) Felipe Franciosi
2020-01-23 16:59 ` Kevin Wolf
2020-01-28 12:30 ` Philippe Mathieu-Daudé
2020-01-28 12:42 ` Kevin Wolf [this message]
2020-02-05 14:22 ` Felipe Franciosi
2020-01-23 17:46 ` Philippe Mathieu-Daudé
2020-01-23 21:29 ` Felipe Franciosi
2020-01-23 22:58 ` Peter Lieven
2020-01-24 10:04 ` Philippe Mathieu-Daudé
2020-01-24 10:48 ` Felipe Franciosi
2020-01-24 13:39 ` Kevin Wolf
2020-01-24 13:42 ` Philippe Mathieu-Daudé
2020-01-24 13:52 ` Kevin Wolf
2020-01-24 14:24 ` Philippe Mathieu-Daudé
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=20200128124220.GE6431@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=felipe@nutanix.com \
--cc=jmaloy@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.turschm@nutanix.com \
--cc=philmd@redhat.com \
--cc=pl@kamp.de \
--cc=ppandit@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=raphael.norwitz@nutanix.com \
--cc=ronniesahlberg@gmail.com \
--cc=stefanha@redhat.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;
as well as URLs for NNTP newsgroup(s).