Re: [syzbot] KMSAN: uninit-value in idmouse_open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



#syz test: https://github.com/google/kmsan.git master

-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
From f9078591da8586d203212b57079c4a086403580c Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@xxxxxxxx>
Date: Thu, 29 Sep 2022 10:08:00 +0200
Subject: [PATCH] usb: idmouse: fix memory leak

Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx>
---
 drivers/usb/misc/idmouse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c
index e9437a176518..6c19e5d2b4d8 100644
--- a/drivers/usb/misc/idmouse.c
+++ b/drivers/usb/misc/idmouse.c
@@ -349,7 +349,7 @@ static int idmouse_probe(struct usb_interface *interface,
 	dev->orig_bi_size = usb_endpoint_maxp(endpoint);
 	dev->bulk_in_size = 0x200; /* works _much_ faster */
 	dev->bulk_in_endpointAddr = endpoint->bEndpointAddress;
-	dev->bulk_in_buffer = kmalloc(IMGSIZE + dev->bulk_in_size, GFP_KERNEL);
+	dev->bulk_in_buffer = kzalloc(IMGSIZE + dev->bulk_in_size, GFP_KERNEL);
 	if (!dev->bulk_in_buffer) {
 		idmouse_delete(dev);
 		return -ENOMEM;
-- 
2.35.3


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux