Skip to content

Commit 39a8fc4

Browse files
perexgtiwai
authored andcommitted
ALSA: rawmidi - fix the uninitalized user_pversion
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: alsa-project/alsa-lib#178 Fixes: 09d2317 ("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>
1 parent 78ea40e commit 39a8fc4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sound/core/rawmidi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
447447
err = -ENOMEM;
448448
goto __error;
449449
}
450+
rawmidi_file->user_pversion = 0;
450451
init_waitqueue_entry(&wait, current);
451452
add_wait_queue(&rmidi->open_wait, &wait);
452453
while (1) {

0 commit comments

Comments
 (0)