syzbot


KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb (4)

Status: auto-closed as invalid on 2022/07/12 12:23
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 269d, last: 182d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb 6 635d 718d 0/24 auto-closed as invalid on 2021/04/15 10:49
upstream KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb (2) 3 353d 383d 0/24 auto-closed as invalid on 2022/01/22 10:01
upstream KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb (3) 2 308d 312d 0/24 auto-closed as invalid on 2022/03/07 16:56

Sample crash report:
netdevsim netdevsim0 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0
==================================================================
BUG: KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb

read-write to 0xffffe8ffffc306d0 of 8 bytes by task 1852 on cpu 0:
 iptunnel_xmit_stats include/net/ip_tunnels.h:460 [inline]
 ip6tunnel_xmit include/net/ip6_tunnel.h:166 [inline]
 udp_tunnel6_xmit_skb+0x39e/0x470 net/ipv6/ip6_udp_tunnel.c:109
 send6+0x2ed/0x3b0 drivers/net/wireguard/socket.c:152
 wg_socket_send_skb_to_peer+0xbb/0x120 drivers/net/wireguard/socket.c:178
 wg_socket_send_buffer_to_peer+0xd2/0xf0 drivers/net/wireguard/socket.c:200
 wg_packet_send_handshake_initiation drivers/net/wireguard/send.c:40 [inline]
 wg_packet_handshake_send_worker+0x109/0x150 drivers/net/wireguard/send.c:51
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30

read to 0xffffe8ffffc306d0 of 8 bytes by task 1827 on cpu 1:
 dev_fetch_sw_netstats net/core/dev.c:10471 [inline]
 dev_get_tstats64+0x128/0x1d0 net/core/dev.c:10494
 dev_get_stats+0x6a/0x2b0 net/core/dev.c:10424
 rtnl_fill_stats+0x45/0x320 net/core/rtnetlink.c:1242
 rtnl_fill_ifinfo+0xbff/0xfe0 net/core/rtnetlink.c:1819
 rtmsg_ifinfo_build_skb+0xa2/0x130 net/core/rtnetlink.c:3908
 rtmsg_ifinfo_event net/core/rtnetlink.c:3940 [inline]
 rtmsg_ifinfo+0x55/0xc0 net/core/rtnetlink.c:3949
 __dev_notify_flags+0x65/0x3a0 net/core/dev.c:8565
 dev_change_flags+0xa2/0xc0 net/core/dev.c:8607
 do_setlink+0x778/0x2230 net/core/rtnetlink.c:2780
 __rtnl_newlink net/core/rtnetlink.c:3546 [inline]
 rtnl_newlink+0x114c/0x16a0 net/core/rtnetlink.c:3593
 rtnetlink_rcv_msg+0x811/0x8c0 net/core/rtnetlink.c:6089
 netlink_rcv_skb+0x13e/0x240 net/netlink/af_netlink.c:2501
 rtnetlink_rcv+0x18/0x20 net/core/rtnetlink.c:6107
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x58a/0x660 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x661/0x750 net/netlink/af_netlink.c:1921
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg net/socket.c:734 [inline]
 __sys_sendto+0x21e/0x2c0 net/socket.c:2119
 __do_sys_sendto net/socket.c:2131 [inline]
 __se_sys_sendto net/socket.c:2127 [inline]
 __x64_sys_sendto+0x74/0x90 net/socket.c:2127
 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+0x46/0xb0

value changed: 0x0000000000000000 -> 0x0000000000000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1827 Comm: syz-executor.0 Not tainted 5.19.0-rc1-syzkaller-00003-ge71e60cd74df-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/06/07 12:16 upstream e71e60cd74df b2706118 .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
ci2-upstream-kcsan-gce 2022/05/16 07:39 upstream 42226c989789 744a39e2 .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
ci2-upstream-kcsan-gce 2022/05/12 11:50 upstream feb9c5e19e91 beb0b407 .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
ci2-upstream-kcsan-gce 2022/05/03 18:10 upstream ef8e4d3c2ab1 dc9e5259 .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
ci2-upstream-kcsan-gce 2022/04/27 18:44 upstream 46cf2c613f4b 1fa34c1b .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
ci2-upstream-kcsan-gce 2022/04/19 22:10 upstream b7f73403a3e9 33fc6ed6 .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
ci2-upstream-kcsan-gce 2022/03/23 19:14 upstream 3bf03b9a0839 5ff41e94 .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
ci2-upstream-kcsan-gce 2022/03/12 00:14 upstream 79b00034e9dc 9e8eaa75 .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
* Struck through repros no longer work on HEAD.