syzbot


WARNING in netif_napi_add_weight

Status: internal: reported C repro on 2022/06/17 23:32
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: 3b9bc84d3111 net: tun: unlink NAPI from device on destruction
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 234d, last: 221d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING in netif_napi_add (log)
Repro: C syz .config

Fix bisection: fixed by (bisect log) :
commit 3b9bc84d311104906d2b4995a9a02d7b7ddab2db
Author: Jakub Kicinski <kuba@kernel.org>
Date: Thu Jun 23 04:20:39 2022 +0000

  net: tun: unlink NAPI from device on destruction


Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 3615 at net/core/dev.c:6357 netif_napi_add_weight+0x7e8/0x9e0 net/core/dev.c:6357
Modules linked in:
CPU: 1 PID: 3615 Comm: syz-executor302 Not tainted 5.19.0-rc3-syzkaller-00038-gca1fdab7fd27 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:netif_napi_add_weight+0x7e8/0x9e0 net/core/dev.c:6357
Code: b6 04 02 48 89 ea 83 e2 07 38 d0 7f 08 84 c0 0f 85 a4 00 00 00 48 8b 04 24 80 a0 b1 0b 00 00 fd e9 6c fd ff ff e8 78 20 27 fa <0f> 0b e9 60 fd ff ff e8 2c e4 73 fa e9 4c fe ff ff e8 12 e4 73 fa
RSP: 0018:ffffc90002fdfb18 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88801fc6a001 RCX: 0000000000000000
RDX: ffff8880257e8000 RSI: ffffffff87535508 RDI: 0000000000000001
RBP: ffff88801fc6a5d8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: ffff88801fc6a5e8
R13: ffff88801fc6a5d8 R14: ffff88801d6ecc80 R15: 0000000000000000
FS:  00007f79a62f3700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f79a62f3718 CR3: 000000001d926000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 netif_napi_add_tx_weight include/linux/netdevice.h:2559 [inline]
 netif_napi_add_tx include/linux/netdevice.h:2578 [inline]
 tun_napi_init drivers/net/tun.c:271 [inline]
 tun_attach.isra.0+0x1096/0x16c0 drivers/net/tun.c:812
 tun_net_init+0x45e/0x660 drivers/net/tun.c:993
 register_netdevice+0x57d/0x15b0 net/core/dev.c:9975
 tun_set_iff drivers/net/tun.c:2809 [inline]
 __tun_chr_ioctl+0x2a19/0x3da0 drivers/net/tun.c:3068
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
 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+0x46/0xb0
RIP: 0033:0x7f79a6362da9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 15 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f79a62f3308 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f79a63ec438 RCX: 00007f79a6362da9
RDX: 0000000020000200 RSI: 00000000400454ca RDI: 0000000000000003
RBP: 00007f79a63ec430 R08: 00007f79a62f3700 R09: 0000000000000000
R10: 00007f79a62f3700 R11: 0000000000000246 R12: 00007f79a63ec43c
R13: 00007f79a63b918c R14: 74656e2f7665642f R15: 0000000000022000
 </TASK>

Crashes (45):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce 2022/06/22 12:49 upstream ca1fdab7fd27 0fc5c330 .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/20 22:37 upstream 78ca55889a54 8d15e28d .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/20 21:26 upstream 78ca55889a54 8d15e28d .config console log report syz C WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/20 13:55 upstream a111daf0c53a 8f633d84 .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/20 13:23 upstream a111daf0c53a 8f633d84 .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/21 16:12 net 69135c572d1f 0fc5c330 .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/18 03:22 net b4a028c4d031 cb58b3b2 .config console log report syz C WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/18 02:31 net b4a028c4d031 cb58b3b2 .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/18 02:03 net b4a028c4d031 cb58b3b2 .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/18 00:47 net b4a028c4d031 cb58b3b2 .config console log report syz C WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/21 16:11 net-next 4336487e30c3 0fc5c330 .config console log report syz C WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/18 02:34 net-next 4875d94c69d5 cb58b3b2 .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/18 01:44 net-next 4875d94c69d5 cb58b3b2 .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/18 01:22 net-next 4875d94c69d5 cb58b3b2 .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/18 00:00 net-next 4875d94c69d5 cb58b3b2 .config strace log report syz C WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/30 11:02 upstream d9b2ba67917c 1434eec0 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/29 10:53 upstream 941e3e791269 496a8536 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/28 09:26 upstream 941e3e791269 ef82eb2c .config console log report info WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/27 02:32 upstream 03c765b0e3b4 a371c43c .config console log report info WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/26 12:13 upstream 0840a7914caa a371c43c .config console log report info WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/24 03:40 upstream de5c208d533a 912f5df7 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-kasan-gce-root 2022/06/23 10:18 upstream 3abc3ae553c7 912f5df7 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/22 15:33 upstream ca1fdab7fd27 0fc5c330 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-kasan-gce 2022/06/21 16:24 upstream 78ca55889a54 0fc5c330 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-kasan-gce-root 2022/06/21 07:56 upstream 78ca55889a54 0fc5c330 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-kasan-gce-selinux-root 2022/06/18 00:05 upstream f0ec9c65a8d6 cb58b3b2 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/23 20:26 net 12378a5a75e3 912f5df7 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/23 05:27 net 1e70212e0315 912f5df7 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/22 08:32 net 69135c572d1f 0fc5c330 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/22 00:15 net 69135c572d1f 0fc5c330 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/21 22:27 net 69135c572d1f 0fc5c330 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/21 16:21 net 69135c572d1f 0fc5c330 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/21 12:07 net 69135c572d1f 0fc5c330 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/19 09:47 net a2b1a5d40bd1 8f633d84 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/18 17:57 net 582573f1b23d 8f633d84 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/18 17:42 net 582573f1b23d 8f633d84 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-this-kasan-gce 2022/06/17 23:36 net b4a028c4d031 cb58b3b2 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/24 07:05 net-next 85763435d5b5 912f5df7 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/23 18:20 net-next 85763435d5b5 912f5df7 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/23 03:02 net-next 6dd4142fb5a9 912f5df7 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/22 05:41 net-next 8720bd951b8e 0fc5c330 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/20 19:05 net-next a56b158a5078 8d15e28d .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/19 15:25 net-next 9776fe0f424b 8f633d84 .config console log report info WARNING in netif_napi_add_weight
ci-upstream-net-kasan-gce 2022/06/17 23:31 net-next 4875d94c69d5 cb58b3b2 .config console log report info WARNING in netif_napi_add_weight
* Struck through repros no longer work on HEAD.