* [PATCH] fix infoleak in wilc_wfi_cfgoperations
@ 2016-05-03 22:17 Kangjie Lu
2016-05-03 23:06 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Kangjie Lu @ 2016-05-03 22:17 UTC (permalink / raw)
To: johnny.kim
Cc: austin.shin, chris.park, tony.cho, glen.lee, gregkh,
linux-kernel, taesoo, insu, csong84, 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.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 448a5c8..44c1356 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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;
}
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix infoleak in wilc_wfi_cfgoperations
2016-05-03 22:17 [PATCH] fix infoleak in wilc_wfi_cfgoperations Kangjie Lu
@ 2016-05-03 23:06 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2016-05-03 23:06 UTC (permalink / raw)
To: Kangjie Lu
Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee,
linux-kernel, taesoo, insu, csong84, Kangjie Lu
On Tue, May 03, 2016 at 06:17:28PM -0400, Kangjie Lu wrote:
> "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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] fix infoleak in wilc_wfi_cfgoperations
@ 2016-05-04 1:36 Kangjie Lu
0 siblings, 0 replies; 3+ messages in thread
From: Kangjie Lu @ 2016-05-04 1:36 UTC (permalink / raw)
To: johnny.kim
Cc: austin.shin, chris.park, gregkh, devel, linux-kernel,
linux-wireless, taesoo, insu, csong84, 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, copy the mac address to it.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 448a5c8..c6e71d9 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1797,6 +1797,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;
}
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-04 1:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-03 22:17 [PATCH] fix infoleak in wilc_wfi_cfgoperations Kangjie Lu
2016-05-03 23:06 ` Greg KH
2016-05-04 1:36 Kangjie Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®