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 42/47] qcow2: Fix NULL dereference in qc


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH for-2.0 42/47] qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146)
Date: Sat, 29 Mar 2014 00:35:01 +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>

The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots
!= 0. By having the initialisation of both fields separated in
qcow2_open(), any error occuring in between would cause the error path
to dereference NULL in qcow2_free_snapshots() if the image had any
snapshots.

Signed-off-by: Kevin Wolf <address@hidden>
---
  block/qcow2.c              | 7 ++++---
  tests/qemu-iotests/080     | 7 +++++++
  tests/qemu-iotests/080.out | 4 ++++
  3 files changed, 15 insertions(+), 3 deletions(-)

Reviewed-by: Max Reitz <address@hidden>



reply via email to

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