From: Emmanuel Grumbach <egrumbach@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>,
stable@vger.kernel.org,
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 1/7] iwlwifi: mvm: check sta_id/drain values in debugfs
Date: Tue, 19 Nov 2013 22:52:00 +0200 [thread overview]
Message-ID: <1384894326-24676-1-git-send-email-egrumbach@gmail.com> (raw)
In-Reply-To: <528BCEDB.8010703@gmail.com>
From: Johannes Berg <johannes.berg@intel.com>
The station ID must be valid, if it's out of range then
the array access may crash. Validate the station ID to
the array length, and also validate the drain value even
if that doesn't matter all that much.
Cc: stable@vger.kernel.org
Fixes: 8ca151b568b6 ("iwlwifi: add the MVM driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
drivers/net/wireless/iwlwifi/mvm/debugfs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
index 9864d71..a8fe6b4 100644
--- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
@@ -119,6 +119,10 @@ static ssize_t iwl_dbgfs_sta_drain_write(struct file *file,
if (sscanf(buf, "%d %d", &sta_id, &drain) != 2)
return -EINVAL;
+ if (sta_id < 0 || sta_id >= IWL_MVM_STATION_COUNT)
+ return -EINVAL;
+ if (drain < 0 || drain > 1)
+ return -EINVAL;
mutex_lock(&mvm->mutex);
--
1.7.9.5
next prev parent reply other threads:[~2013-11-19 20:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 20:49 pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
2013-11-19 20:52 ` Emmanuel Grumbach [this message]
2013-11-19 20:52 ` [PATCH 2/7] iwlwifi: pcie: refactor a bit the interrupt coalescing Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 3/7] iwlwifi: add new HW - 7265 series Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 4/7] iwlwifi: mvm: BT Coex - don't enable MULTI_PRIO_LUT Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 5/7] iwlwifi: mvm: BT Coex fix another NULL pointer dereference Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 6/7] iwlwifi: mvm: don't WARN about unsuccessful time event Emmanuel Grumbach
2013-11-19 20:52 ` [PATCH 7/7] iwlwifi: bump required firmware API version for 3160/7260 Emmanuel Grumbach
2013-11-24 17:04 ` pull request: iwlwifi 2013-11-19 Emmanuel Grumbach
2013-11-25 20:41 ` John W. Linville
2013-11-25 21:05 ` Emmanuel Grumbach
2013-12-02 17:58 ` John W. Linville
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=1384894326-24676-1-git-send-email-egrumbach@gmail.com \
--to=egrumbach@gmail.com \
--cc=emmanuel.grumbach@intel.com \
--cc=johannes.berg@intel.com \
--cc=linux-wireless@vger.kernel.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 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).