Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3467640rwb; Fri, 30 Sep 2022 04:10:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM52oMQla/7fU+qOSh7dPhIzwTYNNHOVSaicSp33eHo2/Kx0JCkKSBkM9vHGjaEJaT00Sxj8 X-Received: by 2002:a17:902:834c:b0:178:be25:203c with SMTP id z12-20020a170902834c00b00178be25203cmr8363234pln.96.1664536203010; Fri, 30 Sep 2022 04:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664536203; cv=none; d=google.com; s=arc-20160816; b=q4dDlNq0WcRZ8NXRlYJxCG7/rGxX0lZ+svHO7Sz93uuUX3UKBDvBSdPjUpYPSMtxH0 8bPWMzdWw8KkBJZWw/sj5H6rAgZkeNmoN7du5p8WpF7UzfVFyHAuZK/yNvSZoWZX7rvv FEd/QNJ5DwoZ7vppwyUdxlmPMd9mNLMycYE1EXVcwd466AY2Ap+lE23EG3EBcxLm/oum G8yxGASFWLbtr8zu/Y0bLbq9Tfp0GaZq+2jXuxgIPrkjj11DlmLcdeI92b011y8iC0ST XL7Dwd4oNirY8GlFof3VGLT80uaK6QGMi3RAG2qe2k6Eqyp9ROFLok38jsL3qpxPnCqf IZPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=t1tICXShoQ7NB6GmGDH64bVW//UAFg02t7BL9gYsELE=; b=u1cenOdEFsf6a3cjDU68TznDVfjd0CtCKKkmByabn9FRHt+Bhg2jIT/nChUlcusVCN vk/SzVKiL5DtgDl9sQLesHf/efHkYpCkmLeUPnRfElS9Ke+DkgUzRXRC4KXSdJSAqDKq PlHUctJa8ZdkfiNeCnxG/zWMG/Yk4QcnSpaWhivz5alE+aospAmLD1Fhcbemq5zRHfCx 9vzJGSdXLE8kkwNCnfW01eTG8jumoXsgFp0ZZddsbZVPpVSQvTKa6UpJqK08ohqXzNkv pNsIa+wCrcyOdI5Uk3mGQXc2bY6JcyGKo4FNRPMBondix3cG+PvErlmv1B4NEk8SpR3e mWhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=OsEE0Y4d; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j18-20020a170902da9200b0016da8773b7bsi1305819plx.503.2022.09.30.04.09.51; Fri, 30 Sep 2022 04:10:02 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=OsEE0Y4d; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231640AbiI3KBT (ORCPT + 99 others); Fri, 30 Sep 2022 06:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231591AbiI3KAj (ORCPT ); Fri, 30 Sep 2022 06:00:39 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C264C1005C1 for ; Fri, 30 Sep 2022 03:00:36 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3450B1F86B; Fri, 30 Sep 2022 10:00:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1664532035; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t1tICXShoQ7NB6GmGDH64bVW//UAFg02t7BL9gYsELE=; b=OsEE0Y4dmTujBJPoDKgFHxu4QTZIEdzGUaqHQbv3A+x2rnZh6h8iGV5BCe/DS54aD7FJRQ HougvknI0tdbbQwO9w2MMIHrVMIJXMxgHHi3fLHVfcOarNnQfJ0dsQB7JZ8G4XarqMjUA4 OS9tiqSaKRpGS18d+vnKuhnAVtrfmXQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1664532035; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t1tICXShoQ7NB6GmGDH64bVW//UAFg02t7BL9gYsELE=; b=PqYn2rnUQIhvzJ5diMB7sw8Oq6xdRHjHQE17mvMEI/RXUcHBrI1j7Q4bOctpblIc21lQoH nUGRjz5kh/RTbdAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0E84F13677; Fri, 30 Sep 2022 10:00:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qKP7AkO+NmOLagAAMHmgww (envelope-from ); Fri, 30 Sep 2022 10:00:35 +0000 Date: Fri, 30 Sep 2022 12:00:34 +0200 Message-ID: <874jwp6v25.wl-tiwai@suse.de> From: Takashi Iwai To: "Sabri N. Ferreiro" Cc: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: general protection fault in release_urbs In-Reply-To: <877d1l6w20.wl-tiwai@suse.de> References: <87bkqx6ws6.wl-tiwai@suse.de> <877d1l6w20.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Fri, 30 Sep 2022 11:39:03 +0200, Takashi Iwai wrote: > > On Fri, 30 Sep 2022 11:23:21 +0200, > Takashi Iwai wrote: > > > > On Fri, 30 Sep 2022 04:23:23 +0200, > > Sabri N. Ferreiro wrote: > > > > > > Hi, > > > > > > When I used fuzz testing to test Linux kernel 6.0.0-rc6, the kernel > > > triggered the following error: > > > HEAD commit: 521a547ced6477c54b4b0cc206000406c221b4d6 > > > git tree: upstream > > > > Could you retest with 6.0-rc7 or later? > > A commit reverting the change might influence on the behavior > > significantly. > > And if it's reproducible on 6.0-rc7, please try the following fix. ... and I believe it's happening no matter which version. I'm going to submit the proper patch, in anyway. thanks, Takashi > > > thanks, > > Takashi > > -- 8< -- > --- a/sound/usb/endpoint.c > +++ b/sound/usb/endpoint.c > @@ -95,12 +95,13 @@ static inline unsigned get_usb_high_speed_rate(unsigned int rate) > */ > static void release_urb_ctx(struct snd_urb_ctx *u) > { > - if (u->buffer_size) > + if (u->urb && u->buffer_size) > usb_free_coherent(u->ep->chip->dev, u->buffer_size, > u->urb->transfer_buffer, > u->urb->transfer_dma); > usb_free_urb(u->urb); > u->urb = NULL; > + u->buffer_size = 0; > } > > static const char *usb_error_string(int err)