All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB: misc: uss720: Fix leak in get_1284_register
@ 2026-07-16 22:24 Michail Tatas
  0 siblings, 0 replies; only message in thread
From: Michail Tatas @ 2026-07-16 22:24 UTC (permalink / raw)
  To: gregkh, oneukum, alexhenrie24, ae878000, mhun512, kees
  Cc: linux-usb, linux-kernel

if wait_for_completion_timeout() times out in get_1284_register()
then we do not destroy the reference acquired via kref_get() in
submit_async_request. Add the missing kref_put in the timeout path.

link: https://syzkaller.appspot.com/bug?extid=56962eb32ba0136cd330

Reported-by: syzbot+56962eb32ba0136cd330@syzkaller.appspotmail.com
Signed-off-by: Michail Tatas <michail.tatas@gmail.com>
---
 drivers/usb/misc/uss720.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
index 1ce48f5832d7..bd0ad7c3261d 100644
--- a/drivers/usb/misc/uss720.c
+++ b/drivers/usb/misc/uss720.c
@@ -223,6 +223,7 @@ static int get_1284_register(struct parport *pp, unsigned char reg, unsigned cha
 	}
 	printk(KERN_WARNING "get_1284_register timeout\n");
 	kill_all_async_requests_priv(priv);
+	kref_put(&rq->ref_count, destroy_async);
 	return -EIO;
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-16 22:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-16 22:24 [PATCH] USB: misc: uss720: Fix leak in get_1284_register Michail Tatas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.