linux/net/wireless
Johannes Berg 8f7d99ba85 cfg80211: wext: really don't store non-WEP keys
Jouni reported that during (repeated) wext_pmf test runs (from the
wpa_supplicant hwsim test suite) the kernel crashes. The reason is
that after the key is set, the wext code still unnecessarily stores
it into the key cache. Despite smatch pointing out an overflow, I
failed to identify the possibility for this in the code and missed
it during development of the earlier patch series.

In order to fix this, simply check that we never store anything but
WEP keys into the cache, adding a comment as to why that's enough.

Also, since the cache is still allocated early even if it won't be
used in many cases, add a comment explaining why - otherwise we'd
have to roll back key settings to the driver in case of allocation
failures, which is far more difficult.

Fixes: 89b706fb28 ("cfg80211: reduce connect key caching struct size")
Reported-by: Jouni Malinen <j@w1.fi>
Bisected-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-09-28 23:55:23 +02:00
..
.gitignore
ap.c cfg80211: export interface stopping function 2014-05-06 15:16:34 +02:00
chan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-08-17 17:26:58 -07:00
core.c cfg80211: Remove deprecated create_singlethread_workqueue 2016-09-12 11:24:48 +02:00
core.h cfg80211: reduce connect key caching struct size 2016-09-13 20:20:54 +02:00
db.txt
debugfs.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
debugfs.h
ethtool.c cfg80211: make ethtool the driver's responsibility 2014-06-23 11:05:33 +02:00
genregdb.awk wireless: fixup genregdb.awk for remove of antenna gain from wireless-regd 2014-07-21 12:24:20 +02:00
ibss.c cfg80211: allow connect keys only with default (TX) key 2016-09-15 16:45:41 +02:00
Kconfig cfg80211: Fix some linguistics in Kconfig 2016-02-24 09:04:23 +01:00
lib80211_crypt_ccmp.c lib80211: ratelimit key index mismatch 2015-12-04 14:43:32 +01:00
lib80211_crypt_tkip.c lib80211: Use skcipher and ahash 2016-01-27 20:36:03 +08:00
lib80211_crypt_wep.c lib80211: Use skcipher and ahash 2016-01-27 20:36:03 +08:00
lib80211.c lib80211: remove unused print_ssid() 2014-10-14 02:18:27 +02:00
Makefile cfg80211: 802.11p OCB mode handling 2014-11-04 13:18:17 +01:00
mesh.c cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
mlme.c cfg80211: disallow shared key authentication with key index 4 2016-09-13 20:20:51 +02:00
nl80211.c cfg80211: add checks for beacon rate, extend to mesh 2016-09-26 10:23:48 +02:00
nl80211.h cfg80211: always notify userspace of new wireless netdevs 2016-08-11 16:51:41 +02:00
ocb.c cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented 2015-12-04 14:43:32 +01:00
radiotap.c cfg80211: add radiotap VHT info to rtap_namespace_sizes 2016-02-24 09:04:41 +01:00
rdev-ops.h cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
reg.c cfg80211: make wdev_list accessible to drivers 2016-05-12 11:16:40 +02:00
reg.h cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00
regdb.h
scan.c cfg80211: add helper to find an IE that matches a byte-array 2016-09-16 14:49:52 +02:00
sme.c cfg80211: allow connect keys only with default (TX) key 2016-09-15 16:45:41 +02:00
sysfs.c cfg80211: remove unnecessary pointer-of 2016-09-15 16:46:20 +02:00
sysfs.h
trace.c
trace.h nl80211: support beacon report scanning 2016-07-06 14:51:31 +02:00
util.c cfg80211: reduce connect key caching struct size 2016-09-13 20:20:54 +02:00
wext-compat.c cfg80211: wext: really don't store non-WEP keys 2016-09-28 23:55:23 +02:00
wext-compat.h cfg80211-wext: export symbols only when needed 2015-02-28 21:31:09 +01:00
wext-core.c Revert "wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel" 2016-08-08 08:49:50 +02:00
wext-priv.c
wext-proc.c
wext-sme.c cfg80211: allow connect keys only with default (TX) key 2016-09-15 16:45:41 +02:00
wext-spy.c