android_kernel_samsung_msm8976/net/wireless
Anant Thazhemadam e9a47662ff net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key()
commit 3dc289f8f139997f4e9d3cfccf8738f20d23e47b upstream.

In nl80211_parse_key(), key.idx is first initialized as -1.
If this value of key.idx remains unmodified and gets returned, and
nl80211_key_allowed() also returns 0, then rdev_del_key() gets called
with key.idx = -1.
This causes an out-of-bounds array access.

Handle this issue by checking if the value of key.idx after
nl80211_parse_key() is called and return -EINVAL if key.idx < 0.

Change-Id: Ie00275076bb4ee6a31d0e59b4b0e477ae732327d
Cc: stable@vger.kernel.org
Reported-by: syzbot+b1bb342d1d097516cbda@syzkaller.appspotmail.com
Tested-by: syzbot+b1bb342d1d097516cbda@syzkaller.appspotmail.com
Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Link: https://lore.kernel.org/r/20201007035401.9522-1-anant.thazhemadam@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-14 19:55:38 +01:00
..
.gitignore
Kconfig
Makefile
ap.c
chan.c This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
core.c cfg80211: fix memory leak of wiphy device name 2019-07-27 22:11:14 +02:00
core.h BACKPORT: nl80211: Stop scheduled scan if netlink client disappears 2019-07-27 21:50:44 +02:00
db.txt msm: wlan: Modify JP regulatory rules 2020-03-20 22:08:35 +01:00
debugfs.c
debugfs.h
ethtool.c
ethtool.h
genregdb.awk
ibss.c
lib80211.c
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c
lib80211_crypt_wep.c
mesh.c
mlme.c
nl80211.c net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key() 2020-11-14 19:55:38 +01:00
nl80211.h
radiotap.c
rdev-ops.h cfg80211: Add support for aborting an ongoing scan 2016-10-07 12:01:24 +05:30
reg.c net: wireless: move regulatory timeout work to power efficient workqueue 2019-07-27 22:11:06 +02:00
reg.h
regdb.h
scan.c cfg80211: limit scan results cache size 2019-07-27 21:42:43 +02:00
sme.c cfg80211: Add option to report the bss entry in connect result 2016-09-07 16:07:24 +05:30
sysfs.c
sysfs.h
trace.c
trace.h cfg80211: Add support for aborting an ongoing scan 2016-10-07 12:01:24 +05:30
util.c cfg80211: Fix use after free when process wdev events 2019-07-27 22:10:56 +02:00
wext-compat.c cfg80211: fix station info handling bugs 2019-07-27 21:46:31 +02:00
wext-compat.h
wext-core.c cfg80211/wext: fix message ordering 2019-07-27 22:06:02 +02:00
wext-priv.c
wext-proc.c
wext-sme.c
wext-spy.c