Re: [Qemu-block] [PATCH 4/6] luks: Turn invalid assertion into check

2018-03-12 Thread Daniel P . Berrangé
On Fri, Mar 09, 2018 at 06:27:11PM +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 fil

Re: [Qemu-block] [PATCH 4/6] luks: Turn invalid assertion into check

2018-03-09 Thread Kevin Wolf
Am 09.03.2018 um 21:19 hat Eric Blake geschrieben: > On 03/09/2018 11:27 AM, 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. Inste

Re: [Qemu-block] [PATCH 4/6] luks: Turn invalid assertion into check

2018-03-09 Thread Eric Blake
On 03/09/2018 11:27 AM, 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 p