Ubuntu-focal-kernel/net/wireless
Johannes Berg c748f37ad9 cfg80211: fix debugfs rename crash
BugLink: https://bugs.launchpad.net/bugs/1881927

commit 0bbab5f030 upstream.

Removing the "if (IS_ERR(dir)) dir = NULL;" check only works
if we adjust the remaining code to not rely on it being NULL.
Check IS_ERR_OR_NULL() before attempting to dereference it.

I'm not actually entirely sure this fixes the syzbot crash as
the kernel config indicates that they do have DEBUG_FS in the
kernel, but this is what I found when looking there.

Cc: stable@vger.kernel.org
Fixes: d82574a8e5 ("cfg80211: no need to check return value of debugfs_create functions")
Reported-by: syzbot+fd5332e429401bf42d18@syzkaller.appspotmail.com
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200525113816.fc4da3ec3d4b.Ica63a110679819eaa9fb3bc1b7437d96b1fd187d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
2020-06-22 17:23:35 -03:00
..
certs
.gitignore
Kconfig
Makefile
ap.c
chan.c nl80211: Disallow setting of HT for channel 14 2019-10-30 10:07:22 +01:00
core.c cfg80211: fix debugfs rename crash 2020-06-22 17:23:35 -03:00
core.h cfg80211: always shut down on HW rfkill 2019-09-11 09:13:26 +02:00
debugfs.c
debugfs.h
ethtool.c cfg80211: check wiphy driver existence for drvinfo report 2020-03-06 12:38:08 +01:00
ibss.c cfg80211: ibss: use 11a mandatory rates for 6GHz band operation 2019-08-21 10:54:57 +02:00
lib80211.c
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c
lib80211_crypt_wep.c
mesh.c
mlme.c
nl80211.c nl80211: fix NL80211_ATTR_FTM_RESPONDER policy 2020-05-05 12:32:22 +02:00
nl80211.h
ocb.c
of.c
pmsr.c
radiotap.c
rdev-ops.h cfg80211: Fix radar event during another phy CAC 2020-02-06 16:32:51 +00:00
reg.c cfg80211: check reg_rule for NULL in handle_channel_custom() 2020-03-23 11:24:26 +01:00
reg.h mac80211: fix scan when operating on DFS channels in ETSI domains 2019-10-07 22:10:50 +02:00
scan.c cfg80211: Do not warn on same channel at the end of CSA 2020-05-05 12:32:22 +02:00
sme.c cfg80211: fix deadlocks in autodisconnect work 2020-01-30 16:26:23 +01:00
sysfs.c
sysfs.h
trace.c
trace.h cfg80211: Fix radar event during another phy CAC 2020-02-06 16:32:51 +00:00
util.c cfg80211: fix page refcount issue in A-MSDU decap 2020-01-30 16:26:24 +01:00
wext-compat.c cfg80211: initialize on-stack chandefs 2019-10-01 17:56:18 +02:00
wext-compat.h
wext-core.c wireless: wext: avoid gcc -O3 warning 2020-02-06 16:32:51 +00:00
wext-priv.c
wext-proc.c
wext-sme.c cfg80211: wext: avoid copying malformed SSIDs 2019-10-04 14:04:08 +02:00
wext-spy.c