syzbot


KCSAN: data-race in handle_irq_event / kstat_irqs

Status: auto-closed as invalid on 2020/04/02 18:12
Subsystems: kernel
[Documentation on labels]
First crash: 1548d, last: 1548d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in handle_irq_event / kstat_irqs

read to 0xffff8881290b5c7c of 4 bytes by task 14345 on cpu 1:
 kstat_irqs+0x12b/0x160 kernel/irq/irqdesc.c:989
 kstat_irqs_usr+0x24/0x38 kernel/irq/irqdesc.c:1011
 show_all_irqs fs/proc/stat.c:101 [inline]
 show_stat+0x88f/0xa20 fs/proc/stat.c:194
 seq_read+0x350/0x9d0 fs/seq_file.c:229
 proc_reg_read+0xe9/0x140 fs/proc/inode.c:223
 do_loop_readv_writev fs/read_write.c:714 [inline]
 do_loop_readv_writev fs/read_write.c:701 [inline]
 do_iter_read+0x357/0x3d0 fs/read_write.c:935
 vfs_readv+0x9c/0xf0 fs/read_write.c:997
 do_preadv+0x131/0x1d0 fs/read_write.c:1089
 __do_sys_preadv fs/read_write.c:1139 [inline]
 __se_sys_preadv fs/read_write.c:1134 [inline]
 __x64_sys_preadv+0x61/0x80 fs/read_write.c:1134
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff8881290b5c7c of 4 bytes by interrupt on cpu 0:
 handle_irq_event+0x38/0xca kernel/irq/handle.c:202
 handle_edge_irq+0x1a4/0x4a0 kernel/irq/chip.c:830
 generic_handle_irq_desc include/linux/irqdesc.h:156 [inline]
 do_IRQ+0x7c/0x130 arch/x86/kernel/irq.c:250
 ret_from_intr+0x0/0x21
 check_kcov_mode kernel/kcov.c:153 [inline]
 __sanitizer_cov_trace_pc+0x20/0x50 kernel/kcov.c:187
 nf_conntrack_tcp_packet+0x38d/0x3390 net/netfilter/nf_conntrack_proto_tcp.c:867
 nf_conntrack_handle_packet net/netfilter/nf_conntrack_core.c:1630 [inline]
 nf_conntrack_in+0x410/0xa80 net/netfilter/nf_conntrack_core.c:1724
 ipv4_conntrack_local+0xbe/0x130 net/netfilter/nf_conntrack_proto.c:200
 nf_hook_entry_hookfn include/linux/netfilter.h:135 [inline]
 nf_hook_slow+0x83/0x160 net/netfilter/core.c:512
 nf_hook include/linux/netfilter.h:262 [inline]
 __ip_local_out+0x1f7/0x2b0 net/ipv4/ip_output.c:114
 ip_local_out+0x31/0x90 net/ipv4/ip_output.c:123
 __ip_queue_xmit+0x3a8/0xa40 net/ipv4/ip_output.c:532
 ip_queue_xmit+0x45/0x60 include/net/ip.h:237
 __tcp_transmit_skb+0xea3/0x1df0 net/ipv4/tcp_output.c:1170
 __tcp_send_ack+0x246/0x300 net/ipv4/tcp_output.c:3697
 tcp_send_ack+0x34/0x40 net/ipv4/tcp_output.c:3703
 tcp_cleanup_rbuf+0x130/0x360 net/ipv4/tcp.c:1578
 tcp_recvmsg+0x687/0x1c90 net/ipv4/tcp.c:2184
 inet_recvmsg+0xbb/0x250 net/ipv4/af_inet.c:838
 sock_recvmsg_nosec net/socket.c:873 [inline]
 sock_recvmsg net/socket.c:891 [inline]
 sock_recvmsg+0x92/0xb0 net/socket.c:887
 sock_read_iter+0x15f/0x1e0 net/socket.c:969
 call_read_iter include/linux/fs.h:1896 [inline]
 new_sync_read+0x4b1/0x4f0 fs/read_write.c:414
 __vfs_read+0xb1/0xc0 fs/read_write.c:427
 vfs_read fs/read_write.c:461 [inline]
 vfs_read+0x143/0x2c0 fs/read_write.c:446
 ksys_read+0x17b/0x1b0 fs/read_write.c:587
 __do_sys_read fs/read_write.c:597 [inline]
 __se_sys_read fs/read_write.c:595 [inline]
 __x64_sys_read+0x4c/0x60 fs/read_write.c:595
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 7982 Comm: syz-fuzzer Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/23 18:03 https://github.com/google/ktsan.git kcsan 245a43005292 11ebf937 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.