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

Re: [PATCH] tools/xenstored: Harden corrupt()


  • To: Julien Grall <julien@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 23 Jun 2022 14:59:46 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9IuVPsVWl/8sRCb1phdqUlF63oQpQLnaNXYBxHmCukA=; b=iTQyrrRUEAsUO1/gBlVY1Tj0lCvCYpKiD1R6tR383uL06ekRKV+HifzH5bLPs/5nReNh0g/gI1zA2ofYG/4U1llT9yxsDIu/IPhllTfV1yQkhqYKT7ICGfqIzrhGdA1gYwjBVRc4GL0Ze1zTe7faI6brH2blBX3xEc5SDQ8mj0AV7kHRrcfeCyTqGUPV9aqjUl4uxhIuz6GrTo6NaMq/ZG3ZYzdxPDooFONYfXRswt8nyAHt3nL7J0suvyh8GVlFVckVzoNlBMvPpe+4p7eDwZdDOBlYLg0z0bSRIk3GS+96MWS2K3Ea9LGkON2kjpTj9Gj3sDEo53rN7ev1cGWSuw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jbyf2GuDZRxGRd+8w2R9dygAN8hdbMxcKaUGbvca9aD6UttF18+Y/VsH3z0aSg9/wcRmCM2heIVtrkao2JEXxBJBDgFlcc04NHHa0ZKjBYTMXwZvPbjXmryy8N/kPNHLRsHcW4DtEpIDxUwcvWfrn6w5ehtwszqhNgED+zc2wVxEZWHqbQRx5B1rPT+JW5H0rCFTgvpZKABBpxX7nH7K1JpZ24xFoKYufdzHqR1KEFe15AqaNOx4QU+68dScawGytUCKCTePGbH+02hBMknP3syFValifD7AqgnH75WFS2zhJOmNuXX+o/9ibl1hzQEN26VFhYRi4sUvrhJSsn+QJw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <jgrall@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 23 Jun 2022 12:59:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.06.2022 13:24, Julien Grall wrote:
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> At the moment, corrupt() is neither checking for allocation failure
> nor freeing the allocated memory.
> 
> Harden the code by printing ENOMEM if the allocation failed and
> free 'str' after the last use.
> 
> This is not considered to be a security issue because corrupt() should
> only be called when Xenstored thinks the database is corrupted. Note
> that the trigger (i.e. a guest reliably provoking the call) would be
> a security issue.
> 
> Fixes: 06d17943f0cd ("Added a basic integrity checker, and some basic ability 
> to recover from store")
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

Is this something which would want queuing for backport?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.