Skip to content

Commit

Permalink
mwifiex: fix unbalanced locking in mwifiex_process_country_ie()
Browse files Browse the repository at this point in the history
We called rcu_read_lock(), so we need to call rcu_read_unlock() before
we return.

Fixes: 3d94a4a ("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>
Acked-by: Ganapathi Bhat <ganapathi.bhat@nxp.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
computersforpeace authored and Kalle Valo committed Jan 27, 2020
1 parent c312840 commit 65b1aae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 65b1aae

Please sign in to comment.