From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 3C871A3 for ; Fri, 8 Mar 2019 18:49:03 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Mar 2019 19:48:58 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x28HloAu002625; Fri, 8 Mar 2019 19:48:57 +0200 From: Yongseok Koh To: Declan Doherty Cc: dpdk stable Date: Fri, 8 Mar 2019 09:47:18 -0800 Message-Id: <20190308174749.30771-40-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190308174749.30771-1-yskoh@mellanox.com> References: <20190308174749.30771-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/bonding: fix possible null pointer reference' has been queued to LTS release 17.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: , X-List-Received-Date: Fri, 08 Mar 2019 17:49:03 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 03/13/19. So please shout if anyone has objection. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From e8201ea3bcd263b67fd09935490393a6cbd24db1 Mon Sep 17 00:00:00 2001 From: Declan Doherty Date: Tue, 8 Jan 2019 11:17:56 +0000 Subject: [PATCH] net/bonding: fix possible null pointer reference [ upstream commit e6b8757bb72caa565d24282ad8e405f28e3a34a9 ] In function check_for_bonded_ethdev the driver name is used without validating the pointer references in the passed ethdev object. Fixes: 740feaf349b1 ("ethdev: remove driver name from device private data") Signed-off-by: Declan Doherty --- drivers/net/bonding/rte_eth_bond_api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index e80338aa2..f4ca0a3f6 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -48,7 +48,10 @@ int check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev) { /* Check valid pointer */ - if (eth_dev->device->driver->name == NULL) + if (eth_dev == NULL || + eth_dev->device == NULL || + eth_dev->device->driver == NULL || + eth_dev->device->driver->name == NULL) return -1; /* return 0 if driver name matches */ -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-03-08 09:46:42.253155513 -0800 +++ 0040-net-bonding-fix-possible-null-pointer-reference.patch 2019-03-08 09:46:40.187402000 -0800 @@ -1,13 +1,14 @@ -From e6b8757bb72caa565d24282ad8e405f28e3a34a9 Mon Sep 17 00:00:00 2001 +From e8201ea3bcd263b67fd09935490393a6cbd24db1 Mon Sep 17 00:00:00 2001 From: Declan Doherty Date: Tue, 8 Jan 2019 11:17:56 +0000 Subject: [PATCH] net/bonding: fix possible null pointer reference +[ upstream commit e6b8757bb72caa565d24282ad8e405f28e3a34a9 ] + In function check_for_bonded_ethdev the driver name is used without validating the pointer references in the passed ethdev object. Fixes: 740feaf349b1 ("ethdev: remove driver name from device private data") -Cc: stable@dpdk.org Signed-off-by: Declan Doherty --- @@ -15,10 +16,10 @@ 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c -index 21bcd5044..e5e146540 100644 +index e80338aa2..f4ca0a3f6 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c -@@ -19,7 +19,10 @@ int +@@ -48,7 +48,10 @@ int check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev) { /* Check valid pointer */