syzbot


WARNING: suspicious RCU usage in xfrm_alloc_userspi

Status: fixed on 2019/11/03 21:23
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+59752237f7ab21c3f3c3@syzkaller.appspotmail.com
Fix commit: f10e0010fae8 net: xfrm: Add '_rcu' tag for rcu protected pointer in netns_xfrm
First crash: 2091d, last: 2088d
Cause bisection: introduced by (bisect log) :
commit f10e0010fae8174dc20bdc872bcaa85baa925cb7
Author: Su Yanjun <suyj.fnst@cn.fujitsu.com>
Date: Thu Mar 7 01:54:08 2019 +0000

  net: xfrm: Add '_rcu' tag for rcu protected pointer in netns_xfrm

Crash: WARNING: suspicious RCU usage in xfrm_alloc_userspi (log)
Repro: C syz .config
  
Fix bisection: failed (error log, bisect log)
  
Discussions (3)
Title Replies (including bot) Last reply
Reminder: 26 open syzbot bugs in "net/xfrm" subsystem 1 (1) 2019/07/24 01:42
Reminder: 27 open syzbot bugs in "net/xfrm" subsystem 1 (1) 2019/06/25 05:51
WARNING: suspicious RCU usage in xfrm_alloc_userspi 2 (4) 2019/03/20 00:55

Sample crash report:
=============================
WARNING: suspicious RCU usage
5.1.0-rc1-next-20190318 #5 Not tainted
-----------------------------
net/xfrm/xfrm_user.c:1080 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-executor085/7946:
 #0: 00000000a55031b5 (&net->xfrm.xfrm_cfg_mutex){+.+.}, at: xfrm_netlink_rcv+0x61/0x90 net/xfrm/xfrm_user.c:2691

stack backtrace:
CPU: 0 PID: 7946 Comm: syz-executor085 Not tainted 5.1.0-rc1-next-20190318 #5
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+0x172/0x1f0 lib/dump_stack.c:113
 lockdep_rcu_suspicious+0x153/0x15d kernel/locking/lockdep.c:5162
 xfrm_nlmsg_unicast net/xfrm/xfrm_user.c:1080 [inline]
 xfrm_alloc_userspi+0x7d5/0xa80 net/xfrm/xfrm_user.c:1356
 xfrm_user_rcv_msg+0x458/0x770 net/xfrm/xfrm_user.c:2684
 netlink_rcv_skb+0x17a/0x460 net/netlink/af_netlink.c:2485
 xfrm_netlink_rcv+0x70/0x90 net/xfrm/xfrm_user.c:2692
 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline]
 netlink_unicast+0x536/0x720 net/netlink/af_netlink.c:1336
 netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1925
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xdd/0x130 net/socket.c:661
 ___sys_sendmsg+0x806/0x930 net/socket.c:2260
 __sys_sendmsg+0x105/0x1d0 net/socket.c:2298
 __do_sys_sendmsg net/socket.c:2307 [inline]
 __se_sys_sendmsg net/socket.c:2305 [inline]
 __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2305
 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440499
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffcf12caf08 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440499
RDX: 0000000000000000 RSI: 00000000200006c0 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000040

Crashes (86):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/18 16:42 linux-next b99981945914 4656beca .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/03/21 02:37 linux-next 835727301ed3 a664c187 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 20:58 linux-next 835727301ed3 a664c187 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 16:39 linux-next 835727301ed3 a664c187 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 15:06 linux-next 835727301ed3 a664c187 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 13:54 linux-next 835727301ed3 a664c187 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 12:47 linux-next 835727301ed3 142c38ee .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 11:40 linux-next 835727301ed3 142c38ee .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 08:58 linux-next 835727301ed3 2458c1c6 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 08:20 linux-next 835727301ed3 2458c1c6 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 05:53 linux-next 835727301ed3 2458c1c6 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 04:18 linux-next 835727301ed3 2458c1c6 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 03:16 linux-next 75e6a83b189c 2458c1c6 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/20 00:28 linux-next 75e6a83b189c 2458c1c6 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 22:50 linux-next 75e6a83b189c e4549234 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 20:57 linux-next 75e6a83b189c e4549234 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 19:52 linux-next 75e6a83b189c e4549234 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 16:35 linux-next 75e6a83b189c e4549234 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 12:47 linux-next 75e6a83b189c e4549234 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 11:17 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 08:59 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 07:09 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 06:57 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 06:52 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 06:52 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 06:52 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 06:51 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 06:51 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 06:41 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 06:32 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 06:01 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 05:58 linux-next 75e6a83b189c 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 04:14 linux-next b99981945914 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 04:13 linux-next b99981945914 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 01:03 linux-next b99981945914 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 01:01 linux-next b99981945914 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 01:00 linux-next b99981945914 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 00:38 linux-next b99981945914 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 00:31 linux-next b99981945914 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 00:28 linux-next b99981945914 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/19 00:19 linux-next b99981945914 46264c32 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/18 23:33 linux-next b99981945914 4656beca .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/18 23:11 linux-next b99981945914 4656beca .config console log report ci-upstream-linux-next-kasan-gce-root
2019/03/18 14:57 linux-next b99981945914 4656beca .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.