diff options
author | Kevin Wolf <kwolf@redhat.com> | 2023-01-12 20:14:51 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-01-24 18:26:41 +0100 |
commit | b03dd9613bcf8fe948581b2b3585510cb525c382 (patch) | |
tree | afb66293d384f18a2ee3db7aea43b60fab6079ee /trace | |
parent | 3d65110f0cd453ac5a5a9c4211902271775eba75 (diff) |
qcow2: Fix theoretical corruption in store_bitmap() error path
In order to write the bitmap table to the image file, it is converted to
big endian. If the write fails, it is passed to clear_bitmap_table() to
free all of the clusters it had allocated before. However, if we don't
convert it back to native endianness first, we'll free things at a wrong
offset.
In practical terms, the offsets will be so high that we won't actually
free any allocated clusters, but just run into an error, but in theory
this can cause image corruption.
Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230112191454.169353-2-kwolf@redhat.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'trace')
0 files changed, 0 insertions, 0 deletions