From: Kangjie Lu Date: Wed, 4 May 2016 01:36:11 +0000 (-0400) Subject: staging: wilc1000: fix infoleak in wilc_wfi_cfgoperations X-Git-Tag: v4.7-rc1~90^2~46 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d13829686bba3e06e2217f044beb8fd5a9abf792;p=karo-tx-linux.git staging: wilc1000: fix infoleak in wilc_wfi_cfgoperations "mac" is an array allocated in stack without being initialized, and will be sent out via "nla_put". The dump_station() is supposed to initialize the mac address; otherwise, sensitive data in kernel stack will be leaked. To fix this, copy the mac address to it. Signed-off-by: Kangjie Lu Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 85031f75d7ee..4b041356f823 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1804,6 +1804,7 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev, wilc_get_rssi(vif, &sinfo->signal); + memcpy(mac, priv->au8AssociatedBss, ETH_ALEN); return 0; }