syzbot


KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit

Status: fixed on 2023/02/24 13:50
Subsystems: net
[Documentation on labels]
Fix commit: cb34b7cf17ec ipv6/sit: use DEV_STATS_INC() to avoid data-races
First crash: 1878d, last: 731d

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

read-write to 0xffff8881467b7158 of 8 bytes by task 15381 on cpu 0:
 sit_tunnel_xmit+0x1be/0x1410
 __netdev_start_xmit include/linux/netdevice.h:4840 [inline]
 netdev_start_xmit include/linux/netdevice.h:4854 [inline]
 xmit_one+0xc0/0x2a0 net/core/dev.c:3590
 dev_hard_start_xmit+0x72/0x120 net/core/dev.c:3606
 __dev_queue_xmit+0x91c/0x11c0 net/core/dev.c:4256
 dev_queue_xmit include/linux/netdevice.h:3008 [inline]
 neigh_connected_output+0x25c/0x2d0 net/core/neighbour.c:1600
 neigh_output include/net/neighbour.h:546 [inline]
 ip6_finish_output2+0xa12/0xc30 net/ipv6/ip6_output.c:134
 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline]
 ip6_finish_output+0x395/0x4f0 net/ipv6/ip6_output.c:206
 NF_HOOK_COND include/linux/netfilter.h:291 [inline]
 ip6_output+0x10e/0x210 net/ipv6/ip6_output.c:227
 dst_output include/net/dst.h:445 [inline]
 ip6_local_out+0x60/0x80 net/ipv6/output_core.c:161
 ip6_send_skb+0x43/0xf0 net/ipv6/ip6_output.c:1971
 udp_v6_send_skb+0x7ab/0xc00 net/ipv6/udp.c:1286
 udpv6_sendmsg+0x1297/0x14a0 net/ipv6/udp.c:1578
 inet6_sendmsg+0x5f/0x80 net/ipv6/af_inet6.c:665
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg net/socket.c:734 [inline]
 ____sys_sendmsg+0x38f/0x500 net/socket.c:2482
 ___sys_sendmsg net/socket.c:2536 [inline]
 __sys_sendmmsg+0x27c/0x4a0 net/socket.c:2622
 __do_sys_sendmmsg net/socket.c:2651 [inline]
 __se_sys_sendmmsg net/socket.c:2648 [inline]
 __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2648
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read-write to 0xffff8881467b7158 of 8 bytes by task 15365 on cpu 1:
 sit_tunnel_xmit+0x1be/0x1410
 __netdev_start_xmit include/linux/netdevice.h:4840 [inline]
 netdev_start_xmit include/linux/netdevice.h:4854 [inline]
 xmit_one+0xc0/0x2a0 net/core/dev.c:3590
 dev_hard_start_xmit+0x72/0x120 net/core/dev.c:3606
 __dev_queue_xmit+0x91c/0x11c0 net/core/dev.c:4256
 dev_queue_xmit include/linux/netdevice.h:3008 [inline]
 neigh_connected_output+0x25c/0x2d0 net/core/neighbour.c:1600
 neigh_output include/net/neighbour.h:546 [inline]
 ip6_finish_output2+0xa12/0xc30 net/ipv6/ip6_output.c:134
 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline]
 ip6_finish_output+0x395/0x4f0 net/ipv6/ip6_output.c:206
 NF_HOOK_COND include/linux/netfilter.h:291 [inline]
 ip6_output+0x10e/0x210 net/ipv6/ip6_output.c:227
 dst_output include/net/dst.h:445 [inline]
 ip6_local_out+0x60/0x80 net/ipv6/output_core.c:161
 ip6_send_skb+0x43/0xf0 net/ipv6/ip6_output.c:1971
 udp_v6_send_skb+0x7ab/0xc00 net/ipv6/udp.c:1286
 udpv6_sendmsg+0x1297/0x14a0 net/ipv6/udp.c:1578
 inet6_sendmsg+0x5f/0x80 net/ipv6/af_inet6.c:665
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg net/socket.c:734 [inline]
 ____sys_sendmsg+0x38f/0x500 net/socket.c:2482
 ___sys_sendmsg net/socket.c:2536 [inline]
 __sys_sendmmsg+0x27c/0x4a0 net/socket.c:2622
 __do_sys_sendmmsg net/socket.c:2651 [inline]
 __se_sys_sendmmsg net/socket.c:2648 [inline]
 __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2648
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000000000653 -> 0x0000000000000654

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 15365 Comm: syz-executor.0 Not tainted 6.1.0-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
==================================================================

Crashes (702):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/13 06:07 upstream 830b3c68c1fb 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/12/12 05:04 upstream 4cee37b3a4e6 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/12/11 04:50 upstream 296a7b7eb792 67be1ae7 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/12/10 22:56 upstream 3ecc37918c80 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/12/07 12:03 upstream 8ed710da2873 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/12/04 07:29 upstream c2bf05db6c78 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/12/02 06:54 upstream ef4d3ea40565 e080de16 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/12/01 13:30 upstream 04aa64375f48 4c2a66e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/30 17:57 upstream 01f856ae6d0c 4c2a66e8 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/30 04:35 upstream 01f856ae6d0c 579a3740 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/28 14:45 upstream b7b275e60bcd 247de55b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/26 17:23 upstream 644e9524388a f4470a7b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/25 09:02 upstream c3eb11fbb826 74a66371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/23 18:33 upstream eb7081409f94 52fdf57a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/22 18:43 upstream eb7081409f94 9da37ae8 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/21 05:44 upstream eb7081409f94 5bb70014 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/19 19:51 upstream fe24a97cf254 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/19 13:33 upstream ab290eaddc4c 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/18 06:14 upstream 84368d882b96 5bb70014 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/17 20:09 upstream 81ac25651a62 4ba8ab94 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/17 08:11 upstream cc675d22e422 3a127a31 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/17 04:34 upstream 59d0d52c30d4 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/16 14:44 upstream 81e7cfa3a9eb 3a127a31 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/15 01:51 upstream e01d50cbd6ee 97de9cfc .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/13 21:38 upstream af7a05689189 7ba4d859 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/12 11:33 upstream 8f2975c2bb4c f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/10 18:37 upstream 1767a722a708 3ead01ad .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/09 23:39 upstream f67dd6ce0723 bebca8b7 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/09 15:18 upstream f141df371335 bebca8b7 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/08 10:33 upstream 59f2f4b8a757 6feb842b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/07 20:15 upstream f0c4d9fc9cc9 a779b11a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/07 11:38 upstream f0c4d9fc9cc9 6d752409 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/07 04:29 upstream 089d1c31224e 6d752409 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/06 00:13 upstream b208b9fbbcba 6d752409 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/05 11:40 upstream 64c3dd0b98f5 6d752409 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/04 13:31 upstream ee6050c8af96 6d752409 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/03 12:18 upstream 8e5423e991e8 7a2ebf95 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/02 06:52 upstream f526d6a82242 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/01 18:17 upstream 5aaef24b5c6d a1d8560a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/11/01 00:12 upstream 30a0b95b1335 2a71366b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/10/30 11:15 upstream 882ad2a2a8ff 2a71366b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/10/29 03:16 upstream 576e61cea1e4 899d812a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2022/10/28 13:35 upstream 23758867219c 8168b69e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in sit_tunnel_xmit / sit_tunnel_xmit
2021/01/16 21:20 upstream 54c6247d06f1 65a7a854 .config console log report info ci2-upstream-kcsan-gce
2019/12/11 16:21 https://github.com/google/ktsan.git kcsan ef798c30ba4e 0d368675 .config console log report ci2-upstream-kcsan-gce
2019/10/23 03:17 https://github.com/google/ktsan.git kcsan 05f2236801fe d0686497 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.