From: "Jan Beulich" Subject: [PATCH 4/5] HVM: prevent leaking heap data from hvm_save_one() Date: Tue, 10 Dec 2013 15:48:00 +0000 Message-ID: <52A745C0020000780010BF2A@nat28.tlf.novell.com> References: <52A744B7020000780010BEF1@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VqPXX-0004yy-RG for xen-devel@lists.xenproject.org; Tue, 10 Dec 2013 15:48:05 +0000 In-Reply-To: <52A744B7020000780010BEF1@nat28.tlf.novell.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: George Dunlap , Keir Fraser , Don Slutz List-Id: xen-devel@lists.xenproject.org When one or more of the vCPU-s of a guest are offline, no data may be put into the allocated space for them and, due to another bug, such uninitialized data may be passed back to the caller. Signed-off-by: Don Slutz Acked-by: Ian Campbell Reviewed-by: Jan Beulich --- a/xen/common/hvm/save.c +++ b/xen/common/hvm/save.c @@ -102,7 +102,7 @@ int hvm_save_one(struct domain *d, uint1 return -EINVAL; ctxt.size = sz; - ctxt.data = xmalloc_bytes(sz); + ctxt.data = xzalloc_bytes(sz); if ( !ctxt.data ) return -ENOMEM;