linux/net/wireless
Sven Eckelmann f69083b119 cfg80211: initialize sinfo in cfg80211_get_station
commit 3c12d04868 upstream.

Most of the implementations behind cfg80211_get_station will not initialize
sinfo to zero before manipulating it. For example, the member "filled",
which indicates the filled in parts of this struct, is often only modified
by enabling certain bits in the bitfield while keeping the remaining bits
in their original state. A caller without a preinitialized sinfo.filled can
then no longer decide which parts of sinfo were filled in by
cfg80211_get_station (or actually the underlying implementations).

cfg80211_get_station must therefore take care that sinfo is initialized to
zero. Otherwise, the caller may tries to read information which was not
filled in and which must therefore also be considered uninitialized. In
batadv_v_elp_get_throughput's case, an invalid "random" expected throughput
may be stored for this neighbor and thus the B.A.T.M.A.N V algorithm may
switch to non-optimal neighbors for certain destinations.

Fixes: 7406353d43 ("cfg80211: implement cfg80211_get_station cfg80211 API")
Reported-by: Thomas Lauer <holminateur@gmail.com>
Reported-by: Marcel Schmidt <ff.z-casparistrasse@mailbox.org>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2018-11-20 18:05:15 +00:00
..
.gitignore wireless: support internal statically compiled regulatory database 2009-12-21 18:56:10 -05:00
ap.c cfg80211: export interface stopping function 2014-05-06 15:16:34 +02:00
chan.c cfg80211: Fix 160 MHz channels with 80+80 and 160 MHz drivers 2015-01-15 10:44:02 +00:00
core.c cfg80211: check dev_set_name() return value 2018-03-03 15:52:23 +00:00
core.h mac80211_hwsim: validate number of different channels 2018-03-03 15:52:22 +00:00
db.txt wireless: support internal statically compiled regulatory database 2009-12-21 18:56:10 -05:00
debugfs.c mac80211: fix some snprintf misuses 2013-10-01 12:16:51 +02:00
debugfs.h cfg80211/mac80211: use debugfs_remove_recursive 2009-10-30 16:49:18 -04:00
ethtool.c cfg80211: change wiphy_to_dev function name 2014-04-25 17:33:04 +02:00
ethtool.h net/wireless/ethtool.h: drop unnecessary include of linux/ethtool.h 2009-10-07 16:39:49 -04:00
genregdb.awk regdb: Generalize the mW to dBm power conversion 2014-05-27 17:58:58 +02:00
ibss.c cfg80211: constify more pointers in the cfg80211 API 2014-05-19 17:53:16 +02:00
Kconfig cfg80211: Enable GO operation on additional channels 2014-04-09 10:55:34 +02:00
lib80211.c lib80211: remove exports for functions not called by other modules 2011-08-09 15:42:36 -04:00
lib80211_crypt_ccmp.c hostap: Don't use create_proc_read_entry() 2013-04-29 15:41:56 -04:00
lib80211_crypt_tkip.c hostap: Don't use create_proc_read_entry() 2013-04-29 15:41:56 -04:00
lib80211_crypt_wep.c hostap: Don't use create_proc_read_entry() 2013-04-29 15:41:56 -04:00
Makefile cfg80211: add tracing to rdev-ops 2012-10-18 10:53:37 +02:00
mesh.c cfg80211: export interface stopping function 2014-05-06 15:16:34 +02:00
mlme.c cfg80211/mac80211: fix BSS leaks when abandoning assoc attempts 2017-03-16 02:26:32 +00:00
nl80211.c nl80211: Sanitize array index in parse_txq_params 2018-03-19 18:59:14 +00:00
nl80211.h cfg80211: send events when devices are added/removed 2014-05-26 13:52:25 +02:00
radiotap.c radiotap: fix bitmap-end-finding buffer overrun 2013-12-16 12:06:43 +01:00
rdev-ops.h cfg80211: implement cfg80211_get_station cfg80211 API 2014-05-21 09:15:17 +02:00
reg.c cfg80211: don't WARN about two consecutive Country IE hint 2015-01-15 10:44:04 +00:00
reg.h cfg80211: Enable GO operation on indoor channels 2014-04-09 10:55:37 +02:00
regdb.h cfg80211: relicense reg.c reg.h and genregdb.awk to ISC 2012-01-04 14:30:41 -05:00
scan.c cfg80211: limit scan results cache size 2017-02-23 03:54:37 +00:00
sme.c cfg80211/mac80211: fix BSS leaks when abandoning assoc attempts 2017-03-16 02:26:32 +00:00
sysfs.c net: wireless: convert class code to use dev_groups 2013-07-25 16:34:40 -07:00
sysfs.h net: misc: Remove extern from function prototypes 2013-10-19 19:12:11 -04:00
trace.c cfg80211: add tracing to rdev-ops 2012-10-18 10:53:37 +02:00
trace.h cfg80211: fix mic_failure tracing 2014-07-18 09:53:56 +02:00
util.c cfg80211: initialize sinfo in cfg80211_get_station 2018-11-20 18:05:15 +00:00
wext-compat.c cfg80211: fix station info handling bugs 2018-03-03 15:52:26 +00:00
wext-compat.h cfg80211: remove unused wiphy argument from cfg80211_wext_freq() 2014-04-10 10:06:19 +02:00
wext-core.c cfg80211/wext: fix message ordering 2016-03-24 10:01:07 +00:00
wext-priv.c wext: fix potential private ioctl memory content leak 2010-09-20 13:41:40 -04:00
wext-proc.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
wext-sme.c cfg80211: change wiphy_to_dev function name 2014-04-25 17:33:04 +02:00
wext-spy.c wireless: Convert compare_ether_addr to ether_addr_equal 2012-05-09 20:49:19 -04:00