]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: csr: info leak in unifi_cfg_get_info()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 4 Apr 2013 06:31:24 +0000 (09:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 21:17:00 +0000 (14:17 -0700)
"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>
drivers/staging/csr/unifi_sme.c

index 7d19e632a5e40ba9dfe9577b9dcb76a54760e2a8..90295035621f6392329eab1400a0f8d0996ac64b 100644 (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;