mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: slab-use-after-free Read in hdm_disconnect
@ 2024-07-30  3:07 Camila Alvarez
  2024-07-30  3:56 ` [syzbot] [usb?] KASAN: " syzbot
  0 siblings, 1 reply; 2+ messages in thread
From: Camila Alvarez @ 2024-07-30  3:07 UTC (permalink / raw)
  To: syzbot+916742d5d24f6c254761; +Cc: syzkaller-bugs, linux-kernel, Camila Alvarez

#syz test
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
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] 2+ messages in thread

* Re: [syzbot] [usb?] KASAN: slab-use-after-free Read in hdm_disconnect
  2024-07-30  3:07 [PATCH] usb: slab-use-after-free Read in hdm_disconnect Camila Alvarez
@ 2024-07-30  3:56 ` syzbot
  0 siblings, 0 replies; 2+ messages in thread
From: syzbot @ 2024-07-30  3:56 UTC (permalink / raw)
  To: cam.alvarez.i, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+916742d5d24f6c254761@syzkaller.appspotmail.com
Tested-by: syzbot+916742d5d24f6c254761@syzkaller.appspotmail.com

Tested on:

commit:         1722389b Merge tag 'net-6.11-rc1' of git://git.kernel...
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
console output: https://syzkaller.appspot.com/x/log.txt?x=163ffdb1980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e3044dca4d5f6dbe
dashboard link: https://syzkaller.appspot.com/bug?extid=916742d5d24f6c254761
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=1057af03980000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-30  3:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-30  3:07 [PATCH] usb: slab-use-after-free Read in hdm_disconnect Camila Alvarez
2024-07-30  3:56 ` [syzbot] [usb?] KASAN: " syzbot

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®