syzbot


WARNING in ref_tracker_free

Status: fixed on 2022/03/08 16:11
Subsystems: net
[Documentation on labels]
Fix commit: 123e495ecc25 net: linkwatch: be more careful about dev->linkwatch_dev_tracker
First crash: 1096d, last: 1068d
Cause bisection: introduced by (bisect log) :
commit e4b8954074f6d0db01c8c97d338a67f9389c042f
Author: Eric Dumazet <edumazet@google.com>
Date: Tue Dec 7 01:30:37 2021 +0000

  netlink: add net device refcount tracker to struct ethnl_req_info

Crash: WARNING in ref_tracker_dir_exit (log)
Repro: syz .config
  

Sample crash report:
 __do_sys_bind net/socket.c:1708 [inline]
 __se_sys_bind net/socket.c:1706 [inline]
 __x64_sys_bind+0x6f/0xb0 net/socket.c:1706
 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+0x44/0xae
freed in:
 netdev_tracker_free include/linux/netdevice.h:3867 [inline]
 dev_put_track include/linux/netdevice.h:3884 [inline]
 dev_put_track include/linux/netdevice.h:3880 [inline]
 packet_do_bind+0x52b/0xc70 net/packet/af_packet.c:3239
 packet_bind+0x152/0x1b0 net/packet/af_packet.c:3298
 __sys_bind+0x1e9/0x250 net/socket.c:1697
 __do_sys_bind net/socket.c:1708 [inline]
 __se_sys_bind net/socket.c:1706 [inline]
 __x64_sys_bind+0x6f/0xb0 net/socket.c:1706
 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+0x44/0xae
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3596 at lib/ref_tracker.c:120 spin_unlock_irqrestore include/linux/spinlock.h:404 [inline]
WARNING: CPU: 0 PID: 3596 at lib/ref_tracker.c:120 ref_tracker_free.cold+0x110/0x14e lib/ref_tracker.c:119
Modules linked in:
CPU: 0 PID: 3596 Comm: syz-executor405 Not tainted 5.16.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ref_tracker_free.cold+0x110/0x14e lib/ref_tracker.c:120
Code: ea 03 48 c1 e0 2a 0f b6 04 02 84 c0 74 04 3c 03 7e 4c 8b 7b 18 e8 b9 2d e9 fa e8 04 b8 62 f8 4c 89 ee 48 89 ef e8 b9 12 36 00 <0f> 0b 41 bd ea ff ff ff e9 0b 3a e9 fa 4c 89 f7 e8 c4 1d aa f8 e9
RSP: 0018:ffffc90001a8fb08 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff88801b7d6680 RCX: 0000000000000000
RDX: 0000000000000002 RSI: 0000000000000002 RDI: 0000000000000001
RBP: ffff888015cd85b8 R08: 0000000000000001 R09: ffffffff8ff9bac7
R10: 0000000000000001 R11: 0000000000000000 R12: 1ffff92000351f63
R13: 0000000000000292 R14: ffff88801b7d6698 R15: 00000000cc40013b
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff8f9201e08 CR3: 000000000b88e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 netdev_tracker_free include/linux/netdevice.h:3867 [inline]
 dev_put_track include/linux/netdevice.h:3884 [inline]
 dev_put_track include/linux/netdevice.h:3880 [inline]
 packet_release+0x382/0xd00 net/packet/af_packet.c:3113
 __sock_release+0xcd/0x280 net/socket.c:650
 sock_close+0x18/0x20 net/socket.c:1318
 __fput+0x286/0x9f0 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xc14/0x2b40 kernel/exit.c:832
 do_group_exit+0x125/0x310 kernel/exit.c:929
 __do_sys_exit_group kernel/exit.c:940 [inline]
 __se_sys_exit_group kernel/exit.c:938 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:938
 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+0x44/0xae
RIP: 0033:0x7ff8f91bdce9
Code: Unable to access opcode bytes at RIP 0x7ff8f91bdcbf.
RSP: 002b:00007ffee5436568 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007ff8f9231270 RCX: 00007ff8f91bdce9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff8f9231270
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
 </TASK>

Crashes (14831):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/01/07 17:05 net-next-old ca1a6705b271 2ca0d385 .config console log report syz C ci-upstream-net-kasan-gce WARNING in ref_tracker_free
2022/01/02 10:30 net-next-old e63a02348958 e1768e9c .config console log report syz C ci-upstream-net-kasan-gce WARNING in ref_tracker_free
2021/12/15 09:48 linux-next ea922272cbe5 f752fb53 .config console log report syz C ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/15 12:46 linux-next ea922272cbe5 f752fb53 .config console log report syz ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/15 12:34 linux-next ea922272cbe5 f752fb53 .config console log report syz ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/15 12:14 linux-next ea922272cbe5 f752fb53 .config console log report syz ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/15 01:41 linux-next ea922272cbe5 d018dd31 .config console log report syz ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/15 00:44 linux-next ea922272cbe5 d018dd31 .config console log report syz ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/15 00:20 linux-next ea922272cbe5 d018dd31 .config console log report syz ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/15 00:10 linux-next ea922272cbe5 d018dd31 .config console log report syz ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/14 23:58 linux-next ea922272cbe5 d018dd31 .config console log report syz ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/14 23:41 linux-next ea922272cbe5 d018dd31 .config console log report syz ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/14 23:30 linux-next ea922272cbe5 d018dd31 .config console log report syz ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/08 04:35 net-next-old ca1a6705b271 2ca0d385 .config console log report info ci-upstream-net-kasan-gce WARNING in ref_tracker_free
2022/01/10 08:01 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 07:44 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 06:42 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 05:48 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 04:28 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 04:15 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 03:09 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 02:44 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 01:32 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 01:28 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 00:27 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/10 00:22 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 23:21 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 22:20 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 22:02 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 20:56 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 20:15 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 19:15 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 18:55 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 17:55 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 17:47 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 16:47 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 16:36 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 15:36 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 14:32 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 14:28 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 13:28 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 12:50 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 11:49 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 11:17 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 10:02 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 09:57 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 08:38 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 08:23 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 07:20 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 06:57 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 05:56 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 04:59 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 03:50 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 03:05 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 01:52 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2022/01/09 00:03 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
2021/12/14 00:32 linux-next ea922272cbe5 5d14b1ea .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in ref_tracker_free
* Struck through repros no longer work on HEAD.