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 E841CA0093 for ; Tue, 19 May 2020 15:00:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 74F231D607; Tue, 19 May 2020 15:00:23 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 998591D61F for ; Tue, 19 May 2020 15:00:21 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id f134so2980190wmf.1 for ; Tue, 19 May 2020 06:00:21 -0700 (PDT) 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=TqjqLxVVBCEXkccoonEg3/a0DN423kVhlKkiJT6kZTE=; b=DhRNsxT7k/yNcVHxII7rzBy4svMU5NxosevI3V4W1V+Ze6M0LF7sJHYtQPKLrKeOtU gR5LclF74fHZUuuGUxcB8h/cvB5yTgeUbX1mSt/ckcvW3dk01KGAmXjb02TsJMQREA4s esEM155R1hZagYsdSgmu1Zx9VdVaa5sSwMU9CBz6KbydcWpkq171t/N2PrHVCORxZjVc I2xAeJVXkrGtWBwWzephNCjnXZB6F1jlS7+01tIJyQKtVbIK65bkovar9s9MxLF11t2r 5H5vZOUJo8ma3ZqnDSHAPgsJETaKJutzrRG8/rM5UIKKe2bcy1TKFn/WFqHz4KiWXlgj si9A== 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=TqjqLxVVBCEXkccoonEg3/a0DN423kVhlKkiJT6kZTE=; b=e7ikuA9eNKz4+SEzoM9q6rh5gYwARac9COr8x743Xn8spRV82lPA+U9Fiab61ft4zN GPiYHODv5InPrqGB6v3LWjnT25Uc/9sXzL5mMU0RsJzaSus7pIah5Ecu2ij0F0zUH9i5 bQrkwVOqN2A2sKaW2HBXNWZDt/0CxQnnfwFtLfe6KyxJCMo5UZ+5bRQrBKQKRv4m+yJu AYZOW9vyf0IFi1myXGlmScZDXuC31SzdhiGhVk59q289JonF27MVAFRLqx21GizmV2TW z9SxaV8syvqSh+RoeSU63RicU7ErFjmW0Lze0kq/oZZJ0oXFS9RK8Z17KFbJwcRINvd9 P/MA== X-Gm-Message-State: AOAM531Lo8boRuLqICU/32D4tgr3aQDF8qJW8JWGwYyyEgDq6H958tX6 G4p09Bs1SSyo5YuUNzWCVLo+g9rUwBMjOvaV X-Google-Smtp-Source: ABdhPJx7d9gb17vMlaLR4bf/1CI44T7e3lyaeDheiVg0KjxuBwflOQOWdTMCcKHAdgqCws8X4sN/xQ== X-Received: by 2002:a05:600c:21d3:: with SMTP id x19mr5137298wmj.113.1589893221223; Tue, 19 May 2020 06:00:21 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 205sm4133640wmc.12.2020.05.19.06.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:00:20 -0700 (PDT) From: luca.boccassi@gmail.com To: Nagadheeraj Rottela Cc: Akhil Goyal , dpdk stable Date: Tue, 19 May 2020 13:54:15 +0100 Message-Id: <20200519125804.104349-65-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519125804.104349-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'crypto/nitrox: fix oversized device name' has been queued to stable release 19.11.3 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 stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/20. 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. Thanks. Luca Boccassi --- >From b9b72b8815d6b90fee1d516c80edc1e61917ae59 Mon Sep 17 00:00:00 2001 From: Nagadheeraj Rottela Date: Fri, 27 Mar 2020 19:12:39 +0530 Subject: [PATCH] crypto/nitrox: fix oversized device name [ upstream commit 9614b472a3af771f68ba4f99a034de3b4da99ef7 ] In nitrox_sym_pmd_create() the name array will overflow if the pci device name is greater than 57 bytes. To fix this issue subtract pci device name length from array length while appending substring to the name. Coverity issue: 349926 Fixes: 9fdef0cc2385 ("crypto/nitrox: create symmetric cryptodev") Signed-off-by: Nagadheeraj Rottela Acked-by: Akhil Goyal --- drivers/crypto/nitrox/nitrox_sym.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c index 56410c44d7..d1b32fec92 100644 --- a/drivers/crypto/nitrox/nitrox_sym.c +++ b/drivers/crypto/nitrox/nitrox_sym.c @@ -683,7 +683,8 @@ nitrox_sym_pmd_create(struct nitrox_device *ndev) struct rte_cryptodev *cdev; rte_pci_device_name(&ndev->pdev->addr, name, sizeof(name)); - snprintf(name + strlen(name), RTE_CRYPTODEV_NAME_MAX_LEN, "_n5sym"); + snprintf(name + strlen(name), RTE_CRYPTODEV_NAME_MAX_LEN - strlen(name), + "_n5sym"); ndev->rte_sym_dev.driver = &nitrox_rte_sym_drv; ndev->rte_sym_dev.numa_node = ndev->pdev->device.numa_node; ndev->rte_sym_dev.devargs = NULL; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 13:56:21.468783355 +0100 +++ 0065-crypto-nitrox-fix-oversized-device-name.patch 2020-05-19 13:56:18.295503187 +0100 @@ -1,8 +1,10 @@ -From 9614b472a3af771f68ba4f99a034de3b4da99ef7 Mon Sep 17 00:00:00 2001 +From b9b72b8815d6b90fee1d516c80edc1e61917ae59 Mon Sep 17 00:00:00 2001 From: Nagadheeraj Rottela Date: Fri, 27 Mar 2020 19:12:39 +0530 Subject: [PATCH] crypto/nitrox: fix oversized device name +[ upstream commit 9614b472a3af771f68ba4f99a034de3b4da99ef7 ] + In nitrox_sym_pmd_create() the name array will overflow if the pci device name is greater than 57 bytes. To fix this issue subtract pci device name length from array length while appending substring to the @@ -10,7 +12,6 @@ Coverity issue: 349926 Fixes: 9fdef0cc2385 ("crypto/nitrox: create symmetric cryptodev") -Cc: stable@dpdk.org Signed-off-by: Nagadheeraj Rottela Acked-by: Akhil Goyal