diff options
author | xidongwang <wangxidong_97@163.com> | 2020-07-06 06:27:38 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-22 10:10:46 +0300 |
commit | af48a55d909e7254453cefc493de6feac0e08ae0 (patch) | |
tree | e07c85b5eaa0e0f5e46ff5d4fad299b50e4843c1 /sound/drivers/opl3 | |
parent | 0e253b4c9673de209c21d2f3a057c4da5b20ee3d (diff) | |
download | linux-af48a55d909e7254453cefc493de6feac0e08ae0.tar.xz |
ALSA: opl3: fix infoleak in opl3
commit ad155712bb1ea2151944cf06a0e08c315c70c1e3 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>
Diffstat (limited to 'sound/drivers/opl3')
-rw-r--r-- | sound/drivers/opl3/opl3_synth.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c index 42920a243328..3f94746d587a 100644 --- a/sound/drivers/opl3/opl3_synth.c +++ b/sound/drivers/opl3/opl3_synth.c @@ -104,6 +104,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))) |