diff mbox series

[UNTESTED] net/usb: kalmia: Fix uninit-value in kalmia_send_init_packet

Message ID 7266fe67c835f90e5c257129014a63e79e849ef9.camel@gmail.com (mailing list archive)
State Superseded
Headers show
Series [UNTESTED] net/usb: kalmia: Fix uninit-value in kalmia_send_init_packet | expand

Commit Message

Miko Larsson Jan. 31, 2023, 11:14 a.m. UTC
From ef617d8df22945b871ab989e25c07d7c60ae21f6 Mon Sep 17 00:00:00 2001
From: Miko Larsson <mikoxyzzz@gmail.com>
Date: Tue, 31 Jan 2023 11:01:20 +0100
Subject: [UNTESTED PATCH] net/usb: kalmia: Fix uninit-value in kalmia_send_init_packet

syzbot reports that act_len in kalmia_send_init_packet() is
uninitialized. Attempt to fix this by initializing it to 0.

Fixes: d40261236e8e ("net/usb: Add Samsung Kalmia driver for Samsung GT-B3730")
Reported-by: syzbot+cd80c5ef5121bfe85b55@syzkaller.appspotmail.com
Signed-off-by: Miko Larsson <mikoxyzzz@gmail.com>
---
 drivers/net/usb/kalmia.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH Jan. 31, 2023, 11:37 a.m. UTC | #1
On Tue, Jan 31, 2023 at 12:14:54PM +0100, Miko Larsson wrote:
> >From ef617d8df22945b871ab989e25c07d7c60ae21f6 Mon Sep 17 00:00:00 2001
> From: Miko Larsson <mikoxyzzz@gmail.com>
> Date: Tue, 31 Jan 2023 11:01:20 +0100

Why is this in the changelog text?

> Subject: [UNTESTED PATCH] net/usb: kalmia: Fix uninit-value in kalmia_send_init_packet
> 
> syzbot reports that act_len in kalmia_send_init_packet() is
> uninitialized. Attempt to fix this by initializing it to 0.

You can send patches to syzbot to have it test things, have you tried
that?

thanks,

greg k-h
Miko Larsson Jan. 31, 2023, 11:48 a.m. UTC | #2
On Tue, 2023-01-31 at 12:37 +0100, Greg KH wrote:
> On Tue, Jan 31, 2023 at 12:14:54PM +0100, Miko Larsson wrote:
> > > From ef617d8df22945b871ab989e25c07d7c60ae21f6 Mon Sep 17 00:00:00
> > > 2001
> > From: Miko Larsson <mikoxyzzz@gmail.com>
> > Date: Tue, 31 Jan 2023 11:01:20 +0100
> 
> Why is this in the changelog text?
D'oh, sorry about that. Imported the patch directly into Evolution
without trimming that away.

> > Subject: [UNTESTED PATCH] net/usb: kalmia: Fix uninit-value in
> > kalmia_send_init_packet
> > 
> > syzbot reports that act_len in kalmia_send_init_packet() is
> > uninitialized. Attempt to fix this by initializing it to 0.
> 
> You can send patches to syzbot to have it test things, have you tried
> that?
Didn't know that, will try!
diff mbox series

Patch

diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c
index 9f2b70ef39aa..b158fb7bf66a 100644
--- a/drivers/net/usb/kalmia.c
+++ b/drivers/net/usb/kalmia.c
@@ -56,7 +56,7 @@  static int
 kalmia_send_init_packet(struct usbnet *dev, u8 *init_msg, u8 init_msg_len,
 	u8 *buffer, u8 expected_len)
 {
-	int act_len;
+	int act_len = 0;
 	int status;
 
 	netdev_dbg(dev->net, "Sending init packet");