syzbot


suspicious RCU usage at ./include/linux/rcupdate.h:LINE (3)

Status: fixed on 2018/02/01 04:00
Subsystems: bpf
[Documentation on labels]
Fix commit: 2310035fa03f bpf: fix incorrect kmalloc usage in lpm_trie MAP_GET_NEXT_KEY rcu region
First crash: 2319d, last: 2310d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream suspicious RCU usage at ./include/linux/rcupdate.h:LINE (2) net C 174 2320d 2400d 4/26 fixed on 2018/01/22 13:19
upstream suspicious RCU usage at ./include/linux/rcupdate.h:LINE (4) perf C 7264 2304d 2308d 4/26 fixed on 2018/02/12 17:26
upstream suspicious RCU usage at ./include/linux/rcupdate.h:LINE 1 2467d 2467d 0/26 closed as invalid on 2017/08/27 08:48

Sample crash report:
audit: type=1400 audit(1516723187.782:8): avc:  denied  { map_create } for  pid=3657 comm="syzkaller703595" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1

=============================
WARNING: suspicious RCU usage
4.15.0-rc8+ #1 Not tainted
-----------------------------
./include/linux/rcupdate.h:302 Illegal context switch in RCU read-side critical section!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
1 lock held by syzkaller703595/3657:
 #0:  (rcu_read_lock){....}, at: [<000000009f49ecac>] map_get_next_key kernel/bpf/syscall.c:836 [inline]
 #0:  (rcu_read_lock){....}, at: [<000000009f49ecac>] SYSC_bpf kernel/bpf/syscall.c:1881 [inline]
 #0:  (rcu_read_lock){....}, at: [<000000009f49ecac>] SyS_bpf+0x1105/0x4860 kernel/bpf/syscall.c:1846

stack backtrace:
CPU: 1 PID: 3657 Comm: syzkaller703595 Not tainted 4.15.0-rc8+ #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:53
 lockdep_rcu_suspicious+0x123/0x170 kernel/locking/lockdep.c:4585
 rcu_preempt_sleep_check include/linux/rcupdate.h:301 [inline]
 ___might_sleep+0x385/0x470 kernel/sched/core.c:6025
 __might_sleep+0x95/0x190 kernel/sched/core.c:6013
 slab_pre_alloc_hook mm/slab.h:419 [inline]
 slab_alloc mm/slab.c:3368 [inline]
 __do_kmalloc mm/slab.c:3706 [inline]
 __kmalloc+0x2c5/0x760 mm/slab.c:3717
 kmalloc include/linux/slab.h:504 [inline]
 trie_get_next_key+0x517/0xf10 kernel/bpf/lpm_trie.c:626
 map_get_next_key kernel/bpf/syscall.c:842 [inline]
 SYSC_bpf kernel/bpf/syscall.c:1881 [inline]
 SyS_bpf+0x11b4/0x4860 kernel/bpf/syscall.c:1846

Crashes (5087):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/01/23 16:01 bpf-next ebdd7b491b8a a5b7566c .config console log report syz C ci-upstream-bpf-next-kasan-gce
2018/01/23 13:23 bpf-next ebdd7b491b8a a5b7566c .config console log report syz C ci-upstream-bpf-next-kasan-gce
2018/01/23 06:45 bpf-next ebdd7b491b8a 228e3d95 .config console log report syz C ci-upstream-bpf-next-kasan-gce
2018/01/22 13:42 bpf-next ebdd7b491b8a 228e3d95 .config console log report syz C ci-upstream-bpf-next-kasan-gce
2018/01/30 01:31 upstream d8a5b80568a9 08d47756 .config console log report ci-upstream-kasan-gce
2018/01/25 00:26 upstream 5132ede0fe80 866f1102 .config console log report ci-upstream-kasan-gce-386
2018/01/31 08:34 bpf-next 868c36dcc949 02553e22 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/30 20:02 net-next-old 91e6dd828425 a899be78 .config console log report ci-upstream-net-kasan-gce
2018/01/29 22:08 net-next-old 3e3ab9ccca5b 08d47756 .config console log report ci-upstream-net-kasan-gce
2018/01/29 08:43 net-next-old 868c36dcc949 08d47756 .config console log report ci-upstream-net-kasan-gce
2018/01/28 19:05 net-next-old 751c45bd828f 08d47756 .config console log report ci-upstream-net-kasan-gce
2018/01/28 16:01 net-next-old 751c45bd828f 08d47756 .config console log report ci-upstream-net-kasan-gce
2018/01/27 22:29 net-next-old 6bb46bc57c8e 08146b1a .config console log report ci-upstream-net-kasan-gce
2018/01/22 22:49 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:48 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:48 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:47 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:47 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:47 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:46 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:46 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:46 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:46 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:45 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:45 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:45 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:44 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:44 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:44 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:44 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:44 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:44 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:43 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:43 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:42 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:42 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:42 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:42 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:42 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:41 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:41 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:41 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:41 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
2018/01/22 22:41 bpf-next ebdd7b491b8a 228e3d95 .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.