From: Dan Williams <dcbw@redhat.com>
To: Tomas Winkler <tomasw@gmail.com>
Cc: Helmut Schaa <hschaa@suse.de>,
John Linville <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>,
Larry Finger <Larry.Finger@lwfinger.net>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCHv2] mac80211: fix NULL pointer dereference in ieee80211_compatible_rates
Date: Sun, 18 May 2008 09:32:58 -0400 [thread overview]
Message-ID: <1211117578.686.12.camel@localhost.localdomain> (raw)
In-Reply-To: <1ba2fa240805180337h35bc3244od619e78c0d95d895@mail.gmail.com>
On Sun, 2008-05-18 at 13:37 +0300, Tomas Winkler wrote:
> On Sat, May 17, 2008 at 9:35 PM, Helmut Schaa <hschaa@suse.de> wrote:
> > Fix a possible NULL pointer dereference in ieee80211_compatible_rates
> > introduced in the patch "mac80211: fix association with some APs".
> >
> > Signed-off-by: Helmut Schaa <hschaa@suse.de>
> > ---
> >
> > diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> > index 76ad4ed..2642551 100644
> > --- a/net/mac80211/mlme.c
> > +++ b/net/mac80211/mlme.c
> > @@ -664,15 +664,22 @@ static int ieee80211_compatible_rates(struct
> > ieee80211_sta_bss *bss,
> > int i, j, count;
> > *rates = 0;
> > count = 0;
> > - for (i = 0; i < bss->supp_rates_len; i++) {
> > - int rate = (bss->supp_rates[i] & 0x7F) * 5;
> >
> > - for (j = 0; j < sband->n_bitrates; j++)
> > - if (sband->bitrates[j].bitrate == rate) {
> > - *rates |= BIT(j);
> > - count++;
> > - break;
> > - }
> > + if (bss) {
> > + for (i = 0; i < bss->supp_rates_len; i++) {
> > + int rate = (bss->supp_rates[i] & 0x7F) * 5;
> > +
> > + for (j = 0; j < sband->n_bitrates; j++)
> > + if (sband->bitrates[j].bitrate == rate) {
> > + *rates |= BIT(j);
> > + count++;
> > + break;
> > + }
> > + }
> > + } else {
> > + for (i = 0; i < sband->n_bitrates; i++)
> > + *rates |= BIT(i);
> > + count = sband->n_bitrates;
> > }
> >
> > return count;
> >
>
> Again, mac should rather solve the problem that we do not connect to
> AP's that are not in the BSS list
> Personally I would NACK this as it's just hiding the real problem
Ugh; is that what's happening? If the AP isn't in the BSS list of the
card, then the card shouldn't be connecting to it. It should have been
probe-scanned already and thus exist in the BSS list, right?
Dan
> The other issue is that we call ieee80211_rx_bss_put(dev, bss); before
> this call in ieee80211_send_assoc.
>
> Tomas
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-05-18 13:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-17 18:35 [PATCHv2] mac80211: fix NULL pointer dereference in ieee80211_compatible_rates Helmut Schaa
2008-05-18 10:37 ` Tomas Winkler
2008-05-18 13:32 ` Dan Williams [this message]
2008-05-18 15:14 ` Larry Finger
2008-05-19 11:07 ` Dan Williams
2008-05-19 11:37 ` Helmut Schaa
2008-05-19 12:41 ` Johannes Berg
2008-05-19 16:44 ` Tomas Winkler
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=1211117578.686.12.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=hschaa@suse.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=tomasw@gmail.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).