Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp784414ybt; Fri, 26 Jun 2020 11:26:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiKeWsR3mpRNYhEacIMND5JvBYfnqa0VMghpxZZ0tWjW8Xve6HbNWswwtess34wkFFL3qP X-Received: by 2002:a17:906:4145:: with SMTP id l5mr3689152ejk.334.1593196001954; Fri, 26 Jun 2020 11:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593196001; cv=none; d=google.com; s=arc-20160816; b=CbFiNWXzf0Ev0thRhbK4Zaq8D3E+1GIUi+og0hRCeZ3VsCL9kdyp/1j+7BjX5TTIKS QAapwRh/xWnCZMqbMAoXCXoLMp0/7qiyl39zCBqtOIcaJXuWY2sRSCURiGU30KqbIMGG z14Vr7Y/UhCY3B4z9PwUsMYphJgQwWMfXCfd1nD6tBphr1c2KvyK9AUSgmkSTgvUFpQj mOEsKNijg8QnKoDB/L4gZJrWNsvQ4LAQjwax6UNwTHJYwlog1Ke+jsBJH2kj3nfqq/XA xjH98d4OpUT8pmJDq9fBtKleREzEc1RPydV5BBXKQm8JRCdfVlp0gz6z5PZ66emxuoEB N+9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+szoAFMROOm30pzo+WP9tG+1BdOvVGBl3fvGODuXtEQ=; b=WTp4qWM+vv6EDWt3b5gcSfQV2uniKpqL8KDwdBMZ/rG0j/u4RfOBe+/auaM1rGn+uC pWlJiUVuq4dSQ4Vz+Na+9BSN/vCvsYXLXj3tH9pXbNYr6BZhD0JzGpzZE9SFbrkj0Hf+ Oc04xdbGHuEDS55LQzV7xxGn/z34U/M/ZCGuxOM+nladSIvA1LXDtOYxwBU/UJUIxiXE RWa+bQBbe/2D+zqPtdugV5GHZYMHupviK5l+pyoiQEQVs75SIsHlTumcJac+6gGJaQPj wgE8b3rpoYSxCM5zqD848gz4J+1sB63tmyfDTl17YKsTG4nygJPLeC7oFtnlG11OQcd3 We8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz7si18529593ejb.455.2020.06.26.11.26.19; Fri, 26 Jun 2020 11:26:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725833AbgFZS0H (ORCPT + 99 others); Fri, 26 Jun 2020 14:26:07 -0400 Received: from netrider.rowland.org ([192.131.102.5]:55225 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1725768AbgFZS0G (ORCPT ); Fri, 26 Jun 2020 14:26:06 -0400 Received: (qmail 305618 invoked by uid 1000); 26 Jun 2020 14:26:05 -0400 Date: Fri, 26 Jun 2020 14:26:05 -0400 From: Alan Stern To: syzbot Cc: alsa-devel@alsa-project.org, andreyknvl@google.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, perex@perex.cz, syzkaller-bugs@googlegroups.com, tiwai@suse.com Subject: Re: KASAN: use-after-free Read in line6_submit_audio_in_all_urbs Message-ID: <20200626182605.GA305214@rowland.harvard.edu> References: <000000000000d44c6d05a8ffe488@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000000000000d44c6d05a8ffe488@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 26, 2020 at 10:18:12AM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit: fb574682 usbip: tools: fix module name in man page > git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing > console output: https://syzkaller.appspot.com/x/log.txt?x=156560b1100000 > kernel config: https://syzkaller.appspot.com/x/.config?x=63b40b2ae167bad6 > dashboard link: https://syzkaller.appspot.com/bug?extid=145012a46658ac00fc9e > compiler: gcc (GCC) 10.1.0-syz 20200507 > > Unfortunately, I don't have any reproducer for this crash yet. > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+145012a46658ac00fc9e@syzkaller.appspotmail.com > > snd_usb_toneport 5-1:0.0: URB in #0 submission failed (-19) > snd_usb_toneport 5-1:0.0: URB in #0 submission failed (-19) > snd_usb_toneport 5-1:0.0: URB in #0 submission failed (-19) > snd_usb_toneport 5-1:0.0: URB in #0 submission failed (-19) > ================================================================== > BUG: KASAN: use-after-free in line6_submit_audio_in_all_urbs+0x10b/0x120 sound/usb/line6/capture.c:72 > Read of size 8 at addr ffff8881cffb1800 by task kworker/1:5/3257 > > CPU: 1 PID: 3257 Comm: kworker/1:5 Not tainted 5.8.0-rc1-syzkaller #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 > Workqueue: events line6_startup_work > Call Trace: > __dump_stack lib/dump_stack.c:77 [inline] > dump_stack+0xf6/0x16e lib/dump_stack.c:118 > print_address_description.constprop.0+0x1a/0x210 mm/kasan/report.c:383 > __kasan_report mm/kasan/report.c:513 [inline] > kasan_report.cold+0x37/0x7c mm/kasan/report.c:530 > line6_submit_audio_in_all_urbs+0x10b/0x120 sound/usb/line6/capture.c:72 > line6_stream_start+0x207/0x230 sound/usb/line6/pcm.c:197 > line6_pcm_acquire+0x161/0x210 sound/usb/line6/pcm.c:318 > line6_startup_work+0x42/0x50 sound/usb/line6/driver.c:734 > process_one_work+0x94c/0x15f0 kernel/workqueue.c:2269 > worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 > kthread+0x392/0x470 kernel/kthread.c:291 > ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 > > Allocated by task 76: > save_stack+0x1b/0x40 mm/kasan/common.c:48 > set_track mm/kasan/common.c:56 [inline] > __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 > kmalloc include/linux/slab.h:555 [inline] > kzalloc include/linux/slab.h:669 [inline] > line6_init_pcm+0x2a7/0x9e0 sound/usb/line6/pcm.c:533 > toneport_init+0xdd/0x6b0 sound/usb/line6/toneport.c:419 > line6_probe+0xaa0/0x1330 sound/usb/line6/driver.c:809 It look like the cancel_delayed_work() in line6_disconnect() needs to be cancel_delayed_work_sync(). Unfortunately we can't test this until syzbot is able to reproduce the bug. Alan Stern