linux-uconsole/net/wireless
Johannes Berg 98d94f20a3 cfg80211: wext: clear sinfo struct before calling driver
commit 9c5a18a31b upstream.

Until recently, mac80211 overwrote all the statistics it could
provide when getting called, but it now relies on the struct
having been zeroed by the caller. This was always the case in
nl80211, but wext used a static struct which could even cause
values from one device leak to another.

Using a static struct is OK (as even documented in a comment)
since the whole usage of this function and its return value is
always locked under RTNL. Not clearing the struct for calling
the driver has always been wrong though, since drivers were
free to only fill values they could report, so calling this
for one device and then for another would always have leaked
values from one to the other.

Fix this by initializing the structure in question before the
driver method call.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=99691

Reported-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Reported-by: Alexander Kaltsas <alexkaltsas@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-22 16:55:54 -07:00
..
.gitignore
ap.c cfg80211: move exported event functions into nl80211 2013-03-06 16:35:46 +01:00
chan.c cfg80211: Fix 160 MHz channels with 80+80 and 160 MHz drivers 2015-01-27 07:52:31 -08:00
core.c cfg80211: fix P2P GO interface teardown 2013-08-20 08:43:03 -07:00
core.h cfg80211: introduce critical protocol indication from user-space 2013-04-22 15:48:00 +02:00
db.txt
debugfs.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
debugfs.h
ethtool.c ethtool: fix drvinfo strings set in drivers 2013-01-06 21:06:31 -08:00
ethtool.h
genregdb.awk cfg80211: relicense reg.c reg.h and genregdb.awk to ISC 2012-01-04 14:30:41 -05:00
ibss.c cfg80211: fix warning when using WEXT for IBSS 2013-11-13 12:05:31 +09:00
Kconfig lib80211: hide Kconfig symbol 2012-11-16 14:29:09 -05: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 nl80211: explicit userspace MPM 2013-03-06 16:36:11 +01:00
mlme.c cfg80211: introduce critical protocol indication from user-space 2013-04-22 15:48:00 +02:00
nl80211.c nl80211: ignore HT/VHT capabilities without QoS/WMM 2015-04-13 14:02:11 +02:00
nl80211.h cfg80211: move exported event functions into nl80211 2013-03-06 16:35:46 +01:00
radiotap.c radiotap: fix bitmap-end-finding buffer overrun 2014-01-09 12:24:23 -08:00
rdev-ops.h cfg80211: introduce critical protocol indication from user-space 2013-04-22 15:48:00 +02:00
reg.c wireless: regulatory: fix channel disabling race condition 2013-04-16 15:25:46 +02:00
reg.h regulatory: use RCU to protect global and wiphy regdomains 2013-01-03 13:01:29 +01: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: fix scheduled scan pointer access 2013-12-04 10:57:30 -08:00
sme.c cfg80211: check wdev->netdev in connection work 2013-05-23 18:12:38 +02:00
sysfs.c cfg80211/mac80211: disconnect on suspend 2013-03-06 16:35:55 +01:00
sysfs.h
trace.c cfg80211: add tracing to rdev-ops 2012-10-18 10:53:37 +02:00
trace.h cfg80211: fix mic_failure tracing 2014-08-07 14:30:25 -07:00
util.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2013-04-24 10:54:20 -04:00
wext-compat.c cfg80211: wext: clear sinfo struct before calling driver 2015-06-22 16:55:54 -07:00
wext-compat.h cfg80211: remove unused wext handler exports 2011-08-08 14:26:29 -04:00
wext-core.c wext: include wireless event id when it has a size problem 2012-09-05 16:12:44 +02:00
wext-priv.c
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: always check for scan end on P2P device 2013-03-24 11:15:58 +01:00
wext-spy.c wireless: Convert compare_ether_addr to ether_addr_equal 2012-05-09 20:49:19 -04:00