Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3404715rwb; Fri, 30 Sep 2022 03:09:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Me4Fl6LvUi/t4kVGDGf5m8xUuPfN5C8rzS1jcemCr2SwtnIgyg33tpHr+LG6LGN9DXMV9 X-Received: by 2002:a05:6402:50cc:b0:451:bf26:8c51 with SMTP id h12-20020a05640250cc00b00451bf268c51mr7423171edb.336.1664532562140; Fri, 30 Sep 2022 03:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664532562; cv=none; d=google.com; s=arc-20160816; b=hHkh5EXOdHocRLUP9RUPpkYjMjuXBuKkCwLLRTUTNKcrH2GXMbFOXx7chJ9spO6Vlm UsKs0rFcmr3b0HhiS+v0stKZpZhaSg426uj77QLfHsi0qPGwe+xEmmtQoLknFueF1srF n5dCfyFMstG66w5mImRZhzXuzac4sVDHAt+bIgFY00qM15M4tFG8xSOI58sN8VJ/V0zx 2fyRFhEwD1rvyB98Wpg26oMK5GRpjrEC1sqVQdMRfvUo8Wy1i0N9XWDVH5tx+sVUL1Kh i38KZRXeAINKrSbwamteSMmeJX9ACay9riT4rNWZiM/qRuKawH/BmHzEayPL1x3lwuc7 hyPg== 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=SRMQb52MbT2bpBHYWiJH2YSSNU2RuItMYhSPzZoa3Oc=; b=dKFjaK4BtTLCQpzCDZP7Ty7viq38KedVW1r6XkWkCfS75P3HeshrHxvOzbQtDHwp0+ WgqVgovgxjEJyiN9mN3sSuvS5PYRGYzjSeh+Op8lZQpQHIsIJAC+8jSUoH/IefuxNV4g oHs9DO0i/XAK6CLbVa2XCehwKCLCbHjNy6/Ds8/63n5DOLcdsOyTkBziysugJl7HZqrj EfKlr227CZa2Rsld6cFgK/PjqcOaQjQl8aq+UqZAbZymzBhI8/nYQiefBAyTHN9ft6f4 bbBRQkjk6Zswq5o0XVmY6VWDw2m53AaDtc6LoN9+99DyA5BgXVn+Fq5KqCzNxHAnWfTp BLPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=14KXKiQ6; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=mn4mnAGA; 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 sg13-20020a170907a40d00b0076f061ffab4si1646044ejc.51.2022.09.30.03.08.43; Fri, 30 Sep 2022 03:09:22 -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=14KXKiQ6; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=mn4mnAGA; 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 S230218AbiI3JjJ (ORCPT + 99 others); Fri, 30 Sep 2022 05:39:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229869AbiI3JjG (ORCPT ); Fri, 30 Sep 2022 05:39:06 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE20613790B for ; Fri, 30 Sep 2022 02:39:05 -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 371021F8D5; Fri, 30 Sep 2022 09:39:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1664530744; 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=SRMQb52MbT2bpBHYWiJH2YSSNU2RuItMYhSPzZoa3Oc=; b=14KXKiQ6OMLquAPciWpAAvyKma1y1RL97TV6u/7k8/JJEuNL0nd1STpj+pXtJLB5ZJVTej eOAdAkBpUnh32r4q2m9S+5d982k1F1XSMq7AygftZ7IT5c8D7PQPPiorohX9sxQzxjS8iW SVdJZfgre5bU2BgbHvm/1OD6ZnUEFfg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1664530744; 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=SRMQb52MbT2bpBHYWiJH2YSSNU2RuItMYhSPzZoa3Oc=; b=mn4mnAGADK9HEeTXESCzmZCdK020MkeghP+NEh4Vj9Te0Uz+GK7isyLf4KAnsWKVVj6fS4 6EAF+dpTdOoQmCAQ== 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 1A52213677; Fri, 30 Sep 2022 09:39:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id LHKuBTi5NmP3YQAAMHmgww (envelope-from ); Fri, 30 Sep 2022 09:39:04 +0000 Date: Fri, 30 Sep 2022 11:39:03 +0200 Message-ID: <877d1l6w20.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: <87bkqx6ws6.wl-tiwai@suse.de> References: <87bkqx6ws6.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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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: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. 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)