Re: [PATCH 1/2] vmevent: don't leak unitialized data to userspace

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

 



On Wed, 23 May 2012, Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
> Subject: [PATCH] vmevent: don't leak unitialized data to userspace
> 
> Remember to initialize all attrs[nr] fields in vmevent_setup_watch().
> 
> Cc: Anton Vorontsov <anton.vorontsov@xxxxxxxxxx>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
> ---
>  mm/vmevent.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> Index: b/mm/vmevent.c
> ===================================================================
> --- a/mm/vmevent.c	2012-05-22 17:51:13.195231958 +0200
> +++ b/mm/vmevent.c	2012-05-22 17:51:40.991231956 +0200
> @@ -350,7 +350,10 @@
>  
>  		attrs = new;
>  
> -		attrs[nr++].type = attr->type;
> +		attrs[nr].type = attr->type;
> +		attrs[nr].value = 0;
> +		attrs[nr].state = 0;
> +		nr++;
>  	}
>  
>  	watch->sample_attrs	= attrs;

Applied, thanks!

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]