]> git.itanic.dy.fi Git - linux-stable/commit
ALSA: rawmidi: Initialize allocated buffers
authorTakashi Iwai <tiwai@suse.de>
Mon, 3 Sep 2018 13:16:43 +0000 (15:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:15:40 +0000 (08:15 +0200)
commit135c2b1c05d027ea20d9ecf359f8d7534569ffc1
treecefe99e094c6a89395dd912dc61efc5dcc2709d8
parent9568ef017c0b88c705f7d585b7f30d56f3f0ed87
ALSA: rawmidi: Initialize allocated buffers

commit 5a7b44a8df822e0667fc76ed7130252523993bda upstream.

syzbot reported the uninitialized value exposure in certain situations
using virmidi loop.  It's likely a very small race at writing and
reading, and the influence is almost negligible.  But it's safer to
paper over this just by replacing the existing kvmalloc() with
kvzalloc().

Reported-by: syzbot+194dffdb8b22fc5d207a@syzkaller.appspotmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/rawmidi.c