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: <20240426102644.3298-1-hdanton@sina.com>
Date: Fri, 26 Apr 2024 18:26:44 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+c6a1953c27ace6cc34e5@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [usb?] WARNING in wdm_rxwork/usb_submit_urb (2)

On Wed, 24 Apr 2024 21:40:22 -0700
> syzbot has found a reproducer for the following issue on:
> 
> HEAD commit:    a160e1202ca3 usb: dwc3: qcom: Add multiport suspend/resume..
> git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=166f3d27180000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git  usb-testing

--- x/drivers/usb/class/cdc-wdm.c
+++ y/drivers/usb/class/cdc-wdm.c
@@ -262,6 +262,10 @@ static void wdm_int_callback(struct urb
 		case -ECONNRESET:
 			return; /* unplug */
 		case -EPIPE:
+			if (test_bit(WDM_INT_STALL, &desc->flags)) {
+				clear_bit(WDM_INT_STALL, &desc->flags);
+				return;
+			}
 			set_bit(WDM_INT_STALL, &desc->flags);
 			dev_err(&desc->intf->dev, "Stall on int endpoint\n");
 			goto sw; /* halt is cleared in work */
@@ -272,6 +276,9 @@ static void wdm_int_callback(struct urb
 		}
 	}
 
+	if (test_bit(WDM_INT_STALL, &desc->flags))
+		clear_bit(WDM_INT_STALL, &desc->flags);
+
 	if (urb->actual_length < sizeof(struct usb_cdc_notification)) {
 		dev_err(&desc->intf->dev, "wdm_int_callback - %d bytes\n",
 			urb->actual_length);
@@ -311,11 +318,12 @@ static void wdm_int_callback(struct urb
 		&& !test_bit(WDM_DISCONNECTING, &desc->flags)
 		&& !test_bit(WDM_SUSPENDING, &desc->flags)) {
 		rv = usb_submit_urb(desc->response, GFP_ATOMIC);
+		if (rv)
+			clear_bit(WDM_RESPONDING, &desc->flags);
 		dev_dbg(&desc->intf->dev, "submit response URB %d\n", rv);
 	}
 	spin_unlock_irqrestore(&desc->iuspin, flags);
 	if (rv < 0) {
-		clear_bit(WDM_RESPONDING, &desc->flags);
 		if (rv == -EPERM)
 			return;
 		if (rv == -ENOMEM) {
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ