[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [PATCH for 2.9] qcow2: avoid nb_sectors int overflow a
From: |
Max Reitz |
Subject: |
Re: [Qemu-stable] [PATCH for 2.9] qcow2: avoid nb_sectors int overflow at zero/discard |
Date: |
Tue, 14 Nov 2017 15:40:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 2017-10-24 10:56, Anton Nefedov wrote:
> during discard, signed integer overflow leads to end_offset possibly
> be less than offset,
> that in turn makes nb_clusters (to discard) much bigger than expected,
> leading to a possible data loss, operation taking very long and
> image growing large as discard will allocate L2 tables for all that
> huge amount of clusters
>
> One possibility where nb_sectors is large enough (>=2^21) is vm_state
> discard at snapshot creation.
>
> Fixed on master in 2.10 with:
>
> d2cb36af2b0040d421b347e6e4e803e07220f78d
> Author: Eric Blake <address@hidden>
> Date: Sat May 6 19:05:52 2017 -0500
>
> qcow2: Discard/zero clusters by byte count
>
> Signed-off-by: Anton Nefedov <address@hidden>
> Signed-off-by: Denis V. Lunev <address@hidden>
> ---
> block/qcow2.h | 6 +++---
> block/qcow2-cluster.c | 6 +++---
> 2 files changed, 6 insertions(+), 6 deletions(-)
FWIW:
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-stable] [PATCH for 2.9] qcow2: avoid nb_sectors int overflow at zero/discard,
Max Reitz <=