syzbot


BUG: soft lockup in sock_write_iter

Status: premoderation: reported on 2025/03/12 11:52
Reported-by: syzbot+57bf1fb2e968d3624032@syzkaller.appspotmail.com
First crash: 29d, last: 29d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 BUG: soft lockup in sock_write_iter 24 240d 375d 0/2 auto-obsoleted due to no activity on 2024/11/03 03:04
linux-5.15 INFO: rcu detected stall in sock_write_iter (4) origin:lts-only syz 1 25d 25d 0/3 upstream: reported syz repro on 2025/03/16 07:14
linux-5.15 INFO: rcu detected stall in sock_write_iter (3) 1 169d 169d 0/3 auto-obsoleted due to no activity on 2025/01/31 00:48
upstream INFO: rcu detected stall in sock_write_iter (3) net C done 148 21h50m 338d 0/28 upstream: reported C repro on 2024/05/07 12:14
linux-5.15 INFO: rcu detected stall in sock_write_iter 1 538d 538d 0/3 auto-obsoleted due to no activity on 2024/01/28 05:21
linux-5.15 INFO: rcu detected stall in sock_write_iter (2) 1 356d 356d 0/3 auto-obsoleted due to no activity on 2024/07/28 08:46
linux-6.1 INFO: rcu detected stall in sock_write_iter 1 371d 371d 0/3 auto-obsoleted due to no activity on 2024/07/13 13:13
upstream INFO: rcu detected stall in sock_write_iter (2) netfilter 1 523d 523d 0/28 auto-obsoleted due to no activity on 2024/01/03 00:51

Sample crash report:
watchdog: BUG: soft lockup - CPU#1 stuck for 123s! [syz-executor:272]
Modules linked in:
CPU: 1 PID: 272 Comm: syz-executor Tainted: G        W         5.10.234-syzkaller-00023-g3f5f2283d684 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline]
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline]
RIP: 0010:kvm_wait+0xfc/0x150 arch/x86/kernel/kvm.c:926
Code: 38 f0 75 26 41 f7 c7 00 02 00 00 75 0f 0f 1f 44 00 00 0f 00 2d a5 53 d5 03 f4 eb 0e 0f 1f 44 00 00 0f 00 2d 96 53 d5 03 fb f4 <4c> 89 7c 24 18 ff 74 24 18 9d 48 c7 44 24 20 0e 36 e0 45 49 c7 04
RSP: 0018:ffffc90000c17760 EFLAGS: 00000246
RAX: 0000000000000003 RBX: 1ffff92000182ef0 RCX: ffffffff8150ca64
RDX: 0000000000000001 RSI: 0000000000000003 RDI: ffffc90000c177a0
RBP: ffffc90000c17810 R08: dffffc0000000000 R09: ffffed1020e7ec42
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff8881073f6208 R14: 0000000000000003 R15: 0000000000000246
FS:  0000555578672500(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055558db324a8 CR3: 000000010a639000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000400000000300 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
 <IRQ>
 </IRQ>
 pv_wait arch/x86/include/asm/paravirt.h:564 [inline]
 pv_wait_head_or_lock kernel/locking/qspinlock_paravirt.h:470 [inline]
 __pv_queued_spin_lock_slowpath+0x72f/0xc70 kernel/locking/qspinlock.c:508
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:554 [inline]
 queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
 queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
 do_raw_spin_lock include/linux/spinlock.h:183 [inline]
 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline]
 _raw_spin_lock_bh+0x139/0x1b0 kernel/locking/spinlock.c:175
 spin_lock_bh include/linux/spinlock.h:359 [inline]
 lock_sock_nested+0x92/0x300 net/core/sock.c:3117
 lock_sock include/net/sock.h:1648 [inline]
 tcp_sendmsg+0x21/0x50 net/ipv4/tcp.c:1451
 inet_sendmsg+0xa1/0xc0 net/ipv4/af_inet.c:830
 sock_sendmsg_nosec net/socket.c:652 [inline]
 __sock_sendmsg net/socket.c:664 [inline]
 sock_write_iter+0x39b/0x530 net/socket.c:1018
 call_write_iter include/linux/fs.h:2058 [inline]
 new_sync_write fs/read_write.c:518 [inline]
 vfs_write+0xb4c/0xe70 fs/read_write.c:605
 ksys_write+0x199/0x2c0 fs/read_write.c:658
 __do_sys_write fs/read_write.c:670 [inline]
 __se_sys_write fs/read_write.c:667 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:667
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f8ac3916be0
Code: 40 00 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 80 3d 61 19 1f 00 00 74 17 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 48 89
RSP: 002b:00007ffe4fb4fa48 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000004a076a800 RCX: 00007f8ac3916be0
RDX: 0000000000000348 RSI: 00007f8ac098acb8 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000007 R09: 00000000003ffde8
R10: 3ca79ef1e24a01b0 R11: 0000000000000202 R12: 0000000000000348
R13: 00005555786864c0 R14: 00007ffe4fb4ff50 R15: 00007f8ac098acb8
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 23993 Comm: syz.6.6774 Tainted: G        W         5.10.234-syzkaller-00023-g3f5f2283d684 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:check_region_inline mm/kasan/generic.c:175 [inline]
RIP: 0010:kasan_check_range+0x24/0x2a0 mm/kasan/generic.c:189
Code: cc cc cc cc cc cc 55 48 89 e5 41 57 41 56 41 55 41 54 53 b0 01 48 85 f6 0f 84 a4 01 00 00 48 89 fb 48 01 f3 0f 82 67 02 00 00 <48> 89 fb 48 c1 eb 2f 81 fb ff ff 01 00 0f 82 54 02 00 00 49 89 fc
RSP: 0018:ffffc90000005978 EFLAGS: 00000086
RAX: 0000000000000001 RBX: ffff8881f7049944 RCX: ffffffff84b36cb8
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffff8881f7049940
RBP: ffffc900000059a0 R08: ffffffff815aff26 R09: ffffc90000005620
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff8881f7049940 R14: 1ffff92000000b3c R15: ffffc900000059e0
FS:  00007f93add3d6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f740ca0133a CR3: 0000000110e95000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37
 instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
 atomic_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:705 [inline]
 queued_spin_lock include/asm-generic/qspinlock.h:82 [inline]
 do_raw_spin_lock include/linux/spinlock.h:183 [inline]
 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:129 [inline]
 _raw_spin_lock_irq+0x98/0x1b0 kernel/locking/spinlock.c:167
 __run_hrtimer kernel/time/hrtimer.c:1589 [inline]
 __hrtimer_run_queues+0x3ec/0xa50 kernel/time/hrtimer.c:1649
 hrtimer_interrupt+0x39a/0x8b0 kernel/time/hrtimer.c:1711
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline]
 __sysvec_apic_timer_interrupt+0xfb/0x3f0 arch/x86/kernel/apic/apic.c:1112
 run_sysvec_on_irqstack_cond arch/x86/include/asm/irq_stack.h:91 [inline]
 sysvec_apic_timer_interrupt+0xba/0xe0 arch/x86/kernel/apic/apic.c:1106
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635
RIP: 0010:bytes_is_nonzero mm/kasan/generic.c:85 [inline]
RIP: 0010:memory_is_nonzero mm/kasan/generic.c:102 [inline]
RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:128 [inline]
RIP: 0010:memory_is_poisoned mm/kasan/generic.c:159 [inline]
RIP: 0010:check_region_inline mm/kasan/generic.c:180 [inline]
RIP: 0010:kasan_check_range+0x82/0x2a0 mm/kasan/generic.c:189
Code: 00 00 00 00 fc ff df 4f 8d 34 1a 4d 89 f5 4d 29 cd 49 83 fd 10 7f 26 4d 85 ed 0f 84 44 01 00 00 49 f7 d2 4d 01 e2 41 80 39 00 <0f> 85 d2 01 00 00 49 ff c1 49 ff c2 75 ee e9 27 01 00 00 45 89 cf
RSP: 0018:ffffc90000005dc0 EFLAGS: 00000246
RAX: ffffffff83bf5801 RBX: 000000000001ffff RCX: ffffffff83bf590c
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff88814901f22c
RBP: ffffc90000005de8 R08: dffffc0000000000 R09: ffffed1029203e45
R10: ffffffffffffffff R11: dffffc0000000001 R12: 1ffff11029203e45
R13: 0000000000000001 R14: ffffed1029203e46 R15: 0000000000000246
 __kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31
 instrument_atomic_read include/linux/instrumented.h:71 [inline]
 atomic_read include/asm-generic/atomic-instrumented.h:27 [inline]
 refcount_read include/linux/refcount.h:147 [inline]
 skb_unref include/linux/skbuff.h:1078 [inline]
 consume_skb+0x3c/0x250 net/core/skbuff.c:847
 __dev_kfree_skb_any+0x159/0x180 net/core/dev.c:3134
 dev_consume_skb_any include/linux/netdevice.h:3911 [inline]
 napi_consume_skb+0x24a/0x490 net/core/skbuff.c:913
 free_old_xmit_skbs+0x119/0x290 drivers/net/virtio_net.c:1468
 start_xmit+0x117/0x14c0 drivers/net/virtio_net.c:1687
 __netdev_start_xmit include/linux/netdevice.h:4858 [inline]
 netdev_start_xmit include/linux/netdevice.h:4872 [inline]
 xmit_one net/core/dev.c:3607 [inline]
 dev_hard_start_xmit+0x228/0x620 net/core/dev.c:3623
 sch_direct_xmit+0x292/0x9b0 net/sched/sch_generic.c:336
 qdisc_restart net/sched/sch_generic.c:401 [inline]
 __qdisc_run+0xa85/0x1df0 net/sched/sch_generic.c:409
 qdisc_run+0x121/0x330 include/net/pkt_sched.h:127
 __dev_xmit_skb net/core/dev.c:3818 [inline]
 __dev_queue_xmit+0xcbe/0x28a0 net/core/dev.c:4174
 dev_queue_xmit+0x17/0x20 net/core/dev.c:4242
 neigh_hh_output include/net/neighbour.h:501 [inline]
 neigh_output include/net/neighbour.h:515 [inline]
 ip_finish_output2+0xb1d/0xfc0 net/ipv4/ip_output.c:237
 __ip_finish_output+0x409/0x740
 ip_finish_output+0x34/0x1e0 net/ipv4/ip_output.c:325
 NF_HOOK_COND include/linux/netfilter.h:288 [inline]
 ip_output+0x1d6/0x420 net/ipv4/ip_output.c:439
 dst_output include/net/dst.h:437 [inline]
 ip_local_out net/ipv4/ip_output.c:126 [inline]
 __ip_queue_xmit+0x10ca/0x1bd0 net/ipv4/ip_output.c:540
 ip_queue_xmit+0x4c/0x70 net/ipv4/ip_output.c:554
 __tcp_transmit_skb+0x1ddd/0x3850 net/ipv4/tcp_output.c:1403
 __tcp_send_ack+0x303/0x6d0 net/ipv4/tcp_output.c:4010
 tcp_send_ack+0x3b/0x60 net/ipv4/tcp_output.c:4016
 __tcp_ack_snd_check+0x3e3/0x940 net/ipv4/tcp_input.c:5529
 tcp_ack_snd_check net/ipv4/tcp_input.c:5575 [inline]
 tcp_rcv_established+0xa4e/0x1a90 net/ipv4/tcp_input.c:6000
 tcp_v4_do_rcv+0x3d7/0x7d0 net/ipv4/tcp_ipv4.c:1698
 tcp_v4_rcv+0x23a8/0x2930 net/ipv4/tcp_ipv4.c:2094
 ip_protocol_deliver_rcu+0x2f4/0x650 net/ipv4/ip_input.c:204
 ip_local_deliver_finish net/ipv4/ip_input.c:231 [inline]
 NF_HOOK include/linux/netfilter.h:299 [inline]
 ip_local_deliver+0x2c6/0x590 net/ipv4/ip_input.c:252
 dst_input include/net/dst.h:443 [inline]
 ip_sublist_rcv_finish net/ipv4/ip_input.c:557 [inline]
 ip_list_rcv_finish net/ipv4/ip_input.c:608 [inline]
 ip_sublist_rcv+0x7e2/0x990 net/ipv4/ip_input.c:616
 ip_list_rcv+0x422/0x470 net/ipv4/ip_input.c:651
 __netif_receive_skb_list_ptype net/core/dev.c:5444 [inline]
 __netif_receive_skb_list_core+0x6b1/0x890 net/core/dev.c:5492
 __netif_receive_skb_list net/core/dev.c:5544 [inline]
 netif_receive_skb_list_internal+0x967/0xcc0 net/core/dev.c:5654
 gro_normal_list net/core/dev.c:5808 [inline]
 gro_normal_one net/core/dev.c:5821 [inline]
 napi_gro_complete+0x347/0x4e0 net/core/dev.c:5859
 dev_gro_receive+0x17a7/0x1f70 net/core/dev.c:6081
 napi_gro_receive+0x2ab/0x8e0 net/core/dev.c:6196
 receive_buf+0x36c8/0x53d0 drivers/net/virtio_net.c:1157
 virtnet_receive drivers/net/virtio_net.c:1421 [inline]
 virtnet_poll+0x5df/0x1240 drivers/net/virtio_net.c:1530
 napi_poll net/core/dev.c:6873 [inline]
 net_rx_action+0x516/0x10d0 net/core/dev.c:6943
 __do_softirq+0x268/0x5bb kernel/softirq.c:309
 asm_call_irq_on_stack+0xf/0x20
 </IRQ>
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
 do_softirq_own_stack+0x60/0x80 arch/x86/kernel/irq_64.c:77
 invoke_softirq kernel/softirq.c:405 [inline]
 __irq_exit_rcu+0x128/0x150 kernel/softirq.c:435
 irq_exit_rcu+0x9/0x10 kernel/softirq.c:447
 sysvec_apic_timer_interrupt+0xbf/0xe0 arch/x86/kernel/apic/apic.c:1106
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635
RIP: 0010:native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline]
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline]
RIP: 0010:generic_exec_single+0x171/0x3b0 kernel/smp.c:296
Code: 24 40 42 80 3c 33 00 74 08 4c 89 e7 e8 78 84 48 00 48 8b 5c 24 40 fa 48 8b 7c 24 08 ff 54 24 10 48 89 5c 24 18 ff 74 24 18 9d <31> c0 e9 56 01 00 00 8b 1d 9a f6 83 05 89 df 44 89 e6 e8 88 e6 0a
RSP: 0018:ffffc900010a79e0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000246 RCX: 0000000000000002
RDX: ffffc90004d19000 RSI: 00000000000078e3 RDI: 0000000000000001
RBP: ffffc900010a7a90 R08: ffffffff8188df9f R09: ffffffff8170d4bb
R10: 0000000000000004 R11: ffff88810bbd2780 R12: ffffc900010a7a20
R13: ffffc900010a7ae8 R14: dffffc0000000000 R15: 1ffff92000214f40
 smp_call_function_single+0x23d/0x510 kernel/smp.c:514
 task_function_call kernel/events/core.c:116 [inline]
 perf_install_in_context+0x582/0x8a0 kernel/events/core.c:2963
 __do_sys_perf_event_open kernel/events/core.c:12258 [inline]
 __se_sys_perf_event_open+0x2cee/0x3c30 kernel/events/core.c:11850
 __x64_sys_perf_event_open+0xbf/0xd0 kernel/events/core.c:11850
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f93af6d3169
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f93add3d038 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 00007f93af8ebfa0 RCX: 00007f93af6d3169
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000400000000180
RBP: 00007f93af7542a0 R08: 0000000000000008 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f93af8ebfa0 R15: 00007ffc2e49da08

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/12 11:51 android13-5.10-lts 3f5f2283d684 ee70e6db .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10-perf BUG: soft lockup in sock_write_iter
* Struck through repros no longer work on HEAD.