Search Linux Wireless

[PATCH] iwlwifi: fix possible NULL dereference in iwl_set_rate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As per Zhu Yi's request, Im forwarding along a patch for CVE-2007-5938, a NULL
dereference vulnerability in the iwlwifi driver.  All current versions are
effected by this.

Thanks.

-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org

>From 25db44d4cdfe31d59223d74cb577f4a71aff1a40 Mon Sep 17 00:00:00 2001
From: Saleem Abdulrasool <compnerd@xxxxxxxxxxxx>
Date: Mon, 19 Nov 2007 15:28:58 +0800
Subject: [PATCH] iwlwifi: fix possible NULL dereference in iwl_set_rate()

Signed-off-by: Saleem Abdulrasool <compnerd@xxxxxxxxxxxx>
Signed-off-by: Zhu Yi <yi.zhu@xxxxxxxxx>
---
 origin/iwl3945-base.c |    4 ++++
 origin/iwl4965-base.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/origin/iwl3945-base.c b/origin/iwl3945-base.c
index 5d3e5fe..0885b56 100644
--- a/origin/iwl3945-base.c
+++ b/origin/iwl3945-base.c
@@ -2984,6 +2984,10 @@ static void iwl3945_set_rate(struct iwl3945_priv *priv)
 	int i;
 
 	hw = iwl3945_get_hw_mode(priv, priv->phymode);
+	if (!hw) {
+		IWL_ERROR("Failed to set rate: unable to get hw mode\n");
+		return;
+	}
 
 	priv->active_rate = 0;
 	priv->active_rate_basic = 0;
diff --git a/origin/iwl4965-base.c b/origin/iwl4965-base.c
index abb8016..c57ec27 100644
--- a/origin/iwl4965-base.c
+++ b/origin/iwl4965-base.c
@@ -3093,6 +3093,10 @@ static void iwl4965_set_rate(struct iwl4965_priv *priv)
 	int i;
 
 	hw = iwl4965_get_hw_mode(priv, priv->phymode);
+	if (!hw) {
+		IWL_ERROR("Failed to set rate: unable to get hw mode\n");
+		return;
+	}
 
 	priv->active_rate = 0;
 	priv->active_rate_basic = 0;
-- 
1.5.3.5

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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux