[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_6ECFD36FE36EC96283A5C4587761F76F8605@qq.com>
Date: Wed, 24 Jul 2024 13:58:45 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+78eccfb8b3c9a85fc6c5@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
linux-sound@...r.kernel.org,
perex@...ex.cz,
syzkaller-bugs@...glegroups.com,
tiwai@...e.com
Subject: [PATCH] ALSA: line6: init buf to zero
Syzbot report KMSAN uninit-value warnings.
When alloc buffer for midi_buffer->buf, init mem to 0.
Reported-and-tested-by: syzbot+78eccfb8b3c9a85fc6c5@...kaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=78eccfb8b3c9a85fc6c5
Signed-off-by: Edward Adam Davis <eadavis@...com>
---
sound/usb/line6/midibuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/usb/line6/midibuf.c b/sound/usb/line6/midibuf.c
index e7f830f7526c..1b699cb3b38d 100644
--- a/sound/usb/line6/midibuf.c
+++ b/sound/usb/line6/midibuf.c
@@ -48,7 +48,7 @@ void line6_midibuf_reset(struct midi_buffer *this)
int line6_midibuf_init(struct midi_buffer *this, int size, int split)
{
- this->buf = kmalloc(size, GFP_KERNEL);
+ this->buf = kzalloc(size, GFP_KERNEL);
if (this->buf == NULL)
return -ENOMEM;
--
2.43.0
Powered by blists - more mailing lists