Skip to contentSkip to conversation

fix infoleak in wilc_wfi_cfgoperations

PATCH In review Kangjie Lu 2 participants 2 messages May 3, 2016 Staging

lore
Share & tools
lore

Kangjie Lu

author
#0 lore raw

PATCH 1/1 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, initialize it with memset or fill it with meaningful mac address.

---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1 -0
index 448a5c8..44c1356 100644
@@ -1797,6 +1797,7 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev,
 
 	wilc_get_rssi(vif, &sinfo->signal);
 
+	memset(mac, 0, ETH_ALEN);
 	return 0;
 }
 
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 5 lines · Kangjie Lu

"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, initialize it with memset or fill it with meaningful mac address.

"or"? You just set it to zero, why not fix this correctly and put the real address here?

thanks,

greg k-h