lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_A2209684364A4BE47431769567DA3DC33709@qq.com>
Date: Tue, 30 Jul 2024 13:58:36 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+916742d5d24f6c254761@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [usb?] KASAN: slab-use-after-free Read in hdm_disconnect

move the relase dev to the end

#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git 933069701c1b

diff --git a/drivers/most/most_usb.c b/drivers/most/most_usb.c
index 485d5ca39951..3f3abb6efb3e 100644
--- a/drivers/most/most_usb.c
+++ b/drivers/most/most_usb.c
@@ -1118,15 +1118,13 @@ static void hdm_disconnect(struct usb_interface *interface)
 	del_timer_sync(&mdev->link_stat_timer);
 	cancel_work_sync(&mdev->poll_work_obj);
 
-	if (mdev->dci)
-		device_unregister(&mdev->dci->dev);
-	most_deregister_interface(&mdev->iface);
-
 	kfree(mdev->busy_urbs);
 	kfree(mdev->cap);
 	kfree(mdev->conf);
 	kfree(mdev->ep_address);
-	put_device(&mdev->dci->dev);
+	if (mdev->dci)
+		device_unregister(&mdev->dci->dev);
+	most_deregister_interface(&mdev->iface);
 	put_device(&mdev->dev);
 }
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ