syzbot


KCSAN: data-race in __tpacket_v3_has_room / prb_retire_current_block

Status: auto-closed as invalid on 2020/05/23 01:53
Subsystems: net
[Documentation on labels]
First crash: 1505d, last: 1505d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __tpacket_v3_has_room / prb_retire_current_block

write to 0xffff88809c458008 of 4 bytes by interrupt on cpu 0:
 prb_flush_block net/packet/af_packet.c:732 [inline]
 prb_close_block net/packet/af_packet.c:788 [inline]
 prb_retire_current_block+0x190/0x2f0 net/packet/af_packet.c:929
 prb_retire_rx_blk_timer_expired+0x26e/0x290 net/packet/af_packet.c:674
 call_timer_fn+0x58/0x2e0 kernel/time/timer.c:1405
 expire_timers kernel/time/timer.c:1450 [inline]
 __run_timers kernel/time/timer.c:1774 [inline]
 __run_timers kernel/time/timer.c:1741 [inline]
 run_timer_softirq+0xb14/0xbd0 kernel/time/timer.c:1787
 __do_softirq+0x118/0x34a kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:373 [inline]
 irq_exit+0xb5/0xd0 kernel/softirq.c:413
 exiting_irq arch/x86/include/asm/apic.h:546 [inline]
 smp_apic_timer_interrupt+0xe2/0x270 arch/x86/kernel/apic/apic.c:1146
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829
 arch_local_irq_restore arch/x86/include/asm/paravirt.h:752 [inline]
 kcsan_setup_watchpoint+0x242/0x420 kernel/kcsan/core.c:521
 PageAnon include/linux/page-flags.h:464 [inline]
 mm_counter include/linux/mm.h:1665 [inline]
 zap_pte_range mm/memory.c:1079 [inline]
 zap_pmd_range mm/memory.c:1184 [inline]
 zap_pud_range mm/memory.c:1213 [inline]
 zap_p4d_range mm/memory.c:1234 [inline]
 unmap_page_range+0xabe/0x1a60 mm/memory.c:1255
 unmap_single_vma+0x13c/0x1f0 mm/memory.c:1300
 unmap_vmas+0xe2/0x1b0 mm/memory.c:1332
 exit_mmap+0x13e/0x2f0 mm/mmap.c:3130
 __mmput kernel/fork.c:1088 [inline]
 mmput+0xe2/0x260 kernel/fork.c:1109
 exit_mm kernel/exit.c:485 [inline]
 do_exit+0x640/0x1880 kernel/exit.c:788
 do_group_exit+0xae/0x1a0 kernel/exit.c:899
 get_signal+0x2a7/0x1290 kernel/signal.c:2734
 do_signal+0x2b/0x670 arch/x86/kernel/signal.c:813
 exit_to_usermode_loop+0x24a/0x2c0 arch/x86/entry/common.c:160
 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:278 [inline]
 do_syscall_64+0x36e/0x390 arch/x86/entry/common.c:304
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88809c458008 of 4 bytes by task 98 on cpu 1:
 prb_lookup_block net/packet/af_packet.c:1095 [inline]
 __tpacket_v3_has_room+0xe6/0x130 net/packet/af_packet.c:1226
 __packet_rcv_has_room net/packet/af_packet.c:1251 [inline]
 __packet_rcv_has_room+0x1ad/0x1c0 net/packet/af_packet.c:1229
 tpacket_rcv+0x26e/0x17c0 net/packet/af_packet.c:2210
 dev_queue_xmit_nit+0x5ea/0x600 net/core/dev.c:2271
 xmit_one net/core/dev.c:3466 [inline]
 dev_hard_start_xmit+0x3ed/0x420 net/core/dev.c:3486
 __dev_queue_xmit+0x14c4/0x1b80 net/core/dev.c:4063
 dev_queue_xmit+0x1e/0x30 net/core/dev.c:4096
 neigh_hh_output include/net/neighbour.h:499 [inline]
 neigh_output include/net/neighbour.h:508 [inline]
 ip_finish_output2+0x87d/0xed0 net/ipv4/ip_output.c:228
 __ip_finish_output net/ipv4/ip_output.c:306 [inline]
 __ip_finish_output+0x22f/0x460 net/ipv4/ip_output.c:288
 ip_finish_output+0x3e/0x160 net/ipv4/ip_output.c:316
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip_output+0xf2/0x240 net/ipv4/ip_output.c:430
 dst_output include/net/dst.h:436 [inline]
 ip_local_out+0x70/0x90 net/ipv4/ip_output.c:125
 __ip_queue_xmit+0x3a6/0xa40 net/ipv4/ip_output.c:530
 ip_queue_xmit+0x3e/0x50 include/net/ip.h:237
 __tcp_transmit_skb+0xe1f/0x1c90 net/ipv4/tcp_output.c:1234
 tcp_transmit_skb net/ipv4/tcp_output.c:1250 [inline]
 tcp_connect+0x1b80/0x2210 net/ipv4/tcp_output.c:3657
 tcp_v4_connect+0xad6/0xc80 net/ipv4/tcp_ipv4.c:311
 __inet_stream_connect+0x1bc/0x830 net/ipv4/af_inet.c:655
 inet_stream_connect+0x4e/0x80 net/ipv4/af_inet.c:719
 rds_tcp_conn_path_connect+0x2e1/0x5d0 net/rds/tcp_connect.c:172
 rds_connect_worker+0x10b/0x1a0 net/rds/threads.c:176
 process_one_work+0x424/0x930 kernel/workqueue.c:2264
 worker_thread+0x9a/0x7e0 kernel/workqueue.c:2410
 kthread+0x1cb/0x1f0 kernel/kthread.c:255
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 98 Comm: kworker/u4:2 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: krdsd rds_connect_worker
==================================================================

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