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]
Date:	Fri, 1 Aug 2014 11:23:57 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Grant Likely <grant.likely@...aro.org>
Cc:	Rob Herring <robh+dt@...nel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Andrew Ruder <andrew.ruder@...csyscorp.com>,
	Nikita Kiryanov <nikita@...pulab.co.il>,
	Igor Grinberg <grinberg@...pulab.co.il>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Jingoo Han <jg1.han@...sung.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Michael Abbott <michael.abbott@...mond.ac.uk>,
	Barry Song <Baohua.Song@....com>, netdev@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: [patch] dm9000: NULL dereferences on error in probe()

The dm9000_release_board() function is called with NULL ->data_req and
->addr_req pointers if dm9000_probe() fails.

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
Old bug, but not serious.

diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
index 13723c9..23084fb 100644
--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -817,10 +817,12 @@ dm9000_release_board(struct platform_device *pdev, struct board_info *db)
 
 	/* release the resources */
 
-	release_resource(db->data_req);
+	if (db->data_req)
+		release_resource(db->data_req);
 	kfree(db->data_req);
 
-	release_resource(db->addr_req);
+	if (db->addr_req)
+		release_resource(db->addr_req);
 	kfree(db->addr_req);
 }
 
--
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