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 97F26A04DD for ; Wed, 28 Oct 2020 11:55:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8E012CA97; Wed, 28 Oct 2020 11:55:21 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 16D55CA32 for ; Wed, 28 Oct 2020 11:55:19 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id x7so5183432wrl.3 for ; Wed, 28 Oct 2020 03:55:19 -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=1RvDv54yppIjIxCAvLeGASHUFkF32fIbDMh7kLARb5o=; b=enaQybZJO3eu3KL7Fs7A1qLKaXNWWUyf9om2Ba2IdIjm4Vz47Z6K/N4ALBNhEI4bJc 48dAp+2N1PVYWSvLUUYYKJ11NXyuNq4DHwn8pUdIvyGlbB3kcJBxbhALtTmErxqQaIJd y0j/8bqP8guPYQfteOusBEeHLOewOFuu3hMx92EWr2CzFgK7EnvBfvrHROvJa+A+SnPO kPNazfQuBZP0rPUqf9qhJCc6MO1rrwq/2bjdf0s8g6brY3pHiKFVyauUxxJhLF+DNp5l Sn7pJa7tnYwXZ5lQjhuY/XQZ3U0wWHHUSJHDJKi/9l68/8ODgL8hyZw/swDmQSyZxCpR Uv5Q== 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=1RvDv54yppIjIxCAvLeGASHUFkF32fIbDMh7kLARb5o=; b=Q4cjgOtkFUclLE1UeKxqAUWBwfGWcxxIJvaFey6EMyseyuhHFD05VxbtvUkRHa3pA6 5zTR5l4agQAWelxO0f7GR+2LXVBMrxQmyE9sxAg4OJTk5C1lRElgfS/iGFcnyJP8lFrs log6O6kMdywSEGbTMcnmizPv9ZBN7G0DAhRMXJBc0tfp7aWM7kykOs1AwEURqB+Vu1SL 9b+JTTz/9fM02LqFUGpyNWBl4R3SoL0XXzPJODY3jF6xbEV9EPNi6YQCCqbw/M8jJfg8 L0K6XWv07dTMMw6IyoEXlYDXRjDF2Ax/p8zRw/dDkgM3cScgqdYXF4IxTe1wFqKAnE2m CWlw== X-Gm-Message-State: AOAM530GvJbrp8IIhocy7TYglT/0TbLCmq1+wr5rHck2XQydB4DJnh9H h2BYj5sbhCBjU4p+VvyA2ApqlT0wPMaXdFTx X-Google-Smtp-Source: ABdhPJyzfE/oj63KxvqsNYcUp/QTbV7QKBJm2WWvPMVZMSCzDAp8T8z6kI2U9AujqSb6jRRxedUJ3Q== X-Received: by 2002:adf:dd89:: with SMTP id x9mr8117560wrl.284.1603882518844; Wed, 28 Oct 2020 03:55:18 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id c1sm6436983wru.49.2020.10.28.03.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:55:18 -0700 (PDT) From: luca.boccassi@gmail.com To: Ciara Loftus Cc: Bruce Richardson , Ferruh Yigit , dpdk stable Date: Wed, 28 Oct 2020 10:45:31 +0000 Message-Id: <20201028104606.3504127-172-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/af_xdp: use strlcpy instead of strncpy' has been queued to stable release 19.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 stable release 19.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 10/30/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 7029c20146ae6714be78a59e514df26242a5d855 Mon Sep 17 00:00:00 2001 From: Ciara Loftus Date: Wed, 7 Oct 2020 09:20:50 +0000 Subject: [PATCH] net/af_xdp: use strlcpy instead of strncpy [ upstream commit 6d3c595d3a4e856307b92d1a824b07b48da1cc3c ] strncpy may leave the destination buffer not NULL terminated so use strlcpy instead. Coverity issue: 362975 Fixes: 339b88c6a91f ("net/af_xdp: support multi-queue") Signed-off-by: Ciara Loftus Acked-by: Bruce Richardson Reviewed-by: Ferruh Yigit --- drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index c5c906ff96..6fab9aab78 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -1116,7 +1116,7 @@ xdp_get_channels_info(const char *if_name, int *max_queues, channels.cmd = ETHTOOL_GCHANNELS; ifr.ifr_data = (void *)&channels; - strncpy(ifr.ifr_name, if_name, IFNAMSIZ); + strlcpy(ifr.ifr_name, if_name, IFNAMSIZ); ret = ioctl(fd, SIOCETHTOOL, &ifr); if (ret) { if (errno == EOPNOTSUPP) { -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:17.061987119 +0000 +++ 0172-net-af_xdp-use-strlcpy-instead-of-strncpy.patch 2020-10-28 10:35:11.780834087 +0000 @@ -1,14 +1,15 @@ -From 6d3c595d3a4e856307b92d1a824b07b48da1cc3c Mon Sep 17 00:00:00 2001 +From 7029c20146ae6714be78a59e514df26242a5d855 Mon Sep 17 00:00:00 2001 From: Ciara Loftus Date: Wed, 7 Oct 2020 09:20:50 +0000 Subject: [PATCH] net/af_xdp: use strlcpy instead of strncpy +[ upstream commit 6d3c595d3a4e856307b92d1a824b07b48da1cc3c ] + strncpy may leave the destination buffer not NULL terminated so use strlcpy instead. Coverity issue: 362975 Fixes: 339b88c6a91f ("net/af_xdp: support multi-queue") -Cc: stable@dpdk.org Signed-off-by: Ciara Loftus Acked-by: Bruce Richardson @@ -18,10 +19,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c -index eaf2c9c873..ac00cbab8e 100644 +index c5c906ff96..6fab9aab78 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c -@@ -1362,7 +1362,7 @@ xdp_get_channels_info(const char *if_name, int *max_queues, +@@ -1116,7 +1116,7 @@ xdp_get_channels_info(const char *if_name, int *max_queues, channels.cmd = ETHTOOL_GCHANNELS; ifr.ifr_data = (void *)&channels;