All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ALSA: opl3: fix infoleak in opl3
@ 2020-07-06  3:27 Xidong Wang
  2020-07-07  8:11   ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Xidong Wang @ 2020-07-06  3:27 UTC (permalink / raw)
  To: Xidong Wang, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel

From: xidongwang <wangxidong_97@163.com>

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>
---
 sound/drivers/opl3/opl3_synth.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c
index e69a4ef..08c10ac 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)))
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] ALSA: opl3: fix infoleak in opl3
  2020-07-06  3:27 [PATCH 1/1] ALSA: opl3: fix infoleak in opl3 Xidong Wang
@ 2020-07-07  8:11   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-07-07  8:11 UTC (permalink / raw)
  To: Xidong Wang; +Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel

On Mon, 06 Jul 2020 05:27:38 +0200,
Xidong Wang wrote:
> 
> From: xidongwang <wangxidong_97@163.com>
> 
> 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>

Applied, thanks.


Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] ALSA: opl3: fix infoleak in opl3
@ 2020-07-07  8:11   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-07-07  8:11 UTC (permalink / raw)
  To: Xidong Wang; +Cc: linux-kernel, alsa-devel, Takashi Iwai

On Mon, 06 Jul 2020 05:27:38 +0200,
Xidong Wang wrote:
> 
> From: xidongwang <wangxidong_97@163.com>
> 
> 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>

Applied, thanks.


Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-07  8:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06  3:27 [PATCH 1/1] ALSA: opl3: fix infoleak in opl3 Xidong Wang
2020-07-07  8:11 ` Takashi Iwai
2020-07-07  8:11   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.