Skip to contentSkip to conversation

infoleak fix1 in timer

PATCH In review Kangjie Lu 2 participants 2 messages May 3, 2016 – May 8, 2016 Sound

lore
Share & tools
lore

Kangjie Lu

author
#0 lore raw

PATCH 1/1 infoleak fix1 in timer

The stack object “tread” has a total size of 32 bytes. Its field “event” and “val” both contain 4 bytes padding. These 8 bytes padding bytes are sent to user without being initialized.

---
 sound/core/timer.c | 1 +
 1 file changed, 1 insertion(+)
sound/core/timer.c +1 -0
index 6469bed..964f5eb 100644
@@ -1739,6 +1739,7 @@ static int snd_timer_user_params(struct file *file,
 	if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
 		if (tu->tread) {
 			struct snd_timer_tread tread;
+			memset(&tread, 0, sizeof(tread));
 			tread.event = SNDRV_TIMER_EVENT_EARLY;
 			tread.tstamp.tv_sec = 0;
 			tread.tstamp.tv_nsec = 0;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 6 lines · Kangjie Lu

The stack object “tread” has a total size of 32 bytes. Its field “event” and “val” both contain 4 bytes padding. These 8 bytes padding bytes are sent to user without being initialized.

Thanks, I applied now all three patches. But I rephrased the subjects to more meaningful ones. Better to give a bit more informative subject line at the next time.

Takashi