Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Zubin Mithra <zsm@chromium.org>
Cc: stable@vger.kernel.org, gregkh@linuxfoundation.org,
	groeck@chromium.org, anant.thazhemadam@gmail.com,
	johannes.berg@intel.com
Subject: Re: [v5.4.y,v4.19.y] nl80211: validate key indexes for cfg80211_registered_device
Date: Fri, 4 Jun 2021 14:26:25 -0400	[thread overview]
Message-ID: <YLpwUeZSEBOZitfd@sashalap> (raw)
In-Reply-To: <20210603162852.1814513-1-zsm@chromium.org>

On Thu, Jun 03, 2021 at 09:28:52AM -0700, Zubin Mithra wrote:
>From: Anant Thazhemadam <anant.thazhemadam@gmail.com>
>
>commit 2d9463083ce92636a1bdd3e30d1236e3e95d859e upstream
>
>syzbot discovered a bug in which an OOB access was being made because
>an unsuitable key_idx value was wrongly considered to be acceptable
>while deleting a key in nl80211_del_key().
>
>Since we don't know the cipher at the time of deletion, if
>cfg80211_validate_key_settings() were to be called directly in
>nl80211_del_key(), even valid keys would be wrongly determined invalid,
>and deletion wouldn't occur correctly.
>For this reason, a new function - cfg80211_valid_key_idx(), has been
>created, to determine if the key_idx value provided is valid or not.
>cfg80211_valid_key_idx() is directly called in 2 places -
>nl80211_del_key(), and cfg80211_validate_key_settings().
>
>Reported-by: syzbot+49d4cab497c2142ee170@syzkaller.appspotmail.com
>Tested-by: syzbot+49d4cab497c2142ee170@syzkaller.appspotmail.com
>Suggested-by: Johannes Berg <johannes@sipsolutions.net>
>Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
>Link: https://lore.kernel.org/r/20201204215825.129879-1-anant.thazhemadam@gmail.com
>Cc: stable@vger.kernel.org
>[also disallow IGTK key IDs if no IGTK cipher is supported]
>Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>Signed-off-by: Zubin Mithra <zsm@chromium.org>

Queued up, thanks!

-- 
Thanks,
Sasha

      reply	other threads:[~2021-06-04 18:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 16:28 [v5.4.y,v4.19.y] nl80211: validate key indexes for cfg80211_registered_device Zubin Mithra
2021-06-04 18:26 ` Sasha Levin [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=YLpwUeZSEBOZitfd@sashalap \
    --to=sashal@kernel.org \
    --cc=anant.thazhemadam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=groeck@chromium.org \
    --cc=johannes.berg@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=zsm@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox