stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: linux-wireless@vger.kernel.org
Cc: <linux-kernel@vger.kernel.org>,
	Ganapathi Bhat <ganapathi.bhat@nxp.com>,
	Nishant Sarmukadam <nishants@marvell.com>,
	Amitkumar Karwar <amitkarwar@gmail.com>,
	Xinming Hu <huxinming820@gmail.com>,
	Brian Norris <briannorris@chromium.org>,
	stable@vger.kernel.org, huangwen <huangwenabc@gmail.com>
Subject: [PATCH] mwifiex: fix unbalanced locking in mwifiex_process_country_ie()
Date: Mon,  6 Jan 2020 14:42:12 -0800	[thread overview]
Message-ID: <20200106224212.189763-1-briannorris@chromium.org> (raw)

We called rcu_read_lock(), so we need to call rcu_read_unlock() before
we return.

Fixes: 3d94a4a8373b ("mwifiex: fix possible heap overflow in mwifiex_process_country_ie()")
Cc: stable@vger.kernel.org
Cc: huangwen <huangwenabc@gmail.com>
Cc: Ganapathi Bhat <ganapathi.bhat@nxp.com>
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
index 6dd835f1efc2..fbfa0b15d0c8 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
@@ -232,6 +232,7 @@ static int mwifiex_process_country_ie(struct mwifiex_private *priv,
 
 	if (country_ie_len >
 	    (IEEE80211_COUNTRY_STRING_LEN + MWIFIEX_MAX_TRIPLET_802_11D)) {
+		rcu_read_unlock();
 		mwifiex_dbg(priv->adapter, ERROR,
 			    "11D: country_ie_len overflow!, deauth AP\n");
 		return -EINVAL;
-- 
2.24.1.735.g03f4e72817-goog


             reply	other threads:[~2020-01-06 22:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 22:42 Brian Norris [this message]
2020-01-06 22:51 ` [PATCH] mwifiex: fix unbalanced locking in mwifiex_process_country_ie() Brian Norris
2020-01-14 14:56   ` Kalle Valo
2020-01-07  5:45 ` [EXT] " Ganapathi Bhat
2020-01-27 14:33 ` Kalle Valo

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=20200106224212.189763-1-briannorris@chromium.org \
    --to=briannorris@chromium.org \
    --cc=amitkarwar@gmail.com \
    --cc=ganapathi.bhat@nxp.com \
    --cc=huangwenabc@gmail.com \
    --cc=huxinming820@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nishants@marvell.com \
    --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 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).