Skip to content

Commit 6c7fc36

Browse files
ea1davisgregkh
authored andcommitted
USB: usbtmc: prevent kernel-usb-infoleak
commit 625fa77 upstream. The syzbot reported a kernel-usb-infoleak in usbtmc_write, we need to clear the structure before filling fields. Fixes: 4ddc645 ("usb: usbtmc: Add ioctl for vendor specific write") Reported-and-tested-by: syzbot+9d34f80f841e948c3fdb@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=9d34f80f841e948c3fdb Signed-off-by: Edward Adam Davis <eadavis@qq.com> Cc: stable <stable@kernel.org> Link: https://lore.kernel.org/r/tencent_9649AA6EC56EDECCA8A7D106C792D1C66B06@qq.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 70b6f47 commit 6c7fc36

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/class/usbtmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ static struct urb *usbtmc_create_urb(void)
754754
if (!urb)
755755
return NULL;
756756

757-
dmabuf = kmalloc(bufsize, GFP_KERNEL);
757+
dmabuf = kzalloc(bufsize, GFP_KERNEL);
758758
if (!dmabuf) {
759759
usb_free_urb(urb);
760760
return NULL;

0 commit comments

Comments
 (0)