Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp658915ybl; Tue, 7 Jan 2020 12:45:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyP+PDh7vmkt9GP2oVpWNhtOBnECKGMw+1Gy7EHwMMu9lWpU2hW022X8pDMYFkZP2ldoN2O X-Received: by 2002:aca:ed57:: with SMTP id l84mr294168oih.8.1578429923807; Tue, 07 Jan 2020 12:45:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578429923; cv=none; d=google.com; s=arc-20160816; b=HPyEievq4ngGIZfXcOB7wcGvIgXM4y5EiBTW/487+X/ehOJJe0fphdHP9Yhxc+J2W6 cd21yXyase1ShGYFSROXuYtF8ZThalSsRw8f5BXsSeywbvMCHaR9bCJZETNf9ntnWTal Izt7L7uWo6OWBauqOR7d7r0papNvtL0LWpXmcbzQznxSf7w+vZ6VfSTOWY1CRtaKDGZM DolynRNf4iUolNI3o0ZJJD2CzmwBHSLEo6ZX+FqQJ7mZad/2ejZal31RfW7k678jfURt gd2W0GpE3iTnTPVj/hVWW4Z8jr4Vd7rQ7xs1SaEF8peFOolGIJiNI0pwsbuOjLopW+kE TX7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=k9X95Q8Y1TqGh7/1NT6QL6XLupB8ioSLGI8tppaf+4g=; b=YOTSPWYhLpw971S5hkn+77ZHIv/i7vUz6PnKsvwKio+hc2x3Y0W0QCSXXMmEdgWgyT vKKMMH97cGsjIneyD/b++hW4avaLABQv++HtO/ccRNROjFmMvJB5UDVDY7NoVP/IbH6I 7RAoXCB8SqYKR8vipt82YES4aW8xstqNgIAtOiiamiwmZHoGuhcD0CrKagYuClNaCuNn GPF0ymJXiby/06tBc0VAqpBKsfNivi+gDGaNVaWpvbwPmD/A3oIJJpkY36ewD2jOZFY7 FiNGbhbkRFUPmVJe3TNzSjNERVWZkfFSt1X5aIcLf6s7JCLYan5ZqqQsf2K0Xkh69V+8 Sd/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12si494007otl.229.2020.01.07.12.45.06; Tue, 07 Jan 2020 12:45:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726830AbgAGUnv (ORCPT + 99 others); Tue, 7 Jan 2020 15:43:51 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:48316 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726142AbgAGUnv (ORCPT ); Tue, 7 Jan 2020 15:43:51 -0500 Received: (qmail 7898 invoked by uid 2102); 7 Jan 2020 15:43:50 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 7 Jan 2020 15:43:50 -0500 Date: Tue, 7 Jan 2020 15:43:50 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: syzbot cc: andreyknvl@google.com, , , , , , Subject: Re: WARNING in usbhid_raw_request/usb_submit_urb (2) In-Reply-To: <0000000000003a83be059b91c6e4@google.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 Jan 2020, syzbot wrote: > Hello, > > syzbot has tested the proposed patch and the reproducer did not trigger > crash: > > Reported-and-tested-by: > syzbot+10e5f68920f13587ab12@syzkaller.appspotmail.com > > Tested on: > > commit: ecdf2214 usb: gadget: add raw-gadget interface > git tree: https://github.com/google/kasan.git > kernel config: https://syzkaller.appspot.com/x/.config?x=b06a019075333661 > dashboard link: https://syzkaller.appspot.com/bug?extid=10e5f68920f13587ab12 > compiler: gcc (GCC) 9.0.0 20181231 (experimental) > patch: https://syzkaller.appspot.com/x/patch.diff?x=11543656e00000 > > Note: testing is done by a robot and is best-effort only. Not very informative. I wonder just how elusive this race is. The patch below doesn't change anything; let's see what happens. Alan Stern #syz test: https://github.com/google/kasan.git ecdf2214 Index: usb-devel/drivers/usb/core/urb.c =================================================================== --- usb-devel.orig/drivers/usb/core/urb.c +++ usb-devel/drivers/usb/core/urb.c @@ -205,7 +205,7 @@ int usb_urb_ep_type_check(const struct u ep = usb_pipe_endpoint(urb->dev, urb->pipe); if (!ep) - return -EINVAL; + return -EINVAL; if (usb_pipetype(urb->pipe) != pipetypes[usb_endpoint_type(&ep->desc)]) return -EINVAL; return 0;