syzbot


BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:LINE

Status: closed as dup on 2017/11/30 20:41
Subsystems: crypto
[Documentation on labels]
Reported-by: syzbot+e989ee6aec642fee2157fd40619d14f808035177@syzkaller.appspotmail.com
First crash: 2344d, last: 2325d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
WARNING: suspicious RCU usage (3) mm 16 2345d 2345d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:LINE (2) kvm C 43 2020d 2211d 0/26 closed as invalid on 2019/06/22 23:06

Sample crash report:
BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1372
in_atomic(): 0, irqs_disabled(): 1, pid: 13211, name: syz-executor6
2 locks held by syz-executor6/13211:
 #0:  (sk_lock-AF_ALG){+.+.}, at: [<0000000011b7eee5>] lock_sock include/net/sock.h:1461 [inline]
 #0:  (sk_lock-AF_ALG){+.+.}, at: [<0000000011b7eee5>] skcipher_recvmsg+0xb3/0xf20 crypto/algif_skcipher.c:163
 #1:  (&mm->mmap_sem){++++}, at: [<000000002de9135e>] __do_page_fault+0x32d/0xc90 arch/x86/mm/fault.c:1358
irq event stamp: 1668
hardirqs last  enabled at (1667): [<00000000c85f213a>] slab_alloc mm/slab.c:3378 [inline]
hardirqs last  enabled at (1667): [<00000000c85f213a>] __do_kmalloc mm/slab.c:3709 [inline]
hardirqs last  enabled at (1667): [<00000000c85f213a>] __kmalloc+0x23a/0x760 mm/slab.c:3720
hardirqs last disabled at (1668): [<00000000d5cf0afc>] kfree+0x6a/0x250 mm/slab.c:3800
softirqs last  enabled at (1662): [<00000000f0b68bb9>] lock_sock_nested+0x91/0x110 net/core/sock.c:2765
softirqs last disabled at (1660): [<0000000004034dca>] spin_lock_bh include/linux/spinlock.h:320 [inline]
softirqs last disabled at (1660): [<0000000004034dca>] lock_sock_nested+0x44/0x110 net/core/sock.c:2762
CPU: 0 PID: 13211 Comm: syz-executor6 Not tainted 4.15.0-rc2+ #149
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
 ___might_sleep+0x2b2/0x470 kernel/sched/core.c:6060
 __might_sleep+0x95/0x190 kernel/sched/core.c:6013
 __do_page_fault+0x350/0xc90 arch/x86/mm/fault.c:1372
 do_page_fault+0xee/0x720 arch/x86/mm/fault.c:1504
 page_fault+0x22/0x30 arch/x86/entry/entry_64.S:1094
RIP: 0010:virt_to_cache mm/slab.c:400 [inline]
RIP: 0010:kfree+0xb2/0x250 mm/slab.c:3802
RSP: 0018:ffff8801d0177780 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffff8801d0177948 RCX: ffffffffffffffff
RDX: ffffea0007405dc0 RSI: 0000000000000000 RDI: ffff8801d0177948
RBP: ffff8801d01777a0 R08: ffffed003a936cdc R09: 0000000000000000
R10: 0000000000000001 R11: ffffed003a936cdb R12: 0000000000000282
R13: 0000000000000000 R14: ffff8801d0177948 R15: ffff8801d01778b0
 blkcipher_walk_done+0x72b/0xde0 crypto/blkcipher.c:139
 encrypt+0x50a/0xaf0 crypto/salsa20_generic.c:208
 skcipher_crypt_blkcipher crypto/skcipher.c:622 [inline]
 skcipher_encrypt_blkcipher+0x213/0x310 crypto/skcipher.c:631
 crypto_skcipher_encrypt include/crypto/skcipher.h:445 [inline]
 _skcipher_recvmsg crypto/algif_skcipher.c:144 [inline]
 skcipher_recvmsg+0x9e8/0xf20 crypto/algif_skcipher.c:165
 sock_recvmsg_nosec net/socket.c:809 [inline]
 sock_recvmsg+0xc9/0x110 net/socket.c:816
 ___sys_recvmsg+0x29b/0x630 net/socket.c:2185
 __sys_recvmsg+0xe2/0x210 net/socket.c:2230
 SYSC_recvmsg net/socket.c:2242 [inline]
 SyS_recvmsg+0x2d/0x50 net/socket.c:2237
 entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x452a39
RSP: 002b:00007fe2d4137c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452a39
RDX: 0000000000002021 RSI: 0000000020b2dfc8 RDI: 0000000000000014
RBP: 000000000000039b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f3728
R13: 00000000ffffffff R14: 00007fe2d41386d4 R15: 0000000000000000
BUG: unable to handle kernel NULL pointer dereference at 0000000000000074
IP: virt_to_cache mm/slab.c:400 [inline]
IP: kfree+0xb2/0x250 mm/slab.c:3802
PGD 1bfe49067 P4D 1bfe49067 PUD 1c25f9067 PMD 0 
Oops: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 13211 Comm: syz-executor6 Tainted: G        W        4.15.0-rc2+ #149
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:virt_to_cache mm/slab.c:400 [inline]
RIP: 0010:kfree+0xb2/0x250 mm/slab.c:3802
RSP: 0018:ffff8801d0177780 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffff8801d0177948 RCX: ffffffffffffffff
RDX: ffffea0007405dc0 RSI: 0000000000000000 RDI: ffff8801d0177948
RBP: ffff8801d01777a0 R08: ffffed003a936cdc R09: 0000000000000000
R10: 0000000000000001 R11: ffffed003a936cdb R12: 0000000000000282
R13: 0000000000000000 R14: ffff8801d0177948 R15: ffff8801d01778b0
FS:  00007fe2d4138700(0000) GS:ffff8801db400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000074 CR3: 00000001cff49000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 blkcipher_walk_done+0x72b/0xde0 crypto/blkcipher.c:139
 encrypt+0x50a/0xaf0 crypto/salsa20_generic.c:208
 skcipher_crypt_blkcipher crypto/skcipher.c:622 [inline]
 skcipher_encrypt_blkcipher+0x213/0x310 crypto/skcipher.c:631
 crypto_skcipher_encrypt include/crypto/skcipher.h:445 [inline]
 _skcipher_recvmsg crypto/algif_skcipher.c:144 [inline]
 skcipher_recvmsg+0x9e8/0xf20 crypto/algif_skcipher.c:165
 sock_recvmsg_nosec net/socket.c:809 [inline]
 sock_recvmsg+0xc9/0x110 net/socket.c:816
 ___sys_recvmsg+0x29b/0x630 net/socket.c:2185
 __sys_recvmsg+0xe2/0x210 net/socket.c:2230
 SYSC_recvmsg net/socket.c:2242 [inline]
 SyS_recvmsg+0x2d/0x50 net/socket.c:2237
 entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x452a39
RSP: 002b:00007fe2d4137c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452a39
RDX: 0000000000002021 RSI: 0000000020b2dfc8 RDI: 0000000000000014
RBP: 000000000000039b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f3728
R13: 00000000ffffffff R14: 00007fe2d41386d4 R15: 0000000000000000
Code: c2 48 b8 00 00 00 00 00 ea ff ff 48 89 df 48 c1 ea 0c 48 c1 e2 06 48 01 c2 48 8b 42 20 48 8d 48 ff a8 01 48 0f 45 d1 4c 8b 6a 30 <49> 63 75 74 e8 05 74 af ff 48 89 de 4c 89 ef 4c 8b 75 08 e8 06 
RIP: virt_to_cache mm/slab.c:400 [inline] RSP: ffff8801d0177780
RIP: kfree+0xb2/0x250 mm/slab.c:3802 RSP: ffff8801d0177780
CR2: 0000000000000074
---[ end trace 8c4ccc674b3d2a53 ]---

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2017/12/11 19:40 net-next-old a0b586fa75a6 da131727 .config console log report ci-upstream-net-kasan-gce
2017/12/11 09:17 net-next-old 51e18a453f5f 5ad0ce95 .config console log report ci-upstream-net-kasan-gce
2017/12/09 02:10 net-next-old 5e54b3c12027 5ad0ce95 .config console log report ci-upstream-net-kasan-gce
2017/12/08 19:25 net-next-old 66c5c5b56682 b0fa969c .config console log report ci-upstream-net-kasan-gce
2017/12/08 08:24 net-next-old 66c5c5b56682 5d643f8e .config console log report ci-upstream-net-kasan-gce
2017/12/08 02:04 net-next-old 24e5992a6bae 5d643f8e .config console log report ci-upstream-net-kasan-gce
2017/12/07 18:14 net-next-old 24e5992a6bae 5d643f8e .config console log report ci-upstream-net-kasan-gce
2017/12/01 13:21 net-next-old 201c78e05c5a 16668351 .config console log report ci-upstream-net-kasan-gce
2017/12/01 01:54 net-next-old b78a6aa3876b 5153aeaf .config console log report ci-upstream-net-kasan-gce
2017/11/30 12:23 net-next-old b9151761021e 29b0fd90 .config console log report ci-upstream-net-kasan-gce
2017/12/19 07:55 linux-next 6084b576dca2 1c4160ef .config console log report ci-upstream-next-kasan-gce
* Struck through repros no longer work on HEAD.