]> git.baikalelectronics.ru Git - kernel.git/commit
regulatory: add NUL to alpha2
authorEliad Peller <eliad@wizery.com>
Wed, 11 Jun 2014 07:23:35 +0000 (10:23 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Aug 2014 11:51:40 +0000 (13:51 +0200)
commit7f02b3559a361427c2522f0ba75e53406e496a6d
tree77d69bf50907fb36473a6f3c341dc06802e27a66
parent50e9138e2eb9fc8d0ae96f597dc583657c8b92fa
regulatory: add NUL to alpha2

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.

Cc: stable@vger.kernel.org
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/regulatory.h