syzbot


KASAN: stack-out-of-bounds Read in wait_consider_task

Status: closed as dup on 2018/07/05 16:15
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+9f4eab8ef379c9cca5e1@syzkaller.appspotmail.com
First crash: 2361d, last: 2354d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
BUG: unable to handle kernel paging request in ttwu_do_activate kernel 1 2361d 2361d

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
IPVS: ftp: loaded support on port[0] = 21
==================================================================
BUG: KASAN: stack-out-of-bounds in ptrace_reparented include/linux/ptrace.h:92 [inline]
BUG: KASAN: stack-out-of-bounds in wait_consider_task+0x3792/0x39b0 kernel/exit.c:1378
Read of size 8 at addr ffff8801afd885e8 by task syz-executor653/4456

CPU: 1 PID: 4456 Comm: syz-executor653 Not tainted 4.18.0-rc3-next-20180706+ #1
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+0x1c9/0x2b4 lib/dump_stack.c:113
 print_address_description+0x6c/0x20b mm/kasan/report.c:256
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report.cold.7+0x242/0x30d mm/kasan/report.c:412
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
 ptrace_reparented include/linux/ptrace.h:92 [inline]
 wait_consider_task+0x3792/0x39b0 kernel/exit.c:1378
 do_wait_thread kernel/exit.c:1455 [inline]
 do_wait+0x477/0xb80 kernel/exit.c:1526
 kernel_wait4+0x247/0x3f0 kernel/exit.c:1669
 __do_sys_wait4+0x137/0x150 kernel/exit.c:1681
 __se_sys_wait4 kernel/exit.c:1677 [inline]
 __x64_sys_wait4+0x97/0xf0 kernel/exit.c:1677
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x406ada
Code: c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 8b 05 fe d0 2d 00 85 c0 75 36 45 31 d2 48 63 d2 48 63 ff b8 3d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 d4 ff ff ff f7 
RSP: 002b:00007fffc9cfbc78 EFLAGS: 00000246 ORIG_RAX: 000000000000003d
RAX: ffffffffffffffda RBX: 00000000000028ef RCX: 0000000000406ada
RDX: 0000000040000001 RSI: 00007fffc9cfbc8c RDI: ffffffffffffffff
RBP: 00000000000028ef R08: 0000000000000001 R09: 0000000001c22940
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000037eb
R13: 00000000000f5d89 R14: 0000000000000000 R15: 0000000000000000

Allocated by task 4456:
 save_stack+0x43/0xd0 mm/kasan/kasan.c:448
 set_track mm/kasan/kasan.c:460 [inline]
 kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553
 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490
 kmem_cache_alloc_node+0x144/0x780 mm/slab.c:3644
 alloc_task_struct_node kernel/fork.c:158 [inline]
 dup_task_struct kernel/fork.c:780 [inline]
 copy_process.part.41+0x16e2/0x7340 kernel/fork.c:1650
 copy_process kernel/fork.c:1625 [inline]
 _do_fork+0x291/0x12a0 kernel/fork.c:2110
 __do_sys_clone kernel/fork.c:2217 [inline]
 __se_sys_clone kernel/fork.c:2211 [inline]
 __x64_sys_clone+0xbf/0x150 kernel/fork.c:2211
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 3520244992:
BUG: unable to handle kernel paging request at ffffffff8bce6b10
PGD 8e6d067 P4D 8e6d067 PUD 8e6e063 PMD 0 
Oops: 0000 [#1] SMP KASAN
CPU: 1 PID: 4456 Comm: syz-executor653 Not tainted 4.18.0-rc3-next-20180706+ #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:depot_fetch_stack+0x10/0x30 lib/stackdepot.c:201
Code: e8 95 39 45 fe e9 b3 fd ff ff e8 8b 39 45 fe e9 55 fd ff ff 90 90 90 90 90 90 89 f8 c1 ef 11 25 ff ff 1f 00 81 e7 f0 3f 00 00 <48> 03 3c c5 c0 6d 43 8b 8b 47 0c 48 83 c7 18 c7 46 10 00 00 00 00 
RSP: 0018:ffff8801b95976b8 EFLAGS: 00010002
RAX: 0000000000115faa RBX: ffff8801afd898cc RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffff8801b95976c0 RDI: 0000000000000bb0
RBP: ffff8801b95976e8 R08: ffff8801d9644600 R09: ffffed003b5e3ec2
R10: ffffed003b5e3ec2 R11: ffff8801daf1f617 R12: ffff8801afd88140
R13: ffff8801afd885e8 R14: ffff8801ba7174c0 R15: ffff8801afd898c0
FS:  0000000001c22940(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffff8bce6b10 CR3: 00000001ba471000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 describe_object mm/kasan/report.c:245 [inline]
 print_address_description+0x11b/0x20b mm/kasan/report.c:263
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report.cold.7+0x242/0x30d mm/kasan/report.c:412
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
 ptrace_reparented include/linux/ptrace.h:92 [inline]
 wait_consider_task+0x3792/0x39b0 kernel/exit.c:1378
 do_wait_thread kernel/exit.c:1455 [inline]
 do_wait+0x477/0xb80 kernel/exit.c:1526
 kernel_wait4+0x247/0x3f0 kernel/exit.c:1669
 __do_sys_wait4+0x137/0x150 kernel/exit.c:1681
 __se_sys_wait4 kernel/exit.c:1677 [inline]
 __x64_sys_wait4+0x97/0xf0 kernel/exit.c:1677
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x406ada
Code: c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 8b 05 fe d0 2d 00 85 c0 75 36 45 31 d2 48 63 d2 48 63 ff b8 3d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 d4 ff ff ff f7 
RSP: 002b:00007fffc9cfbc78 EFLAGS: 00000246 ORIG_RAX: 000000000000003d
RAX: ffffffffffffffda RBX: 00000000000028ef RCX: 0000000000406ada
RDX: 0000000040000001 RSI: 00007fffc9cfbc8c RDI: ffffffffffffffff
RBP: 00000000000028ef R08: 0000000000000001 R09: 0000000001c22940
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000037eb
R13: 00000000000f5d89 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
Dumping ftrace buffer:
   (ftrace buffer empty)
CR2: ffffffff8bce6b10
---[ end trace a22c2d39a3d8792c ]---
RIP: 0010:depot_fetch_stack+0x10/0x30 lib/stackdepot.c:201
Code: e8 95 39 45 fe e9 b3 fd ff ff e8 8b 39 45 fe e9 55 fd ff ff 90 90 90 90 90 90 89 f8 c1 ef 11 25 ff ff 1f 00 81 e7 f0 3f 00 00 <48> 03 3c c5 c0 6d 43 8b 8b 47 0c 48 83 c7 18 c7 46 10 00 00 00 00 
RSP: 0018:ffff8801b95976b8 EFLAGS: 00010002
RAX: 0000000000115faa RBX: ffff8801afd898cc RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffff8801b95976c0 RDI: 0000000000000bb0
RBP: ffff8801b95976e8 R08: ffff8801d9644600 R09: ffffed003b5e3ec2
R10: ffffed003b5e3ec2 R11: ffff8801daf1f617 R12: ffff8801afd88140
R13: ffff8801afd885e8 R14: ffff8801ba7174c0 R15: ffff8801afd898c0
FS:  0000000001c22940(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffff8bce6b10 CR3: 00000001ba471000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/07/08 01:03 linux-next 526674536360 ab89aea9 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/07/12 04:26 bpf-next 671dffa7de7b 2e0e3130 .config console log report ci-upstream-bpf-next-kasan-gce
2018/07/08 14:50 bpf-next d90c936fb318 c9a7a4dc .config console log report ci-upstream-bpf-next-kasan-gce
2018/07/05 12:11 bpf-next 6fcf9b1d4d6c f525fd72 .config console log report ci-upstream-bpf-next-kasan-gce
2018/07/04 22:13 bpf-next 2bdea157b999 e1b966c6 .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.