linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: Read outside array bounds
@ 2009-07-25 21:34 Roel Kluin
  2009-07-27  1:41 ` Zhu Yi
  0 siblings, 1 reply; 7+ messages in thread
From: Roel Kluin @ 2009-07-25 21:34 UTC (permalink / raw)
  To: yi.zhu, linux-wireless, ipw3945-devel, Andrew Morton

tid is bounded (above) by the size of default_tid_to_tx_fifo (17 elements), but
the size of priv->stations[].tid[] is MAX_TID_COUNT (9) elements.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 85ae7a6..e9441c6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -1170,6 +1170,8 @@ int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn)
 		IWL_ERR(priv, "Start AGG on invalid station
");
 		return -ENXIO;
 	}
+	if (unlikely(tid >= MAX_TID_COUNT))
+		return -EINVAL;
 
 	if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_OFF) {
 		IWL_ERR(priv, "Start AGG when state is not IWL_AGG_OFF !
");

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

end of thread, other threads:[~2009-07-28  5:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-25 21:34 [PATCH] iwlwifi: Read outside array bounds Roel Kluin
2009-07-27  1:41 ` Zhu Yi
2009-07-27  8:28   ` Winkler, Tomas
2009-07-27 22:12     ` reinette chatre
2009-07-28  2:27       ` Zhu Yi
2009-07-28  4:50         ` reinette chatre
2009-07-28  5:17           ` Zhu Yi

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).