]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
ALSA: timer: Fix leak in events via snd_timer_user_ccallback
authorKangjie Lu <kangjielu@gmail.com>
Wed, 25 May 2016 15:17:24 +0000 (16:17 +0100)
committerKamal Mostafa <kamal@canonical.com>
Fri, 10 Jun 2016 13:32:25 +0000 (06:32 -0700)
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.

Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit 9a47e9cff994f37f7f0dbd9ae23740d0f64f9fe6)
CVE-2016-4578
BugLink: https://bugs.launchpad.net/bugs/1581866
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
sound/core/timer.c

index cfa3500a3327c3a2ebc8e24afca8438b1cfdb5ac..541053dcc856fd1c0694c0c209a0a8ae95024b5e 100644 (file)
@@ -1247,6 +1247,7 @@ static void snd_timer_user_ccallback(struct snd_timer_instance *timeri,
                tu->tstamp = *tstamp;
        if ((tu->filter & (1 << event)) == 0 || !tu->tread)
                return;
+       memset(&r1, 0, sizeof(r1));
        r1.event = event;
        r1.tstamp = *tstamp;
        r1.val = resolution;