Skip to content

Commit 625fa77

Browse files
ea1davisgregkh
authored andcommitted
USB: usbtmc: prevent kernel-usb-infoleak
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: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=9d34f80f841e948c3fdb Signed-off-by: Edward Adam Davis <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0088d75 commit 625fa77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)