[dpdk-stable] patch 'net/bonding: fix possible null pointer reference' has been queued to LTS release 17.11.6

Yongseok Koh yskoh at mellanox.com
Fri Mar 8 18:47:18 CET 2019


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 <declan.doherty at intel.com>
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 <declan.doherty at intel.com>
---
 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 <declan.doherty at intel.com>
 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 at dpdk.org
 
 Signed-off-by: Declan Doherty <declan.doherty at intel.com>
 ---
@@ -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 */


More information about the stable mailing list