ALSA: rawmidi - fix the uninitalized user_pversion
authorJaroslav Kysela <perex@perex.cz>
Sat, 18 Dec 2021 12:39:25 +0000 (13:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 11:28:50 +0000 (12:28 +0100)
commitb398fcbe4de1e1100867fdb6f447c6fbc8fe7085
treea31485f18a96bf9b1c00fac44faf52858ad63099
parent3fd58303b05e23eaf752d7b300c2d67c95267d01
ALSA: rawmidi - fix the uninitalized user_pversion

commit 39a8fc4971a00d22536aeb7d446ee4a97810611b upstream.

The user_pversion was uninitialized for the user space file structure
in the open function, because the file private structure use
kmalloc for the allocation.

The kernel ALSA sequencer code clears the file structure, so no additional
fixes are required.

Cc: stable@kernel.org
Cc: broonie@kernel.org
BugLink: https://github.com/alsa-project/alsa-lib/issues/178
Fixes: 09d23174402d ("ALSA: rawmidi: introduce SNDRV_RAWMIDI_IOCTL_USER_PVERSION")
Reported-by: syzbot+88412ee8811832b00dbe@syzkaller.appspotmail.com
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20211218123925.2583847-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/rawmidi.c