syzbot


BUG: sleeping function called from invalid context at mm/slab.h:LINE

Status: fixed on 2017/09/06 01:15
Fix commit: 36f41f8fc6d8 af_key: do not use GFP_KERNEL in atomic contexts
First crash: 2390d, last: 2383d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: sleeping function called from invalid context at mm/slab.h:LINE (2) bpf 2 2221d 2222d 4/26 fixed on 2018/02/01 04:00
upstream BUG: sleeping function called from invalid context at mm/slab.h:LINE (4) crypto C 36 1894d 2055d 11/26 fixed on 2019/01/11 01:22
upstream BUG: sleeping function called from invalid context at mm/slab.h:LINE (3) kernel 339 2117d 2201d 0/26 closed as dup on 2018/02/12 16:15
android-49 BUG: sleeping function called from invalid context at mm/slab.h:LINE C 3 2390d 2403d 1/3 fixed on 2017/10/23 20:15

Sample crash report:
in_atomic(): 1, irqs_disabled(): 0, pid: 2932, name: syzkaller183439
3 locks held by syzkaller183439/2932:
 #0:  (&net->xfrm.xfrm_cfg_mutex){+.+.+.}, at: [<ffffffff83b43888>] pfkey_sendmsg+0x4c8/0x9f0 net/key/af_key.c:3649
 #1:  (&pfk->dump_lock){+.+.+.}, at: [<ffffffff83b467f6>] pfkey_do_dump+0x76/0x3f0 net/key/af_key.c:293
 #2:  (&(&net->xfrm.xfrm_policy_lock)->rlock){+...+.}, at: [<ffffffff83957632>] spin_lock_bh include/linux/spinlock.h:304 [inline]
 #2:  (&(&net->xfrm.xfrm_policy_lock)->rlock){+...+.}, at: [<ffffffff83957632>] xfrm_policy_walk+0x192/0xa30 net/xfrm/xfrm_policy.c:1028
CPU: 0 PID: 2932 Comm: syzkaller183439 Not tainted 4.13.0-rc4+ #24
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:16 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:52
 ___might_sleep+0x2b2/0x470 kernel/sched/core.c:5994
 __might_sleep+0x95/0x190 kernel/sched/core.c:5947
 slab_pre_alloc_hook mm/slab.h:416 [inline]
 slab_alloc mm/slab.c:3383 [inline]
 kmem_cache_alloc+0x24b/0x6e0 mm/slab.c:3559
 skb_clone+0x1a0/0x400 net/core/skbuff.c:1037
 pfkey_broadcast_one+0x4b2/0x6f0 net/key/af_key.c:207
 pfkey_broadcast+0x4ba/0x770 net/key/af_key.c:281
 dump_sp+0x3d6/0x500 net/key/af_key.c:2685
 xfrm_policy_walk+0x2f1/0xa30 net/xfrm/xfrm_policy.c:1042
 pfkey_dump_sp+0x42/0x50 net/key/af_key.c:2695
 pfkey_do_dump+0xaa/0x3f0 net/key/af_key.c:299
 pfkey_spddump+0x1a0/0x210 net/key/af_key.c:2722
 pfkey_process+0x606/0x710 net/key/af_key.c:2814
 pfkey_sendmsg+0x4d6/0x9f0 net/key/af_key.c:3650
 sock_sendmsg_nosec net/socket.c:633 [inline]
 sock_sendmsg+0xca/0x110 net/socket.c:643
 ___sys_sendmsg+0x755/0x890 net/socket.c:2035
 __sys_sendmsg+0xe5/0x210 net/socket.c:2069
 SYSC_sendmsg net/socket.c:2080 [inline]
 SyS_sendmsg+0x2d/0x50 net/socket.c:2076
 entry_SYSCALL_64_fastpath+0x1f/0xbe
RIP: 0033:0x445d79
RSP: 002b:00007f32447c1dc8 EFLAGS: 00000202 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445d79
RDX: 0000000000000000 RSI: 000000002023dfc8 RDI: 0000000000000008
RBP: 0000000000000086 R08: 00007f32447c2700 R09: 00007f32447c2700
R10: 00007f32447c2700 R11: 0000000000000202 R12: 0000000000000000
R13: 00007ffe33edec4f R14: 00007f32447c29c0 R15: 0000000000000000

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2017/08/08 04:41 upstream 623ce3456671 ec649f0f .config console log report syz C ci-upstream-kasan-gce
2017/08/12 23:29 upstream 043cd07c555f 360f0528 .config console log report syz ci-upstream-kasan-gce
2017/08/08 10:44 upstream 623ce3456671 ec649f0f .config console log report syz ci-upstream-kasan-gce
2017/08/11 23:51 net-next-old 3b2b69efeca7 a0330c0f .config console log report syz ci-upstream-net-kasan-gce
2017/08/11 22:05 net-next-old 3b2b69efeca7 a0330c0f .config console log report syz ci-upstream-net-kasan-gce
2017/08/12 12:07 linux-next 91dfed74eabc 360f0528 .config console log report syz ci-upstream-next-kasan-gce
2017/08/12 08:05 linux-next 91dfed74eabc 360f0528 .config console log report syz ci-upstream-next-kasan-gce
2017/08/14 23:59 upstream ef954844c7ac 6a0246bf .config console log report ci-upstream-kasan-gce
* Struck through repros no longer work on HEAD.