From: Timo Lindhorst <tlnd@online.de>
To: johannes@sipsolutions.net, linville@tuxdriver.com
Cc: mcgrof@qca.qualcomm.com, linux-wireless@vger.kernel.org
Subject: [PATCH] cfg80211: Fix changing regulatory from userspace
Date: Wed, 23 Nov 2011 03:30:10 +0100 [thread overview]
Message-ID: <201111230330.11103.tlnd@online.de> (raw)
The commit de3584bd62d87b4c250129fbc46ca52c80330add -
"cfg80211: fix regulatory NULL dereference" prevents the regulatory
domain from being changed by user space. A wiphy is only present
if the request comes from driver or is set by country IE, thus
check only those cases.
Signed-off-by: Timo Lindhorst <tlnd@online.de>
---
net/wireless/reg.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 76b35df..c9588ae 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2076,7 +2076,9 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
}
request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
- if (!request_wiphy) {
+ if (((last_request->initiator == NL80211_REGDOM_SET_BY_DRIVER) ||
+ (last_request->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE)) &&
+ !request_wiphy) {
reg_set_request_processed();
return -ENODEV;
}
--
1.7.7.3
next reply other threads:[~2011-11-23 2:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-23 2:30 Timo Lindhorst [this message]
2011-11-23 14:28 ` [PATCH] cfg80211: Fix changing regulatory from userspace Luis R. Rodriguez
2011-11-23 14:34 ` John W. Linville
2011-11-23 14:42 ` John W. Linville
2011-11-23 14:58 ` Luis R. Rodriguez
2011-11-28 18:45 ` John W. Linville
2011-11-28 19:14 ` Luis R. Rodriguez
2011-11-29 8:32 ` Johannes Berg
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=201111230330.11103.tlnd@online.de \
--to=tlnd@online.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@qca.qualcomm.com \
/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.