From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 850AEA0544 for ; Fri, 11 Nov 2022 12:40:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7FAD74014F; Fri, 11 Nov 2022 12:40:25 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 4BB8740141 for ; Fri, 11 Nov 2022 12:40:23 +0100 (CET) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id CECA53F0C8 for ; Fri, 11 Nov 2022 11:40:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668166822; bh=dwj7X98hiCbrBZqx4d6ld0921E/Q81eEKCxOvRMDcV4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bDLCO5xfoMCLut/M71MVeBR+jdWFLZRfCXXDSMUaKBqrNyHX/LKmI3NX6etjP6MpY Zz5+/oymZxzm4oponQLMuGWgS366hLnFcHBL+1Q+gJyA4uGSndmIC6xmSWg0Mn7NHk v3xGcGnMfExP81uumwdaFUP+9E22OQliO28VtCyZdfvH0nP69rfWXKBkYSUE7H1bfF HW9yx49DFh6CuIkqXTQEpfOe4mUTR9/Wi6RTKsnKMrs9X+QaOxEzTVDA6uGPtCxDmd CvuK1Fo+r5/LzsuciqK12TXIWGRiADozwYn+uaTHz6SE48jnoei+yIFMNxrcgVOvdq yoNNLXBfV+DCA== Received: by mail-ej1-f71.google.com with SMTP id sc40-20020a1709078a2800b007ae024e5e82so2914058ejc.13 for ; Fri, 11 Nov 2022 03:40:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dwj7X98hiCbrBZqx4d6ld0921E/Q81eEKCxOvRMDcV4=; b=tBnmeOb8agAjJF926UKZu2Ou2gUhrXvQcbwA+/8Kn7W1ychK7sNNRSiXrWRWOAnB3u Firkk4h6giHM1ic0GYlUJQA/vm7dGS6CtT5IY7nxfuxAMLGYhBZT7LaJzWWssrQydDTu 0yG/lTl1ePhqhEXCGLp9kH3GvcNc0b5SaMNdHQoNPj0nwRNE1ZYukyil8456SPLi0mh+ JaMZF7UKI48jFndZCilINc5seXe1zM1FaqFypI/uKzxCjSytgYJlrFgpSuEFv6CnCZhU yIRp8cOm6xfv5x4nIhOtYYPvJrpnyfxA0nAAsiUA6yNceUjAM26RKnupXu28+/N/qgwO tfKQ== X-Gm-Message-State: ANoB5pkfOs77dvYmGfXtE6vCxbvIJj8QbhavNmHUJMJmNJj+Z50Ru8d4 ok5p9iZn+wzZvOdyBxzPANBtm8jOpQ9qeQFP9XMkovyI0Vxo2CSjg4nLp0CRyWN4OQ5zvH+q+la BxBQ6f+bIfZsPYHukLy7u2E/l X-Received: by 2002:a05:6402:344f:b0:461:d726:438f with SMTP id l15-20020a056402344f00b00461d726438fmr1089235edc.333.1668166822521; Fri, 11 Nov 2022 03:40:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf7g6/BdUJb5SgE8FAdGXGqOLpr4eAEQpMIFl5T55qR29rP6y2mo+kx0MveSoNsjIKwbZLwNXg== X-Received: by 2002:a05:6402:344f:b0:461:d726:438f with SMTP id l15-20020a056402344f00b00461d726438fmr1089214edc.333.1668166822293; Fri, 11 Nov 2022 03:40:22 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39af:c100:1891:6c61:50fd:e567]) by smtp.gmail.com with ESMTPSA id n23-20020a170906701700b0078db18d7972sm777713ejj.117.2022.11.11.03.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 03:40:21 -0800 (PST) From: christian.ehrhardt@canonical.com To: Qi Zhang Cc: Jesse Brandeburg , Qiming Yang , dpdk stable Subject: patch 'net/ice/base: fix array overflow in add switch recipe' has been queued to stable release 19.11.14 Date: Fri, 11 Nov 2022 12:38:38 +0100 Message-Id: <20221111113904.1549618-21-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> References: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 19.11.14 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/18/22. 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 rebasing (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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/542536e5f11a7a81f0291a4859a01cf1aadbe58f Thanks. Christian Ehrhardt --- >From 542536e5f11a7a81f0291a4859a01cf1aadbe58f Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Mon, 15 Aug 2022 03:31:25 -0400 Subject: [PATCH] net/ice/base: fix array overflow in add switch recipe [ upstream commit 289b2846c187aa061c13d6a499d0321f581390a5 ] The array indexes in this function are used with a zero index in the fv_idx table, and with a +1 index in the lkup_idx arrays. The code was using the lookup index for the field vector in only one place in this function, but the code was never used after this point so just remove the bad line. This was caught by the undefined behavior sanitizer. Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe") Signed-off-by: Jesse Brandeburg Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- drivers/net/ice/base/ice_switch.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 6899502a93..5fe6e9ea69 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -5199,7 +5199,6 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm, last_chain_entry->chain_idx = ICE_INVAL_CHAIN_IND; LIST_FOR_EACH_ENTRY(entry, &rm->rg_list, ice_recp_grp_entry, l_entry) { - last_chain_entry->fv_idx[i] = entry->chain_idx; buf[recps].content.lkup_indx[i] = entry->chain_idx; buf[recps].content.mask[i++] = CPU_TO_LE16(0xFFFF); ice_set_bit(entry->rid, rm->r_bitmap); -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 12:35:05.537618698 +0100 +++ 0021-net-ice-base-fix-array-overflow-in-add-switch-recipe.patch 2022-11-11 12:35:04.757191974 +0100 @@ -1 +1 @@ -From 289b2846c187aa061c13d6a499d0321f581390a5 Mon Sep 17 00:00:00 2001 +From 542536e5f11a7a81f0291a4859a01cf1aadbe58f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 289b2846c187aa061c13d6a499d0321f581390a5 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index e59d191c46..b8e733f539 100644 +index 6899502a93..5fe6e9ea69 100644 @@ -28 +29 @@ -@@ -7315,7 +7315,6 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm, +@@ -5199,7 +5199,6 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm,