syzbot


KASAN: stack-out-of-bounds Read in profile_pc
Status: upstream: reported C repro on 2021/05/31 07:15
Reported-by: syzbot+84fe685c02cd112a2ac3@syzkaller.appspotmail.com
First crash: 366d, last: 3d17h

Cause bisection: failed (bisect log)
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 KASAN: stack-out-of-bounds Read in profile_pc C 112 219d 366d 0/2 upstream: reported C repro on 2021/05/27 02:31
Patch testing requests:
Created Duration User Patch Repo Result
2021/06/14 17:36 12m chouhan.shreyansh630@gmail.com upstream report log

Sample crash report:
==================================================================
BUG: KASAN: stack-out-of-bounds in profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42
Read of size 8 at addr ffffc900028cf920 by task syz-executor419/3616

CPU: 1 PID: 3616 Comm: syz-executor419 Not tainted 5.17.0-rc7-syzkaller-00020-gea4424be1688 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106
 print_address_description+0x65/0x3a0 mm/kasan/report.c:255
 __kasan_report mm/kasan/report.c:442 [inline]
 kasan_report+0x19a/0x1f0 mm/kasan/report.c:459
 profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42
 profile_tick+0xcd/0x120 kernel/profile.c:336
 tick_sched_handle kernel/time/tick-sched.c:227 [inline]
 tick_sched_timer+0x287/0x420 kernel/time/tick-sched.c:1428
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x4cb/0xa60 kernel/time/hrtimer.c:1749
 hrtimer_interrupt+0x3b3/0x1040 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline]
 __sysvec_apic_timer_interrupt+0xf9/0x270 arch/x86/kernel/apic/apic.c:1103
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1097
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x12/0x20
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194
Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 c2 49 b4 f7 f6 44 24 21 02 75 4e 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 <e8> 27 f1 3c f7 65 8b 05 88 67 e4 75 85 c0 74 3f 48 c7 04 24 0e 36
RSP: 0018:ffffc900028cf920 EFLAGS: 00000206
RAX: e6b220d8bf598900 RBX: 1ffff92000519f28 RCX: ffffffff90bf5803
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffffc900028cf9b0 R08: ffffffff818c3ff0 R09: ffffed100f174c13
R10: ffffed100f174c13 R11: 0000000000000000 R12: dffffc0000000000
R13: 1ffff92000519f24 R14: ffffc900028cf940 R15: 0000000000000246
 spin_unlock_irqrestore include/linux/spinlock.h:404 [inline]
 __wake_up_common_lock kernel/sched/wait.c:140 [inline]
 __wake_up_sync_key+0x124/0x1c0 kernel/sched/wait.c:205
 pipe_write+0x11ff/0x1b10 fs/pipe.c:593
 call_write_iter include/linux/fs.h:2074 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0xb11/0xe90 fs/read_write.c:590
 ksys_write+0x18f/0x2c0 fs/read_write.c:643
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7ff4160d2273
Code: e8 5b 5d 41 5c 41 5d c3 89 ef 41 bd 01 00 00 00 e8 a2 00 00 00 eb e0 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18
RSP: 002b:00007ffc8ef27328 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000000b5f6 RCX: 00007ff4160d2273
RDX: 0000000000000012 RSI: 00007ff41615303b RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffc8ef26da0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc8ef2733c
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
 </TASK>


addr ffffc900028cf920 is located in stack of task syz-executor419/3616 at offset 0 in frame:
 _raw_spin_unlock_irqrestore+0x0/0x130 kernel/locking/spinlock.c:187

this frame has 1 object:
 [32, 40) 'flags.i.i.i.i'

Memory state around the buggy address:
 ffffc900028cf800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc900028cf880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc900028cf900: 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00
                               ^
 ffffc900028cf980: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
 ffffc900028cfa00: 00 00 00 00 00 f3 f3 f3 f3 f3 f3 f3 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
   0:	9c                   	pushfq
   1:	8f 44 24 20          	popq   0x20(%rsp)
   5:	42 80 3c 23 00       	cmpb   $0x0,(%rbx,%r12,1)
   a:	74 08                	je     0x14
   c:	4c 89 f7             	mov    %r14,%rdi
   f:	e8 c2 49 b4 f7       	callq  0xf7b449d6
  14:	f6 44 24 21 02       	testb  $0x2,0x21(%rsp)
  19:	75 4e                	jne    0x69
  1b:	41 f7 c7 00 02 00 00 	test   $0x200,%r15d
  22:	74 01                	je     0x25
  24:	fb                   	sti
  25:	bf 01 00 00 00       	mov    $0x1,%edi
* 2a:	e8 27 f1 3c f7       	callq  0xf73cf156 <-- trapping instruction
  2f:	65 8b 05 88 67 e4 75 	mov    %gs:0x75e46788(%rip),%eax        # 0x75e467be
  36:	85 c0                	test   %eax,%eax
  38:	74 3f                	je     0x79
  3a:	48                   	rex.W
  3b:	c7                   	.byte 0xc7
  3c:	04 24                	add    $0x24,%al
  3e:	0e                   	(bad)
  3f:	36                   	ss

Crashes (123):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2022/03/08 13:33 upstream ea4424be1688 7bdd8b2c .config log report syz C KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/08 12:21 upstream ea4424be1688 7bdd8b2c .config log report syz C KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/08 11:49 upstream ea4424be1688 7bdd8b2c .config log report syz C KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/08 11:28 upstream ea4424be1688 7bdd8b2c .config log report syz C KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/02/19 13:43 upstream 4f12b742eb2b 3cd800e4 .config log report syz C KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/02/17 06:57 upstream 359303076163 2bea8a27 .config log report syz C KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/06/03 08:01 upstream 324c92e5e0ee 0740de69 .config log report syz C KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/05/25 04:31 upstream aa051d36ce4a 647c0e27 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/05/21 23:45 upstream 6c3f5bec9b40 7268fa62 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/05/14 18:51 upstream ec7f49619d8e 744a39e2 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/05/14 18:19 upstream ec7f49619d8e 744a39e2 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/05/13 14:13 upstream f3f19f939c11 107f6434 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/05/12 08:00 upstream feb9c5e19e91 beb0b407 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/05/12 02:55 upstream feb9c5e19e91 beb0b407 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/05/10 14:08 upstream 9be9ed2612b5 8b277b8e .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/04/27 06:01 upstream cf424ef014ac 1fa34c1b .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/04/20 19:24 upstream 559089e0a93d 160a3f31 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/04/19 04:52 upstream b2d229d4ddb1 8bcc32a6 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/04/03 18:00 upstream be2d3ecedd99 79a2a8fc .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/04/02 07:31 upstream 8467b0ed6ce3 79a2a8fc .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/29 10:35 upstream cffb2b72d3ed 6bdac766 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/24 05:50 upstream 1bc191051dca 5ff41e94 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/23 08:03 upstream 6b1f86f8e9c7 5ff41e94 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/22 23:22 upstream b47d5a4f6b8d d88ef0c5 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/21 05:05 upstream f443e374ae13 e2d91b1d .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/13 05:37 upstream aad611a868d1 9e8eaa75 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/12 15:32 upstream 68453767131a 9e8eaa75 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/09 13:21 upstream 330f4c53d3c2 9e8eaa75 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/07 16:55 upstream ffb217a13a2e 7bdd8b2c .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/06 14:30 upstream dcde98da9970 7bdd8b2c .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/05 16:34 upstream ac84e82f78cb 45a13a73 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/05 15:03 upstream ac84e82f78cb 45a13a73 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/03/02 00:07 upstream 575115360652 45a13a73 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/02/25 11:32 upstream 73878e5eb1bd 7c337266 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/02/20 17:24 upstream 4f12b742eb2b 3cd800e4 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/02/13 13:18 upstream b81b1829e7e3 8b9ca619 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/02/09 16:50 upstream e6251ab4551f 0b33604d .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/02/08 17:24 upstream 555f3d7be91a 0b33604d .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/02/05 21:57 upstream 0457e5153e0e a7dab638 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/02/02 02:58 upstream 9f7fb8de5d9b 4ebb2798 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/01/26 00:56 upstream 0280e3c58f92 2cbffd88 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2022/01/08 10:06 upstream d1587f7bfe9a 2ca0d385 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/12/30 17:42 upstream eec4df26e24e 2e49f10d .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/12/28 23:47 upstream ecf71de775a0 76c8cf06 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/12/23 11:47 upstream bc491fb12513 6caa12e4 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/12/17 18:37 upstream 6441998e2e37 44068e19 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/12/13 12:28 upstream 2585cf9dfaad 49ca1f59 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/12/11 17:28 upstream 6f513529296f 49ca1f59 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/12/06 18:35 upstream 0fcfb00b28c0 579a8754 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/11/30 01:36 upstream d58071a8a76d d0830353 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/11/27 12:34 upstream c5c17547b778 63eeac02 .config log report info KASAN: stack-out-of-bounds Read in profile_pc
ci-upstream-kasan-gce-smack-root 2021/05/27 02:41 upstream 7ac3a1c1ae51 858ea628 .config log report info KASAN: stack-out-of-bounds Read in profile_pc