linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: "Chatre, Reinette" <reinette.chatre@intel.com>
Cc: "Winkler, Tomas" <tomas.winkler@intel.com>,
	Roel Kluin <roel.kluin@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"ipw3945-devel@lists.sourceforge.net"
	<ipw3945-devel@lists.sourceforge.net>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: RE: [PATCH] iwlwifi: Read outside array bounds
Date: Tue, 28 Jul 2009 13:17:28 +0800	[thread overview]
Message-ID: <1248758248.3747.1101.camel@debian> (raw)
In-Reply-To: <1248756646.1216.662.camel@rc-desk>

On Tue, 2009-07-28 at 12:50 +0800, Chatre, Reinette wrote:
> On Mon, 2009-07-27 at 19:27 -0700, Zhu, Yi wrote:
> > On Tue, 2009-07-28 at 06:12 +0800, Chatre, Reinette wrote:
> > > On Mon, 2009-07-27 at 01:28 -0700, Winkler, Tomas wrote:
> > > > 
> > > > > -----Original Message-----
> > > > > From: Zhu, Yi
> > > > > Sent: Monday, July 27, 2009 4:42 AM
> > > > > To: Roel Kluin; Winkler, Tomas; Chatre, Reinette
> > > > > Cc: linux-wireless@vger.kernel.org; ipw3945-devel@lists.sourceforge.net;
> > > > > Andrew Morton
> > > > > Subject: Re: [PATCH] iwlwifi: Read outside array bounds
> > > > > 
> > > > > On Sun, 2009-07-26 at 05:34 +0800, Roel Kluin wrote:
> > > > > > 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.
> > > > > 
> > > > > I think MAX_TID_COUNT should be defined as 16 or 17. Tomas?
> > > > >
> > > > 
> > > > In general it's 16. In practice we use only 8.
> > > 
> > > I think the above statement means that we are mostly using EDCA quality
> > > of service which only uses 8 tids. We do not currently use HCCA (and
> > > thus of course not the hybrid) which would cause more tids to be used.
> > > 
> > > A closer look at this flow to this function shows:
> > > rs_tl_turn_on_agg 
> > 
> > rs_tl_add_packet
> > {
> > 	...
> > 	u8 *qc = ieee80211_get_qos_ctl(hdr);
> > 	tid = qc[0] & 0xf;
> > 	...
> > 
> > 	tl = &lq_data->load[tid];
> > }
> > 
> > This should be a problem.
> 
> Indeed. Are there any other cases like this that you can think of? It
> seems like we need Roel's fix for iwl_tx_agg_stop also.

Yes. I think we can do an audit for all the ieee80211_ops callbacks with
tid as a parameter. Because mac80211 use u16 for tid, but iwlwifi use u8
internally.

Thanks,
-yi


      reply	other threads:[~2009-07-28  5:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1248758248.3747.1101.camel@debian \
    --to=yi.zhu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=roel.kluin@gmail.com \
    --cc=tomas.winkler@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).