syzbot


BUG: soft lockup in syscall_exit_to_user_mode (2)

Status: premoderation: reported on 2024/11/21 23:23
Reported-by: syzbot+775aed34755a4b91427a@syzkaller.appspotmail.com
First crash: 1d13h, last: 1d13h
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 BUG: soft lockup in syscall_exit_to_user_mode origin:lts C 16 104d 183d 0/2 auto-obsoleted due to no activity on 2024/11/18 18:22
upstream INFO: rcu detected stall in syscall_exit_to_user_mode cgroups mm 78 1002d 1183d 20/28 fixed on 2022/03/08 16:11
linux-6.1 INFO: rcu detected stall in syscall_exit_to_user_mode origin:upstream missing-backport C 90 3h38m 596d 0/3 upstream: reported C repro on 2023/04/07 08:31
upstream INFO: rcu detected stall in syscall_exit_to_user_mode (2) usb C inconclusive 582 18h49m 718d 0/28 upstream: reported C repro on 2022/12/05 19:46
linux-5.15 INFO: rcu detected stall in syscall_exit_to_user_mode origin:upstream missing-backport C 548 8h51m 454d 0/3 upstream: reported C repro on 2023/08/26 22:23

Sample crash report:
watchdog: BUG: soft lockup - CPU#1 stuck for 225s! [syz.1.949:6213]
Modules linked in:
CPU: 1 PID: 6213 Comm: syz.1.949 Tainted: G        W         5.15.167-syzkaller-00348-g2e66050fb753 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
RIP: 0010:arch_stack_walk+0xf8/0x140 arch/x86/kernel/stacktrace.c:27
Code: ff ff 4c 89 e6 4c 89 fa e8 05 9d 05 00 83 bd 70 ff ff ff 00 74 32 48 8d 9d 70 ff ff ff 48 89 df e8 1d 8d 05 00 48 85 c0 74 1e <4c> 89 f7 48 89 c6 41 ff d5 84 c0 74 11 48 89 df e8 33 8e 05 00 83
RSP: 0018:ffffc900001d0300 EFLAGS: 00000282
RAX: ffffffff8143156e RBX: ffffc900001d0300 RCX: 00000000001d0301
RDX: 1ffff9200003a062 RSI: ffffc900001d0f30 RDI: ffffffff8143156e
RBP: ffffc900001d0390 R08: ffffc900001d03e8 R09: 000000000000000a
R10: ffffc900001d03f0 R11: dffffc0000000001 R12: ffff88810f83e2c0
R13: ffffffff815f77d0 R14: ffffc900001d03e0 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000000 CR3: 000000012e83a000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
 <IRQ>
 stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:433 [inline]
 __kasan_slab_alloc+0xb1/0xe0 mm/kasan/common.c:466
 kasan_slab_alloc include/linux/kasan.h:217 [inline]
 slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550
 kmem_cache_alloc_bulk+0x29e/0x360 mm/slub.c:3734
 napi_skb_cache_get+0x11f/0x1f0 net/core/skbuff.c:179
 __alloc_skb+0xd5/0x550 net/core/skbuff.c:414
 __napi_alloc_skb+0x167/0x2e0 net/core/skbuff.c:569
 napi_alloc_skb include/linux/skbuff.h:3079 [inline]
 page_to_skb+0x2a5/0xb40 drivers/net/virtio_net.c:454
 receive_mergeable drivers/net/virtio_net.c:1070 [inline]
 receive_buf+0xed9/0x5860 drivers/net/virtio_net.c:1180
 virtnet_receive drivers/net/virtio_net.c:1472 [inline]
 virtnet_poll+0x615/0x1250 drivers/net/virtio_net.c:1585
 __napi_poll+0xc4/0x5a0 net/core/dev.c:7043
 napi_poll net/core/dev.c:7110 [inline]
 net_rx_action+0x47d/0xc50 net/core/dev.c:7200
 handle_softirqs+0x25e/0x5c0 kernel/softirq.c:565
 __do_softirq kernel/softirq.c:603 [inline]
 invoke_softirq kernel/softirq.c:425 [inline]
 __irq_exit_rcu+0x52/0xf0 kernel/softirq.c:652
 irq_exit_rcu+0x9/0x10 kernel/softirq.c:664
 sysvec_apic_timer_interrupt+0x9a/0xc0 arch/x86/kernel/apic/apic.c:1096
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:mnt_get_count+0x56/0x1e0 fs/namespace.c:186
Code: c4 48 c7 c0 e8 9b 29 87 48 c1 e8 03 49 bd 00 00 00 00 00 fc ff df 42 0f b6 04 28 84 c0 0f 85 5d 01 00 00 44 8b 3d 82 a1 66 05 <44> 89 e7 44 89 fe e8 6f 5e ad ff 45 39 fc 0f 83 22 01 00 00 48 83
RSP: 0018:ffffc90000af7730 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffff88810eabd880 RCX: ffff88810f83e2c0
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000000
RBP: ffffc90000af7770 R08: ffffffff828659eb R09: 0000000000000003
R10: fffff5200015eee0 R11: dffffc0000000001 R12: 0000000000000000
R13: dffffc0000000000 R14: ffffc90000af77e0 R15: 0000000000000002
 mntput_no_expire+0x160/0x6b0 fs/namespace.c:1191
 mntput fs/namespace.c:1239 [inline]
 namespace_unlock+0x42e/0x4d0 fs/namespace.c:1458
 drop_collected_mounts fs/namespace.c:1941 [inline]
 put_mnt_ns+0xa6/0xe0 fs/namespace.c:4404
 free_nsproxy+0x4e/0x260 kernel/nsproxy.c:191
 put_nsproxy include/linux/nsproxy.h:105 [inline]
 switch_task_namespaces kernel/nsproxy.c:249 [inline]
 exit_task_namespaces+0xb9/0xe0 kernel/nsproxy.c:254
 do_exit+0xc43/0x2ca0 kernel/exit.c:879
 do_group_exit+0x141/0x310 kernel/exit.c:1002
 get_signal+0x7a3/0x1630 kernel/signal.c:2904
 arch_do_signal_or_restart+0xbd/0x1680 arch/x86/kernel/signal.c:867
 handle_signal_work kernel/entry/common.c:154 [inline]
 exit_to_user_mode_loop+0xa0/0xe0 kernel/entry/common.c:178
 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x26/0x160 kernel/entry/common.c:307
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f031310d819
Code: Unable to access opcode bytes at RIP 0x7f031310d7ef.
RSP: 002b:00007f03117860e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000000 RBX: 00007f03132c4fa8 RCX: 00007f031310d819
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f03132c4fac
RBP: 00007f03132c4fa0 R08: 00007ffd0f7900b0 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 00007f03132c4fac
R13: 0000000000000000 R14: 00007ffd0f684b60 R15: 00007ffd0f684c48
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 6552 Comm: kworker/u4:2 Tainted: G        W         5.15.167-syzkaller-00348-g2e66050fb753 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:check_kcov_mode kernel/kcov.c:183 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x36/0x60 kernel/kcov.c:206
Code: 10 16 92 7e 65 8b 15 11 16 92 7e 81 e2 00 01 ff 00 74 11 81 fa 00 01 00 00 75 35 83 b9 5c 0b 00 00 00 74 2c 8b 91 38 0b 00 00 <83> fa 02 75 21 48 8b 91 40 0b 00 00 48 8b 32 48 8d 7e 01 8b 89 3c
RSP: 0018:ffffc90000b47830 EFLAGS: 00000246
RAX: ffffffff8165b55b RBX: 1ffff1103ee2784d RCX: ffff8881182c0000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90000b47830 R08: ffffffff8165b52a R09: ffffed103ee071d3
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000001
R13: ffff8881f713c268 R14: ffff8881f7038e80 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3fd798eff8 CR3: 0000000006a0f000 CR4: 00000000003506b0
DR0: 0010000010000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 csd_lock_wait kernel/smp.c:440 [inline]
 smp_call_function_many_cond+0x85b/0x9b0 kernel/smp.c:969
 on_each_cpu_cond_mask+0x40/0x80 kernel/smp.c:1135
 on_each_cpu include/linux/smp.h:71 [inline]
 text_poke_sync arch/x86/kernel/alternative.c:1207 [inline]
 text_poke_bp_batch+0x1db/0x720 arch/x86/kernel/alternative.c:1407
 text_poke_flush arch/x86/kernel/alternative.c:1598 [inline]
 text_poke_finish+0x1a/0x30 arch/x86/kernel/alternative.c:1605
 arch_jump_label_transform_apply+0x15/0x30 arch/x86/kernel/jump_label.c:146
 __jump_label_update+0x36a/0x380 kernel/jump_label.c:459
 jump_label_update+0x3af/0x450 kernel/jump_label.c:830
 static_key_enable_cpuslocked+0x12f/0x250 kernel/jump_label.c:177
 static_key_enable+0x1a/0x30 kernel/jump_label.c:190
 toggle_allocation_gate+0xbf/0x460 mm/kfence/core.c:729
 process_one_work+0x6bb/0xc10 kernel/workqueue.c:2325
 worker_thread+0xad5/0x12a0 kernel/workqueue.c:2472
 kthread+0x421/0x510 kernel/kthread.c:337
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
NMI backtrace for cpu 0
CPU: 0 PID: 6213 Comm: syz.1.949 Tainted: G        W    L    5.15.167-syzkaller-00348-g2e66050fb753 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
RIP: 0010:perf_misc_flags+0xf1/0x130 arch/x86/events/core.c:2976
Code: 3c 20 00 74 08 48 89 df e8 1c 7c b1 00 48 8b 33 45 31 ff 48 83 e6 03 41 0f 94 c7 31 ff e8 57 27 6f 00 bb 02 00 00 00 4c 29 fb <49> 81 c6 90 00 00 00 4c 89 f0 48 c1 e8 03 42 80 3c 20 00 74 08 4c
RSP: 0018:ffffc90000007490 EFLAGS: 00000002
RAX: 0000000000010100 RBX: 0000000000000001 RCX: ffff88810f83e2c0
RDX: 0000000000010100 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900000074b0 R08: ffffffff81013449 R09: ffffc90000007600
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: dffffc0000000000 R14: ffffc90000007c28 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6318a6b6e0 CR3: 000000010c4ff000 CR4: 00000000003506b0
DR0: 0010000010000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 perf_prepare_sample+0x142/0x1a80 kernel/events/core.c:7468
 __perf_event_output kernel/events/core.c:7648 [inline]
 perf_event_output_forward+0xdb/0x1b0 kernel/events/core.c:7668
 __perf_event_overflow+0x20b/0x390 kernel/events/core.c:9336
 perf_swevent_hrtimer+0x3fd/0x560 kernel/events/core.c:10732
 __run_hrtimer kernel/time/hrtimer.c:1687 [inline]
 __hrtimer_run_queues+0x41a/0xad0 kernel/time/hrtimer.c:1751
 hrtimer_interrupt+0x40c/0xaa0 kernel/time/hrtimer.c:1813
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1085 [inline]
 __sysvec_apic_timer_interrupt+0xfd/0x3c0 arch/x86/kernel/apic/apic.c:1102
 sysvec_apic_timer_interrupt+0x44/0xc0 arch/x86/kernel/apic/apic.c:1096
 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:can_stat_update+0x72f/0xd10 net/can/proc.c:142
Code: e8 86 17 f9 fc 4c 8b 65 c8 4c 8b 6d b8 eb 05 e8 77 17 f9 fc 48 8b 5d c0 48 b8 00 00 00 00 00 fc ff df 48 8b 4d a0 80 3c 01 00 <74> 08 48 89 df e8 47 70 3b fd 48 8b 1b 31 ff 48 89 de e8 8a 1b f9
RSP: 0018:ffffc90000007cd8 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: ffff8881191ab608 RCX: 1ffff110232356c1
RDX: 0000000000000100 RSI: 0000000000000000 RDI: 028f5c28f5c28f5c
RBP: ffffc90000007d50 R08: ffffffff84773eb9 R09: 0000000000000000
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8881191ab600
R13: 000000010002de6c R14: ffff8881150e2ee0 R15: 1ffff110232356c3
 call_timer_fn+0x3b/0x2d0 kernel/time/timer.c:1457
 expire_timers kernel/time/timer.c:1502 [inline]
 __run_timers+0x72a/0xa10 kernel/time/timer.c:1773
 run_timer_softirq+0x69/0xf0 kernel/time/timer.c:1786
 handle_softirqs+0x25e/0x5c0 kernel/softirq.c:565
 __do_softirq kernel/softirq.c:603 [inline]
 invoke_softirq kernel/softirq.c:425 [inline]
 __irq_exit_rcu+0x52/0xf0 kernel/softirq.c:652
 irq_exit_rcu+0x9/0x10 kernel/softirq.c:664
 sysvec_apic_timer_interrupt+0x9a/0xc0 arch/x86/kernel/apic/apic.c:1096
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:schedule_debug kernel/sched/core.c:5717 [inline]
RIP: 0010:__schedule+0x119/0x1590 kernel/sched/core.c:6402
Code: 33 49 8d 5e 20 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 66 6e cd fc 48 8b 1b 48 89 d8 48 c1 e8 03 42 80 3c 28 00 <74> 08 48 89 df e8 4d 6e cd fc 48 81 3b 9d 6e ac 57 0f 85 87 0f 00
RSP: 0018:ffffc90000af71c0 EFLAGS: 00000246
RAX: 1ffff9200015e000 RBX: ffffc90000af0000 RCX: 1ffff9200015ee44
RDX: 0000000000000000 RSI: ffffffff85a34040 RDI: ffffffff85a34000
RBP: ffffc90000af72b0 R08: dffffc0000000000 R09: ffffed1021f07c59
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000001
R13: dffffc0000000000 R14: ffff88810f83e2c0 R15: ffff8881f7000000
 preempt_schedule_irq+0xc7/0x140 kernel/sched/core.c:6916
 irqentry_exit_cond_resched+0x2a/0x30 kernel/entry/common.c:398
 irqentry_exit+0x30/0x40 kernel/entry/common.c:432
 sysvec_apic_timer_interrupt+0x55/0xc0 arch/x86/kernel/apic/apic.c:1096
 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:find_stack lib/stackdepot.c:207 [inline]
RIP: 0010:__stack_depot_save+0x167/0x470 lib/stackdepot.c:304
Code: de eb 03 44 89 ff 48 8b 05 3e 00 cf 04 44 89 f1 81 e1 ff 0f 00 00 48 89 45 b0 48 89 4d b8 4c 8b 24 c8 4c 89 cb 41 89 df eb 04 <4d> 8b 24 24 4d 85 e4 74 2d 45 39 74 24 08 75 f0 41 39 5c 24 0c 75
RSP: 0018:ffffc90000af7458 EFLAGS: 00000287
RAX: ffff88823fe40000 RBX: 0000000000000012 RCX: 000000000000060d
RDX: ffffc90000af7544 RSI: 0000000000000001 RDI: 0000000000000800
RBP: ffffc90000af74b0 R08: 0000000000000003 R09: 0000000000000012
R10: ffffc90000af7430 R11: dffffc0000000001 R12: ffff88812aaa9120
R13: ffffc90000af74c0 R14: 000000006d28d60d R15: 0000000000000012
 kasan_save_stack+0x4b/0x60 mm/kasan/common.c:39
 __kasan_record_aux_stack+0xd3/0xf0 mm/kasan/generic.c:348
 kasan_record_aux_stack+0xe/0x10 mm/kasan/generic.c:353
 task_work_add+0x27/0x1d0 kernel/task_work.c:38
 mntput_no_expire+0x3f8/0x6b0 fs/namespace.c:1222
 mntput fs/namespace.c:1239 [inline]
 namespace_unlock+0x42e/0x4d0 fs/namespace.c:1458
 drop_collected_mounts fs/namespace.c:1941 [inline]
 put_mnt_ns+0xa6/0xe0 fs/namespace.c:4404
 free_nsproxy+0x4e/0x260 kernel/nsproxy.c:191
 put_nsproxy include/linux/nsproxy.h:105 [inline]
 switch_task_namespaces kernel/nsproxy.c:249 [inline]
 exit_task_namespaces+0xb9/0xe0 kernel/nsproxy.c:254
 do_exit+0xc43/0x2ca0 kernel/exit.c:879
 do_group_exit+0x141/0x310 kernel/exit.c:1002
 get_signal+0x7a3/0x1630 kernel/signal.c:2904
 arch_do_signal_or_restart+0xbd/0x1680 arch/x86/kernel/signal.c:867
 handle_signal_work kernel/entry/common.c:154 [inline]
 exit_to_user_mode_loop+0xa0/0xe0 kernel/entry/common.c:178
 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x26/0x160 kernel/entry/common.c:307
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f031310d819
Code: Unable to access opcode bytes at RIP 0x7f031310d7ef.
RSP: 002b:00007f03117860e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000000 RBX: 00007f03132c4fa8 RCX: 00007f031310d819
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f03132c4fac
RBP: 00007f03132c4fa0 R08: 00007ffd0f7900b0 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 00007f03132c4fac
R13: 0000000000000000 R14: 00007ffd0f684b60 R15: 00007ffd0f684c48
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/21 23:22 android13-5.15-lts 2e66050fb753 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf BUG: soft lockup in syscall_exit_to_user_mode
* Struck through repros no longer work on HEAD.