syzbot


WARNING: suspicious RCU usage in xfrm_set_default
Status: fixed on 2022/03/08 16:11
Reported-by: syzbot+3d9866419b4aa8f985d6@syzkaller.appspotmail.com
Fix commit: 93ec1320b017 xfrm: fix rcu lock in xfrm_notify_userpolicy()
First crash: 246d, last: 239d

Cause bisection: introduced by (bisect log) :
commit 88d0adb5f13b1c52fbb7d755f6f79db18c2f0c2c
Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Tue Sep 14 14:46:34 2021 +0000

  xfrm: notify default policy on update

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

Sample crash report:
=============================
WARNING: suspicious RCU usage
5.15.0-rc2-next-20210920-syzkaller #0 Not tainted
-----------------------------
net/xfrm/xfrm_user.c:1157 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-executor917/6560:
 #0: ffffffff8d0d4818 (&net->xfrm.xfrm_cfg_mutex){+.+.}-{3:3}, at: xfrm_netlink_rcv+0x5c/0x90 net/xfrm/xfrm_user.c:2928

stack backtrace:
CPU: 0 PID: 6560 Comm: syz-executor917 Not tainted 5.15.0-rc2-next-20210920-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 xfrm_nlmsg_multicast net/xfrm/xfrm_user.c:1157 [inline]
 xfrm_notify_userpolicy net/xfrm/xfrm_user.c:1991 [inline]
 xfrm_set_default+0x789/0x8b0 net/xfrm/xfrm_user.c:2017
 xfrm_user_rcv_msg+0x430/0xa20 net/xfrm/xfrm_user.c:2907
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504
 xfrm_netlink_rcv+0x6b/0x90 net/xfrm/xfrm_user.c:2929
 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1340
 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1929
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:724
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fe115dcd079
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:00007ffedbf3ee68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fe115dcd079
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003
RBP: 00007fe115d91060 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe115d910f0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
unsupported nlmsg_t

Crashes (20):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2021/09/20 17:50 linux-next 1f77990c4b79 af796c18 .config log report syz C WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/26 22:11 linux-next 5a5d008887b4 78494d16 .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/26 21:21 linux-next 5a5d008887b4 78494d16 .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/26 17:36 linux-next 5a5d008887b4 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/26 12:34 linux-next 5a5d008887b4 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/26 10:35 linux-next 5a5d008887b4 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/26 10:14 linux-next 5a5d008887b4 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/25 08:01 linux-next 5a5d008887b4 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/24 07:11 linux-next 5a5d008887b4 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/24 05:54 linux-next 5a5d008887b4 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/23 07:54 linux-next bc5aa70f2699 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/23 07:29 linux-next bc5aa70f2699 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/22 19:04 linux-next e90f9946ba28 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/22 18:05 linux-next e90f9946ba28 8cac236e .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/22 07:52 linux-next e90f9946ba28 169724fe .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/22 06:41 linux-next e90f9946ba28 169724fe .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/21 13:35 linux-next 83fa5857d812 169724fe .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/20 17:15 linux-next 1f77990c4b79 af796c18 .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/20 15:37 linux-next 1f77990c4b79 af796c18 .config log report info WARNING: suspicious RCU usage in xfrm_set_default
ci-upstream-linux-next-kasan-gce-root 2021/09/20 14:42 linux-next 1f77990c4b79 af796c18 .config log report info WARNING: suspicious RCU usage in xfrm_set_default