On Mon, Jul 6, 2020 at 11:44 AM syzbot <syzbot+582c98032903dcc04...@syzkaller.appspotmail.com> wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit: e44f65fd xen-netfront: remove redundant assignment to vari.. > git tree: net-next > console output: https://syzkaller.appspot.com/x/log.txt?x=16148f87100000 > kernel config: https://syzkaller.appspot.com/x/.config?x=829871134ca5e230 > dashboard link: https://syzkaller.appspot.com/bug?extid=582c98032903dcc04816 > compiler: gcc (GCC) 10.1.0-syz 20200507 > > Unfortunately, I don't have any reproducer for this crash yet. > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+582c98032903dcc04...@syzkaller.appspotmail.com > > ============================= > WARNING: suspicious RCU usage > 5.8.0-rc2-syzkaller #0 Not tainted > ----------------------------- > drivers/net/bonding/bond_main.c:387 suspicious rcu_dereference_protected() > usage!
Hm. Access to curr_active_slave in the bonding driver is kind of all over the place, between rtnl_dereference, rcu_deference, rcu_access_pointer and just reading it without any protections. It does look like this is a case where bond_ipsec_add_sa() gets called without RTNL being held, so perhaps we should be using rcu_dereference here, since we do need to dereference the acquired pointer, but probably don't need to be holding RTNL here. > other info that might help us debug this: > > > rcu_scheduler_active = 2, debug_locks = 1 > 1 lock held by syz-executor.0/5186: > #0: ffff888089791a28 (&net->xfrm.xfrm_cfg_mutex){+.+.}-{3:3}, at: > xfrm_netlink_rcv+0x5c/0x90 net/xfrm/xfrm_user.c:2687 > > stack backtrace: > CPU: 1 PID: 5186 Comm: syz-executor.0 Not tainted 5.8.0-rc2-syzkaller #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS > Google 01/01/2011 > Call Trace: > __dump_stack lib/dump_stack.c:77 [inline] > dump_stack+0x18f/0x20d lib/dump_stack.c:118 > bond_ipsec_add_sa+0x1c8/0x220 drivers/net/bonding/bond_main.c:387 > xfrm_dev_state_add+0x2da/0x7b0 net/xfrm/xfrm_device.c:268 > xfrm_state_construct net/xfrm/xfrm_user.c:655 [inline] > xfrm_add_sa+0x2166/0x34f0 net/xfrm/xfrm_user.c:684 > xfrm_user_rcv_msg+0x414/0x700 net/xfrm/xfrm_user.c:2680 > netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2469 > xfrm_netlink_rcv+0x6b/0x90 net/xfrm/xfrm_user.c:2688 > netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] > netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1329 > netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1918 > sock_sendmsg_nosec net/socket.c:652 [inline] > sock_sendmsg+0xcf/0x120 net/socket.c:672 > ____sys_sendmsg+0x6e8/0x810 net/socket.c:2352 > ___sys_sendmsg+0xf3/0x170 net/socket.c:2406 > __sys_sendmsg+0xe5/0x1b0 net/socket.c:2439 > do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:359 > entry_SYSCALL_64_after_hwframe+0x44/0xa9 > RIP: 0033:0x45cb29 > Code: Bad RIP value. > RSP: 002b:00007ff7e9a92c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e > RAX: ffffffffffffffda RBX: 00000000005027e0 RCX: 000000000045cb29 > RDX: 0000000000000000 RSI: 0000000020000180 RDI: 0000000000000003 > RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 > R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff > R13: 0000000000000a45 R14: 00000000004cd2c9 R15: 00007ff7e9a936d4 > bond0: (slave bond_slave_0): Slave does not support ipsec offload > > > --- > This bug is generated by a bot. It may contain errors. > See https://goo.gl/tpsmEJ for more information about syzbot. > syzbot engineers can be reached at syzkal...@googlegroups.com. > > syzbot will keep track of this bug report. See: > https://goo.gl/tpsmEJ#status for how to communicate with syzbot. > -- Jarod Wilson ja...@redhat.com