Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp162410iog; Sun, 12 Jun 2022 22:51:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJqrLY2AC8lM08uh2tOCvsMPgb30bGdRVk51jtw4WUyLuPAqpHh498zVdOR31VPwXdu34s X-Received: by 2002:aa7:ce18:0:b0:431:9332:fe69 with SMTP id d24-20020aa7ce18000000b004319332fe69mr32543267edv.220.1655099505962; Sun, 12 Jun 2022 22:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655099505; cv=none; d=google.com; s=arc-20160816; b=cWthljmF5cLX3iRUyJpnxwK7bqSsDwwrx5DM8mgsiThmNcD/x4LFZcS6Z5IgPunQ3h xf7ui6fo6r0FBUl+XP13O7qXsZeWL0hIMFlacWk//e8aDYey+88muXMBZ5dbHubilmnJ dg7PwN0QnSEmeqTIA8C1jZh9G4sTWTk1sxfmWEUxx9QyaxHcru+a4sG6+AHNkCsdgUw5 I0yNkdhQKC5BzsZYetLXUDN7P0ZKOOpGfByUkstgGuFhCGQsoXERhFwk6pIV97MPWq1n U5AXm39kPp6VcDpGOvZizen/CwMizbBduduzAxZlDD7Slv1KME80d/wd8Vbq4js992QV iHQw== 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=3dINdTPcWskYcY4vaHavZqUpGKTEZb/iEHgT5+r3rkI=; b=wAoY+aZWuxUezqvDIyf3aeEJFuXkRfJ0TPlVac2V/HMBzOYw2h1MpndhGinUZXmWQF VX1+WETHp0icwZYCvKK/9o4f5yCPmYhzafa/XWcqnV3XsYe2m+TJEonJ1wsoVm/hzpYa yUf1qE+WNithAVxz4YQby3TKTHQyfaLXcaJFlRyZn7ZMIUTGybrFrl8WroMwN0i4eqnc or+pe6/F6C7v0VH7GFGnXq1orjmfG/nhiYcvg9Rq6rOsLUgRFBr/vJaT3yVSuBdkGnn1 gvD3rXaTQ1XSxwCqFUiPFsIBy32IExRwDO+/iCdCLpbgnWbYzs4KHx+Tm2OBupd4Aq/T 7Law== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="sEUK/XO2"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=BVoNivKB; 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 k26-20020aa7c05a000000b0043139d41054si6697117edo.381.2022.06.12.22.51.21; Sun, 12 Jun 2022 22:51:45 -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="sEUK/XO2"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=BVoNivKB; 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 S236937AbiFMFoq (ORCPT + 99 others); Mon, 13 Jun 2022 01:44:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232665AbiFMFnM (ORCPT ); Mon, 13 Jun 2022 01:43:12 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40EC413DCF for ; Sun, 12 Jun 2022 22:41:14 -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 E19551F91B; Mon, 13 Jun 2022 05:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1655098872; 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=3dINdTPcWskYcY4vaHavZqUpGKTEZb/iEHgT5+r3rkI=; b=sEUK/XO2825jyPzqfgauovi913iP9V+rVVL1jeonqZUh91YxzlEYTnvaNHJtAio13YBdPo v/oPSVzDCPpZ8kP8EVevZuSY6pRt7G50Z1h9W8KJyDZ9t4u+dICM1HcX2b4QtTTqarla4y aVuptZqZpvR/GfdWlY5slmMieU8Cihg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1655098872; 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=3dINdTPcWskYcY4vaHavZqUpGKTEZb/iEHgT5+r3rkI=; b=BVoNivKBgpz8BtiMTCIHUiwn5BoVYysZMR6nylaDkjCiLtcmPu3dzuGkGq/7oot3uFd/CK 8lnEtn3nQbAz0HAA== 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 B24F113941; Mon, 13 Jun 2022 05:41:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qyWdKfjNpmJ3bQAAMHmgww (envelope-from ); Mon, 13 Jun 2022 05:41:12 +0000 Date: Mon, 13 Jun 2022 07:41:12 +0200 Message-ID: <87edztt91j.wl-tiwai@suse.de> From: Takashi Iwai To: Daniil Dementev Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Alexey Khoroshilov Subject: Re: [PATCH] ALSA: usb-audio: US16x08: Move overflow check before array access In-Reply-To: <20220610165732.2904-1-d.dementev@ispras.ru> References: <20220610165732.2904-1-d.dementev@ispras.ru> 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,T_SCC_BODY_TEXT_LINE 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, 10 Jun 2022 18:57:32 +0200, Daniil Dementev wrote: > > Buffer overflow could occur in the loop "while", due to accessing an > array element before checking the index. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Daniil Dementev > Reviewed-by: Alexey Khoroshilov Thanks, applied. Takashi