From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AFBA0C004D4 for ; Thu, 19 Jan 2023 10:30:44 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C8A4C7FD4; Thu, 19 Jan 2023 11:29:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C8A4C7FD4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1674124242; bh=hRXUdudLuZeO+VgVDbNxLMQxsYdg7P29jf/yofds3iw=; h=Date:From:To:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=Z92xVVDUTo366/Egm2deMlOSyIgba7taFVDqaSKQMHl910fmKsBU1ckCHmogV9KNG fxur+7h0nxMH5j2CYzsSm6AC+9JWGvp+JGS6yg6sLS/zRDi+vHmGGXJauoIF31wh/i jk9pmws3fl9xXdAsoiIXvgSa9lplHK3RC2afEOPk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 769DDF8025D; Thu, 19 Jan 2023 11:29:52 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0B5BAF8047B; Thu, 19 Jan 2023 11:29:51 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8F2E9F80083 for ; Thu, 19 Jan 2023 11:29:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8F2E9F80083 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=k0ic+1V+; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=IPhbZ9Ej 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 597FC5CC2F; Thu, 19 Jan 2023 10:29:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1674124183; 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=8KlZvB/UZYoksWT8hu741iFNZtBsBPjxTGyRD6uI2Ko=; b=k0ic+1V+fKvyIIFs/LqlGPRvOUUHZVkeHkWDW004aaWTKsGZ3EXfpIXL/X5TutMdq0RS6/ Zps69tLDQf13QMeOgU9VSzVljwAtVYoRbvEDH+FB7LM+GGfPb4ftN+JIQjDlf1631uk5km QlOrHXOB/T98YRidodHAULA3xQCUKjg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1674124183; 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=8KlZvB/UZYoksWT8hu741iFNZtBsBPjxTGyRD6uI2Ko=; b=IPhbZ9EjkvqmGUIZ4C2Y+sFXn75Ef5eDpMFoum3Woe46eGFKF3Rrh3sCajGcCn/nS43V4w AX6jqcqyb1M9CUAw== 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 374A3139ED; Thu, 19 Jan 2023 10:29:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id jk/VDJcbyWO2HgAAMHmgww (envelope-from ); Thu, 19 Jan 2023 10:29:43 +0000 Date: Thu, 19 Jan 2023 11:29:42 +0100 Message-ID: <87wn5irf55.wl-tiwai@suse.de> From: Takashi Iwai To: Artemii Karasev Subject: Re: [PATCH] ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path() In-Reply-To: <20230119082259.3634-1-karasev@ispras.ru> References: <20230119082259.3634-1-karasev@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-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Xiang wangx , lvc-project@linuxtesting.org, linux-kernel@vger.kernel.org, Takashi Iwai Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Thu, 19 Jan 2023 09:22:59 +0100, Artemii Karasev wrote: > > snd_hda_get_connections() can return a negative error code. > It may lead to accessing 'conn' array at a negative index. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Artemii Karasev > Fixes: 30b4503378c9 ("ALSA: hda - Expose secret DAC-AA connection of some VIA codecs") Thanks, applied. Takashi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0ADAC004D4 for ; Thu, 19 Jan 2023 10:29:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230132AbjASK3v (ORCPT ); Thu, 19 Jan 2023 05:29:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbjASK3r (ORCPT ); Thu, 19 Jan 2023 05:29:47 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA3B73ABA for ; Thu, 19 Jan 2023 02:29:44 -0800 (PST) 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 597FC5CC2F; Thu, 19 Jan 2023 10:29:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1674124183; 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=8KlZvB/UZYoksWT8hu741iFNZtBsBPjxTGyRD6uI2Ko=; b=k0ic+1V+fKvyIIFs/LqlGPRvOUUHZVkeHkWDW004aaWTKsGZ3EXfpIXL/X5TutMdq0RS6/ Zps69tLDQf13QMeOgU9VSzVljwAtVYoRbvEDH+FB7LM+GGfPb4ftN+JIQjDlf1631uk5km QlOrHXOB/T98YRidodHAULA3xQCUKjg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1674124183; 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=8KlZvB/UZYoksWT8hu741iFNZtBsBPjxTGyRD6uI2Ko=; b=IPhbZ9EjkvqmGUIZ4C2Y+sFXn75Ef5eDpMFoum3Woe46eGFKF3Rrh3sCajGcCn/nS43V4w AX6jqcqyb1M9CUAw== 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 374A3139ED; Thu, 19 Jan 2023 10:29:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id jk/VDJcbyWO2HgAAMHmgww (envelope-from ); Thu, 19 Jan 2023 10:29:43 +0000 Date: Thu, 19 Jan 2023 11:29:42 +0100 Message-ID: <87wn5irf55.wl-tiwai@suse.de> From: Takashi Iwai To: Artemii Karasev Cc: Jaroslav Kysela , Takashi Iwai , Xiang wangx , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path() In-Reply-To: <20230119082259.3634-1-karasev@ispras.ru> References: <20230119082259.3634-1-karasev@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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Jan 2023 09:22:59 +0100, Artemii Karasev wrote: > > snd_hda_get_connections() can return a negative error code. > It may lead to accessing 'conn' array at a negative index. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Artemii Karasev > Fixes: 30b4503378c9 ("ALSA: hda - Expose secret DAC-AA connection of some VIA codecs") Thanks, applied. Takashi