From: Johannes Berg <johannes@sipsolutions.net>
To: Bertold Van den Bergh <bertold.vandenbergh@esat.kuleuven.be>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Fix oops in OCB mode when receiving data when not joined
Date: Tue, 08 Sep 2015 18:03:24 +0200 [thread overview]
Message-ID: <1441728204.1906.18.camel@sipsolutions.net> (raw)
In-Reply-To: <1439456956.2114.8.camel@sipsolutions.net> (sfid-20150813_110943_152676_58A412B6)
On Thu, 2015-08-13 at 11:09 +0200, Johannes Berg wrote:
> On Wed, 2015-08-05 at 15:38 +0200, Bertold Van den Bergh wrote:
> > The current implementation in ocb.c can cause a kernel oops when
> > the
> > interface is up, but no ocb has been joined. When data is received
> > with the broadcast BSSID rx_no_sta is called. This function uses
> > uninitialized variables because the join function has not yet been
> > used.
> >
> > Signed-off-by: Bertold Van den Bergh <
> > bertold.vandenbergh@esat.kuleuven.be>
> > ---
> > net/mac80211/ocb.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/net/mac80211/ocb.c b/net/mac80211/ocb.c
> > index 573b81a..5da2bd3 100644
> > --- a/net/mac80211/ocb.c
> > +++ b/net/mac80211/ocb.c
> > @@ -50,6 +50,9 @@ void ieee80211_ocb_rx_no_sta(struct
> > ieee80211_sub_if_data *sdata,
> > struct sta_info *sta;
> > int band;
> >
> > + if (!ifocb->joined)
> > + return;
> >
> Wouldn't it make more sense to put this check into
> ieee80211_accept_frame() and, in addition to not doing any station
> processing, simply dropping the frame completely? Like such:
>
Reminder? I'm not sure what to do with this patch - I don't
particularly like processing the frame at all.
johannes
next prev parent reply other threads:[~2015-09-08 16:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 13:38 [PATCH] mac80211: Fix oops in OCB mode when receiving data when not joined Bertold Van den Bergh
2015-08-13 9:09 ` Johannes Berg
2015-09-08 16:03 ` Johannes Berg [this message]
2015-09-08 19:17 ` Bertold Van den Bergh
2015-09-08 19:21 ` Johannes Berg
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=1441728204.1906.18.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=bertold.vandenbergh@esat.kuleuven.be \
--cc=linux-wireless@vger.kernel.org \
/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 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.