qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.0 45/47] qcow2: Limit snapshot table size


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH for-2.0 45/47] qcow2: Limit snapshot table size
Date: Sat, 29 Mar 2014 00:41:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 26.03.2014 13:06, Stefan Hajnoczi wrote:
From: Kevin Wolf <address@hidden>

Even with a limit of 64k snapshots, each snapshot could have a filename
and an ID with up to 64k, which would still lead to pretty large
allocations, which could potentially lead to qemu aborting. Limit the
total size of the snapshot table to an average of 1k per entry when
the limit of 64k snapshots is fully used. This should be plenty for any
reasonable user.

This also fixes potential integer overflows of s->snapshot_size.

Suggested-by: Max Reitz <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
  block/qcow2-snapshot.c | 15 ++++++++++++++-
  block/qcow2.h          |  4 ++++
  2 files changed, 18 insertions(+), 1 deletion(-)

Reviewed-by: Max Reitz <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]