staging: csr: info leak in unifi_cfg_get_info()

"cfg_ap_config" has a number of fields which are not cleared before we
copy them to the user.  I've added a memset() at the beginning to set
everything to zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Dan Carpenter 2013-04-04 09:31:24 +03:00 committed by Greg Kroah-Hartman
parent 2c71c4ff57
commit 69c1440e86
1 changed files with 2 additions and 0 deletions

View File

@ -876,6 +876,8 @@ int unifi_cfg_get_info(unifi_priv_t *priv, unsigned char *arg)
{
#ifdef CSR_SUPPORT_WEXT_AP
uf_cfg_ap_config_t cfg_ap_config;
memset(&cfg_ap_config, 0, sizeof(cfg_ap_config));
cfg_ap_config.channel = priv->ap_config.channel;
cfg_ap_config.beaconInterval = priv->ap_mac_config.beaconInterval;
cfg_ap_config.wmmEnabled = priv->ap_mac_config.wmmEnabled;