Re: [Qemu-devel] [PATCH 5/6] luks: Catch integer overflow for huge sizes

2018-03-12 Thread Daniel P . Berrangé
On Fri, Mar 09, 2018 at 06:27:12PM +0100, Kevin Wolf wrote: > When you request an image size close to UINT64_MAX, the addition of the > crypto header may cause an integer overflow. Catch it instead of > silently truncating the image size. > > Signed-off-by: Kevin Wolf > --- > block/crypto.c | 5

Re: [Qemu-devel] [PATCH 5/6] luks: Catch integer overflow for huge sizes

2018-03-09 Thread Eric Blake
On 03/09/2018 11:27 AM, Kevin Wolf wrote: When you request an image size close to UINT64_MAX, the addition of the crypto header may cause an integer overflow. Catch it instead of silently truncating the image size. Signed-off-by: Kevin Wolf --- block/crypto.c | 5 + 1 file changed, 5 ins

[Qemu-devel] [PATCH 5/6] luks: Catch integer overflow for huge sizes

2018-03-09 Thread Kevin Wolf
When you request an image size close to UINT64_MAX, the addition of the crypto header may cause an integer overflow. Catch it instead of silently truncating the image size. Signed-off-by: Kevin Wolf --- block/crypto.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block/crypto.c b/bloc