syzbot


WARNING in dev_index_reserve

Status: fixed on 2023/10/12 12:48
Subsystems: bridge
[Documentation on labels]
Reported-by: syzbot+5ba06978f34abb058571@syzkaller.appspotmail.com
Fix commit: f534f6581ec0 net: validate veth and vxcan peer ifindexes 30188bd7838c rtnetlink: Reject negative ifindexes in RTM_NEWLINK
First crash: 200d, last: 145d
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
  
Discussions (4)
Title Replies (including bot) Last reply
[PATCH net] rtnetlink: Reject negative ifindexes in RTM_NEWLINK 1 (1) 2023/08/23 06:43
[PATCH net] net: validate veth and vxcan peer ifindexes 6 (6) 2023/08/22 10:39
[syzbot] [net?] WARNING in dev_index_reserve 0 (1) 2023/08/17 04:19
[syzbot] [net?] WARNING in dev_index_reserve 0 (1) 2023/08/16 19:07
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in dev_index_reserve (2) net C done 68 133d 143d 25/26 fixed on 2024/01/10 12:24
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/08/18 10:55 26m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git 950fe35831af report log
2023/08/17 11:11 15m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git 950fe35831af report log

Sample crash report:
netlink: 12 bytes leftover after parsing attributes in process `syz-executor125'.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5027 at net/core/dev.c:9593 dev_index_reserve+0x1a2/0x1c0 net/core/dev.c:9593
Modules linked in:
CPU: 0 PID: 5027 Comm: syz-executor125 Not tainted 6.5.0-rc6-syzkaller-01638-g7eb6deb3f556 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
RIP: 0010:dev_index_reserve+0x1a2/0x1c0 net/core/dev.c:9593
Code: 00 31 d2 4d 8d 45 50 b9 ff ff ff 7f 48 8d 74 24 20 e8 82 29 02 02 4c 89 e7 89 c3 e8 28 24 11 02 e9 48 ff ff ff e8 ee fd 5d f9 <0f> 0b bb ea ff ff ff e9 52 ff ff ff e8 ad 72 0d 02 66 66 2e 0f 1f
RSP: 0018:ffffc9000397f2e8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 0000000000000000
RDX: ffff888028e98000 RSI: ffffffff882822a2 RDI: 0000000000000005
RBP: 1ffff9200072fe5d R08: 0000000000000005 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000000 R12: ffff88802c224010
R13: ffffffff924d0dc0 R14: ffff88802c224000 R15: ffff88802c2240f8
FS:  0000555557271380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000562e4044a798 CR3: 000000002cf59000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 register_netdevice+0x69a/0x1490 net/core/dev.c:10081
 br_dev_newlink+0x27/0x110 net/bridge/br_netlink.c:1552
 rtnl_newlink_create net/core/rtnetlink.c:3471 [inline]
 __rtnl_newlink+0x115e/0x18c0 net/core/rtnetlink.c:3688
 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3701
 rtnetlink_rcv_msg+0x439/0xd30 net/core/rtnetlink.c:6427
 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545
 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline]
 netlink_unicast+0x536/0x810 net/netlink/af_netlink.c:1368
 netlink_sendmsg+0x93c/0xe40 net/netlink/af_netlink.c:1910
 sock_sendmsg_nosec net/socket.c:728 [inline]
 sock_sendmsg+0xd9/0x180 net/socket.c:751
 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2538
 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2592
 __sys_sendmsg+0x117/0x1e0 net/socket.c:2621
 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:0x7efc6c01aa79
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 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:00007ffe62f66a78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007efc6c01aa79
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00007efc6c08d5f0 R08: 0000000000000006 R09: 0000000000000006
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (7120):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/22 01:27 net-next 7eb6deb3f556 6b415825 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/19 20:40 net-next 4025d3e73abd d216d8a0 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/16 16:33 net-next 950fe35831af 7773e940 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/22 06:57 linux-next 47d9bb711707 6b415825 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/20 23:03 linux-next 7271b2a53042 d216d8a0 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/09/14 13:34 upstream aed8aee11130 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in dev_index_reserve
2023/09/09 21:25 upstream 6099776f9f26 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in dev_index_reserve
2023/09/08 21:51 upstream a48fa7efaf11 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in dev_index_reserve
2023/09/23 02:03 upstream 8018e02a8703 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in dev_index_reserve
2023/09/25 20:42 bpf 81335f90e8a8 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING in dev_index_reserve
2023/09/16 11:40 net 615efed8b63f 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in dev_index_reserve
2023/09/09 23:54 net ac28b1ec6135 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING in dev_index_reserve
2023/10/10 08:26 net-next 8cea95b0bd79 c9be5398 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/09/30 10:32 net-next 7c7dd1d64910 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/09/29 18:28 net-next 7c7dd1d64910 d265efd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/09/25 13:14 net-next 5a1b322cb0b7 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/09/10 01:34 net-next 73be7fb14e83 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/09/09 09:02 bpf-next 9bc869253d4d 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in dev_index_reserve
2023/09/07 18:10 net-next bd6c11bc43c4 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/09/01 15:13 net-next bd6c11bc43c4 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/29 14:18 bpf-next 8be6f88b9d3f 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING in dev_index_reserve
2023/08/24 20:37 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 20:12 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 19:39 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 19:15 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 18:41 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 18:02 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 17:10 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 16:42 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 16:21 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 15:59 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 14:44 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 14:15 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 13:30 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 13:05 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 12:37 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 10:50 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 10:29 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 09:56 net-next 23c167af2404 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 08:36 net-next e3b3a87967ce 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 07:56 net-next e3b3a87967ce 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/24 07:14 net-next e3b3a87967ce 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/08/16 12:45 net-next 950fe35831af 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in dev_index_reserve
2023/09/03 04:36 linux-next a47fc304d2b6 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/09/26 10:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bf6547d8715b 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in dev_index_reserve
2023/08/25 05:11 linux-next 2b3bd393093b 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/25 03:54 linux-next 2b3bd393093b 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/25 03:06 linux-next 2b3bd393093b 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/25 02:23 linux-next 2b3bd393093b 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/25 01:28 linux-next 2b3bd393093b 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/25 00:19 linux-next 2b3bd393093b 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/24 23:14 linux-next 2b3bd393093b 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/24 22:07 linux-next 2b3bd393093b 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/24 21:02 linux-next 2b3bd393093b 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/24 17:31 linux-next 2b3bd393093b 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/24 15:37 linux-next 2b3bd393093b 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/24 15:09 linux-next 2b3bd393093b 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/24 11:52 linux-next 2b3bd393093b 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
2023/08/24 11:11 linux-next 2b3bd393093b 4d7ae7ab .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in dev_index_reserve
* Struck through repros no longer work on HEAD.