Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp807007pxp; Fri, 11 Mar 2022 15:40:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNQIPDR4eSa0SWjW/8zohspGy8As6mT6hnLydIPvqhqUy1sGOkTa2jmaF4PMEmpiHDPkG8 X-Received: by 2002:a17:902:ced0:b0:151:a5fa:6b44 with SMTP id d16-20020a170902ced000b00151a5fa6b44mr12684908plg.31.1647042036187; Fri, 11 Mar 2022 15:40:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647042036; cv=none; d=google.com; s=arc-20160816; b=vH3vzM6mcosfaBgEYOnpQbXZkDyVns54SHviEx6SZFINiJ0uvnaqEXIEo1XKcoeBPv FnEnLwNPpcudBuqn5lTSo2Ge7VwhYvfUQO303+xZ0E0n+T+JrLX0l0J3v6dbIZc/bres dUCyN5qzESwq02YZ/aRZMV6nvUYRODq1H3F2PEgGktoK73mSbuXwt1L9vaxjLTMFQqCj /rrX59K2bS+7cU9d+HM5aCOElxmUAxhUnTYOshDpK6KISgVNHkJ72yVLjkthZ1Exqgxp xLmSkQuHUnpAf5wZubEea8dLjWE2B0X7jXHOfCUizaodNWe6ukytkTnvXvn2xvsUZi4h WutA== 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=daB8Ka1iXpwYXc2YB1fMZ1YVS0JR55tQI1girSMBPLY=; b=LdcGnC1SjZEYGeiLz5PBKhgBNai0HWqha5TTx+D4nEjR3ANplL3OICHiLcoobDWtlG xg/7okZtrsVrOkyvoNECQS0Y57UsiOwgYLFRYM12Z/66Mz/WDmmyJK9WdmfoprbTdF3H BeTFeu7GL28mYrkBC+vufbDIh2NBBZ2an5JA040KfmV/b6r5LoN4sEFlPh6MasEMtZSC CQOlSZ+BB6H5AnXLjUOkOihSAW3wKVpvuWdcpDv5dqLjIIs2PqQP5odbK8RKeok8Fp0P RsjjbgRLoHjhyXRztF8OWfi4qF0lzxdhHpJ+2WC+0gB0XkZR2z9EQ42BzGaYe3/gstSF xFTg== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d6-20020a170902854600b001530b0dd498si7996915plo.306.2022.03.11.15.40.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 15:40:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 12A4023969F; Fri, 11 Mar 2022 14:57:53 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230020AbiCKW6t (ORCPT + 99 others); Fri, 11 Mar 2022 17:58:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231426AbiCKW6i (ORCPT ); Fri, 11 Mar 2022 17:58:38 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 53CB224F7B1 for ; Fri, 11 Mar 2022 14:48:23 -0800 (PST) Received: (qmail 1595351 invoked by uid 1000); 11 Mar 2022 16:01:40 -0500 Date: Fri, 11 Mar 2022 16:01:40 -0500 From: Alan Stern To: syzbot Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, pavel.hofman@ivitera.com, rob@robgreener.com, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] memory leak in usb_get_configuration Message-ID: References: <000000000000351b8605d9d1d1bf@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000000000000351b8605d9d1d1bf@google.com> X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SORTED_RECIPS,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 Wed, Mar 09, 2022 at 03:54:24PM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 0014404f9c18 Merge branch 'akpm' (patches from Andrew) > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=15864216700000 > kernel config: https://syzkaller.appspot.com/x/.config?x=3f0a704147ec8e32 > dashboard link: https://syzkaller.appspot.com/bug?extid=f0fae482604e6d9a87c9 > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13a63dbe700000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10e150a1700000 > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+f0fae482604e6d9a87c9@syzkaller.appspotmail.com > > BUG: memory leak > unreferenced object 0xffff88810c0289e0 (size 32): > comm "kworker/1:2", pid 139, jiffies 4294947862 (age 15.910s) > hex dump (first 32 bytes): > 09 02 12 00 01 00 00 00 00 09 04 00 00 00 d0 bb ................ > 3a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :............... > backtrace: > [] kmalloc include/linux/slab.h:586 [inline] > [] usb_get_configuration+0x1c7/0x1cd0 drivers/usb/core/config.c:919 > [] usb_enumerate_device drivers/usb/core/hub.c:2398 [inline] > [] usb_new_device+0x1a9/0x2e0 drivers/usb/core/hub.c:2536 > [] hub_port_connect drivers/usb/core/hub.c:5358 [inline] > [] hub_port_connect_change drivers/usb/core/hub.c:5502 [inline] > [] port_event drivers/usb/core/hub.c:5660 [inline] > [] hub_event+0x1364/0x21a0 drivers/usb/core/hub.c:5742 > [] process_one_work+0x2bf/0x600 kernel/workqueue.c:2307 > [] worker_thread+0x59/0x5b0 kernel/workqueue.c:2454 > [] kthread+0x125/0x160 kernel/kthread.c:377 > [] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The console log shows that this is connected to gspca_dev_probe. Let's see who's calling it... Alan Stern #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ 0014404f9c18 Index: usb-devel/drivers/media/usb/gspca/gspca.c =================================================================== --- usb-devel.orig/drivers/media/usb/gspca/gspca.c +++ usb-devel/drivers/media/usb/gspca/gspca.c @@ -1599,6 +1599,7 @@ int gspca_dev_probe(struct usb_interface if (dev->descriptor.bNumConfigurations != 1) { pr_err("%04x:%04x too many config\n", id->idVendor, id->idProduct); + dump_stack(); return -ENODEV; }