* [PATCH] usb: fix slab-use-after-free Read in hdm_disconnect
@ 2024-07-30 3:57 Camila Alvarez
0 siblings, 0 replies; only message in thread
From: Camila Alvarez @ 2024-07-30 3:57 UTC (permalink / raw)
To: Parthiban Veerasooran, Christian Gromm
Cc: syzkaller-bugs, linux-kernel, Camila Alvarez,
syzbot+916742d5d24f6c254761
All references on the device were lost when deregistering the interface.
To make sure the device is not released before freeing all the memory we
add get_device to increase the ref count by one.
Reported-by: syzbot+916742d5d24f6c254761@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=916742d5d24f6c254761
Signed-off-by: Camila Alvarez <cam.alvarez.i@gmail.com>
---
drivers/most/most_usb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/most/most_usb.c b/drivers/most/most_usb.c
index 485d5ca39951..e178a5a0d3aa 100644
--- a/drivers/most/most_usb.c
+++ b/drivers/most/most_usb.c
@@ -1120,6 +1120,7 @@ static void hdm_disconnect(struct usb_interface *interface)
if (mdev->dci)
device_unregister(&mdev->dci->dev);
+ get_device(&mdev->dev);
most_deregister_interface(&mdev->iface);
kfree(mdev->busy_urbs);
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-07-30 3:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-30 3:57 [PATCH] usb: fix slab-use-after-free Read in hdm_disconnect Camila Alvarez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®