aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-06-11 10:23:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-05 13:41:06 -0700
commit5fa0d9cc1bd63272ff585e7b4495b2132b43547e (patch)
treef93ab24ddc53d3bc11e4c2ad4b982522d4c3ae43 /include
parent145f3d4620ed51cabeced1ebf4a233f4592a4b57 (diff)
regulatory: add NUL to alpha2
commit a5fe8e7695dc3f547e955ad2b662e3e72969e506 upstream. alpha2 is defined as 2-chars array, but is used in multiple places as string (e.g. with nla_put_string calls), which might leak kernel data. Solve it by simply adding an extra char for the NULL terminator, making such operations safe. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/regulatory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/regulatory.h b/include/net/regulatory.h
index 259992444e80..dad7ab20a8cb 100644
--- a/include/net/regulatory.h
+++ b/include/net/regulatory.h
@@ -167,7 +167,7 @@ struct ieee80211_reg_rule {
struct ieee80211_regdomain {
struct rcu_head rcu_head;
u32 n_reg_rules;
- char alpha2[2];
+ char alpha2[3];
enum nl80211_dfs_regions dfs_region;
struct ieee80211_reg_rule reg_rules[];
};