syzbot


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

Status: fixed on 2019/01/11 01:22
Subsystems: crypto
[Documentation on labels]
Reported-by: syzbot+9bf843c33f782d73ae7d@syzkaller.appspotmail.com
Fix commit: f9c9bdb5131e crypto: x86/chacha - avoid sleeping under kernel_fpu_begin()
First crash: 2147d, last: 1986d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] crypto: x86/chacha - avoid sleeping under kernel_fpu_begin() 2 (2) 2018/12/23 04:03
BUG: sleeping function called from invalid context at mm/slab.h:LINE (4) 0 (2) 2018/12/15 18:43
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 2314d 2314d 4/26 fixed on 2018/02/01 04:00
upstream BUG: sleeping function called from invalid context at mm/slab.h:LINE (3) kernel 339 2209d 2294d 0/26 closed as dup on 2018/02/12 16:15
upstream BUG: sleeping function called from invalid context at mm/slab.h:LINE C 8 2476d 2479d 2/26 fixed on 2017/09/06 01:15
android-49 BUG: sleeping function called from invalid context at mm/slab.h:LINE C 3 2483d 2496d 1/3 fixed on 2017/10/23 20:15

Sample crash report:
sshd (6035) used greatest stack depth: 15600 bytes left
BUG: sleeping function called from invalid context at mm/slab.h:421
in_atomic(): 1, irqs_disabled(): 0, pid: 6051, name: syz-executor515
1 lock held by syz-executor515/6051:
 #0: 000000002f6552ef (sk_lock-AF_ALG){+.+.}, at: lock_sock include/net/sock.h:1502 [inline]
 #0: 000000002f6552ef (sk_lock-AF_ALG){+.+.}, at: skcipher_recvmsg+0xbb/0x1420 crypto/algif_skcipher.c:163
Preemption disabled at:
[<ffffffff812e4ae6>] kernel_fpu_begin+0x16/0x260 arch/x86/kernel/fpu/core.c:127
CPU: 0 PID: 6051 Comm: syz-executor515 Not tainted 4.20.0-rc6-next-20181214+ #171
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+0x244/0x39d lib/dump_stack.c:113
 ___might_sleep.cold.86+0x221/0x254 kernel/sched/core.c:6148
 __might_sleep+0x95/0x190 kernel/sched/core.c:6101
 slab_pre_alloc_hook mm/slab.h:421 [inline]
 slab_alloc mm/slab.c:3365 [inline]
 __do_kmalloc mm/slab.c:3707 [inline]
 __kmalloc+0x2da/0x760 mm/slab.c:3718
 kmalloc include/linux/slab.h:550 [inline]
 kzalloc include/linux/slab.h:740 [inline]
 skcipher_next_slow crypto/skcipher.c:254 [inline]
 skcipher_walk_next+0x7f9/0x17f0 crypto/skcipher.c:358
 skcipher_walk_first+0xff/0x3a0 crypto/skcipher.c:441
 skcipher_walk_skcipher+0x541/0x700 crypto/skcipher.c:469
 skcipher_walk_virt+0x58/0xd0 crypto/skcipher.c:479
 chacha_simd_stream_xor+0xb3/0xa40 arch/x86/crypto/chacha_glue.c:141
 chacha_simd+0xd8/0x110 arch/x86/crypto/chacha_glue.c:179
 crypto_skcipher_decrypt include/crypto/skcipher.h:538 [inline]
 _skcipher_recvmsg crypto/algif_skcipher.c:146 [inline]
 skcipher_recvmsg+0xcc9/0x1420 crypto/algif_skcipher.c:165
 sock_recvmsg_nosec net/socket.c:795 [inline]
 sock_recvmsg+0xd0/0x110 net/socket.c:802
 ___sys_recvmsg+0x2b6/0x680 net/socket.c:2279
 do_recvmmsg+0x303/0xb90 net/socket.c:2392
 __sys_recvmmsg+0x265/0x2a0 net/socket.c:2471
 __do_sys_recvmmsg net/socket.c:2494 [inline]
 __se_sys_recvmmsg net/socket.c:2487 [inline]
 __x64_sys_recvmmsg+0xe6/0x140 net/socket.c:2487
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440349
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:00007fff9312c608 EFLAGS: 00000203 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440349
RDX: 0000000000000001 RSI: 000000002000a280 RDI: 0000000000000004
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000203 R12: 00000000

Crashes (36):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/12/15 18:42 linux-next d14b746c6c1c c9128939 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/10/09 20:39 upstream 64c5e530ac2c 8b311eaf .config console log report ci-upstream-kasan-gce-smack-root
2018/10/08 16:41 upstream 0854ba5ff5c9 8b311eaf .config console log report ci-upstream-kasan-gce-smack-root
2018/10/08 05:48 upstream 0238df646e62 8b311eaf .config console log report ci-upstream-kasan-gce-root
2018/10/07 22:22 upstream fb1c592cf4c9 8b311eaf .config console log report ci-upstream-kasan-gce-smack-root
2018/10/07 08:24 upstream c1d84a1b42ef 8b311eaf .config console log report ci-upstream-kasan-gce-selinux-root
2018/10/07 05:11 upstream c1d84a1b42ef 8b311eaf .config console log report ci-upstream-kasan-gce-smack-root
2018/10/06 16:31 upstream 091a1eaa0e30 8b311eaf .config console log report ci-upstream-kasan-gce-root
2018/10/06 12:24 upstream 091a1eaa0e30 8b311eaf .config console log report ci-upstream-kasan-gce-selinux-root
2018/10/06 03:59 upstream b2e45b46d85b 8b311eaf .config console log report ci-upstream-kasan-gce-selinux-root
2018/10/06 00:12 upstream b2e45b46d85b 8b311eaf .config console log report ci-upstream-kasan-gce-selinux-root
2018/10/05 13:54 upstream befad944e231 8b311eaf .config console log report ci-upstream-kasan-gce-selinux-root
2018/10/05 03:40 upstream d2467adb6610 8b311eaf .config console log report ci-upstream-kasan-gce-root
2018/10/04 22:56 upstream d2467adb6610 8b311eaf .config console log report ci-upstream-kasan-gce-root
2018/10/04 12:13 upstream cec4de302c5f 8b311eaf .config console log report ci-upstream-kasan-gce-selinux-root
2018/10/04 12:04 upstream cec4de302c5f 8b311eaf .config console log report ci-upstream-kasan-gce-smack-root
2018/11/25 15:04 net-next-old 358be656406d 3d3ec907 .config console log report ci-upstream-net-kasan-gce
2018/12/17 05:15 linux-next d14b746c6c1c def91db3 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/12/16 23:57 linux-next d14b746c6c1c def91db3 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/12/16 13:40 linux-next d14b746c6c1c def91db3 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/12/15 17:02 linux-next d14b746c6c1c c9128939 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/11 09:32 linux-next 771b65e89c8a 5f818b4b .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/11 01:54 linux-next 7f3049305d22 5f818b4b .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/10 18:07 linux-next 7f3049305d22 5b11ac2c .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/10 08:41 linux-next 7f3049305d22 8b311eaf .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/09 09:58 linux-next 570b7bdeaf18 8b311eaf .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/08 15:33 linux-next ae16eea39a86 8b311eaf .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/07 18:19 linux-next 12ffaa1197f5 8b311eaf .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/06 03:51 linux-next 12ffaa1197f5 8b311eaf .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/04 12:05 linux-next 25bcda3e8b9f 8b311eaf .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/04 02:27 linux-next 8f84a21675f0 8b311eaf .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/03 21:13 linux-next 8f84a21675f0 8b311eaf .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/03 15:57 linux-next 8f84a21675f0 8b311eaf .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/03 09:12 linux-next 62f3d25900c9 0f3e0261 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/10/02 18:47 linux-next 62f3d25900c9 a316a2af .config console log report ci-upstream-linux-next-kasan-gce-root
2018/07/09 10:17 linux-next d00d6d9a339d f25e5770 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.