public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH maint] batman-adv: Initialize memory for station_info
@ 2018-06-05 18:31 Sven Eckelmann
  2018-06-05 22:01 ` Sven Eckelmann
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Eckelmann @ 2018-06-05 18:31 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sven Eckelmann, Thomas Lauer, Marcel Schmidt

cfg80211_get_station is not initializing the memory given as parameter
sinfo. The caller has to handle it. Otherwise the filled parameter may be
set incorrectly and thus uninitialized memory is used to identify the
throughput to an neighbor.

Fixes: 5c3245172c01 ("batman-adv: ELP - compute the metric based on the estimated throughput")
Reported-by: Thomas Lauer <holminateur@gmail.com>
Reported-by: Marcel Schmidt <ff.z-casparistrasse@mailbox.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---

Cc: Thomas Lauer <holminateur@gmail.com>
Cc: Marcel Schmidt <ff.z-casparistrasse@mailbox.org>

 net/batman-adv/bat_v_elp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index 71c20c1d..5f931475 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -102,6 +102,7 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
 		if (!real_netdev)
 			goto default_throughput;
 
+		memset(&sinfo, 0, sizeof(sinfo));
 		ret = cfg80211_get_station(real_netdev, neigh->addr, &sinfo);
 
 		dev_put(real_netdev);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-06  5:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-05 18:31 [B.A.T.M.A.N.] [PATCH maint] batman-adv: Initialize memory for station_info Sven Eckelmann
2018-06-05 22:01 ` Sven Eckelmann
2018-06-06  4:44   ` Antonio Quartulli
2018-06-06  5:25     ` Sven Eckelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox