syzbot


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

Status: auto-closed as invalid on 2022/01/22 10:01
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 385d, last: 354d
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 (4) 8 183d 271d 0/24 auto-closed as invalid on 2022/07/12 12:23
upstream KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb 6 636d 719d 0/24 auto-closed as invalid on 2021/04/15 10:49
upstream KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb (3) 2 310d 313d 0/24 auto-closed as invalid on 2022/03/07 16:56

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

write to 0xffffe8ffffd36ab0 of 8 bytes by task 1829 on cpu 1:
 iptunnel_xmit_stats include/net/ip_tunnels.h:450 [inline]
 ip6tunnel_xmit include/net/ip6_tunnel.h:165 [inline]
 udp_tunnel6_xmit_skb+0x3ce/0x4d0 net/ipv6/ip6_udp_tunnel.c:109
 send6+0x2ef/0x3b0 drivers/net/wireguard/socket.c:152
 wg_socket_send_skb_to_peer+0xbb/0x130 drivers/net/wireguard/socket.c:177
 wg_socket_send_buffer_to_peer+0xf7/0x120 drivers/net/wireguard/socket.c:199
 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+0x3fc/0x980 kernel/workqueue.c:2298
 worker_thread+0x616/0xa70 kernel/workqueue.c:2445
 kthread+0x2c7/0x2e0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

read to 0xffffe8ffffd36ab0 of 8 bytes by task 2801 on cpu 0:
 dev_fetch_sw_netstats net/core/dev.c:10726 [inline]
 dev_get_tstats64+0x13a/0x1e0 net/core/dev.c:10749
 dev_get_stats+0x65/0x180 net/core/dev.c:10691
 rtnl_fill_stats+0x45/0x320 net/core/rtnetlink.c:1202
 rtnl_fill_ifinfo+0xebf/0x2560 net/core/rtnetlink.c:1774
 rtmsg_ifinfo_build_skb+0xa8/0x130 net/core/rtnetlink.c:3812
 rtmsg_ifinfo_event net/core/rtnetlink.c:3844 [inline]
 rtmsg_ifinfo+0x58/0xc0 net/core/rtnetlink.c:3853
 __dev_notify_flags+0x63/0x3b0 net/core/dev.c:8830
 dev_change_flags+0xa2/0xc0 net/core/dev.c:8872
 do_setlink+0x810/0x2410 net/core/rtnetlink.c:2719
 __rtnl_newlink net/core/rtnetlink.c:3391 [inline]
 rtnl_newlink+0xfad/0x13b0 net/core/rtnetlink.c:3506
 rtnetlink_rcv_msg+0x745/0x7e0 net/core/rtnetlink.c:5571
 netlink_rcv_skb+0x14e/0x250 net/netlink/af_netlink.c:2496
 rtnetlink_rcv+0x18/0x20 net/core/rtnetlink.c:5589
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x5fc/0x6c0 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x726/0x840 net/netlink/af_netlink.c:1921
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg net/socket.c:724 [inline]
 __sys_sendto+0x21e/0x2c0 net/socket.c:2036
 __do_sys_sendto net/socket.c:2048 [inline]
 __se_sys_sendto net/socket.c:2044 [inline]
 __x64_sys_sendto+0x74/0x90 net/socket.c:2044
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000000 -> 0x0000000000000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 2801 Comm: syz-executor.0 Not tainted 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
syz-executor.0 (2801) used greatest stack depth: 9568 bytes left

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/12/18 09:55 upstream 9eaa88c7036e 44068e19 .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
ci2-upstream-kcsan-gce 2021/11/25 23:19 upstream b501b85957de 63eeac02 .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
ci2-upstream-kcsan-gce 2021/11/17 21:57 upstream ee1703cda8dc cafff8b6 .config log report info KCSAN: data-race in dev_get_tstats64 / udp_tunnel6_xmit_skb
* Struck through repros no longer work on HEAD.