All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: mvm: Fix possible NULL dereference
@ 2021-09-07 11:32 Luca Coelho
  2021-09-07 12:12 ` Luca Coelho
  2021-09-16 17:01 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Luca Coelho @ 2021-09-07 11:32 UTC (permalink / raw)
  To: kvalo; +Cc: luca, linux-wireless, dan.carpenter

From: Ilan Peer <ilan.peer@intel.com>

In __iwl_mvm_remove_time_event() check that 'te_data->vif' is NULL
before dereferencing it.

Fixes: 7b3954a1d69a ("iwlwifi: mvm: Explicitly stop session protection before unbinding")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
index 25af88a3edce..e91f8e889df7 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
@@ -662,12 +662,13 @@ static bool __iwl_mvm_remove_time_event(struct iwl_mvm *mvm,
 					u32 *uid)
 {
 	u32 id;
-	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif);
+	struct iwl_mvm_vif *mvmvif;
 	enum nl80211_iftype iftype;
 
 	if (!te_data->vif)
 		return false;
 
+	mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif);
 	iftype = te_data->vif->type;
 
 	/*
-- 
2.33.0


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

* Re: [PATCH] iwlwifi: mvm: Fix possible NULL dereference
  2021-09-07 11:32 [PATCH] iwlwifi: mvm: Fix possible NULL dereference Luca Coelho
@ 2021-09-07 12:12 ` Luca Coelho
  2021-09-16 17:01 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Luca Coelho @ 2021-09-07 12:12 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, dan.carpenter

On Tue, 2021-09-07 at 14:32 +0300, Luca Coelho wrote:
> From: Ilan Peer <ilan.peer@intel.com>
> 
> In __iwl_mvm_remove_time_event() check that 'te_data->vif' is NULL
> before dereferencing it.
> 
> Fixes: 7b3954a1d69a ("iwlwifi: mvm: Explicitly stop session protection before unbinding")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Ilan Peer <ilan.peer@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---

Kalle, I assigned this to you.  Can you please take it directly to
wireless-drivers for v5.15?

Thanks!

--
Cheers,
Luca.


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

* Re: [PATCH] iwlwifi: mvm: Fix possible NULL dereference
  2021-09-07 11:32 [PATCH] iwlwifi: mvm: Fix possible NULL dereference Luca Coelho
  2021-09-07 12:12 ` Luca Coelho
@ 2021-09-16 17:01 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-09-16 17:01 UTC (permalink / raw)
  To: Luca Coelho; +Cc: luca, linux-wireless, dan.carpenter

Luca Coelho <luca@coelho.fi> wrote:

> From: Ilan Peer <ilan.peer@intel.com>
> 
> In __iwl_mvm_remove_time_event() check that 'te_data->vif' is NULL
> before dereferencing it.
> 
> Fixes: 7b3954a1d69a ("iwlwifi: mvm: Explicitly stop session protection before unbinding")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Ilan Peer <ilan.peer@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

Patch applied to wireless-drivers.git, thanks.

24d5f16e407b iwlwifi: mvm: Fix possible NULL dereference

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/iwlwifi.20210907143156.e80e52167d93.Ie2247f43f8acb2cee6dff5b07a3947c79a772835@changeid/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2021-09-16 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 11:32 [PATCH] iwlwifi: mvm: Fix possible NULL dereference Luca Coelho
2021-09-07 12:12 ` Luca Coelho
2021-09-16 17:01 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.