All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: Double 'put' of bss in mac80211/mlme.c?
Date: Fri, 14 Jun 2013 16:38:43 -0700	[thread overview]
Message-ID: <51BBA983.5090704@candelatech.com> (raw)
In-Reply-To: <51BBA888.7030309@candelatech.com>

On 06/14/2013 04:34 PM, Ben Greear wrote:
> Looks like an easy way to leak ies would be to mess up the
> ref counting on bss objects.
>
> While looking at such code, I found this in mac80211/mlme.c
>
> The destroy_assoc_data does a put_bss, and then it is put again
> directly.  Is this on purpose, or would this effectively cause
> a double-free?
>
>          if (!ieee80211_assoc_success(sdata, *bss, mgmt, len)) {
>              /* oops -- internal error -- send timeout for now */
>              ieee80211_destroy_assoc_data(sdata, false);
>              cfg80211_put_bss(sdata->local->hw.wiphy, *bss);
>              return RX_MGMT_CFG80211_ASSOC_TIMEOUT;
>          }
>
> Thanks,
> Ben
>

Gah, nevermind...one is assoc_data->bss, the other is auth_data->bss.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


      reply	other threads:[~2013-06-14 23:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-14 23:34 Double 'put' of bss in mac80211/mlme.c? Ben Greear
2013-06-14 23:38 ` Ben Greear [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=51BBA983.5090704@candelatech.com \
    --to=greearb@candelatech.com \
    --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.