All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>,
	Ilan Peer <ilan.peer@intel.com>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH v5.19] wifi: mac80211: fix MBSSID parsing use-after-free
Date: Thu, 13 Oct 2022 20:01:49 +0200	[thread overview]
Message-ID: <Y0hSjVMP2HonYspS@kroah.com> (raw)
In-Reply-To: <20221013175215.161367-1-johannes@sipsolutions.net>

On Thu, Oct 13, 2022 at 07:52:15PM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> Commit ff05d4b45dd89b922578dac497dcabf57cf771c6 upstream.
> 
> When we parse a multi-BSSID element, we might point some
> element pointers into the allocated nontransmitted_profile.
> However, we free this before returning, causing UAF when the
> relevant pointers in the parsed elements are accessed.
> 
> Fix this by not allocating the scratch buffer separately but
> as part of the returned structure instead, that way, there
> are no lifetime issues with it.
> 
> The scratch buffer introduction as part of the returned data
> here is taken from MLO feature work done by Ilan.
> 
> This fixes CVE-2022-42719.
> 
> Fixes: 5023b14cf4df ("mac80211: support profile split between elements")
> Co-developed-by: Ilan Peer <ilan.peer@intel.com>
> Signed-off-by: Ilan Peer <ilan.peer@intel.com>
> Reviewed-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>  net/mac80211/ieee80211_i.h |  8 ++++++++
>  net/mac80211/util.c        | 30 +++++++++++++++---------------
>  2 files changed, 23 insertions(+), 15 deletions(-)

Thanks, my attempt was almost the same as yours, except for one
whitespace difference.  I've taken yours as a replacement now.

greg k-h

      reply	other threads:[~2022-10-13 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 17:52 [PATCH v5.19] wifi: mac80211: fix MBSSID parsing use-after-free Johannes Berg
2022-10-13 18:01 ` Greg KH [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=Y0hSjVMP2HonYspS@kroah.com \
    --to=greg@kroah.com \
    --cc=ilan.peer@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=keescook@chromium.org \
    --cc=stable@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.