linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: fix possible NULL dereference in iwl_set_rate()
@ 2007-11-19  7:59 Saleem Abdulrasool
  2007-11-19  8:14 ` Zhu Yi
  0 siblings, 1 reply; 3+ messages in thread
From: Saleem Abdulrasool @ 2007-11-19  7:59 UTC (permalink / raw)
  To: yi.zhu; +Cc: linux-wireless, greg, chrisw, stable

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@compnerd.org>
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@compnerd.org>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iwlwifi: fix possible NULL dereference in iwl_set_rate()
  2007-11-19  7:59 [PATCH] iwlwifi: fix possible NULL dereference in iwl_set_rate() Saleem Abdulrasool
@ 2007-11-19  8:14 ` Zhu Yi
  2007-11-19 19:10   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Zhu Yi @ 2007-11-19  8:14 UTC (permalink / raw)
  To: Saleem Abdulrasool, John W.Linville; +Cc: linux-wireless, greg, chrisw, stable

On Sun, 2007-11-18 at 23:59 -0800, Saleem Abdulrasool wrote:
> 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.

ACK.

Thanks,
-yi

> Thanks.
> 
> -- 
> Saleem Abdulrasool
> compnerd (at) compnerd (dot) org
> 
> >From 25db44d4cdfe31d59223d74cb577f4a71aff1a40 Mon Sep 17 00:00:00 2001
> From: Saleem Abdulrasool <compnerd@compnerd.org>
> 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@compnerd.org>
> Signed-off-by: Zhu Yi <yi.zhu@intel.com>
> ---
>  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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iwlwifi: fix possible NULL dereference in iwl_set_rate()
  2007-11-19  8:14 ` Zhu Yi
@ 2007-11-19 19:10   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2007-11-19 19:10 UTC (permalink / raw)
  To: Zhu Yi; +Cc: Saleem Abdulrasool, John W.Linville, linux-wireless, chrisw,
	stable

On Mon, Nov 19, 2007 at 04:14:06PM +0800, Zhu Yi wrote:
> On Sun, 2007-11-18 at 23:59 -0800, Saleem Abdulrasool wrote:
> > 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.
> 
> ACK.

Please let the stable@kernel.org address know when this patch goes into
Linus's tree, so that we can apply it there.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-19 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-19  7:59 [PATCH] iwlwifi: fix possible NULL dereference in iwl_set_rate() Saleem Abdulrasool
2007-11-19  8:14 ` Zhu Yi
2007-11-19 19:10   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).