Lorenzo Bianconi
1282bb0083
mac80211: limit injected vht mcs/nss in ieee80211_parse_tx_radiotap
[ Upstream commit 13cb6d826e0ac0d144b0d48191ff1a111d32f0c6 ]
Limit max values for vht mcs and nss in ieee80211_parse_tx_radiotap
routine in order to fix the following warning reported by syzbot:
WARNING: CPU: 0 PID: 10717 at include/net/mac80211.h:989 ieee80211_rate_set_vht include/net/mac80211.h:989 [inline]
WARNING: CPU: 0 PID: 10717 at include/net/mac80211.h:989 ieee80211_parse_tx_radiotap+0x101e/0x12d0 net/mac80211/tx.c:2244
Modules linked in:
CPU: 0 PID: 10717 Comm: syz-executor.5 Not tainted 5.14.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ieee80211_rate_set_vht include/net/mac80211.h:989 [inline]
RIP: 0010:ieee80211_parse_tx_radiotap+0x101e/0x12d0 net/mac80211/tx.c:2244
RSP: 0018:ffffc9000186f3e8 EFLAGS: 00010216
RAX: 0000000000000618 RBX: ffff88804ef76500 RCX: ffffc900143a5000
RDX: 0000000000040000 RSI: ffffffff888f478e RDI: 0000000000000003
RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000100
R10: ffffffff888f46f9 R11: 0000000000000000 R12: 00000000fffffff8
R13: ffff88804ef7653c R14: 0000000000000001 R15: 0000000000000004
FS: 00007fbf5718f700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2de23000 CR3: 000000006a671000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
ieee80211_monitor_select_queue+0xa6/0x250 net/mac80211/iface.c:740
netdev_core_pick_tx+0x169/0x2e0 net/core/dev.c:4089
__dev_queue_xmit+0x6f9/0x3710 net/core/dev.c:4165
__bpf_tx_skb net/core/filter.c:2114 [inline]
__bpf_redirect_no_mac net/core/filter.c:2139 [inline]
__bpf_redirect+0x5ba/0xd20 net/core/filter.c:2162
____bpf_clone_redirect net/core/filter.c:2429 [inline]
bpf_clone_redirect+0x2ae/0x420 net/core/filter.c:2401
bpf_prog_eeb6f53a69e5c6a2+0x59/0x234
bpf_dispatcher_nop_func include/linux/bpf.h:717 [inline]
__bpf_prog_run include/linux/filter.h:624 [inline]
bpf_prog_run include/linux/filter.h:631 [inline]
bpf_test_run+0x381/0xa30 net/bpf/test_run.c:119
bpf_prog_test_run_skb+0xb84/0x1ee0 net/bpf/test_run.c:663
bpf_prog_test_run kernel/bpf/syscall.c:3307 [inline]
__sys_bpf+0x2137/0x5df0 kernel/bpf/syscall.c:4605
__do_sys_bpf kernel/bpf/syscall.c:4691 [inline]
__se_sys_bpf kernel/bpf/syscall.c:4689 [inline]
__x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4689
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665f9
Reported-by: syzbot+0196ac871673f0c20f68@syzkaller.appspotmail.com
Fixes: 646e76bb5d
("mac80211: parse VHT info in injected frames")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/c26c3f02dcb38ab63b2f2534cb463d95ee81bb13.1632141760.git.lorenzo@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-10-06 15:55:51 +02:00
..
2021-04-10 13:36:08 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-02-24 10:36:03 +01:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2021-04-10 13:36:08 +02:00
2019-06-19 17:09:55 +02:00
2020-08-27 11:23:08 +02:00
2020-05-31 11:27:16 +02:00
2020-09-18 11:36:03 +02:00
2021-08-04 12:46:42 +02:00
2020-09-28 13:53:05 +02:00
2017-11-02 11:10:55 +01:00
2020-02-24 10:35:57 +01:00
2020-02-24 10:35:57 +01:00
2020-07-31 09:24:24 +02:00
2017-11-02 11:10:55 +01:00
2020-03-29 21:25:29 -07:00
2017-11-02 11:10:55 +01:00
2021-02-07 15:37:15 +01:00
2017-11-02 11:10:55 +01:00
2021-02-10 09:29:16 +01:00
2020-09-18 12:16:16 +02:00
2019-06-05 17:37:16 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-05-31 11:27:03 +02:00
2020-07-31 09:24:23 +02:00
2021-03-30 14:32:08 +02:00
2021-08-04 12:46:42 +02:00
2021-09-18 13:40:28 +02:00
2021-02-17 11:02:25 +01:00
2021-06-03 09:00:29 +02:00
2021-06-03 09:00:29 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2021-05-14 09:50:34 +02:00
2020-10-08 10:40:57 +02:00
2021-03-04 11:37:32 +01:00
2020-12-04 17:34:25 -08:00
2020-09-28 14:36:53 +02:00
2020-09-28 14:36:53 +02:00
2019-06-19 17:09:55 +02:00
2020-08-27 14:12:15 +02:00
2020-05-31 11:26:39 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2021-08-04 12:46:42 +02:00
2019-06-19 17:09:55 +02:00
2020-09-28 13:18:53 +02:00
2017-11-02 11:10:55 +01:00
2021-02-10 09:29:16 +01:00
2020-04-24 11:30:13 +02:00
2019-10-11 10:31:45 +02:00
2019-10-11 10:31:45 +02:00
2020-05-26 20:17:35 -07:00
2019-10-11 10:31:45 +02:00
2020-11-12 11:25:09 +01:00
2020-11-12 11:24:43 +01:00
2021-06-30 08:47:20 -04:00
2020-10-08 10:40:57 +02:00
2021-06-23 14:42:41 +02:00
2021-02-13 13:55:04 +01:00
2021-07-19 09:44:53 +02:00
2021-06-03 09:00:29 +02:00
2020-11-12 11:23:58 +01:00
2020-07-31 09:24:23 +02:00
2020-01-15 09:52:12 +01:00
2019-07-08 20:57:08 -07:00
2019-03-29 11:20:36 +01:00
2017-11-02 11:10:55 +01:00
2020-09-18 12:16:16 +02:00
2021-10-06 15:55:51 +02:00
2021-06-30 08:47:23 -04:00
2020-12-30 11:53:50 +01:00
2020-02-07 12:40:34 +01:00
2020-02-07 12:40:34 +01:00
2020-07-31 09:24:23 +02:00
2019-06-19 17:09:55 +02:00
2021-10-06 15:55:48 +02:00
2019-06-19 17:09:55 +02:00