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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 26 Mar 2007 00:18:39 +0100 (BST)
From:	Daniel Drake <dsd@...too.org>
To:	linville@...driver.com
Cc:	kune@...ne-taler.de
Subject: [PATCH] zd1211rw-mac80211: Fix NULL dereference on installer exit path

When dealing with a DEVICE_INSTALLER, dev will be NULL when disconnect()
is called. This fixes a NULL dereference oops with such devices.

Signed-off-by: Daniel Drake <dsd@...too.org>
---
 drivers/net/wireless/mac80211/zd1211rw/zd_usb.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mac80211/zd1211rw/zd_usb.c b/drivers/net/wireless/mac80211/zd1211rw/zd_usb.c
index 8867110..24d22dc 100644
--- a/drivers/net/wireless/mac80211/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/mac80211/zd1211rw/zd_usb.c
@@ -978,14 +978,17 @@ error:
 static void disconnect(struct usb_interface *intf)
 {
 	struct ieee80211_hw *dev = zd_intf_to_dev(intf);
-	struct zd_mac *mac = zd_dev_mac(dev);
-	struct zd_usb *usb = &mac->chip.usb;
+	struct zd_mac *mac;
+	struct zd_usb *usb;
 
 	/* Either something really bad happened, or we're just dealing with
 	 * a DEVICE_INSTALLER. */
 	if (dev == NULL)
 		return;
 
+	mac = zd_dev_mac(dev);
+	usb = &mac->chip.usb;
+
 	dev_dbg_f(zd_usb_dev(usb), "\n");
 
 	ieee80211_unregister_hw(dev);
-- 
1.5.0.5

-
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