[syzbot] INFO: trying to register non-static key in __timer_delete_sync

7 views
Skip to first unread message

syzbot

unread,
Dec 21, 2022, 3:54:46ā€ÆPM12/21/22
to k...@vger.kernel.org, linux-...@vger.kernel.org, pbon...@redhat.com, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: ca39c4daa6f7 Add linux-next specific files for 20221216
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1182429d880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9f0bce83c86de334
dashboard link: https://syzkaller.appspot.com/bug?extid=1e164be619b690a43d79
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3cbf8a8f223d/disk-ca39c4da.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f104cf6ddf80/vmlinux-ca39c4da.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6ba8b49536b5/bzImage-ca39c4da.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+1e164b...@syzkaller.appspotmail.com

INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 PID: 20857 Comm: syz-executor.5 Not tainted 6.1.0-next-20221216-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106
assign_lock_key kernel/locking/lockdep.c:981 [inline]
register_lock_class+0xf1b/0x1120 kernel/locking/lockdep.c:1294
__lock_acquire+0x109/0x56d0 kernel/locking/lockdep.c:4934
lock_acquire.part.0+0x11a/0x350 kernel/locking/lockdep.c:5668
__timer_delete_sync+0x5d/0x1c0 kernel/time/timer.c:1555
del_timer_sync include/linux/timer.h:200 [inline]
cleanup_srcu_struct kernel/rcu/srcutree.c:611 [inline]
cleanup_srcu_struct+0x112/0x3e0 kernel/rcu/srcutree.c:599
kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:1325 [inline]
kvm_put_kvm+0x884/0xb80 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1352
kvm_vm_release+0x43/0x50 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1375
__fput+0x27c/0xa90 fs/file_table.c:320
task_work_run+0x16f/0x270 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296
do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f1a7ae3df8b
Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44
RSP: 002b:00007fff9d5d14e0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007f1a7ae3df8b
RDX: 0000000000000000 RSI: 0000001b32320ef8 RDI: 0000000000000004
RBP: 00007f1a7afad980 R08: 0000000000000000 R09: 000000008acd30fc
R10: 0000000000000000 R11: 0000000000000293 R12: 000000000011376f
R13: 00007fff9d5d15e0 R14: 00007f1a7afac050 R15: 0000000000000032
</TASK>
------------[ cut here ]------------
WARNING: CPU: 1 PID: 20857 at kernel/workqueue.c:3066 __flush_work+0x90a/0xaf0 kernel/workqueue.c:3066
Modules linked in:
CPU: 1 PID: 20857 Comm: syz-executor.5 Not tainted 6.1.0-next-20221216-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__flush_work+0x90a/0xaf0 kernel/workqueue.c:3066
Code: 00 48 c7 c6 2f 7b 52 81 48 c7 c7 c0 28 79 8c e8 1c 7c 11 00 e9 ab fc ff ff e8 12 d7 2e 00 0f 0b e9 9f fc ff ff e8 06 d7 2e 00 <0f> 0b 45 31 ed e9 90 fc ff ff e8 77 e6 7c 00 e9 7a fb ff ff e8 ed
RSP: 0018:ffffc900038afb60 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffe8ffffcd0620 RCX: 0000000000000000
RDX: ffff888020d38000 RSI: ffffffff81527b6a RDI: 0000000000000001
RBP: ffffc900038afcf8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 3e4b5341542f3c20 R12: ffffc9000393b478
R13: 0000000000000001 R14: fffffbfff1ce6138 R15: ffffe8ffffcd0638
FS: 0000555555edb400(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200e9000 CR3: 00000000297ac000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
cleanup_srcu_struct kernel/rcu/srcutree.c:612 [inline]
cleanup_srcu_struct+0x11e/0x3e0 kernel/rcu/srcutree.c:599
kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:1325 [inline]
kvm_put_kvm+0x884/0xb80 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1352
kvm_vm_release+0x43/0x50 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1375
__fput+0x27c/0xa90 fs/file_table.c:320
task_work_run+0x16f/0x270 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296
do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f1a7ae3df8b
Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44
RSP: 002b:00007fff9d5d14e0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007f1a7ae3df8b
RDX: 0000000000000000 RSI: 0000001b32320ef8 RDI: 0000000000000004
RBP: 00007f1a7afad980 R08: 0000000000000000 R09: 000000008acd30fc
R10: 0000000000000000 R11: 0000000000000293 R12: 000000000011376f
R13: 00007fff9d5d15e0 R14: 00007f1a7afac050 R15: 0000000000000032
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Feb 12, 2023, 9:59:46ā€ÆPM2/12/23
to da...@davemloft.net, desh...@xen.org, edum...@google.com, j...@mojatatu.com, ji...@resnulli.us, ku...@kernel.org, k...@vger.kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, pbon...@redhat.com, syzkall...@googlegroups.com, xiyou.w...@gmail.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 75da437a2f17 Merge branch '40GbE' of git://git.kernel.org/..
git tree: net-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=179ffde0c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=6e5fc864153bbc8c
dashboard link: https://syzkaller.appspot.com/bug?extid=1e164be619b690a43d79
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12d2dfb7480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13a81a07480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1ee7fdbb5171/disk-75da437a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/74233a046cf5/vmlinux-75da437a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a59b1d7b14b0/bzImage-75da437a.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+1e164b...@syzkaller.appspotmail.com

INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 PID: 5075 Comm: syz-executor387 Not tainted 6.2.0-rc7-syzkaller-01590-g75da437a2f17 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106
assign_lock_key kernel/locking/lockdep.c:981 [inline]
register_lock_class+0xf1b/0x1120 kernel/locking/lockdep.c:1294
__lock_acquire+0x109/0x56d0 kernel/locking/lockdep.c:4934
lock_acquire kernel/locking/lockdep.c:5668 [inline]
lock_acquire+0x1e3/0x630 kernel/locking/lockdep.c:5633
__timer_delete_sync+0x5d/0x1c0 kernel/time/timer.c:1555
del_timer_sync include/linux/timer.h:200 [inline]
sfq_destroy+0x82/0x140 net/sched/sch_sfq.c:725
qdisc_create+0xaca/0x1150 net/sched/sch_api.c:1329
tc_modify_qdisc+0x488/0x19c0 net/sched/sch_api.c:1679
rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6174
netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574
netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1942
sock_sendmsg_nosec net/socket.c:722 [inline]
sock_sendmsg+0xde/0x190 net/socket.c:745
____sys_sendmsg+0x71c/0x900 net/socket.c:2501
___sys_sendmsg+0x110/0x1b0 net/socket.c:2555
__sys_sendmsg+0xf7/0x1c0 net/socket.c:2584
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fcf276b9e69
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:00007ffdba938b58 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcf276b9e69
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00007fcf2767e010 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 00007fcf2767e0a0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
------------[ cut here ]------------
ODEBUG: assert_init not available (active state 0) object: ffff88802ba73540 object type: timer_list hint: 0x0
WARNING: CPU: 0 PID: 5075 at lib/debugobjects.c:509 debug_print_object+0x194/0x2c0 lib/debugobjects.c:509
Modules linked in:
CPU: 0 PID: 5075 Comm: syz-executor387 Not tainted 6.2.0-rc7-syzkaller-01590-g75da437a2f17 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
RIP: 0010:debug_print_object+0x194/0x2c0 lib/debugobjects.c:509
Code: df 48 89 fe 48 c1 ee 03 80 3c 16 00 0f 85 c7 00 00 00 48 8b 14 dd a0 d1 a6 8a 50 4c 89 ee 48 c7 c7 60 c5 a6 8a e8 56 68 b4 05 <0f> 0b 58 83 05 ee 4c 64 0a 01 48 83 c4 20 5b 5d 41 5c 41 5d 41 5e
RSP: 0018:ffffc90003b5f210 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000000000
RDX: ffff888020570000 RSI: ffffffff8166195c RDI: fffff5200076be34
RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 203a47554245444f R12: ffffffff8a4ea980
R13: ffffffff8aa6cc00 R14: ffffc90003b5f2c8 R15: ffffffff816f9ff0
FS: 00005555573c4300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004585c0 CR3: 00000000299a3000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
debug_object_assert_init lib/debugobjects.c:899 [inline]
debug_object_assert_init+0x1f8/0x2e0 lib/debugobjects.c:870
debug_timer_assert_init kernel/time/timer.c:792 [inline]
debug_assert_init kernel/time/timer.c:837 [inline]
__try_to_del_timer_sync+0x72/0x160 kernel/time/timer.c:1412
__timer_delete_sync+0x144/0x1c0 kernel/time/timer.c:1573
del_timer_sync include/linux/timer.h:200 [inline]
sfq_destroy+0x82/0x140 net/sched/sch_sfq.c:725
qdisc_create+0xaca/0x1150 net/sched/sch_api.c:1329
tc_modify_qdisc+0x488/0x19c0 net/sched/sch_api.c:1679
rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6174
netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574
netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1942
sock_sendmsg_nosec net/socket.c:722 [inline]
sock_sendmsg+0xde/0x190 net/socket.c:745
____sys_sendmsg+0x71c/0x900 net/socket.c:2501
___sys_sendmsg+0x110/0x1b0 net/socket.c:2555
__sys_sendmsg+0xf7/0x1c0 net/socket.c:2584
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fcf276b9e69
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:00007ffdba938b58 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcf276b9e69
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00007fcf2767e010 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 00007fcf2767e0a0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>

Hillf Danton

unread,
Feb 13, 2023, 2:14:36ā€ÆAM2/13/23
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Sun, 12 Feb 2023 18:59:44 -0800
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 75da437a2f17 Merge branch '40GbE' of git://git.kernel.org/..
> git tree: net-next
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13a81a07480000

Check if queue is init-ed.

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git 75da437a2f17

--- x/net/sched/sch_sfq.c
+++ y/net/sched/sch_sfq.c
@@ -720,6 +720,8 @@ static void sfq_destroy(struct Qdisc *sc
{
struct sfq_sched_data *q = qdisc_priv(sch);

+ if (q->sch != sch)
+ return;
tcf_block_put(q->block);
q->perturb_period = 0;
del_timer_sync(&q->perturb_timer);
--

syzbot

unread,
Feb 13, 2023, 2:32:26ā€ÆAM2/13/23
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
unregister_netdevice: waiting for DEV to become free

unregister_netdevice: waiting for lo to become free. Usage count = 2
leaked reference.
__netdev_tracker_alloc include/linux/netdevice.h:4039 [inline]
netdev_hold include/linux/netdevice.h:4068 [inline]
ipv6_add_dev+0x43e/0x1320 net/ipv6/addrconf.c:401
addrconf_notify+0x61e/0x18c0 net/ipv6/addrconf.c:3552
notifier_call_chain+0xb5/0x200 kernel/notifier.c:87
call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1945
call_netdevice_notifiers_extack net/core/dev.c:1983 [inline]
call_netdevice_notifiers net/core/dev.c:1997 [inline]
register_netdevice+0xfb4/0x1640 net/core/dev.c:10084
register_netdev+0x31/0x50 net/core/dev.c:10179
loopback_net_init+0x7a/0x170 drivers/net/loopback.c:219
ops_init+0xb9/0x670 net/core/net_namespace.c:135
setup_net+0x793/0xe60 net/core/net_namespace.c:333
copy_net_ns+0x31b/0x6b0 net/core/net_namespace.c:483
create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0xc5/0x1f0 kernel/nsproxy.c:228
ksys_unshare+0x449/0x920 kernel/fork.c:3202
__do_sys_unshare kernel/fork.c:3273 [inline]
__se_sys_unshare kernel/fork.c:3271 [inline]
__x64_sys_unshare+0x31/0x40 kernel/fork.c:3271
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd


Tested on:

commit: 75da437a Merge branch '40GbE' of git://git.kernel.org/..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
console output: https://syzkaller.appspot.com/x/log.txt?x=16527cc7480000
kernel config: https://syzkaller.appspot.com/x/.config?x=6e5fc864153bbc8c
dashboard link: https://syzkaller.appspot.com/bug?extid=1e164be619b690a43d79
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=10692a4f480000

Eric Dumazet

unread,
Feb 13, 2023, 3:58:03ā€ÆAM2/13/23
to syzbot, da...@davemloft.net, desh...@xen.org, j...@mojatatu.com, ji...@resnulli.us, ku...@kernel.org, k...@vger.kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, pbon...@redhat.com, syzkall...@googlegroups.com, xiyou.w...@gmail.com
On Mon, Feb 13, 2023 at 3:59 AM syzbot
<syzbot+1e164b...@syzkaller.appspotmail.com> wrote:
>
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 75da437a2f17 Merge branch '40GbE' of git://git.kernel.org/..
> git tree: net-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=179ffde0c80000
> kernel config: https://syzkaller.appspot.com/x/.config?x=6e5fc864153bbc8c
> dashboard link: https://syzkaller.appspot.com/bug?extid=1e164be619b690a43d79
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12d2dfb7480000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13a81a07480000
>

Probably a dup

patch under review :
https://patchwork.kernel.org/project/netdevbpf/patch/20230210152605.1...@google.com/

#syz dup: BUG: unable to handle kernel paging request in atm_tc_destroy
Reply all
Reply to author
Forward
0 new messages