syzbot


WARNING: suspicious RCU usage in bpf_get_current_cgroup_id

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+7ee5c2c09c284495371f@syzkaller.appspotmail.com
Fix commit: 2d3a1e3615c5 bpf: Add rcu_read_lock in bpf_get_current_[ancestor_]cgroup_id() helpers
First crash: 558d, last: 516d

Cause bisection: introduced by (bisect log) :
commit 79a7f8bdb159d9914b58740f3d31d602a6e4aca8
Author: Alexei Starovoitov <ast@kernel.org>
Date: Fri May 14 00:36:03 2021 +0000

  bpf: Introduce bpf_sys_bpf() helper and program type.

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

Sample crash report:
=============================
WARNING: suspicious RCU usage
5.14.0-rc1-syzkaller #0 Not tainted
-----------------------------
include/linux/cgroup.h:481 suspicious rcu_dereference_check() usage!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
no locks held by syz-executor046/8490.

stack backtrace:
CPU: 1 PID: 8490 Comm: syz-executor046 Not tainted 5.14.0-rc1-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:105
 task_css_set include/linux/cgroup.h:481 [inline]
 task_dfl_cgroup include/linux/cgroup.h:550 [inline]
 ____bpf_get_current_cgroup_id kernel/bpf/helpers.c:356 [inline]
 bpf_get_current_cgroup_id+0x1ce/0x210 kernel/bpf/helpers.c:354
 bpf_prog_08c4887f705f20b8+0x10/0xee4
 bpf_dispatcher_nop_func include/linux/bpf.h:687 [inline]
 bpf_prog_run_pin_on_cpu include/linux/filter.h:624 [inline]
 bpf_prog_test_run_syscall+0x2cf/0x5f0 net/bpf/test_run.c:954
 bpf_prog_test_run kernel/bpf/syscall.c:3207 [inline]
 __sys_bpf+0x1993/0x53b0 kernel/bpf/syscall.c:4487
 __do_sys_bpf kernel/bpf/syscall.c:4573 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4571 [inline]
 __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4571
 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:0x441c39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 15 00 00 90 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:00007ffe8a7f5878 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000441c39
RDX: 0000000000000048 RSI: 0000000020000500 RDI: 000000000000000a
RBP: 0000000000000000 R08: 00007ffe8a7f58a7 R09: 00007ffe8a7f58a7
R10: 00007ffe8a7f52f0 R11: 0000000000000246 R12: 00007ffe8a7f58ac
R13: 00007ffe8a7f58a8 R14: 00007ffe8a7f58f0 R15: 00007ffe8a7f58e0

Crashes (764):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-net-this-kasan-gce 2021/07/20 07:52 net 6f20c8adb181 bc48c9ab .config console log report syz C WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-kasan-gce 2021/07/20 07:42 bpf d6371c76e20d bc48c9ab .config console log report syz C WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-kasan-gce-root 2021/08/12 23:52 upstream f8fbb47c6e86 3fd2ea69 .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-kasan-gce-smack-root 2021/08/08 06:08 upstream 85a90500f9a1 6972b106 .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-kasan-gce-selinux-root 2021/08/02 17:23 upstream c500bee1c5b2 6c236867 .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-net-this-kasan-gce 2021/08/19 05:18 net fb4b1373dcab a2fe1cb5 .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-kasan-gce 2021/08/11 20:58 bpf 519133debcc1 6972b106 .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/31 12:40 bpf-next fca35b11e18a 8f58a0ef .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/31 11:20 bpf-next fca35b11e18a 8f58a0ef .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/31 10:01 bpf-next fca35b11e18a 8f58a0ef .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/31 09:00 bpf-next fca35b11e18a 8f58a0ef .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/31 05:46 bpf-next fca35b11e18a 8f58a0ef .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/31 03:18 bpf-next fca35b11e18a 8f58a0ef .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 21:09 bpf-next fca35b11e18a 8f58a0ef .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 16:35 bpf-next 47bb27a20d6e 8f58a0ef .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 15:17 bpf-next 47bb27a20d6e 8f58a0ef .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 13:27 bpf-next 47bb27a20d6e 8f58a0ef .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 12:05 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 10:36 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 08:55 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 06:34 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 05:37 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 04:23 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/30 01:43 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 23:52 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 21:42 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 19:58 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 18:42 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 17:21 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 14:51 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 13:35 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 12:07 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 11:38 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 09:25 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 07:59 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 04:31 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 03:17 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 01:52 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/29 00:30 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/28 21:10 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/28 12:20 bpf-next 47bb27a20d6e be2c130d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/28 10:37 bpf-next 47bb27a20d6e d5a29e53 .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/28 09:34 bpf-next 47bb27a20d6e d5a29e53 .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/28 06:43 bpf-next 47bb27a20d6e d5a29e53 .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/27 20:03 bpf-next 47bb27a20d6e d5a29e53 .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/27 19:16 bpf-next 48b2e71c2e53 b318694d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/27 18:13 bpf-next 48b2e71c2e53 b318694d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/27 17:11 bpf-next 48b2e71c2e53 b318694d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/27 16:03 bpf-next 48b2e71c2e53 b318694d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/27 14:27 bpf-next 48b2e71c2e53 b318694d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-bpf-next-kasan-gce 2021/08/27 12:39 bpf-next 48b2e71c2e53 b318694d .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
ci-upstream-net-kasan-gce 2021/08/19 17:54 net-next 5c8a2bb48159 b599f2fc .config console log report info WARNING: suspicious RCU usage in bpf_get_current_cgroup_id
* Struck through repros no longer work on HEAD.