syzbot


WARNING: refcount bug in vti6_dev_uninit

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: 0d7a7b2014b1 ipv6: remove extra dev_hold() for fallback tunnels
First crash: 549d, last: 544d

Sample crash report:
netlink: 4 bytes leftover after parsing attributes in process `syz-executor830'.
netlink: 16 bytes leftover after parsing attributes in process `syz-executor830'.
------------[ cut here ]------------
refcount_t: decrement hit 0; leaking memory.
WARNING: CPU: 1 PID: 8382 at lib/refcount.c:31 refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31
Modules linked in:
CPU: 1 PID: 8382 Comm: syz-executor830 Not tainted 5.12.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31
Code: 1d 6a 5a e8 09 31 ff 89 de e8 8d 1a ab fd 84 db 75 e0 e8 d4 13 ab fd 48 c7 c7 a0 e1 c1 89 c6 05 4a 5a e8 09 01 e8 2e 36 fb 04 <0f> 0b eb c4 e8 b8 13 ab fd 0f b6 1d 39 5a e8 09 31 ff 89 de e8 58
RSP: 0018:ffffc90000f1ef28 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888020010000 RSI: ffffffff815c51f5 RDI: fffff520001e3dd7
RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff815bdf8e R11: 0000000000000000 R12: ffff88802b784568
R13: ffff888022a80800 R14: 00000000ffffffff R15: ffffffff8d659b80
FS:  0000000000ce5300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000180 CR3: 00000000251f9000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __refcount_dec include/linux/refcount.h:344 [inline]
 refcount_dec include/linux/refcount.h:359 [inline]
 dev_put include/linux/netdevice.h:4135 [inline]
 vti6_dev_uninit+0x31a/0x360 net/ipv6/ip6_vti.c:297
 register_netdevice+0xadf/0x1500 net/core/dev.c:10308
 vti6_tnl_create2+0x1b5/0x400 net/ipv6/ip6_vti.c:190
 vti6_newlink+0x9d/0xd0 net/ipv6/ip6_vti.c:1020
 __rtnl_newlink+0x1062/0x1710 net/core/rtnetlink.c:3443
 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3491
 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502
 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+0x331/0x810 net/socket.c:2350
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404
 __sys_sendmmsg+0x195/0x470 net/socket.c:2490
 __do_sys_sendmmsg net/socket.c:2519 [inline]
 __se_sys_sendmmsg net/socket.c:2516 [inline]
 __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2516
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43f2a9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdd7b3a568 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043f2a9
RDX: 04000000000001f2 RSI: 0000000020000000 RDI: 0000000000000004
RBP: 0000000000403290 R08: 0000000000400488 R09: 0000000000400488
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000403320
R13: 0000000000000000 R14: 00000000004ad018 R15: 0000000000400488

Crashes (26):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-net-kasan-gce 2021/03/27 13:53 net-next a1281601f88e a8529b82 .config log report syz C WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/31 21:39 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/31 16:17 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/31 10:58 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/31 10:38 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/31 06:11 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/31 04:15 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/30 18:40 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/30 15:02 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/30 08:19 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/30 08:03 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/29 21:26 net-next 37f368d8d09d 6a81331a .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/29 17:55 net-next 72642f4127c3 a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/29 08:51 net-next 72642f4127c3 a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/29 06:05 net-next 72642f4127c3 a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/29 04:10 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/29 04:02 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/28 16:45 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/28 12:16 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/28 11:48 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/28 09:38 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/28 07:37 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/28 06:54 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/28 05:40 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/28 04:15 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
ci-upstream-net-kasan-gce 2021/03/27 06:59 net-next a1281601f88e a8529b82 .config log report info WARNING: refcount bug in vti6_dev_uninit
* Struck through repros no longer work on HEAD.