android_kernel_sony_sdm845/net/wireless
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Johannes Berg 355b53d5c6 wext: fix NULL-ptr-dereference with cfg80211's lack of commit()
commit 5122565188bae59d507d90a9a9fd2fd6107f4439 upstream.

Since cfg80211 doesn't implement commit, we never really cared about
that code there (and it's configured out w/o CONFIG_WIRELESS_EXT).
After all, since it has no commit, it shouldn't return -EIWCOMMIT to
indicate commit is needed.

However, EIWCOMMIT is actually an alias for EINPROGRESS, which _can_
happen if e.g. we try to change the frequency but we're already in
the process of connecting to some network, and drivers could return
that value (or even cfg80211 itself might).

This then causes us to crash because dev->wireless_handlers is NULL
but we try to check dev->wireless_handlers->standard[0].

Fix this by also checking dev->wireless_handlers. Also simplify the
code a little bit.

Cc: stable@vger.kernel.org
Reported-by: syzbot+444248c79e117bc99f46@syzkaller.appspotmail.com
Reported-by: syzbot+8b2a88a09653d4084179@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20210121171621.2076e4a37d5a.I5d9c72220fe7bb133fb718751da0180a57ecba4e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-03 23:19:49 +01:00
..
.gitignore
ap.c
chan.c
core.c cfg80211: fix memory leak of wiphy device name 2019-07-10 09:55:35 +02:00
core.h cfg80211/mac80211: fix BSS leaks when abandoning assoc attempts 2017-01-09 08:32:17 +01:00
db.txt
debugfs.c
debugfs.h
ethtool.c cfg80211: check wiphy driver existence for drvinfo report 2020-03-11 07:53:02 +01:00
genregdb.awk
ibss.c
Kconfig
lib80211.c
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c
lib80211_crypt_wep.c
Makefile
mesh.c
mlme.c cfg80211/mac80211: fix BSS leaks when abandoning assoc attempts 2017-01-09 08:32:17 +01:00
nl80211.c cfg80211: initialize rekey_data 2020-12-29 13:45:02 +01:00
nl80211.h
ocb.c
radiotap.c
rdev-ops.h cfg80211: check for set_wiphy_params 2020-01-23 08:19:42 +01:00
reg.c cfg80211: regulatory: Fix inconsistent format argument 2020-11-18 18:26:26 +01:00
reg.h
regdb.h
scan.c cfg80211: add and use strongly typed element iteration macros 2019-10-17 13:42:21 -07:00
sme.c cfg80211: fix connect/disconnect edge cases 2017-11-02 09:49:15 +01:00
sysfs.c cfg80211: check rdev resume callback only for registered wiphy 2017-04-12 12:41:11 +02:00
sysfs.h
trace.c
trace.h
util.c cfg80211: fix page refcount issue in A-MSDU decap 2020-01-23 08:19:41 +01:00
wext-compat.c cfg80211: initialize on-stack chandefs 2019-10-17 13:42:08 -07:00
wext-compat.h
wext-core.c wext: fix NULL-ptr-dereference with cfg80211's lack of commit() 2021-02-03 23:19:49 +01:00
wext-priv.c
wext-proc.c
wext-sme.c cfg80211: wext: avoid copying malformed SSIDs 2019-10-29 09:15:21 +01:00
wext-spy.c