Re: [PATCH 1/2] vmevent: don't leak unitialized data to userspace
From: Pekka Enberg <penberg@kernel.org>
Date: 2012-05-25 07:17:28
On Wed, 23 May 2012, Bartlomiej Zolnierkiewicz wrote:
quoted hunk ↗ jump to hunk
From: Bartlomiej Zolnierkiewicz <redacted> Subject: [PATCH] vmevent: don't leak unitialized data to userspace Remember to initialize all attrs[nr] fields in vmevent_setup_watch(). Cc: Anton Vorontsov <redacted> Signed-off-by: Bartlomiej Zolnierkiewicz <redacted> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- 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@kvack.org. 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@kvack.org"> email@kvack.org </a>