Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2571461ybh; Mon, 9 Mar 2020 08:31:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vug9/Jcz4LxPAnOEdhQvAbl+ym8sa6np/bo2mFwN0yh4kmQRfNPBgWWfySK/yqfULCgdjxx X-Received: by 2002:aca:5191:: with SMTP id f139mr6259549oib.140.1583767915682; Mon, 09 Mar 2020 08:31:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583767915; cv=none; d=google.com; s=arc-20160816; b=WfTiWyUruJlVSfX0r2rsvEUPwng9xBu9fNgAswSGR6JjRF4Wdojc0lXhg48KAXdBIA QnoNIMAAhYgvTmneXEDbgMk8ROLqJqddglhHyaQogRLSMO/FnXVHlevWeS9qeGa9ZoOw 08qEyCl3wiIHye5Caj3KfI0qSOmdfxaWnqIpISaGqLExG7Uhmt/ZMKJ7o9Y76TSwSza1 pGqyuLhxqRTwGIpf6FTpwib2emUNMFW2iVi+z0O2D/99D73ICaWg4CU5s4Gio0w8gTuX eS+qdYFn8zYFMgib4Lf3rRYw6RNWlmekmKtQM/ZU7wMod1+jJUWpdiKVRoTZ5yeQmmgW Df7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TBQjxqhqh43Vz7ZObc9jDcwMmtrtNyYcw90uL5B2kUY=; b=uumwZtvcNRU8DAfcrjzmywIFzCliZJlKcsZNHPaNf3VXcZ7MPPLzbqWSO/YL+UUzt9 QuboWTZjAUp8c05FQoXaqUeyIT7DtyoVQu2e//LPFDA2EaqcqZKXci3q3qyYfcRL3rxX uP7MqQQ8omjuuR27JZf6oWcaWuENxqKXfaS+1trI2PLAh8FtZMjbeYJ8yDea/JTLWqz8 jsAneirIxpZwWyCm18ovHl3uuPVjUBwigAPZxwJzBzipu+llv086WLHMNr3/+2Afyq3i pFGl92p1vUQYJzDJNG+NK7gQmERan6ouiJanOnpxfBD8ORcy8lenhREzS1vtLN+DtV1B IViw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=W3aVM0WY; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17si5043663otl.108.2020.03.09.08.31.40; Mon, 09 Mar 2020 08:31:55 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=W3aVM0WY; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727006AbgCIP3e (ORCPT + 99 others); Mon, 9 Mar 2020 11:29:34 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:38736 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbgCIP3e (ORCPT ); Mon, 9 Mar 2020 11:29:34 -0400 Received: by mail-pl1-f193.google.com with SMTP id w3so4113673plz.5 for ; Mon, 09 Mar 2020 08:29:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TBQjxqhqh43Vz7ZObc9jDcwMmtrtNyYcw90uL5B2kUY=; b=W3aVM0WYylnKhDOjjH9AwTDI6PaeCN+QUWT6IDGk3Gw3uMFeksnW19Wen3DUxuAsny OGbLa8vX9upR37lSAdBhKXqfybSO/RyO0RUfJSkqlfWJLbTYh18/zU17ppGXEBw18uvB yf3wnzskXUbNMYbOv2Xn+8nUW13hgI5lTGHnidYTfH1JK2hjRXdwEE7id2ahGz2reEZ5 AkfwvnhD9FjiQ8wd4xssAW5I6Sl2K5fcf/4hQ2EWR3oN91b5wZiuNMxWR4oGeikXkJoA +cJByz5ZoePdoAU9fr5nMFJfoUrp5ZzeyNosYrJSSUUiD8Gj8WVu/vkW0GpyTykfUfM1 425Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TBQjxqhqh43Vz7ZObc9jDcwMmtrtNyYcw90uL5B2kUY=; b=InyeJDWWmOVMLZUvh0OPbihKtwOAOsW7to8RyYCt92NTi0HwGgrpDVkyqatTfHdXVs U6buWaOxBX2fi1CuhOgnjEc6EwB2gxWqoEGCRDq9PJrBvKUkAfqm00J+KA9wRysmQr/+ ks+sI4Kimqa8lrxjXSLgGfsooiY7PzeIDiyV/GRo5nPgDmKSziRI9KCoc1TAvCBJmpVi IO6vx7TJwCtLySigFlTuDQudPXDBwTzZKEFDI0VQJyE2lznKs3VZ6mHYs2AEbDhbIPiS 3Uc9FoU+B+PKxC6gpxtm/KoSL2aro8C0l50QGJrveI7602FDP34RkVhVZSaiyCeEUeSC T3ug== X-Gm-Message-State: ANhLgQ0O2XkPgBciufJEeI9VcZDbjgTZWiIc/1FX9HncCAdDTgkmN174 CX++W4YkKDirTQ0Y5hLeFbSLc7sLWWeeGZ+TaufHYw== X-Received: by 2002:a17:90b:19cf:: with SMTP id nm15mr19327741pjb.69.1583767771395; Mon, 09 Mar 2020 08:29:31 -0700 (PDT) MIME-Version: 1.0 References: <000000000000488dd305933945d2@google.com> In-Reply-To: <000000000000488dd305933945d2@google.com> From: Andrey Konovalov Date: Mon, 9 Mar 2020 16:29:20 +0100 Message-ID: Subject: Re: WARNING in _chaoskey_fill/usb_submit_urb To: syzbot Cc: Greg Kroah-Hartman , "Gustavo A. R. Silva" , LKML , USB list , syzkaller-bugs Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 23, 2019 at 4:31 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit: e0bd8d79 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=1452c6a1600000 > kernel config: https://syzkaller.appspot.com/x/.config?x=8847e5384a16f66a > dashboard link: https://syzkaller.appspot.com/bug?extid=f5349b421c6213d34ce2 > compiler: gcc (GCC) 9.0.0 20181231 (experimental) > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16342d45600000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=166769b1600000 > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+f5349b421c6213d34ce2@syzkaller.appspotmail.com > > ------------[ cut here ]------------ > URB 00000000052bee21 submitted while active > WARNING: CPU: 1 PID: 1794 at drivers/usb/core/urb.c:362 > usb_submit_urb+0x10c1/0x13b0 drivers/usb/core/urb.c:362 > Kernel panic - not syncing: panic_on_warn set ... > CPU: 1 PID: 1794 Comm: syz-executor305 Not tainted 5.3.0+ #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS > Google 01/01/2011 > Call Trace: > __dump_stack lib/dump_stack.c:77 [inline] > dump_stack+0xca/0x13e lib/dump_stack.c:113 > panic+0x2a3/0x6da kernel/panic.c:219 > __warn.cold+0x20/0x4a kernel/panic.c:576 > report_bug+0x262/0x2a0 lib/bug.c:186 > fixup_bug arch/x86/kernel/traps.c:179 [inline] > fixup_bug arch/x86/kernel/traps.c:174 [inline] > do_error_trap+0x12b/0x1e0 arch/x86/kernel/traps.c:272 > do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:291 > invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1028 > RIP: 0010:usb_submit_urb+0x10c1/0x13b0 drivers/usb/core/urb.c:362 > Code: 89 de e8 92 5b ee fd 84 db 0f 85 42 f6 ff ff e8 55 5a ee fd 4c 89 fe > 48 c7 c7 00 c2 18 86 c6 05 f3 cf 38 04 01 e8 f4 e5 c3 fd <0f> 0b e9 20 f6 > ff ff c7 44 24 14 01 00 00 00 e9 d7 f6 ff ff 41 bd > RSP: 0018:ffff8881d0427b68 EFLAGS: 00010286 > RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 > RDX: 0000000000000000 RSI: ffffffff8128d9ad RDI: ffffed103a084f5f > RBP: ffff8881d070b180 R08: ffff8881d4934800 R09: ffffed103b663ee7 > R10: ffffed103b663ee6 R11: ffff8881db31f737 R12: ffff8881d070b180 > R13: 00000000fffffff0 R14: 0000000000000000 R15: ffff8881d5c22400 > _chaoskey_fill.part.0+0xe0/0x470 drivers/usb/misc/chaoskey.c:367 > _chaoskey_fill+0x1ad/0x230 drivers/usb/misc/chaoskey.c:361 > chaoskey_read+0x2c2/0x4c0 drivers/usb/misc/chaoskey.c:434 > __vfs_read+0x76/0x100 fs/read_write.c:425 > vfs_read+0x1ea/0x430 fs/read_write.c:461 > ksys_read+0x127/0x250 fs/read_write.c:587 > do_syscall_64+0xb7/0x580 arch/x86/entry/common.c:290 > entry_SYSCALL_64_after_hwframe+0x49/0xbe > RIP: 0033:0x4419c9 > Code: e8 8c e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 > 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff > ff 0f 83 cb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 > RSP: 002b:00007ffc317ed1f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 > RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004419c9 > RDX: 0000000000000009 RSI: 0000000020000040 RDI: 0000000000000004 > RBP: 000000000000e12e R08: 000000000000000f R09: 00000000004002c8 > R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402720 > R13: 00000000004027b0 R14: 0000000000000000 R15: 0000000000000000 > Kernel Offset: disabled > Rebooting in 86400 seconds.. > > > --- > This bug is generated by a bot. It may contain errors. > See https://goo.gl/tpsmEJ for more information about syzbot. > syzbot engineers can be reached at syzkaller@googlegroups.com. > > syzbot will keep track of this bug report. See: > https://goo.gl/tpsmEJ#status for how to communicate with syzbot. > syzbot can test patches for this bug, for details see: > https://goo.gl/tpsmEJ#testing-patches #syz fix: USB: chaoskey: fix error case of a timeout