From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-block@nongnu.org, mreitz@redhat.com, eblake@redhat.com,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 4/6] luks: Turn invalid assertion into check
Date: Mon, 12 Mar 2018 16:03:46 +0000 [thread overview]
Message-ID: <20180312160346.GH3493@redhat.com> (raw)
In-Reply-To: <20180312150218.1314-5-kwolf@redhat.com>
On Mon, Mar 12, 2018 at 04:02:16PM +0100, Kevin Wolf wrote:
> The .bdrv_getlength implementation of the crypto block driver asserted
> that the payload offset isn't after EOF. This is an invalid assertion to
> make as the image file could be corrupted. Instead, check it and return
> -EIO if the file is too small for the payload offset.
>
> Zero length images are fine, so trigger -EIO only on offset > len, not
> on offset >= len as the assertion did before.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/crypto.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-03-12 16:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 15:02 [Qemu-devel] [PATCH v2 0/6] luks: Implement .bdrv_co_create Kevin Wolf
2018-03-12 15:02 ` [Qemu-devel] [PATCH v2 1/6] luks: Separate image file creation from formatting Kevin Wolf
2018-03-12 15:02 ` [Qemu-devel] [PATCH v2 2/6] luks: Create block_crypto_co_create_generic() Kevin Wolf
2019-05-14 11:13 ` Daniel P. Berrangé
2019-05-14 17:53 ` Kevin Wolf
2018-03-12 15:02 ` [Qemu-devel] [PATCH v2 3/6] luks: Support .bdrv_co_create Kevin Wolf
2018-03-12 16:03 ` Daniel P. Berrangé
2018-03-12 15:02 ` [Qemu-devel] [PATCH v2 4/6] luks: Turn invalid assertion into check Kevin Wolf
2018-03-12 16:03 ` Daniel P. Berrangé [this message]
2018-03-12 15:02 ` [Qemu-devel] [PATCH v2 5/6] luks: Catch integer overflow for huge sizes Kevin Wolf
2018-03-12 15:02 ` [Qemu-devel] [PATCH v2 6/6] qemu-iotests: Test luks QMP image creation Kevin Wolf
2018-03-12 16:06 ` Daniel P. Berrangé
2018-03-12 16:34 ` [Qemu-devel] [PATCH v2 0/6] luks: Implement .bdrv_co_create Kevin Wolf
2018-03-12 17:59 ` no-reply
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=20180312160346.GH3493@redhat.com \
--to=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).