[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_CE76CFE28DD5A5A20DF7121F5DDBDDB71907@qq.com>
Date: Wed, 4 Sep 2024 20:47:46 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+9d34f80f841e948c3fdb@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [usb?] KMSAN: kernel-usb-infoleak in usbtmc_write
prevent kernel-infoleak.
We need to clear the structure before filling fields.
#syz test
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 6bd9fe565385..e9ddaa9b580d 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -759,6 +759,7 @@ static struct urb *usbtmc_create_urb(void)
usb_free_urb(urb);
return NULL;
}
+ memset(dmabuf, 0, bufsize);
urb->transfer_buffer = dmabuf;
urb->transfer_buffer_length = bufsize;
Powered by blists - more mailing lists