syzbot


WARNING: suspicious RCU usage in __dev_queue_xmit

Status: fixed on 2022/03/08 16:11
Reported-by: syzbot+e163f2ff7c3f7efd8203@syzkaller.appspotmail.com
Fix commit: 6316136ec6e3 netfilter: egress: avoid a lockdep splat
First crash: 275d, last: 208d

Cause bisection: introduced by (bisect log) :
commit 42df6e1d221dddc0f2acf2be37e68d553ad65f96
Author: Lukas Wunner <lukas@wunner.de>
Date: Fri Oct 8 20:06:03 2021 +0000

  netfilter: Introduce egress hook

Crash: WARNING: suspicious RCU usage in __dev_queue_xmit (log)
Repro: C syz .config

Sample crash report:
=============================
WARNING: suspicious RCU usage
5.16.0-rc4-syzkaller #0 Not tainted
-----------------------------
include/linux/netfilter_netdev.h:97 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
6 locks held by kworker/0:5/3608:
 #0: ffff888147552538 ((wq_completion)wg-crypt-wg0){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff888147552538 ((wq_completion)wg-crypt-wg0){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
 #0: ffff888147552538 ((wq_completion)wg-crypt-wg0){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1198 [inline]
 #0: ffff888147552538 ((wq_completion)wg-crypt-wg0){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:635 [inline]
 #0: ffff888147552538 ((wq_completion)wg-crypt-wg0){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:662 [inline]
 #0: ffff888147552538 ((wq_completion)wg-crypt-wg0){+.+.}-{0:0}, at: process_one_work+0x896/0x1690 kernel/workqueue.c:2269
 #1: ffffc90001f7fdb0 ((work_completion)(&peer->transmit_packet_work)){+.+.}-{0:0}, at: process_one_work+0x8ca/0x1690 kernel/workqueue.c:2273
 #2: ffff888022a30ad8 (&peer->endpoint_lock){++..}-{2:2}, at: wg_socket_send_skb_to_peer+0x5e/0x220 drivers/net/wireguard/socket.c:172
 #3: ffffffff8bb83cc0 (rcu_read_lock_bh){....}-{1:2}, at: send6+0x2db/0xcc0 drivers/net/wireguard/socket.c:116
 #4: ffffffff8bb83cc0 (rcu_read_lock_bh){....}-{1:2}, at: lwtunnel_xmit_redirect include/net/lwtunnel.h:95 [inline]
 #4: ffffffff8bb83cc0 (rcu_read_lock_bh){....}-{1:2}, at: ip6_finish_output2+0x2ad/0x14e0 net/ipv6/ip6_output.c:112
 #5: ffffffff8bb83cc0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1e3/0x3650 net/core/dev.c:4153

stack backtrace:
CPU: 0 PID: 3608 Comm: kworker/0:5 Not tainted 5.16.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: wg-crypt-wg0 wg_packet_tx_worker
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nf_hook_egress include/linux/netfilter_netdev.h:97 [inline]
 __dev_queue_xmit+0x2ec3/0x3650 net/core/dev.c:4170
 neigh_hh_output include/net/neighbour.h:511 [inline]
 neigh_output include/net/neighbour.h:525 [inline]
 ip6_finish_output2+0xf63/0x14e0 net/ipv6/ip6_output.c:126
 __ip6_finish_output net/ipv6/ip6_output.c:191 [inline]
 __ip6_finish_output+0x4c1/0x1050 net/ipv6/ip6_output.c:170
 ip6_finish_output+0x32/0x200 net/ipv6/ip6_output.c:201
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:224
 dst_output include/net/dst.h:450 [inline]
 ip6_local_out+0xaf/0x1a0 net/ipv6/output_core.c:161
 ip6tunnel_xmit include/net/ip6_tunnel.h:160 [inline]
 udp_tunnel6_xmit_skb+0x72e/0xc90 net/ipv6/ip6_udp_tunnel.c:109
 send6+0x4ab/0xcc0 drivers/net/wireguard/socket.c:152
 wg_socket_send_skb_to_peer+0xf5/0x220 drivers/net/wireguard/socket.c:177
 wg_packet_create_data_done drivers/net/wireguard/send.c:251 [inline]
 wg_packet_tx_worker+0x1a7/0x720 drivers/net/wireguard/send.c:276
 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Crashes (635):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2021/12/11 06:52 upstream b8a98b6bf66a 49ca1f59 .config log report syz C WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-this-kasan-gce 2021/12/08 01:34 net 2a62df369271 0230ba3e .config log report syz C WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2021/12/07 21:21 net-next 1c5526968e27 0230ba3e .config log report syz C WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2021/12/07 11:03 net-next 4c375272fb0b 0230ba3e .config log report syz C WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce 2022/01/11 05:55 upstream 133d9c53c9dc ddb0ab8c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-selinux-root 2022/01/10 22:19 upstream 133d9c53c9dc ddb0ab8c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-selinux-root 2022/01/10 17:41 upstream df0cc57e057f ddb0ab8c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-selinux-root 2022/01/10 04:04 upstream df0cc57e057f 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream 2022/01/09 23:49 upstream df0cc57e057f 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce 2022/01/09 22:14 upstream 4634129ad9fd 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-selinux-root 2022/01/08 05:54 upstream d1587f7bfe9a 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-selinux-root 2022/01/07 18:13 upstream ddec8ed2d490 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce 2022/01/07 16:29 upstream ddec8ed2d490 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce 2022/01/07 00:30 upstream b2b436ec0205 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream 2022/01/06 01:44 upstream 49ef78e59b07 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce 2022/01/05 15:54 upstream c9e6606c7fe9 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-selinux-root 2022/01/04 17:26 upstream c9e6606c7fe9 0a2584dd .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream 2022/01/04 06:52 upstream c9e6606c7fe9 7f723fbe .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce 2022/01/04 04:39 upstream c9e6606c7fe9 7f723fbe .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-selinux-root 2022/01/03 16:29 upstream c9e6606c7fe9 4a3f34f2 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-selinux-root 2022/01/01 21:43 upstream 278218f6778b e1768e9c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-root 2021/12/19 01:30 upstream 3f667b5d4053 44068e19 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-smack-root 2021/12/02 17:36 upstream 58e1100fdc59 61f86278 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-386 2022/01/10 21:02 upstream df0cc57e057f ddb0ab8c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/10 19:31 upstream 133d9c53c9dc ddb0ab8c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/10 02:25 upstream df0cc57e057f 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-386 2022/01/09 14:30 upstream 4634129ad9fd 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/09 11:45 upstream 4634129ad9fd 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/08 23:48 upstream 21f35d2ca83e 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/08 11:04 upstream d1587f7bfe9a 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/08 07:10 upstream d1587f7bfe9a 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/07 21:45 upstream ddec8ed2d490 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/07 07:14 upstream b2b436ec0205 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/07 03:30 upstream b2b436ec0205 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/06 16:02 upstream 75acfdb6fd92 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-386 2022/01/06 13:21 upstream 75acfdb6fd92 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/06 11:48 upstream 75acfdb6fd92 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/06 03:52 upstream 49ef78e59b07 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/05 20:22 upstream c9e6606c7fe9 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/05 18:40 upstream c9e6606c7fe9 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/04 20:05 upstream c9e6606c7fe9 0a2584dd .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/04 15:31 upstream c9e6606c7fe9 0a2584dd .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/04 03:31 upstream c9e6606c7fe9 7f723fbe .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/03 15:09 upstream c9e6606c7fe9 4a3f34f2 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/03 10:01 upstream c9e6606c7fe9 e1768e9c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/03 07:27 upstream c9e6606c7fe9 e1768e9c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-kasan-gce-386 2022/01/02 20:04 upstream 1286cc4893cf e1768e9c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/02 18:22 upstream 1286cc4893cf e1768e9c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/01 23:50 upstream 278218f6778b e1768e9c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-qemu-upstream-386 2022/01/01 09:28 upstream 800829388818 e1768e9c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/09 20:06 net-next d5c8725cc913 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/09 17:43 net-next d5c8725cc913 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/08 22:43 net-next 82192cb497f9 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/08 21:01 net-next 82192cb497f9 2ca0d385 .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/07 06:57 net-next e4a3d6a6a19a 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/06 17:51 net-next 710ad98c363a 6acc789a .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/05 04:57 net-next ffd32ea6b13c 0a2584dd .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/04 22:55 net-next 416b27439df9 0a2584dd .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/04 15:51 net-next 416b27439df9 0a2584dd .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/02 13:14 net-next c95e078069bf e1768e9c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/02 11:50 net-next e63a02348958 e1768e9c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2022/01/02 06:24 net-next e63a02348958 e1768e9c .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit
ci-upstream-net-kasan-gce 2021/11/05 02:48 net-next cc0356d6a02e 4c1be0be .config log report info WARNING: suspicious RCU usage in __dev_queue_xmit