mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ALSA: opl3: fix infoleak in opl3
commit ad155712bb upstream.
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 <wangxidong_97@163.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1594006058-30362-1-git-send-email-wangxidong_97@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
384260fd46
commit
d917af2fa7
@@ -105,6 +105,8 @@ int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
|
||||
{
|
||||
struct snd_dm_fm_info info;
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
|
||||
info.fm_mode = opl3->fm_mode;
|
||||
info.rhythm = opl3->rhythm;
|
||||
if (copy_to_user(argp, &info, sizeof(struct snd_dm_fm_info)))
|
||||
|
||||
Reference in New Issue
Block a user