From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 671BAA04F5 for ; Wed, 11 Dec 2019 22:28:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 55C1F2BD3; Wed, 11 Dec 2019 22:28:49 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 9DECB1D9E for ; Wed, 11 Dec 2019 22:28:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576099727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2pJgIe3uEpdixJ8XFxvGtwOAmIttrVaBfRvSIsZFEeI=; b=RstmrDWMBoZQ3CoFq2PlxM6yfDnSVo9jBO9xxPcUYLsTVCdu69CpZM44yC0i+Y0aSq2N/Z 9/rYG+Tx4gHaJUSrY4qo7TuYGjv+qTBg0AzpzFHBRxIrReVIlkx+hW1hBTwBQGX2UcFz0m db/apnN8BN4eArnt1OpiLioOazCVLG8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-261-0-cAIQuAPEiG-23Iq8SoDQ-1; Wed, 11 Dec 2019 16:28:38 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A3F1318543A0; Wed, 11 Dec 2019 21:28:37 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id A10AC10013A1; Wed, 11 Dec 2019 21:28:36 +0000 (UTC) From: Kevin Traynor To: Dekel Peled Cc: Matan Azrad , dpdk stable Date: Wed, 11 Dec 2019 21:26:29 +0000 Message-Id: <20191211212702.27851-37-ktraynor@redhat.com> In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com> References: <20191211212702.27851-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: 0-cAIQuAPEiG-23Iq8SoDQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/mlx5: fix check of RSS queue index' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/17/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/cba8f82b30a751c9e2= 01065fee0abde9810788f0 Thanks. Kevin. --- >From cba8f82b30a751c9e201065fee0abde9810788f0 Mon Sep 17 00:00:00 2001 From: Dekel Peled Date: Mon, 11 Nov 2019 16:32:31 +0200 Subject: [PATCH] net/mlx5: fix check of RSS queue index [ upstream commit 97127d429876b6ac817de65c6e3c1c2d17851bfe ] RSS action validation function checks the queues included in RSS to make sure they are valid. A Queue is considered valid if the pointer to the queue (item at location queue-index of RxQ array) is not a null value. The queue indices are not checked. If a large value is entered as queue index, using it as an index in RxQ array will result in a pointer to memory out of array bounds. If this memory contains a value which is not null, this queue will be wrongly considered valid. This patch updates function mlx5_flow_validate_action_rss() with check of the input queue indices, as done in function mlx5_flow_validate_action_queue(). Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function= ") Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 2bf535213..467af73a5 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -945,4 +945,9 @@ mlx5_flow_validate_action_rss(const struct rte_flow_act= ion *action, =09=09=09=09=09 " supported"); =09for (i =3D 0; i !=3D rss->queue_num; ++i) { +=09=09if (rss->queue[i] >=3D priv->rxqs_n) +=09=09=09return rte_flow_error_set +=09=09=09=09(error, EINVAL, +=09=09=09=09 RTE_FLOW_ERROR_TYPE_ACTION_CONF, +=09=09=09=09 &rss->queue[i], "queue index out of range"); =09=09if (!(*priv->rxqs)[rss->queue[i]]) =09=09=09return rte_flow_error_set --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-11 21:24:15.637335946 +0000 +++ 0037-net-mlx5-fix-check-of-RSS-queue-index.patch=092019-12-11 21:24:12.= 672651114 +0000 @@ -1 +1 @@ -From 97127d429876b6ac817de65c6e3c1c2d17851bfe Mon Sep 17 00:00:00 2001 +From cba8f82b30a751c9e201065fee0abde9810788f0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 97127d429876b6ac817de65c6e3c1c2d17851bfe ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -29 +30 @@ -index 092f7b4c4..14a89e2e3 100644 +index 2bf535213..467af73a5 100644 @@ -32,2 +33,2 @@ -@@ -1152,4 +1152,9 @@ mlx5_flow_validate_action_rss(const struct rte_flow_= action *action, - =09=09=09=09=09 NULL, "No queues configured"); +@@ -945,4 +945,9 @@ mlx5_flow_validate_action_rss(const struct rte_flow_ac= tion *action, + =09=09=09=09=09 " supported");