6116861
From 527a5767c165abd2b4dba99da992c51ca7547562 Mon Sep 17 00:00:00 2001
6116861
From: Kangjie Lu <kangjielu@gmail.com>
6116861
Date: Tue, 3 May 2016 16:44:07 -0400
6116861
Subject: [PATCH 1/3] ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS
6116861
MIME-Version: 1.0
6116861
Content-Type: text/plain; charset=UTF-8
6116861
Content-Transfer-Encoding: 8bit
6116861
6116861
The stack object “tread” has a total size of 32 bytes. Its field
6116861
“event” and “val” both contain 4 bytes padding. These 8 bytes
6116861
padding bytes are sent to user without being initialized.
6116861
6116861
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
6116861
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6116861
---
6116861
 sound/core/timer.c | 1 +
6116861
 1 file changed, 1 insertion(+)
6116861
6116861
diff --git a/sound/core/timer.c b/sound/core/timer.c
6116861
index 6469bedda2f3..964f5ebf495e 100644
6116861
--- a/sound/core/timer.c
6116861
+++ b/sound/core/timer.c
6116861
@@ -1739,6 +1739,7 @@ static int snd_timer_user_params(struct file *file,
6116861
 	if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
6116861
 		if (tu->tread) {
6116861
 			struct snd_timer_tread tread;
6116861
+			memset(&tread, 0, sizeof(tread));
6116861
 			tread.event = SNDRV_TIMER_EVENT_EARLY;
6116861
 			tread.tstamp.tv_sec = 0;
6116861
 			tread.tstamp.tv_nsec = 0;
6116861
-- 
6116861
2.5.5
6116861