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] [day] [month] [year] [list]
Message-ID: <tencent_251BD325BCBA5EBB0533CD9EC71B1A4B9208@qq.com>
Date: Wed, 14 May 2025 07:01:09 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+0dcc341ee61fc9e4032f@...kaller.appspotmail.com
Cc: anna-maria@...utronix.de,
	frederic@...nel.org,
	linux-kernel@...r.kernel.org,
	linux-usb@...r.kernel.org,
	syzkaller-bugs@...glegroups.com,
	tglx@...utronix.de
Subject: [PATCH] media: cxusb: Initialize medion after checking intf

dvb_usb_device_exit() is entered because the number of alternate setting
is less than 2. Check the USB interface in advance to avoid unnecessary
dvb device initialization and exit.

Reported-by: syzbot+0dcc341ee61fc9e4032f@...kaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=0dcc341ee61fc9e4032f
Tested-by: syzbot+0dcc341ee61fc9e4032f@...kaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@...com>
---
 drivers/media/usb/dvb-usb/cxusb.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/cxusb.c b/drivers/media/usb/dvb-usb/cxusb.c
index f44529b40989..df86ae7106c1 100644
--- a/drivers/media/usb/dvb-usb/cxusb.c
+++ b/drivers/media/usb/dvb-usb/cxusb.c
@@ -1601,13 +1601,9 @@ static int cxusb_probe(struct usb_interface *intf,
 	int ret;
 
 	/* Medion 95700 */
-	if (!dvb_usb_device_init(intf, &cxusb_medion_properties,
+	if (cxusb_medion_check_intf(intf) &&
+	    !dvb_usb_device_init(intf, &cxusb_medion_properties,
 				 THIS_MODULE, &dvbdev, adapter_nr)) {
-		if (!cxusb_medion_check_intf(intf)) {
-			ret = -ENODEV;
-			goto ret_uninit;
-		}
-
 		_cxusb_power_ctrl(dvbdev, 1);
 		ret = cxusb_medion_set_mode(dvbdev, false);
 		if (ret)
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ