Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1639643rdg; Sat, 12 Aug 2023 09:31:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFd/3C6TbZBAh2ZfTaCoLga+83Jod5b3ED6dR1kJNsmfNgBJRWH52syJOXvO3QkSK47q/QW X-Received: by 2002:a17:90a:fb50:b0:26b:365b:e59e with SMTP id iq16-20020a17090afb5000b0026b365be59emr1775108pjb.26.1691857889048; Sat, 12 Aug 2023 09:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691857889; cv=none; d=google.com; s=arc-20160816; b=Cv6WCP1pNb4xnXBDobDNPqD0Ai3RdfNXqGgIjZj4H5mvGowaKo1wBrmNzMx/aOIHiv AtX15smqfuekQR9g03K4d5XRqwcNMYKMAhJApPsFnt6wpCtfLXf8Hk6oGrmKHWwqyXar rRUhc1nwF+2AfyjUc3c3pSDRrvT7/sNq3HIdjbdrDsJQr4QRH7gVNTO3F8V1Q7mnoLoU EPgwFDnez08PaFZZ2RQIW4lfaK5hSgxddmXd5P4mzGhZuA6YXqj7oRHUBQlnVmqQDGIC hc6BLDesXXrj/COAkj8opB4LPRDuoBXNzvWONrg1ZqqfL/g9Rc4SLai212n87+iydLsV 098g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=/3UblrPDHzF8E4wD2amGEl/RqN9k+NggOzquLzP265I=; fh=NdHwH8vZOjeh08y5dSUew/hm9RP/X+H3kvgBcrTEVj0=; b=d2hKAs7qTTG3mDI/tmCeJeVyFgSBwXC1oLQAiVDNy3/FY+KcDQIgOc8jio07oNZoaM 9xxg+cHMlpyxdkVckZae1KhIGurpwvqHcVpV9VeCifJvRrU68Wj09RymJXOQUoiY8Tkc Cfsu50F3n36prubuYAGNeq6JzyNhpmm9MFQUmowjmdLyMKzHwvUeYGlYS4lNMyEQCpsf c1J6I/iORJdA0e4jI/Qcgm06AzcTjYlGUnU4d/hBkb5rHXwYIGq5EwVZiUJ6KiLdfIrL bLWEECF+1RMo4BZSqdN/ggB0UJCup+SqjWNmbUUaJXB1wGPrf0Yi9yNArkmMCkIZdeMa rZaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d20-20020a17090ab31400b00262c146b8cesi7006154pjr.158.2023.08.12.09.31.16; Sat, 12 Aug 2023 09:31:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229812AbjHLP4h (ORCPT + 99 others); Sat, 12 Aug 2023 11:56:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjHLP4f (ORCPT ); Sat, 12 Aug 2023 11:56:35 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 88207E4D for ; Sat, 12 Aug 2023 08:56:37 -0700 (PDT) Received: (qmail 317565 invoked by uid 1000); 12 Aug 2023 11:56:36 -0400 Date: Sat, 12 Aug 2023 11:56:36 -0400 From: Alan Stern To: syzbot , Oliver Neukum Cc: arnd@arndb.de, christian.brauner@ubuntu.com, gregkh@linuxfoundation.org, hdanton@sina.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, mpe@ellerman.id.au, oleg@redhat.com, syzkaller-bugs@googlegroups.com, web@syzkaller.appspotmail.com Subject: Re: [syzbot] [usb?] KASAN: slab-use-after-free Write in usb_anchor_suspend_wakeups Message-ID: <1134d446-3189-4f2d-81b4-10142e751320@rowland.harvard.edu> References: <0000000000007c27e105faa4aa99@google.com> <00000000000014678c0602b6c643@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00000000000014678c0602b6c643@google.com> X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 12, 2023 at 02:51:30AM -0700, syzbot wrote: > syzbot has bisected this issue to: > > commit 9b4feb630e8e9801603f3cab3a36369e3c1cf88d > Author: Christian Brauner > Date: Fri May 24 09:31:44 2019 +0000 > > arch: wire-up close_range() > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1323329ba80000 > start commit: 89d77f71f493 Merge tag 'riscv-for-linus-6.4-mw1' of git://.. > git tree: upstream > final oops: https://syzkaller.appspot.com/x/report.txt?x=10a3329ba80000 > console output: https://syzkaller.appspot.com/x/log.txt?x=1723329ba80000 > kernel config: https://syzkaller.appspot.com/x/.config?x=d963e7536cbe545e > dashboard link: https://syzkaller.appspot.com/bug?extid=d6b0b0ea0781c14b2ecf > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11471b84280000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10b98e2c280000 > > Reported-by: syzbot+d6b0b0ea0781c14b2ecf@syzkaller.appspotmail.com > Fixes: 9b4feb630e8e ("arch: wire-up close_range()") > > For information about bisection process see: https://goo.gl/tpsmEJ#bisection This attribution is extremely unlikely. The real problem seems to be some sort of race in usbtmc and the core between URBs being added to an anchor, file I/O being stopped, and URBs being killed or scuttled when the file is flushed. The bug is caused by an URB completing after (or while) its anchor is deallocated. Note that __usb_hcd_giveback_urb() removes an URB from its anchor before calling the completion routine, but dereferences the anchor afterward. The anchor could easily be deallocated during that window. Alan Stern