lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <a901b49a0706210553r58ea8743gc565fcca1a87b58f@mail.gmail.com>
Date:	Thu, 21 Jun 2007 18:23:13 +0530
From:	"pradeep singh" <pradeep.rautela@...il.com>
To:	trivial@...nel.org
Cc:	netdev@...r.kernel.org, akpm@...ux-foundation.org,
	jgarzik@...ox.com
Subject: [PATCH v2.6.22-rc5] cxgb2: handle possible NULL pointer dereferencing, take 2

Hi,
This is second submission for a possible NULL dereference handling in
the Chelsio's 10G driver.

Thanks to Jens Axboe for pointing out my mistake of ignoring
subsequent dereferences in init_one routine.

Thanks

Signed-off-by: Pradeep Singh <pradeep.rautela@...il.com>
---
 drivers/net/chelsio/cxgb2.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c
index 231ce43..006c634 100644
--- a/drivers/net/chelsio/cxgb2.c
+++ b/drivers/net/chelsio/cxgb2.c
@@ -1022,6 +1022,11 @@ static int __devinit init_one(struct pci_dev *pdev,
 	mmio_start = pci_resource_start(pdev, 0);
 	mmio_len = pci_resource_len(pdev, 0);
 	bi = t1_get_board_info(ent->driver_data);
+	
+	if (!bi) {
+                CH_ERR("%s: Board info array index out of
range\n",pci_name(pdev));
+                goto out_disable_pdev;
+        }

 	for (i = 0; i < bi->port_number; ++i) {
 		struct net_device *netdev;
-- 
1.4.4.2

-- 
Pradeep
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ