syzbot


WARNING in dev_index_reserve (2)

Status: fixed on 2024/01/10 12:24
Subsystems: net
[Documentation on labels]
Fix commit: cbfbfe3aee71 tun: prevent negative ifindex
First crash: 424d, last: 414d
Cause bisection: introduced by (bisect log) :
commit 956db0a13b47df7f3d6d624394e602e8bf9b057e
Author: Jakub Kicinski <kuba@kernel.org>
Date: Mon Aug 14 20:56:25 2023 +0000

  net: warn about attempts to register negative ifindex

Crash: WARNING in dev_index_reserve (log)
Repro: C syz .config
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in dev_index_reserve bridge C done 7120 427d 481d 23/28 fixed on 2023/10/12 12:48

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5042 at net/core/dev.c:9596 dev_index_reserve+0x1a2/0x1c0 net/core/dev.c:9596
Modules linked in:
CPU: 0 PID: 5042 Comm: syz-executor171 Not tainted 6.6.0-rc5-syzkaller-00072-g401644852d0b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
RIP: 0010:dev_index_reserve+0x1a2/0x1c0 net/core/dev.c:9596
Code: 00 31 d2 4d 8d 45 50 b9 ff ff ff 7f 48 8d 74 24 20 e8 22 50 03 02 4c 89 e7 89 c3 e8 68 5b 12 02 e9 48 ff ff ff e8 1e 7d 56 f9 <0f> 0b bb ea ff ff ff e9 52 ff ff ff e8 5d a3 0e 02 66 66 2e 0f 1f
RSP: 0018:ffffc900042e7c30 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 00000000a245662c RCX: 0000000000000000
RDX: ffff88801f29d940 RSI: ffffffff883149a2 RDI: 0000000000000005
RBP: 1ffff9200085cf86 R08: 0000000000000005 R09: 0000000000000000
R10: 00000000a245662c R11: ffffffff910cd5f0 R12: ffff888075b2c010
R13: ffffffff9260f200 R14: ffff888075b2c000 R15: ffff888075b2c0f8
FS:  0000555555e22380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005fdeb8 CR3: 0000000074238000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 register_netdevice+0x69a/0x1490 net/core/dev.c:10084
 tun_set_iff drivers/net/tun.c:2850 [inline]
 __tun_chr_ioctl+0x3091/0x4700 drivers/net/tun.c:3118
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f4b12cc5469
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 00 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:00007ffeb75dc608 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffeb75dc7d8 RCX: 00007f4b12cc5469
RDX: 0000000020000200 RSI: 00000000400454ca RDI: 0000000000000004
RBP: 00007f4b12d38610 R08: 00007ffeb75dc7d8 R09: 00007ffeb75dc7d8
R10: 00007ffeb75dc7d8 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffeb75dc7c8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (68):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/13 03:34 upstream 401644852d0b fc170927 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in dev_index_reserve
2023/10/13 02:27 upstream 401644852d0b fc170927 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in dev_index_reserve
2023/10/13 01:20 upstream 401644852d0b fc170927 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in dev_index_reserve
2023/10/13 01:19 upstream 401644852d0b fc170927 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in dev_index_reserve
2023/10/14 06:22 net 8702cf12e6ba 6388bc36 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in dev_index_reserve
2023/10/13 18:05 net e8c127b05766 6388bc36 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in dev_index_reserve
2023/10/13 12:55 net e8c127b05766 6388bc36 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in dev_index_reserve
2023/10/13 10:09 net e8c127b05766 6388bc36 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in dev_index_reserve
2023/10/13 02:38 net 50e492143374 fc170927 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in dev_index_reserve
2023/10/14 06:22 net-next cf8b49fbd041 6388bc36 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/10/14 05:48 net-next cf8b49fbd041 6388bc36 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/10/14 05:20 net-next cf8b49fbd041 6388bc36 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/10/14 00:52 net-next cf8b49fbd041 6388bc36 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/10/13 01:59 net-next 21b2e2624d2e fc170927 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/10/13 01:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 19af4a4ed414 fc170927 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in dev_index_reserve
2023/10/18 10:01 upstream 06dc10eae55b 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in dev_index_reserve
2023/10/16 21:04 upstream 58720809f527 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in dev_index_reserve
2023/10/16 21:03 upstream 58720809f527 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in dev_index_reserve
2023/10/16 21:03 upstream 58720809f527 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in dev_index_reserve
2023/10/16 21:02 upstream 58720809f527 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in dev_index_reserve
2023/10/16 21:00 upstream 58720809f527 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in dev_index_reserve
2023/10/16 06:19 upstream 58720809f527 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in dev_index_reserve
2023/10/16 05:45 upstream 58720809f527 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in dev_index_reserve
2023/10/16 04:58 upstream 58720809f527 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in dev_index_reserve
2023/10/16 01:19 upstream 9a3dad63edbe 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in dev_index_reserve
2023/10/13 01:06 upstream 401644852d0b fc170927 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING in dev_index_reserve
2023/10/13 00:56 upstream 401644852d0b fc170927 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in dev_index_reserve
2023/10/13 00:55 upstream 401644852d0b fc170927 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING in dev_index_reserve
2023/10/13 00:54 upstream 401644852d0b fc170927 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in dev_index_reserve
2023/10/18 07:28 upstream 06dc10eae55b 342b9c55 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in dev_index_reserve
2023/10/18 15:51 upstream 06dc10eae55b 342b9c55 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm32 WARNING in dev_index_reserve
2023/10/18 09:47 upstream 06dc10eae55b 342b9c55 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64-mte WARNING in dev_index_reserve
2023/10/17 01:38 upstream 58720809f527 342b9c55 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64-mte WARNING in dev_index_reserve
2023/10/16 20:59 upstream 58720809f527 342b9c55 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in dev_index_reserve
2023/10/16 20:59 upstream 58720809f527 342b9c55 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in dev_index_reserve
2023/10/16 06:20 upstream 11d3f7261395 f757a323 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm32 WARNING in dev_index_reserve
2023/10/13 11:05 upstream 20f4757fa5ed 6388bc36 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64-mte WARNING in dev_index_reserve
2023/10/13 01:03 upstream e8c127b05766 6388bc36 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in dev_index_reserve
2023/10/16 20:58 net 883f0dc0e4f6 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in dev_index_reserve
2023/10/13 00:59 net 50e492143374 fc170927 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in dev_index_reserve
2023/10/22 23:27 bpf-next cf559a416f9b 361b23dc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in dev_index_reserve
2023/10/21 01:44 bpf-next 830cad2305d0 361b23dc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in dev_index_reserve
2023/10/18 08:46 net-next ee2a35fedbc9 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/10/16 20:59 net-next dccce1d7c040 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/10/16 20:59 net-next dccce1d7c040 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/10/13 00:55 net-next 21b2e2624d2e fc170927 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/10/18 22:51 linux-next 2dac75696c6d 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/10/19 09:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 78124b0c1d10 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in dev_index_reserve
2023/10/16 20:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c295ba49917a 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in dev_index_reserve
2023/10/16 20:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c295ba49917a 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in dev_index_reserve
2023/10/13 00:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 19af4a4ed414 fc170927 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in dev_index_reserve
* Struck through repros no longer work on HEAD.