[sheepdog] [PATCH] dog: referencing uninitialized buffer during cluster format

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Wed Dec 10 02:42:02 CET 2014


At Wed, 10 Dec 2014 10:06:43 +0900,
Saeki Masaki wrote:
> 
> when executing dog cluster format,
> by referring to the memory area that is not initialized
> update_node_list() was an unintended behavior.
> 
> Signed-off-by: Masaki Saeki <saeki.masaki at po.ntts.co.jp>
> ---
>  dog/dog.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Applied, thanks.
Hitoshi

> 
> diff --git a/dog/dog.c b/dog/dog.c
> index 3f33cdd..54520dd 100644
> --- a/dog/dog.c
> +++ b/dog/dog.c
> @@ -118,6 +118,7 @@ int update_node_list(int max_nodes)
>  	/* check whether cluster use diskmode */
>  	log_length = sizeof(struct epoch_log);
>  	logs = xmalloc(log_length);
> +	memset(logs, 0, log_length);
>  
>  	sd_init_req(&hdr, SD_OP_STAT_CLUSTER);
>  	hdr.data_length = log_length;
> -- 
> 1.7.1
> 
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog



More information about the sheepdog mailing list