Skip to contentSkip to conversation

infoleak fix3 in timer

PATCH New Kangjie Lu 1 participant 1 message May 3, 2016 Sound

lore
Share & tools
lore

Kangjie Lu

author
#0 lore raw

PATCH 1/1 infoleak fix3 in timer

The stack object “r1” 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 e98fa5f..c69a271 100644
@@ -1268,6 +1268,7 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,
 	}
 	if ((tu->filter & (1 << SNDRV_TIMER_EVENT_RESOLUTION)) &&
 	    tu->last_resolution != resolution) {
+		memset(&r1, 0, sizeof(r1));
 		r1.event = SNDRV_TIMER_EVENT_RESOLUTION;
 		r1.tstamp = tstamp;
 		r1.val = resolution;
Signature · 1 line
1.9.1