syzbot


WARNING: suspicious RCU usage in bond_ipsec_add_sa (2)

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+11dcfe6879155fbb6a4e@syzkaller.appspotmail.com
Fix commit: b648eba4c69e bonding: fix suspicious RCU usage in bond_ipsec_add_sa()
First crash: 861d, last: 573d

Cause bisection: introduced by (bisect log) :
commit a3b658cfb66497525278cbf852913a04dbaae992
Author: Jarod Wilson <jarod@redhat.com>
Date: Tue Jun 30 18:49:41 2020 +0000

  bonding: allow xfrm offload setup post-module-load

Crash: WARNING: suspicious RCU usage in bond_ipsec_add_sa (log)
Repro: C syz .config
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: suspicious RCU usage in bond_ipsec_add_sa 214 866d 937d 17/24 fixed on 2020/09/16 22:51

Sample crash report:
netlink: 'syz-executor076': attribute type 1 has an invalid length.
8021q: adding VLAN 0 to HW filter on device bond1
=============================
WARNING: suspicious RCU usage
5.12.0-syzkaller #0 Not tainted
-----------------------------
drivers/net/bonding/bond_main.c:411 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
1 lock held by syz-executor076/8371:
 #0: ffffffff8d6666e0 (&net->xfrm.xfrm_cfg_mutex){+.+.}-{3:3}, at: xfrm_netlink_rcv+0x5c/0x90 net/xfrm/xfrm_user.c:2823

stack backtrace:
CPU: 0 PID: 8371 Comm: syz-executor076 Not tainted 5.12.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x141/0x1d7 lib/dump_stack.c:120
 bond_ipsec_add_sa+0x1dc/0x240 drivers/net/bonding/bond_main.c:411
 xfrm_dev_state_add+0x2da/0x7b0 net/xfrm/xfrm_device.c:266
 xfrm_state_construct net/xfrm/xfrm_user.c:655 [inline]
 xfrm_add_sa+0x229e/0x35f0 net/xfrm/xfrm_user.c:684
 xfrm_user_rcv_msg+0x42c/0x8b0 net/xfrm/xfrm_user.c:2812
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502
 xfrm_netlink_rcv+0x6b/0x90 net/xfrm/xfrm_user.c:2824
 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927
 sock_sendmsg_nosec net/socket.c:654 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:674
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433
 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43f0b9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc98392028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043f0b9
RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000004
RBP: 00000000004030a0 R08: 0000000000400488 R09: 0000000000400488
R10: 0000000000400488 R11: 0000000000000246 R12: 0000000000403130
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 8371 Comm: syz-executor076 Not tainted 5.12.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:bond_ipsec_add_sa+0x9e/0x240 drivers/net/bonding/bond_main.c:412
Code: 04 31 ff 89 c3 89 c6 e8 60 2d cb fc 85 db 0f 85 f6 00 00 00 e8 03 27 cb fc 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 5f 01 00 00 48 8d bd d0 02 00 00 49 8b 5d 00 48
RSP: 0018:ffffc90001b17490 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff84a7f5bd RDI: 0000000000000003
RBP: ffff8880289b6b80 R08: 0000000000000000 R09: ffffffff9019996f
R10: ffffffff88d38f58 R11: 0000000000000000 R12: ffff88801f87c000
R13: 0000000000000000 R14: ffff8880289b6e60 R15: ffff8880289b6e64
FS:  0000000001def300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8aa40420f8 CR3: 0000000015a93000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 xfrm_dev_state_add+0x2da/0x7b0 net/xfrm/xfrm_device.c:266
 xfrm_state_construct net/xfrm/xfrm_user.c:655 [inline]
 xfrm_add_sa+0x229e/0x35f0 net/xfrm/xfrm_user.c:684
 xfrm_user_rcv_msg+0x42c/0x8b0 net/xfrm/xfrm_user.c:2812
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502
 xfrm_netlink_rcv+0x6b/0x90 net/xfrm/xfrm_user.c:2824
 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927
 sock_sendmsg_nosec net/socket.c:654 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:674
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433
 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43f0b9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc98392028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043f0b9
RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000004
RBP: 00000000004030a0 R08: 0000000000400488 R09: 0000000000400488
R10: 0000000000400488 R11: 0000000000000246 R12: 0000000000403130
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488
Modules linked in:
---[ end trace 09352077ec7e6a51 ]---
RIP: 0010:bond_ipsec_add_sa+0x9e/0x240 drivers/net/bonding/bond_main.c:412
Code: 04 31 ff 89 c3 89 c6 e8 60 2d cb fc 85 db 0f 85 f6 00 00 00 e8 03 27 cb fc 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 5f 01 00 00 48 8d bd d0 02 00 00 49 8b 5d 00 48
RSP: 0018:ffffc90001b17490 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff84a7f5bd RDI: 0000000000000003
RBP: ffff8880289b6b80 R08: 0000000000000000 R09: ffffffff9019996f
R10: ffffffff88d38f58 R11: 0000000000000000 R12: ffff88801f87c000
R13: 0000000000000000 R14: ffff8880289b6e60 R15: ffff8880289b6e64
FS:  0000000001def300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8aa40420f8 CR3: 0000000015a93000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (540):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-selinux-root 2021/04/28 13:25 upstream 57fa2369ab17 805b5003 .config console log report syz C WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-kasan-gce-smack-root 2021/03/30 08:44 upstream 1e43c377a79f 6a81331a .config console log report syz C WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-kasan-gce-root 2021/03/29 08:09 upstream 81b1d39fd39a a8529b82 .config console log report syz C WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-linux-next-kasan-gce-root 2021/05/05 09:32 linux-next 9a9aa07ae18b 06c27ff5 .config console log report syz C WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-kasan-gce 2020/12/09 03:31 upstream 7d8761ba27fc a7f7f4a4 .config console log report syz C
ci-upstream-kasan-gce-root 2020/11/06 23:01 upstream 521b619acdc8 64069d48 .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/11/06 02:47 upstream 521b619acdc8 64069d48 .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2020/11/06 02:27 upstream 521b619acdc8 64069d48 .config console log report syz C
ci-upstream-kasan-gce-smack-root 2020/10/03 12:42 upstream d3d45f8220d6 2653fa43 .config console log report syz C
ci-upstream-kasan-gce-smack-root 2020/10/03 12:12 upstream d3d45f8220d6 2653fa43 .config console log report syz C
ci-upstream-kasan-gce 2020/09/24 00:26 upstream 805c6d3c1921 287cd75a .config console log report syz C
ci-upstream-kasan-gce 2020/09/23 23:35 upstream 805c6d3c1921 287cd75a .config console log report syz C
ci-upstream-net-this-kasan-gce 2020/10/31 08:44 net 2b94f5266c84 18e33098 .config console log report syz C
ci-upstream-net-this-kasan-gce 2020/09/20 19:04 net f13d783a184e 9564d2e9 .config console log report syz C
ci-upstream-net-this-kasan-gce 2020/09/20 18:07 net f13d783a184e 9564d2e9 .config console log report syz C
ci-upstream-net-kasan-gce 2020/10/31 06:59 net-next 1fb74191988f 18e33098 .config console log report syz C
ci-upstream-net-kasan-gce 2020/09/20 19:03 net-next dd92f1798981 9564d2e9 .config console log report syz C
ci-upstream-net-kasan-gce 2020/09/20 18:08 net-next dd92f1798981 9564d2e9 .config console log report syz C
ci-upstream-kasan-gce 2021/05/19 15:57 upstream 8ac91e6c6033 a343ba6b .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-this-kasan-gce 2021/07/05 06:16 net dbe69e433722 55aa55c2 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-this-kasan-gce 2021/07/03 20:42 net dbe69e433722 55aa55c2 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-this-kasan-gce 2021/05/27 02:09 net 62f3415db237 858ea628 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/06/28 14:16 net-next ff8744b5eb11 9d2ab5df .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/06/22 14:46 net-next ef2c3ddaa4ed aba2b2fb .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/06/21 14:54 net-next adc2e56ebe63 aba2b2fb .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/06/19 19:33 net-next adc2e56ebe63 aba2b2fb .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/06/10 17:51 net-next 0d155170d6ee 1ba81399 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/06/05 15:43 net-next 1a42624aecba 500c2339 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/05/28 19:32 net-next af9207adb6d9 858ea628 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/05/21 16:13 net-next 86fe2f8aa14f 3c7fef33 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/05/04 18:28 net-next 95aafe911db6 09efdd63 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/05/04 15:39 net-next 95aafe911db6 09efdd63 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/05/03 01:19 net-next 95aafe911db6 77e2b668 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/05/01 23:32 net-next 95aafe911db6 77e2b668 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/30 00:24 net-next 95aafe911db6 77e2b668 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/29 19:18 net-next 95aafe911db6 77e2b668 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/29 14:08 net-next 95aafe911db6 77e2b668 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/12 12:30 net-next 5b489fea977c bfeda1b1 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/12 00:24 net-next cbd312539284 bfeda1b1 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/11 12:27 net-next cbd312539284 bfeda1b1 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/11 08:25 net-next cbd312539284 bfeda1b1 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/10 23:33 net-next 626b598aa8be bfeda1b1 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/10 18:57 net-next 626b598aa8be bfeda1b1 .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/09 20:39 net-next 4438669eb703 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/09 19:16 net-next 4438669eb703 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/09 13:59 net-next 4438669eb703 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/09 05:26 net-next 4438669eb703 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/08 22:11 net-next 3cd52c1e32fe 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/08 09:38 net-next 0b35e0deb5be 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/08 02:25 net-next 0b35e0deb5be 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/07 23:19 net-next 0b35e0deb5be 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/07 17:34 net-next be107538c529 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/07 14:43 net-next be107538c529 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/07 14:23 net-next be107538c529 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/07 08:48 net-next be107538c529 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/07 01:45 net-next cc0626c2aaed 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/06 20:38 net-next cc0626c2aaed 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/06 19:30 net-next cc0626c2aaed 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/06 18:28 net-next cc0626c2aaed 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/06 14:16 net-next cc0626c2aaed 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/06 09:04 net-next cc0626c2aaed 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/06 04:32 net-next 514e1150da9c 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/05 20:01 net-next 514e1150da9c 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/05 17:20 net-next 7d42e84eb99d 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/05 08:36 net-next 7d42e84eb99d 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/05 04:03 net-next 7d42e84eb99d 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/05 00:38 net-next 7d42e84eb99d 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/04 23:18 net-next 7d42e84eb99d 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/04 14:02 net-next 428e68e1a85a 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/04 13:12 net-next 428e68e1a85a 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-upstream-net-kasan-gce 2021/04/04 08:21 net-next 428e68e1a85a 6a81331a .config console log report info WARNING: suspicious RCU usage in bond_ipsec_add_sa
ci-qemu-upstream 2020/11/01 19:41 upstream 31f020064f9d 8bc4594f .config console log report info
ci-upstream-kasan-gce-386 2021/01/15 16:28 upstream 146620506274 65a7a854 .config console log report info
ci-upstream-net-kasan-gce 2021/01/17 07:41 net-next c761b2df9df0 65a7a854 .config console log report info
ci-upstream-net-kasan-gce 2020/09/20 01:15 net-next a5a3303e26cd 53ce8104 .config console log report info
* Struck through repros no longer work on HEAD.