syzbot


KCSAN: data-race in __dev_change_flags / ip_route_output_key_hash_rcu

Status: auto-obsoleted due to no activity on 2023/05/23 08:19
Subsystems: net
[Documentation on labels]
First crash: 865d, last: 865d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __dev_change_flags / ip_route_output_key_hash_rcu (2) net 6 1 170d 170d 0/29 auto-obsoleted due to no activity on 2025/05/01 20:25

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __dev_change_flags / ip_route_output_key_hash_rcu

read to 0xffff88813888b0c0 of 4 bytes by interrupt on cpu 0:
 ip_route_output_key_hash_rcu+0x17e/0x1320 net/ipv4/route.c:2720
 ip_route_output_key_hash net/ipv4/route.c:2643 [inline]
 __ip_route_output_key include/net/route.h:137 [inline]
 ip_route_output_flow+0xa6/0x150 net/ipv4/route.c:2873
 ip_route_output_ports include/net/route.h:180 [inline]
 igmpv3_newpack+0x19e/0x640 net/ipv4/igmp.c:369
 add_grec+0x6d7/0xb70 net/ipv4/igmp.c:534
 igmpv3_send_cr net/ipv4/igmp.c:666 [inline]
 igmp_ifc_timer_expire+0xc1/0x900 net/ipv4/igmp.c:810
 call_timer_fn+0x35/0x290 kernel/time/timer.c:1700
 expire_timers kernel/time/timer.c:1751 [inline]
 __run_timers+0x46c/0x650 kernel/time/timer.c:2022
 run_timer_softirq+0x1d/0x40 kernel/time/timer.c:2035
 __do_softirq+0xc1/0x265 kernel/softirq.c:571
 invoke_softirq kernel/softirq.c:445 [inline]
 __irq_exit_rcu+0x57/0xa0 kernel/softirq.c:650
 sysvec_apic_timer_interrupt+0x6d/0x80 arch/x86/kernel/apic/apic.c:1107
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
 slab_pre_alloc_hook+0x3/0x180 mm/slab.h:725
 slab_alloc_node mm/slab.c:3241 [inline]
 slab_alloc mm/slab.c:3266 [inline]
 __kmem_cache_alloc_lru mm/slab.c:3443 [inline]
 kmem_cache_alloc+0x58/0x260 mm/slab.c:3452
 kmem_cache_zalloc include/linux/slab.h:710 [inline]
 __alloc_file+0x2e/0x150 fs/file_table.c:139
 alloc_empty_file+0xba/0x1a0 fs/file_table.c:188
 path_openat+0x64/0x1d00 fs/namei.c:3701
 do_filp_open+0xf6/0x200 fs/namei.c:3742
 do_sys_openat2+0xb5/0x2a0 fs/open.c:1348
 do_sys_open fs/open.c:1364 [inline]
 __do_sys_openat fs/open.c:1380 [inline]
 __se_sys_openat fs/open.c:1375 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1375
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read-write to 0xffff88813888b0c0 of 4 bytes by task 24918 on cpu 1:
 __dev_change_flags+0xa3/0x400 net/core/dev.c:8501
 dev_change_flags+0x59/0xd0 net/core/dev.c:8599
 do_setlink+0xa09/0x18c0 net/core/rtnetlink.c:2833
 rtnl_setlink+0x230/0x2d0 net/core/rtnetlink.c:3140
 rtnetlink_rcv_msg+0x807/0x8c0 net/core/rtnetlink.c:6174
 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2577
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6192
 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
 netlink_unicast+0x56f/0x640 net/netlink/af_netlink.c:1365
 netlink_sendmsg+0x665/0x770 net/netlink/af_netlink.c:1942
 sock_sendmsg_nosec net/socket.c:724 [inline]
 sock_sendmsg net/socket.c:747 [inline]
 sock_write_iter+0x1aa/0x230 net/socket.c:1138
 do_iter_write+0x418/0x700 fs/read_write.c:861
 vfs_writev+0x1a2/0x310 fs/read_write.c:934
 do_writev+0xf8/0x220 fs/read_write.c:977
 __do_sys_writev fs/read_write.c:1050 [inline]
 __se_sys_writev fs/read_write.c:1047 [inline]
 __x64_sys_writev+0x45/0x50 fs/read_write.c:1047
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 24918 Comm: syz-executor.0 Not tainted 6.3.0-rc6-syzkaller-00016-g0d3eb744aed4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/11 07:36 upstream 0d3eb744aed4 71147e29 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __dev_change_flags / ip_route_output_key_hash_rcu
* Struck through repros no longer work on HEAD.