Skip to content

Commit ad15571

Browse files
xidongwangtiwai
authored andcommitted
ALSA: opl3: fix infoleak in opl3
The stack object “info” in snd_opl3_ioctl() has a leaking problem. It has 2 padding bytes which are not initialized and leaked via “copy_to_user”. Signed-off-by: xidongwang <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent d02b105 commit ad15571

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/drivers/opl3/opl3_synth.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
9191
{
9292
struct snd_dm_fm_info info;
9393

94+
memset(&info, 0, sizeof(info));
95+
9496
info.fm_mode = opl3->fm_mode;
9597
info.rhythm = opl3->rhythm;
9698
if (copy_to_user(argp, &info, sizeof(struct snd_dm_fm_info)))

0 commit comments

Comments
 (0)