From patchwork Fri Jul 13 15:30:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 141962 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp915516ljj; Sat, 14 Jul 2018 15:45:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfhcgVQ6A8e6qpa2B1uPYnxD8qZJMzELwUJC5/ka4deiG0zuhJsDNCp+i3sNSFZB/K9glc3 X-Received: by 2002:adf:fac1:: with SMTP id a1-v6mr8011282wrs.74.1531608311499; Sat, 14 Jul 2018 15:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531608311; cv=none; d=google.com; s=arc-20160816; b=Tr+1mpA5tiCnzQqi7uWw5Mb5NMA75qLXGiXG3qbuZIqECWjk3op3YGG/LPaWaUXRSU QO8a+NULSJc3XM17DU9HkazAg/p+rdTgsyVsqLidI+KJh8IeFqFYi+eUaxWBxe/KHHGC SOyvF/6HUbwSqPRdFPdQQlf87hrc88XXzuOOwCO927X0p8JRoLFzVn8GXV6+0+cUTSoC P3gI12yDJ1X423XKDmQSU1fvWh3X2IgmeRkkIINLqycRHKgK9Sf7aVJc0raUtHbrY+43 4n6f+QWxVXMkIdqwtmlle/nPk0I/EvZSc9GaCbrSMAJnC2VDvam72dqR3fssrYQnxnIS he9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=1WLWUqzMvkInIpJdVaWc0IwMiHkS+pvH/jLTv5j/0sQ=; b=TTyVVFGl1lHX4vcbPhJyI1cfdvVrWl3ogfdbEyAAOGdoxb9N3RNOtwN/Cm9kjc745j Rcmopk9tgr/HxVgB5DtP9rsRHUra8ULuddFphMg/e2CxRnKXtsru0T3456e38kbQOsxl kjHDJzU1EavanmVOrCWzW0jVcfQMEYuhqsLDmS/Hnk5NS62ODlpX5SJ/+sozfZ10wo7w Fu2Aa8HkBWmQU2tMbG04eaXH8GhsDYuMQQI1SY+4d0bsZ3IWxoeARjpex6Yq5EMU/zyg wJzSzzrzv9Tl2KPzBr9eD34X7ox9Z0IDm7TpGDGSz/Wgnqhb9B5mRDFoyEhDYYbpuXz6 zHng== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=vrPW2TxN; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id k124-v6si6918069wmf.217.2018.07.14.15.45.11; Sat, 14 Jul 2018 15:45:11 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=vrPW2TxN; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7835E26776A; Sun, 15 Jul 2018 00:44:38 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5450A26773C; Sun, 15 Jul 2018 00:44:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=DATE_IN_PAST_24_48, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id C9AFD267730 for ; Sun, 15 Jul 2018 00:44:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=qnLrLmv8AU0IISHLB1nJj6n07NyXPTX6noRbxDq23Ik=; b=vrPW2TxNV4re j+5VMB+2DTYFED2kw2jy6oHuh5e6S2qJrO4lIlBE7Y2N8gR+meGAoa5efoRXYPO1I6Ca4Ndl3GdDD kvCwU/c4UYqKh0bUO0ItdhsraS7KeGYGFFNsSyCabOumtvytvEnA9gzR5rOixbYicTNS9R/IfAKU2 akSoI=; Received: from host86-174-189-173.range86-174.btcentralplus.com ([86.174.189.173] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1feTH6-0006hl-2X; Sat, 14 Jul 2018 22:44:24 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 31DC8440088; Fri, 13 Jul 2018 16:30:13 +0100 (BST) From: Mark Brown To: Dan Carpenter In-Reply-To: <20180713150557.gsx7wrau2l7tg2jq@kili.mountain> Message-Id: <20180713153013.31DC8440088@finisterre.ee.mobilebroadband> Date: Fri, 13 Jul 2018 16:30:13 +0100 (BST) Cc: alsa-devel@alsa-project.org, Banajit Goswami , Patrick Lai , kernel-janitors@vger.kernel.org, Takashi Iwai , Liam Girdwood , Mark Brown , Srinivas Kandagatla , Niklas Cassel Subject: [alsa-devel] Applied "ASoC: qdsp6: q6afe-dai: fix a range check in of_q6afe_parse_dai_data()" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: qdsp6: q6afe-dai: fix a range check in of_q6afe_parse_dai_data() has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From b8110a87b75f948d978c06e130cc68026645c4a1 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 13 Jul 2018 18:05:57 +0300 Subject: [PATCH] ASoC: qdsp6: q6afe-dai: fix a range check in of_q6afe_parse_dai_data() The main thing is that the data->priv[] array has AFE_PORT_MAX elements so the > condition should be >=. But we may as well check for negative values as well just to be safe. Fixes: 24c4cbcfac09 ("ASoC: qdsp6: q6afe: Add q6afe dai driver") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown --- sound/soc/qcom/qdsp6/q6afe-dai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.18.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c index a373ca5523ff..9ba95956ada8 100644 --- a/sound/soc/qcom/qdsp6/q6afe-dai.c +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c @@ -1183,7 +1183,7 @@ static void of_q6afe_parse_dai_data(struct device *dev, int id, i, num_lines; ret = of_property_read_u32(node, "reg", &id); - if (ret || id > AFE_PORT_MAX) { + if (ret || id < 0 || id >= AFE_PORT_MAX) { dev_err(dev, "valid dai id not found:%d\n", ret); continue; }