Michal Kazior
59153e6589
ath10k: fix null deref on wmi-tlv when trying spectral scan
commit 18ae68fff3 upstream.
WMI ops wrappers did not properly check for null
function pointers for spectral scan. This caused
null dereference crash with WMI-TLV based firmware
which doesn't implement spectral scan.
The crash could be triggered with:
ip link set dev wlan0 up
echo background > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl
The crash looked like this:
[ 168.031989] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 168.037406] IP: [< (null)>] (null)
[ 168.040395] PGD cdd4067 PUD fa0f067 PMD 0
[ 168.043303] Oops: 0010 [#1] SMP
[ 168.045377] Modules linked in: ath10k_pci(O) ath10k_core(O) ath mac80211 cfg80211 [last unloaded: cfg80211]
[ 168.051560] CPU: 1 PID: 1380 Comm: bash Tainted: G W O 4.8.0 #78
[ 168.054336] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
[ 168.059183] task: ffff88000c460c00 task.stack: ffff88000d4bc000
[ 168.061736] RIP: 0010:[<0000000000000000>] [< (null)>] (null)
...
[ 168.100620] Call Trace:
[ 168.101910] [<ffffffffa03b9566>] ? ath10k_spectral_scan_config+0x96/0x200 [ath10k_core]
[ 168.104871] [<ffffffff811386e2>] ? filemap_fault+0xb2/0x4a0
[ 168.106696] [<ffffffffa03b97e6>] write_file_spec_scan_ctl+0x116/0x280 [ath10k_core]
[ 168.109618] [<ffffffff812da3a1>] full_proxy_write+0x51/0x80
[ 168.111443] [<ffffffff811957b8>] __vfs_write+0x28/0x120
[ 168.113090] [<ffffffff812f1a2d>] ? security_file_permission+0x3d/0xc0
[ 168.114932] [<ffffffff8109b912>] ? percpu_down_read+0x12/0x60
[ 168.116680] [<ffffffff811965f8>] vfs_write+0xb8/0x1a0
[ 168.118293] [<ffffffff81197966>] SyS_write+0x46/0xa0
[ 168.119912] [<ffffffff818f2972>] entry_SYSCALL_64_fastpath+0x1a/0xa4
[ 168.121737] Code: Bad RIP value.
[ 168.123318] RIP [< (null)>] (null)
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-06 18:59:42 -07:00
..
2017-07-27 15:08:07 -07:00
2016-10-24 19:37:48 +02:00
2017-06-14 15:06:00 +02:00
2016-12-05 14:53:46 -05:00
2017-03-30 09:41:27 +02:00
2017-07-27 15:08:08 -07:00
2017-03-12 06:41:52 +01:00
2017-07-05 14:40:20 +02:00
2017-05-20 14:28:41 +02:00
2017-01-19 20:18:07 +01:00
2017-07-27 15:08:02 -07:00
2017-07-05 14:40:30 +02:00
2017-04-12 12:41:16 +02:00
2017-07-05 14:40:30 +02:00
2016-10-15 09:26:12 -07:00
2017-07-21 07:42:23 +02:00
2017-05-20 14:28:41 +02:00
2017-03-12 06:41:44 +01:00
2017-06-29 13:00:31 +02:00
2017-04-18 07:11:50 +02:00
2016-10-04 12:06:26 -07:00
2017-01-19 20:18:03 +01:00
2016-11-03 14:46:39 +01:00
2017-04-21 09:31:20 +02:00
2017-07-05 14:40:18 +02:00
2017-08-06 18:59:41 -07:00
2017-07-05 14:40:24 +02:00
2017-03-30 09:41:27 +02:00
2017-05-14 14:00:13 +02:00
2017-03-30 09:41:27 +02:00
2017-07-05 14:40:30 +02:00
2017-04-12 12:41:17 +02:00
2017-06-24 07:11:17 +02:00
2017-07-27 15:08:07 -07:00
2017-07-27 15:08:05 -07:00
2017-07-05 14:40:30 +02:00
2016-10-27 18:43:43 -07:00
2017-07-21 07:42:20 +02:00
2017-08-06 18:59:42 -07:00
2017-05-14 14:00:15 +02:00
2016-10-07 14:42:05 -07:00
2016-09-20 20:57:12 +10:00
2016-11-14 22:07:38 +01:00
2016-09-27 12:33:47 +02:00
2017-08-06 18:59:40 -07:00
2017-07-27 15:08:01 -07:00
2017-03-15 10:02:45 +08:00
2016-10-17 15:43:05 +02:00
2017-06-24 07:11:14 +02:00
2017-07-27 15:07:59 -07:00
2017-06-07 12:07:47 +02:00
2017-07-05 14:40:31 +02:00
2017-08-06 18:59:42 -07:00
2017-08-06 18:59:42 -07:00
2017-02-23 17:44:36 +01:00
2017-07-27 15:08:02 -07:00
2017-07-27 15:08:03 -07:00
2017-07-21 07:42:22 +02:00
2017-07-27 15:08:08 -07:00
2016-10-10 20:16:43 -07:00
2017-07-21 07:42:20 +02:00
2017-06-17 06:41:54 +02:00
2017-07-27 15:08:00 -07:00
2016-11-11 08:45:08 -08:00
2016-10-17 15:50:07 +01:00
2017-05-14 14:00:19 +02:00
2017-07-12 15:01:05 +02:00
2017-07-05 14:40:23 +02:00
2017-05-14 14:00:15 +02:00
2017-01-19 20:18:07 +01:00
2016-10-11 15:06:32 -07:00
2016-09-20 20:57:12 +10:00
2016-10-13 10:20:06 -04:00
2017-04-21 09:31:22 +02:00
2016-10-19 08:11:43 -07:00
2017-07-05 14:40:29 +02:00
2017-03-12 06:41:50 +01:00
2016-10-22 18:31:42 +09:00
2017-01-26 08:24:44 +01:00
2017-04-21 09:31:24 +02:00
2017-06-07 12:07:43 +02:00
2017-07-27 15:07:59 -07:00
2017-01-26 08:24:45 +01:00
2017-07-05 14:40:28 +02:00
2017-07-27 15:08:08 -07:00
2017-01-09 08:32:16 +01:00
2017-08-06 18:59:41 -07:00
2017-07-27 15:08:06 -07:00
2017-07-27 15:07:55 -07:00
2017-07-21 07:42:22 +02:00
2017-07-27 15:08:01 -07:00
2017-05-25 15:44:46 +02:00
2017-07-27 15:08:03 -07:00
2017-06-17 06:41:57 +02:00
2017-04-21 09:31:21 +02:00
2016-10-19 08:11:43 -07:00
2017-03-31 10:31:45 +02:00
2017-03-12 06:41:50 +01:00
2017-03-12 06:41:48 +01:00
2017-07-05 14:40:28 +02:00
2017-07-27 15:07:59 -07:00
2017-05-20 14:28:35 +02:00