From 69c1440e864287914c94c244b3d1ca7802089e66 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 4 Apr 2013 09:31:24 +0300 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/csr/unifi_sme.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/csr/unifi_sme.c b/drivers/staging/csr/unifi_sme.c index 7d19e632a5e4..90295035621f 100644 --- a/drivers/staging/csr/unifi_sme.c +++ b/drivers/staging/csr/unifi_sme.c @@ -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; -- 2.39.5