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 BB8E0A0524 for ; Fri, 5 Feb 2021 12:32:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5FF51889FD; Fri, 5 Feb 2021 12:32:43 +0100 (CET) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id 0623D188A08 for ; Fri, 5 Feb 2021 12:32:43 +0100 (CET) Received: by mail-wr1-f50.google.com with SMTP id u14so7336562wri.3 for ; Fri, 05 Feb 2021 03:32:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+klFbV5bcD1qNLcVuLDD6QJ/oJl1vvlX/yoxIjRbf+o=; b=TUsBhlPCKRv8+/J4wOKz4GWQnZqXHoYJxm8J7Q2Lfgo6WJNrGmbiFW9KM9gcFjX1V0 nXUyBk29u8yEHCCtnzuRJ76a939NAAcL/mL47YvOabKNvik3VlIbaGVIKXg/A+gaBJJ6 rkOidixFvho6iHPuQ/TxmcnQ86SR/LMg31P+mFxKwURrcrjw9x6ooZ1+IbmXiZkhGl4M fPKkiwlmFKIv3QIx2JtVTV/3p21b5jN+B6hv8v50O0Oh0XkLNQabZCppDEKztAgZVEPS upv/W/rf3fQWw7QNAmr2ket0dpRrFhs/yRU5bVbQH5mGdft1Xj1Jrtnp48GOvkpYH9YY p9tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+klFbV5bcD1qNLcVuLDD6QJ/oJl1vvlX/yoxIjRbf+o=; b=Snjxr5a+63BAqPZ2JbyuvSlhHORNtC7d13RWPYJBVIb8Y/JB0lqtsVM0DM4q87Ju/Z fSFHnaE6/ugsx3eQ9W6fJECiH/jywyFaz8pLcw9fFiL0T5naLpufYp6GYgjWyCx1VDHC l0PRI4HXTQ3MH0hS930osOOrIMNx+EQKcWG7nkcC+TmjBTurfRhi72eS2y4HEOjWZwqc E3lSrReYZmih73eEOmMzGJuIzA5q4Gv1uFPC9rOPr6bwpVWXB8gq0fOeMXhxQdrYPYN+ 3U5ACiqkIEP86ICUbquyrSBdIWvYkmtTxxGdyPkE75FGssqpCEu66ZvtC5NQ2zuKx4K3 ZH0A== X-Gm-Message-State: AOAM533CQQWCFBKVO62ErLk3n8phl2Fr4pplTowF7aztnzRTc0zkxOiK tp6bowo9HKv3tQRQ21u2hU0= X-Google-Smtp-Source: ABdhPJy3dyPlm5VT/LaGNw/orMaRzmK/hGW6T4G3LGlfJxh3qaRArTjoac/kcfQvpv9FZbdzHu/Drg== X-Received: by 2002:adf:e50e:: with SMTP id j14mr4662187wrm.162.1612524762773; Fri, 05 Feb 2021 03:32:42 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id z15sm317233wmi.38.2021.02.05.03.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:32:42 -0800 (PST) From: luca.boccassi@gmail.com To: Ivan Malov Cc: Andy Moreton , Andrew Rybchenko , dpdk stable Date: Fri, 5 Feb 2021 11:17:08 +0000 Message-Id: <20210205111920.1272063-142-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'common/sfc_efx/base: enhance field ID check in field set API' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/e7fd91ef16c4f092aa5a39a8a871d2054ac53a45 Thanks. Luca Boccassi --- >From e7fd91ef16c4f092aa5a39a8a871d2054ac53a45 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Wed, 6 Jan 2021 13:06:01 +0300 Subject: [PATCH] common/sfc_efx/base: enhance field ID check in field set API [ upstream commit 5da37ab56e144686e5cc87153c9bd929db7c11b7 ] A field ID passed to the API may point to a gap in the array of field descriptors. Turn down such invocations as improper. Fixes: 370ed675a952 ("common/sfc_efx/base: support setting PPORT in match spec") Reviewed-by: Andy Moreton Reviewed-by: Andrew Rybchenko Signed-off-by: Ivan Malov --- drivers/common/sfc_efx/base/efx_mae.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c index eb91753ec5..cc5d8cfc4f 100644 --- a/drivers/common/sfc_efx/base/efx_mae.c +++ b/drivers/common/sfc_efx/base/efx_mae.c @@ -690,14 +690,20 @@ efx_mae_match_spec_field_set( goto fail2; } + if (descp->emmd_mask_size == 0) { + /* The ID points to a gap in the array of field descriptors. */ + rc = EINVAL; + goto fail3; + } + if (value_size != descp->emmd_value_size) { rc = EINVAL; - goto fail3; + goto fail4; } if (mask_size != descp->emmd_mask_size) { rc = EINVAL; - goto fail4; + goto fail5; } if (descp->emmd_endianness == EFX_MAE_FIELD_BE) { @@ -741,6 +747,8 @@ efx_mae_match_spec_field_set( return (0); +fail5: + EFSYS_PROBE(fail5); fail4: EFSYS_PROBE(fail4); fail3: -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:35.603278648 +0000 +++ 0142-common-sfc_efx-base-enhance-field-ID-check-in-field-.patch 2021-02-05 11:18:29.026695300 +0000 @@ -1 +1 @@ -From 5da37ab56e144686e5cc87153c9bd929db7c11b7 Mon Sep 17 00:00:00 2001 +From e7fd91ef16c4f092aa5a39a8a871d2054ac53a45 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5da37ab56e144686e5cc87153c9bd929db7c11b7 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org