diff options
author | Eliad Peller <eliad@wizery.com> | 2014-06-11 10:23:35 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-10-13 15:41:25 +0200 |
commit | 91a95b41f3abe8071e62193668f8c3e7dbd5e94f (patch) | |
tree | 2edb3f57e4b4fbd40a34ab0d3783691d61009219 /include | |
parent | e989b52a9136201d70b4b59b0b67885559d137d2 (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: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/regulatory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/regulatory.h b/include/net/regulatory.h index f17ed590d64a..23a019668705 100644 --- a/include/net/regulatory.h +++ b/include/net/regulatory.h @@ -78,7 +78,7 @@ struct regulatory_request { int wiphy_idx; enum nl80211_reg_initiator initiator; enum nl80211_user_reg_hint_type user_reg_hint_type; - char alpha2[2]; + char alpha2[3]; u8 dfs_region; bool intersect; bool processed; |