]> Git Repo - qemu.git/commit - block/qcow2.c
qcow2: Fix header extension size check
authorKevin Wolf <[email protected]>
Tue, 25 Nov 2014 17:12:40 +0000 (18:12 +0100)
committerKevin Wolf <[email protected]>
Wed, 10 Dec 2014 09:31:13 +0000 (10:31 +0100)
commit2ebafc854d109ff09b66fb4dd62c2c53fc29754a
tree2647037960aee19ef9c07457a6e4b3bd93330ffa
parent3dc7ca3c97dff8732e38828b38e0497efba0fedf
qcow2: Fix header extension size check

After reading the extension header, offset is incremented, but not
checked against end_offset any more. This way an integer overflow could
happen when checking whether the extension end is within the allowed
range, effectively disabling the check.

This patch adds the missing check and a test case for it.

Cc: [email protected]
Reported-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: 1416935562[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/qcow2.c
tests/qemu-iotests/080
tests/qemu-iotests/080.out
This page took 0.022122 seconds and 4 git commands to generate.