syzbot


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

Status: closed as invalid on 2018/07/08 10:08
Subsystems: fs
[Documentation on labels]
First crash: 2396d, last: 2396d

Sample crash report:
==================================================================
BUG: KASAN: stack-out-of-bounds in __wake_up_common+0x6db/0x740 kernel/sched/wait.c:83
Read of size 8 at addr ffff8801bb4af648 by task syz-executor1/15907
kasan: CONFIG_KASAN_INLINE enabled

kasan: GPF could be caused by NULL-ptr deref or user memory access
CPU: 1 PID: 15907 Comm: syz-executor1 Not tainted 4.18.0-rc3+ #48
general protection fault: 0000 [#1] SMP KASAN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
CPU: 0 PID: 1102416563 Comm: syz-exec Not tainted 4.18.0-rc3+ #48
Call Trace:
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:task_css include/linux/cgroup.h:477 [inline]
RIP: 0010:task_ca kernel/sched/cpuacct.c:43 [inline]
RIP: 0010:cpuacct_account_field+0x13c/0x3b0 kernel/sched/cpuacct.c:365
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113
Code: 
da 
45 08 
00 85 
c0 74 
 print_address_description+0x6c/0x20b mm/kasan/report.c:256
0d 80 
3d f1 
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412
1e 3c 
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
08 00 
 __wake_up_common+0x6db/0x740 kernel/sched/wait.c:83
0f 84 
79 
01 00 
00 48 
b8 00 
 __wake_up_common_lock+0x1c2/0x330 kernel/sched/wait.c:119
00 
00 00 
00 
 __wake_up_sync_key+0x19/0x20 kernel/sched/wait.c:197
fc ff 
 pipe_write+0x9d2/0xeb0 fs/pipe.c:477
df 49 
 call_write_iter include/linux/fs.h:1793 [inline]
 new_sync_write fs/read_write.c:474 [inline]
 __vfs_write+0x6c6/0x9f0 fs/read_write.c:487
8d 
7d 
10 48 
89 fa 
48 
c1 ea 
 vfs_write+0x1f8/0x560 fs/read_write.c:549
03 
 ksys_write+0x101/0x260 fs/read_write.c:598
<80> 3c 
02 00 
0f 
 __do_sys_write fs/read_write.c:610 [inline]
 __se_sys_write fs/read_write.c:607 [inline]
 __x64_sys_write+0x73/0xb0 fs/read_write.c:607
85 
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
49 
02 
00 
00 4d 
8b 65 
10 
49 81 
fc 
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
80 
RIP: 0033:0x40fbc1
a4 
Code: 
f7 88 
75 
0f 
14 
RSP: 0018:ffff8801dae078e8 EFLAGS: 00010002
b8 
RAX: dffffc0000000000 RBX: dffffc0000000000 RCX: ffffffff815d8e26
RDX: 000000000836b158 RSI: 0000000000000008 RDI: 0000000041b58ac3
01 
RBP: ffff8801dae07978 R08: 0000000000000000 R09: 0000000000000000
00 
R10: ffff8801dae07950 R11: ffffffff88fa1263 R12: ffff8801b939a300
R13: 0000000041b58ab3 R14: 1ffff1003b5c0f1e R15: 00000000000f4240
00 
FS:  00007f4567bc4700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
00 
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe134222000 CR3: 0000000008e6a000 CR4: 00000000001406f0
0f 
DR0: 0000000020000000 DR1: 0000000020000000 DR2: 0000000000000000
05 
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
48 
 <IRQ>
3d 
01 
f0 
ff 
 cgroup_account_cputime_field include/linux/cgroup.h:739 [inline]
 task_group_account_field kernel/sched/cputime.c:108 [inline]
 account_system_index_time+0x1dc/0x5c0 kernel/sched/cputime.c:171
ff 
0f 
83 
f4 
19 
00 
00 
 account_system_time+0x7f/0xb0 kernel/sched/cputime.c:199
c3 
 account_process_tick+0x76/0x240 kernel/sched/cputime.c:498
48 
 update_process_times+0x21/0x70 kernel/time/timer.c:1634
83 
 tick_sched_handle+0x9f/0x180 kernel/time/tick-sched.c:164
ec 
 tick_sched_timer+0x45/0x130 kernel/time/tick-sched.c:1274
08 
 __run_hrtimer kernel/time/hrtimer.c:1398 [inline]
 __hrtimer_run_queues+0x3eb/0x10c0 kernel/time/hrtimer.c:1460
e8 
ca 
fc 
ff 
ff 
48 
89 
04 
24 
b8 
01 
00 
 hrtimer_interrupt+0x2f3/0x750 kernel/time/hrtimer.c:1518
00 
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline]
 smp_apic_timer_interrupt+0x165/0x730 arch/x86/kernel/apic/apic.c:1050
00 
0f 
05 
<48> 
8b 
3c 
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:863
24 
 </IRQ>
48 
Modules linked in:
89 
c2 
Dumping ftrace buffer:
e8 
---------------------------------
13 
syz-exec-8219    0...2 65067929us : 0: }D
fd 
syz-exec-8219    0...2 65067935us : 0: }D
ff 
syz-exec-8219    0...2 65067939us : 0: }D
ff 
syz-exec-8219    0...2 65067941us : 0: }D
48 
syz-exec-8219    0...2 65067944us : 0: }D
89 
syz-exec-8219    0...2 65067946us : 0: }D
d0 
syz-exec-8219    0...2 65067950us : 0: }D
48 
syz-exec-8219    0...2 65067952us : 0: }D
83 
syz-exec-8219    0...2 65067954us : 0: }D
c4 
syz-exec-8219    0...2 65067957us : 0: }D
08 
syz-exec-8219    0...2 65067960us : 0: }D
48 
syz-exec-8219    0...2 65067962us : 0: }D
3d 
syz-exec-8219    0...2 65067965us : 0: }D
01 
syz-exec-8219    0...2 65067968us : 0: }D
syz-exec-8219    0...2 65067970us : 0: }D
RSP: 002b:00007ffdb4ab7f30 EFLAGS: 00000293
syz-exec-8219    0...2 65067972us : 0: }D
 ORIG_RAX: 0000000000000001
syz-exec-8219    0...2 65067975us : 0: }D
RAX: ffffffffffffffda RBX: 0000000000000038 RCX: 000000000040fbc1
syz-exec-8219    0...2 65067978us : 0: }D
RDX: 0000000000000038 RSI: 00007ffdb4ab80d0 RDI: 0000000000000002
syz-exec-8219    0...2 65067980us : 0: }D
RBP: 00007ffdb4ab80d0 R08: 00000000018f9940 R09: 0000000000000038
syz-exec-8219    0...2 65067982us : 0: }D
R10: 0000000000000064 R11: 0000000000000293 R12: 0000000000000038
syz-exec-8219    0...2 65067985us : 0: }D
R13: 0000000000000001 R14: 0000000000707f00 R15: 000000000072c680
syz-exec-8219    0...2 65067988us : 0: }D

syz-exec-8219    0...2 65067990us : 0: }D
Allocated by task 4372:
syz-exec-8219    0...2 65067992us : 0: }D
 save_stack+0x43/0xd0 mm/kasan/kasan.c:448
syz-exec-8219    0...2 65067995us : 0: }D
 set_track mm/kasan/kasan.c:460 [inline]
 kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553
syz-exec-8219    0...2 65067998us : 0: }D
 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490
syz-exec-8219    0...2 65068000us : 0: }D
 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3554
 ep_ptable_queue_proc+0x14e/0x520 fs/eventpoll.c:1240
syz-exec-8219    0...2 65068002us : 0: }D
 poll_wait include/linux/poll.h:47 [inline]
 pipe_poll+0x94/0x340 fs/pipe.c:520
syz-exec-8219    0...2 65068006us : 0: }D
 vfs_poll include/linux/poll.h:86 [inline]
 ep_item_poll.isra.14+0x15c/0x400 fs/eventpoll.c:887
syz-exec-8219    0...2 65068008us : 0: }D
 ep_insert+0x6c1/0x1c20 fs/eventpoll.c:1459
syz-exec-8219    0...2 65068010us : 0: }D
 __do_sys_epoll_ctl fs/eventpoll.c:2113 [inline]
 __se_sys_epoll_ctl fs/eventpoll.c:1999 [inline]
 __x64_sys_epoll_ctl+0xf00/0x10a0 fs/eventpoll.c:1999
syz-exec-8219    0...2 65068013us : 0: }D
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
syz-exec-8219    0...2 65068016us : 0: }D
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
syz-exec-8219    0...2 65068018us : 0: }D

syz-exec-8219    0...2 65068020us : 0: }D
Freed by task 0:
syz-exec-8219    0...2 65068023us : 0: }D
(stack is not available)
syz-exec-8219    0...2 65068026us : 0: }D

syz-exec-8219    0...2 65068028us : 0: }D
The buggy address belongs to the object at ffff8801bb4af618
 which belongs to the cache eventpoll_pwq of size 72
syz-exec-8219    0...2 65068030us : 0: }D
The buggy address is located 48 bytes inside of
 72-byte region [ffff8801bb4af618, ffff8801bb4af660)
syz-exec-8219    0...2 65068034us : 0: }D
The buggy address belongs to the page:
syz-exec-8219    0...2 65068036us : 0: }D
page:ffffea0006ed2bc0 count:1 mapcount:0 mapping:ffff8801d4843e00 index:0x0
syz-exec-8219    0...2 65068039us : 0: }D
syz-exec-8219    0...2 65068042us : 0: }D
flags: 0x2fffc0000000100(slab)
syz-exec-8219    0...2 65068046us : 0: }D
raw: 02fffc0000000100 ffffea0006fbe208 ffffea00070b50c8 ffff8801d4843e00
syz-exec-8219    0...2 65068048us : 0: }D
raw: 0000000000000000 ffff8801bb4af000 0000000100000027 0000000000000000
syz-exec-8219    0...2 65068051us : 0: }D
page dumped because: kasan: bad access detected
syz-exec-8219    0...2 65068054us : 0: }D

syz-exec-8219    0...2 65068056us : 0: }D
Memory state around the buggy address:
syz-exec-8219    0...2 65068059us : 0: }D
 ffff8801bb4af500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
syz-exec-8219    0...2 65068061us : 0: }D
 ffff8801bb4af580: 00 f1 f1 f1 f1 00 f2 f2 f2 f2 f2 f2 f2 00 f2 f2
syz-exec-8219    0...2 65068063us : 0: }D
>ffff8801bb4af600: f2 f2 f2 f2 f2 00 f2 f2 f2 f2 f2 f2 f2 f8 f2 f2
syz-exec-8219    0...2 65068065us : 0: }D
                                              ^
syz-exec-8219    0...2 65068067us : 0: }D
 ffff8801bb4af680: f2 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00 00
syz-exec-8219    0...2 65068070us : 0: }D
 ffff8801bb4af700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
syz-exec-8219    0...2 65068072us : 0: }D
==================================================================
syz-exec-8219    0...2 65068075us : 0: }D

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/07/08 01:23 bpf-next d90c936fb318 ab89aea9 .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.