projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d02b105
)
ALSA: opl3: fix infoleak in opl3
author
xidongwang
<wangxidong_97@163.com>
Mon, 6 Jul 2020 03:27:38 +0000
(20:27 -0700)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 7 Jul 2020 08:10:49 +0000
(10:10 +0200)
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>
sound/drivers/opl3/opl3_synth.c
patch
|
blob
|
history
diff --git
a/sound/drivers/opl3/opl3_synth.c
b/sound/drivers/opl3/opl3_synth.c
index e69a4ef0d6bdea61218aa9c9b95b06d0cfdcddce..08c10ac9d6c87a75374ac97e787ded3be15c4617 100644
(file)
--- 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)))