summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorxidongwang <wangxidong_97@163.com>2020-07-05 20:27:38 -0700
committerTakashi Iwai <tiwai@suse.de>2020-07-07 10:10:49 +0200
commitad155712bb1ea2151944cf06a0e08c315c70c1e3 (patch)
tree61cc051b7feed12d5b1d2e4ff2bc1ac8deae42e3 /sound
parentd02b10590953429a6dd2d6245df4d8a0a869df66 (diff)
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 <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>
Diffstat (limited to 'sound')
-rw-r--r--sound/drivers/opl3/opl3_synth.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c
index e69a4ef0d6bd..08c10ac9d6c8 100644
--- a/sound/drivers/opl3/opl3_synth.c
+++ b/sound/drivers/opl3/opl3_synth.c
@@ -91,6 +91,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)))