syzbot


general protection fault in ieee80211_chanctx_num_assigned

Status: fixed on 2022/05/13 11:13
Reported-by: syzbot+00ce7332120071df39b1@syzkaller.appspotmail.com
Fix commit: 563fbefed46a cfg80211: call cfg80211_stop_ap when switch from P2P_GO type
First crash: 671d, last: 236d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: general protection fault in ieee80211_chanctx_num_assigned (log)
Repro: C syz .config

Fix bisection: fixed by (bisect log) :
commit 563fbefed46ae4c1f70cffb8eb54c02df480b2c2
Author: Nguyen Dinh Phi <phind.uet@gmail.com>
Date: Wed Oct 27 17:37:22 2021 +0000

  cfg80211: call cfg80211_stop_ap when switch from P2P_GO type

similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 general protection fault in ieee80211_chanctx_num_assigned C error 4 319d 639d 0/1 upstream: reported C repro on 2020/11/06 01:59
linux-4.14 general protection fault in ieee80211_chanctx_num_assigned C 4 21d 649d 0/1 upstream: reported C repro on 2020/10/27 05:11

Sample crash report:
general protection fault, probably for non-canonical address 0xfbd59c0000000020: 0000 [#1] PREEMPT SMP KASAN
KASAN: maybe wild-memory-access in range [0xdead000000000100-0xdead000000000107]
CPU: 1 PID: 8405 Comm: syz-executor754 Not tainted 5.12.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ieee80211_chanctx_num_assigned+0xb1/0x140 net/mac80211/chan.c:22
Code: a8 f6 ff ff 48 39 c5 74 3b 49 bd 00 00 00 00 00 fc ff df e8 d1 53 0c f9 48 8d bb 58 09 00 00 41 83 c4 01 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 75 68 48 8b 83 58 09 00 00 48 8d 98 a8 f6 ff ff 48
RSP: 0018:ffffc90001927330 EFLAGS: 00010a02
RAX: 1bd5a00000000020 RBX: deacfffffffff7a8 RCX: 0000000000000000
RDX: ffff888013908140 RSI: ffffffff8866d1ff RDI: dead000000000100
RBP: ffff88801e237520 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff8866d25b R11: 0000000000000000 R12: 0000000000000002
R13: dffffc0000000000 R14: ffff88801e237500 R15: 0000000000000000
FS:  00000000021e9300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc350a3e58 CR3: 000000002deb7000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ieee80211_assign_vif_chanctx+0x7bd/0x1240 net/mac80211/chan.c:746
 __ieee80211_vif_release_channel+0x236/0x430 net/mac80211/chan.c:1619
 ieee80211_vif_release_channel+0x117/0x220 net/mac80211/chan.c:1833
 ieee80211_ibss_disconnect+0x44e/0x7b0 net/mac80211/ibss.c:735
 ieee80211_ibss_leave+0x12/0x150 net/mac80211/ibss.c:1871
 rdev_leave_ibss net/wireless/rdev-ops.h:545 [inline]
 __cfg80211_leave_ibss+0x1a2/0x4d0 net/wireless/ibss.c:213
 cfg80211_leave_ibss+0x57/0x80 net/wireless/ibss.c:231
 cfg80211_change_iface+0x820/0xf30 net/wireless/util.c:1047
 nl80211_set_interface+0x65c/0x8d0 net/wireless/nl80211.c:3916
 genl_family_rcv_msg_doit+0x228/0x320 net/netlink/genetlink.c:739
 genl_family_rcv_msg net/netlink/genetlink.c:783 [inline]
 genl_rcv_msg+0x328/0x580 net/netlink/genetlink.c:800
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:811
 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927
 sock_sendmsg_nosec net/socket.c:654 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:674
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x440bf9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 14 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc350a4ec8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 000000000001557f RCX: 0000000000440bf9
RDX: 0000000000000000 RSI: 0000000020000340 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007ffc350a5068 R09: 00007ffc350a5068
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc350a4edc
R13: 431bde82d7b634db R14: 00000000004b5018 R15: 00000000004004b8
Modules linked in:
---[ end trace 15d6aca3128782a4 ]---
RIP: 0010:ieee80211_chanctx_num_assigned+0xb1/0x140 net/mac80211/chan.c:22
Code: a8 f6 ff ff 48 39 c5 74 3b 49 bd 00 00 00 00 00 fc ff df e8 d1 53 0c f9 48 8d bb 58 09 00 00 41 83 c4 01 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 75 68 48 8b 83 58 09 00 00 48 8d 98 a8 f6 ff ff 48
RSP: 0018:ffffc90001927330 EFLAGS: 00010a02
RAX: 1bd5a00000000020 RBX: deacfffffffff7a8 RCX: 0000000000000000
RDX: ffff888013908140 RSI: ffffffff8866d1ff RDI: dead000000000100
RBP: ffff88801e237520 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff8866d25b R11: 0000000000000000 R12: 0000000000000002
R13: dffffc0000000000 R14: ffff88801e237500 R15: 0000000000000000
FS:  00000000021e9300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005568cdc96a80 CR3: 000000002deb7000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (15):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2021/04/15 13:05 upstream 7f75285ca572 fcdb12ba .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-kasan-gce-root 2021/03/07 02:06 upstream a38fd8748464 e4b4d570 .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-kasan-gce-selinux-root 2021/02/17 02:54 upstream f40ddce88593 98682e5e .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-kasan-gce-root 2021/02/05 22:59 upstream dd86e7fa07a3 23a562df .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-kasan-gce-selinux-root 2021/02/03 19:33 upstream 3aaf0a27ffc2 624dad51 .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-kasan-gce-root 2021/01/25 02:35 upstream e68061375f79 52e37319 .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-kasan-gce-root 2021/01/24 08:26 upstream e1ae4b0be158 52e37319 .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-linux-next-kasan-gce-root 2021/04/17 08:26 linux-next 1216f02e46a4 7e2b734b .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-linux-next-kasan-gce-root 2021/03/31 23:07 linux-next 931294922e65 6a81331a .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-linux-next-kasan-gce-root 2021/03/24 09:48 linux-next d949689e7383 e613994b .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-linux-next-kasan-gce-root 2021/03/23 08:15 linux-next e3128d2f068e 8092f30d .config log report syz C general protection fault in ieee80211_chanctx_num_assigned
ci-upstream-kasan-gce 2020/12/03 16:30 upstream 34816d20f173 e6b0d314 .config log report syz C
ci-upstream-kasan-gce 2020/11/22 13:55 upstream a349e4c65960 0d27f508 .config log report syz C
ci-upstream-kasan-gce-386 2020/11/29 21:55 upstream aae5ab854e38 a0092f9d .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2020/10/05 12:52 linux-next 2172e358cd17 5ef9c291 .config log report info