syzbot


WARNING: can't dereference registers at ADDR for ip apic_timer_interrupt

Status: auto-closed as invalid on 2019/06/26 03:56
Reported-by: syzbot+40f5857aa71d2bb9197a@syzkaller.appspotmail.com
First crash: 2055d, last: 1995d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 WARNING: can't dereference registers at ADDR for ip apic_timer_interrupt C error 328 468d 1485d 0/1 upstream: reported C repro on 2020/05/20 22:22
android-414 WARNING: can't dereference registers at ADDR for ip apic_timer_interrupt (2) 22 1669d 1744d 0/1 auto-closed as invalid on 2020/03/18 18:31
linux-4.14 WARNING: can't dereference registers at ADDR for ip apic_timer_interrupt C error 25 639d 1422d 0/1 upstream: reported C repro on 2020/07/22 22:24

Sample crash report:
WARNING: can't dereference registers at ffffffffba402330 for ip apic_timer_interrupt+0x84/0x90 arch/x86/entry/entry_64.S:787
==================================================================
BUG: KASAN: stack-out-of-bounds in deref_stack_regs arch/x86/kernel/unwind_orc.c:290 [inline]
BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x1595/0x1930 arch/x86/kernel/unwind_orc.c:420
Read of size 8 at addr ffff8881dba07ce0 by task syz-executor0/4676

CPU: 0 PID: 4676 Comm: syz-executor0 Not tainted 4.14.90+ #29
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0xb9/0x11b lib/dump_stack.c:53
 print_address_description+0x60/0x22b mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409
 deref_stack_regs arch/x86/kernel/unwind_orc.c:290 [inline]
 unwind_next_frame+0x1595/0x1930 arch/x86/kernel/unwind_orc.c:420
 perf_callchain_kernel+0x39c/0x540 arch/x86/events/core.c:2334
 get_perf_callchain+0x2eb/0x760 kernel/events/callchain.c:217
 perf_callchain+0x14a/0x190 kernel/events/callchain.c:190
 perf_prepare_sample+0x704/0x13c0 kernel/events/core.c:6140
 __perf_event_output kernel/events/core.c:6256 [inline]
 perf_event_output_forward+0xeb/0x230 kernel/events/core.c:6274
 __perf_event_overflow+0x116/0x320 kernel/events/core.c:7510
 perf_swevent_overflow+0x166/0x1f0 kernel/events/core.c:7586
 perf_swevent_event+0x112/0x270 kernel/events/core.c:7624
 perf_tp_event+0x620/0x7e0 kernel/events/core.c:8048
 perf_trace_run_bpf_submit+0x10f/0x170 kernel/events/core.c:8018
 perf_trace_lock+0x2f6/0x4c0 include/trace/events/lock.h:39
 trace_lock_release include/trace/events/lock.h:58 [inline]
 lock_release+0x4dc/0x720 kernel/locking/lockdep.c:4009
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:158 [inline]
 _raw_spin_unlock_irqrestore+0x1b/0x70 kernel/locking/spinlock.c:192
 debug_object_deactivate+0x214/0x340 lib/debugobjects.c:530
 debug_rcu_head_unqueue kernel/rcu/rcu.h:164 [inline]
 rcu_do_batch kernel/rcu/tree.c:2690 [inline]
 invoke_rcu_callbacks kernel/rcu/tree.c:2954 [inline]
 __rcu_process_callbacks kernel/rcu/tree.c:2921 [inline]
 rcu_process_callbacks+0x60f/0xee0 kernel/rcu/tree.c:2938
 __do_softirq+0x20d/0x9bd kernel/softirq.c:288
 invoke_softirq kernel/softirq.c:368 [inline]
 irq_exit+0x117/0x150 kernel/softirq.c:409
 exiting_irq arch/x86/include/asm/apic.h:648 [inline]
 smp_apic_timer_interrupt+0x18c/0x600 arch/x86/kernel/apic/apic.c:1064
 apic_timer_interrupt+0x84/0x90 arch/x86/entry/entry_64.S:787
 </IRQ>
RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:778 [inline]
RIP: 0010:lock_release+0x3d0/0x720 kernel/locking/lockdep.c:4013
RSP: 0018:ffff88817fd178b8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10
RAX: 0000000000000007 RBX: 1ffff1102ffa2f1a RCX: 1ffff110398579d4
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000246
RBP: ffff8881cc2bc680 R08: 0000000000000001 R09: 0000000000000001
R10: ffff88817fd17738 R11: ffff88817fd1704f R12: 0000000000000000
R13: ffff8881cc2bcea8 R14: 0000000000000000 R15: ffff8881cc2bc680
 rcu_lock_release include/linux/rcupdate.h:249 [inline]
 rcu_read_unlock include/linux/rcupdate.h:687 [inline]
 __is_insn_slot_addr+0x139/0x1f0 kernel/kprobes.c:301
 is_kprobe_insn_slot include/linux/kprobes.h:317 [inline]
 kernel_text_address+0x10b/0x120 kernel/extable.c:148
 __kernel_text_address+0x9/0x30 kernel/extable.c:105
 unwind_get_return_address+0x51/0x90 arch/x86/kernel/unwind_orc.c:238
 __save_stack_trace+0x8d/0xf0 arch/x86/kernel/stacktrace.c:45
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc.part.1+0x4f/0xd0 mm/kasan/kasan.c:551
 slab_post_alloc_hook mm/slab.h:442 [inline]
 slab_alloc_node mm/slub.c:2723 [inline]
 slab_alloc mm/slub.c:2731 [inline]
 kmem_cache_alloc+0xe4/0x2b0 mm/slub.c:2736
 kmem_cache_zalloc include/linux/slab.h:651 [inline]
 inode_alloc_security security/selinux/hooks.c:234 [inline]
 selinux_inode_alloc_security+0xab/0x290 security/selinux/hooks.c:2885
 security_inode_alloc+0x95/0xd0 security/security.c:439
 inode_init_always+0x4a1/0xa20 fs/inode.c:167
 alloc_inode+0x7b/0x170 fs/inode.c:216
 new_inode_pseudo+0x12/0xd0 fs/inode.c:891
 new_inode+0x18/0x40 fs/inode.c:920
 shmem_get_inode+0x6f/0x6c0 mm/shmem.c:2191
 __shmem_file_setup.part.14+0x122/0x3f0 mm/shmem.c:4277
 __shmem_file_setup mm/shmem.c:4259 [inline]
 shmem_file_setup mm/shmem.c:4326 [inline]
 SYSC_memfd_create mm/shmem.c:3779 [inline]
 SyS_memfd_create+0x1ba/0x310 mm/shmem.c:3719
 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4579b9
RSP: 002b:00007fe7d84dda88 EFLAGS: 00000246 ORIG_RAX: 000000000000013f
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004579b9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000004bcb93
RBP: 000000000073bf00 R08: 0000000001008082 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe7d84de6d4
R13: 00000000004c5f27 R14: 00000000004dace0 R15: 00000000ffffffff

The buggy address belongs to the page:
page:ffffea00076e81c0 count:1 mapcount:0 mapping:          (null) index:0x0
flags: 0x4000000000000800(reserved)
raw: 4000000000000800 0000000000000000 0000000000000000 00000001ffffffff
raw: ffffea00076e81e0 ffffea00076e81e0 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8881dba07b80: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
 ffff8881dba07c00: 04 f2 f2 f2 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00
>ffff8881dba07c80: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f2
                                                       ^
 ffff8881dba07d00: f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8881dba07d80: 00 00 f1 f1 f1 f1 00 00 00 00 00 f2 f2 f2 00 00
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/12/28 03:55 android-4.14 815e34f802d8 af317504 .config console log report ci-android-414-kasan-gce-root
2018/12/26 12:51 android-4.14 815e34f802d8 8a41a0ad .config console log report ci-android-414-kasan-gce-root
2018/10/29 00:40 android-4.14 4ed22187defd 9ca2afa1 .config console log report ci-android-414-kasan-gce-root
* Struck through repros no longer work on HEAD.