From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id 0A26B1B88C for ; Tue, 15 May 2018 15:53:43 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id a12-v6so214190wrn.13 for ; Tue, 15 May 2018 06:53:43 -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=6Mm3U/oB+Ck65Xg983LH7RgQXwUJ+Ovj2EpAC3Tq8+4=; b=XUysXOoGCLWsxEloAhxLOjOzHIPfJN7AlObB/Ny7g2Zf0aNsfSqhKZ29ZoTaRkCCeQ fCKvDqkDPcKVDe2086dLSxIUf6u/SHMWqdAaouJ/UsD8oBHzuwzrTAAeZu0Sa6aVCYfc /oSRk25QvA3L1Uh4ESQsbetiFMuihuqIvVij7ud8CReAuAqRwxWCApxmk89vSTOdQtlX AFuJ1fZlD/QWldb6PodGW63KLPOZqPk0giHBVWGNF+q3Nd+r70ZdmUKHK5m6hD11CsZK 5ZKuln1VKiYtOfx20d8gRu6rG5xEiahN44zwVi+QVE3yGupA9iCVlccfpKJtJysDW+fC Akbg== 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=6Mm3U/oB+Ck65Xg983LH7RgQXwUJ+Ovj2EpAC3Tq8+4=; b=aMf12A+AekBBeW2bXPuXc91ZZo4+KubmWNu19/QkHRpwgfAi8iWcRo81jattXedbvj NvsAUgt6rhpQCz5FbhM0rRnzPxZYdVMV7t8IXjWqlLMEPi+KWfZBHC9yOZGeyQ7tEvK9 w6LJhC3t58AO/7O+wCrbuUp/Mm/kLmc8BYmrYy9hW+RZVkdMLnFn7VLzS31+E7wHCozA FTMY0YmLlTu3t17YtKI9uYfOqSZue4BCaM+6GX4Nr195V1b1EtPPkRh4hn6e0zotCRA6 cI8ciU8lZH7bZ7C+bi/f+IJfDMiRhkJPaCx3YlI2yYT67wSQFdeC9PnQPBccOBdhiZmM tk+w== X-Gm-Message-State: ALKqPweE1SfL2EvegkJGNsDJsJFy1MYZ624dMS+10XGpe4FWUDwL5uZa jzyySNKfvEuRqZBL5XRqXVU= X-Google-Smtp-Source: AB8JxZrf7YOuU/TksV61PUBaU2JKiKu8XK6GYWgsNZr6P9vrMVwXKv8vUtaoNE124Aot6yfF2FJT3A== X-Received: by 2002:adf:a0b9:: with SMTP id m54-v6mr10286248wrm.76.1526392423735; Tue, 15 May 2018 06:53:43 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id g78-v6sm722692wmc.27.2018.05.15.06.53.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:53:42 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: Alejandro Lucero , dpdk stable Date: Tue, 15 May 2018 14:53:31 +0100 Message-Id: <20180515135335.10459-4-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515135335.10459-1-luca.boccassi@gmail.com> References: <20180515134731.9337-72-luca.boccassi@gmail.com> <20180515135335.10459-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/nfp: fix memcpy out of source range' has been queued to stable release 18.02.2 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: , X-List-Received-Date: Tue, 15 May 2018 13:53:44 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 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/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 71335de3f9d02cef22e2d98eaf707ea2cbabf1f9 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 14 May 2018 13:00:32 +0800 Subject: [PATCH] net/nfp: fix memcpy out of source range MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 1bcb5ecb179cbca81ff3fe15432326c1c3ca9e9b ] drivers/net/nfp/nfp_net.c:669:2: error: ‘memcpy’ forming offset [5, 6] is out of the bounds [0, 4] of object ‘tmp’ with type ‘uint32_t’ {aka ‘unsigned int’} [-Werror=array-bounds] memcpy(&hw->mac_addr[0], &tmp, sizeof(struct ether_addr)); Fixes: e6decee38209 ("net/nfp: use random MAC address if not configured") Signed-off-by: Andy Green Acked-by: Alejandro Lucero Tested-by: Alejandro Lucero --- drivers/net/nfp/nfp_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 912c3e1a6..16adbb29e 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -675,7 +675,7 @@ nfp_net_vf_read_mac(struct nfp_net_hw *hw) uint32_t tmp; tmp = rte_be_to_cpu_32(nn_cfg_readl(hw, NFP_NET_CFG_MACADDR)); - memcpy(&hw->mac_addr[0], &tmp, sizeof(struct ether_addr)); + memcpy(&hw->mac_addr[0], &tmp, 4); tmp = rte_be_to_cpu_32(nn_cfg_readl(hw, NFP_NET_CFG_MACADDR + 4)); memcpy(&hw->mac_addr[4], &tmp, 2); -- 2.14.2