KASAN: global-out-of-bounds Read in pvclock_gtod_notify

6 views
Skip to first unread message

syzbot

unread,
Aug 17, 2020, 3:52:21 AM8/17/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: fb893de3 Merge tag 'tag-chrome-platform-for-v5.9' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=170b8ab4900000
kernel config: https://syzkaller.appspot.com/x/.config?x=f1fedc63022bf07e
dashboard link: https://syzkaller.appspot.com/bug?extid=916e9f1b8faca356f20b
compiler: gcc (GCC) 10.1.0-syz 20200507
CC: [b...@alien8.de h...@zytor.com jmat...@google.com jo...@8bytes.org k...@vger.kernel.org linux-...@vger.kernel.org mi...@redhat.com pbon...@redhat.com sean.j.chr...@intel.com tg...@linutronix.de vkuz...@redhat.com wanp...@tencent.com x...@kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+916e9f...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: global-out-of-bounds in update_pvclock_gtod arch/x86/kvm/x86.c:1745 [inline]
BUG: KASAN: global-out-of-bounds in pvclock_gtod_notify+0x522/0x570 arch/x86/kvm/x86.c:7452
Read of size 8 at addr ffffffff8c96d2c0 by task syz-executor.3/12844

CPU: 1 PID: 12844 Comm: syz-executor.3 Not tainted 5.8.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x18f/0x20d lib/dump_stack.c:118
print_address_description.constprop.0.cold+0x5/0x497 mm/kasan/report.c:383
__kasan_report mm/kasan/report.c:513 [inline]
kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530
update_pvclock_gtod arch/x86/kvm/x86.c:1745 [inline]
pvclock_gtod_notify+0x522/0x570 arch/x86/kvm/x86.c:7452
notifier_call_chain+0xb5/0x200 kernel/notifier.c:83
update_pvclock_gtod kernel/time/timekeeping.c:581 [inline]
timekeeping_update+0x28a/0x4a0 kernel/time/timekeeping.c:675
timekeeping_advance+0x6ad/0xa40 kernel/time/timekeeping.c:2122
tick_do_update_jiffies64.part.0+0x1ec/0x330 kernel/time/tick-sched.c:101
tick_do_update_jiffies64 kernel/time/tick-sched.c:64 [inline]
tick_sched_do_timer kernel/time/tick-sched.c:147 [inline]
tick_sched_timer+0x236/0x2a0 kernel/time/tick-sched.c:1321
__run_hrtimer kernel/time/hrtimer.c:1524 [inline]
__hrtimer_run_queues+0x1d5/0xfc0 kernel/time/hrtimer.c:1588
hrtimer_interrupt+0x32a/0x930 kernel/time/hrtimer.c:1650
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1080 [inline]
__sysvec_apic_timer_interrupt+0x142/0x5e0 arch/x86/kernel/apic/apic.c:1097
asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706
</IRQ>
__run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline]
sysvec_apic_timer_interrupt+0xb2/0xf0 arch/x86/kernel/apic/apic.c:1091
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581
RIP: 0010:arch_atomic_dec_and_test arch/x86/include/asm/atomic.h:123 [inline]
RIP: 0010:atomic_dec_and_test include/asm-generic/atomic-instrumented.h:749 [inline]
RIP: 0010:page_ref_dec_and_test include/linux/page_ref.h:148 [inline]
RIP: 0010:put_page_testzero include/linux/mm.h:696 [inline]
RIP: 0010:release_pages+0x1cf/0x17a0 mm/swap.c:871
Code: 65 34 31 ff 44 89 e6 e8 df 77 db ff 45 85 e4 0f 84 db 05 00 00 e8 51 7b db ff be 04 00 00 00 48 89 df e8 b4 3c 1b 00 f0 ff 0b <0f> 94 c3 31 ff 89 de e8 75 77 db ff 84 db 0f 84 fd 02 00 00 e8 28
RSP: 0018:ffffc9000876f8f0 EFLAGS: 00000206
RAX: 0000000000000001 RBX: ffffea00016f83b4 RCX: ffffffff8198ce4c
RDX: fffff940002df077 RSI: 0000000000000004 RDI: ffffea00016f83b4
RBP: 0000000000000132 R08: 0000000000000001 R09: ffffea00016f83b7
R10: fffff940002df076 R11: 0000000000000000 R12: 0000000000000004
R13: ffffea00016f8380 R14: ffff8880a7e369a8 R15: dffffc0000000000
tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:242 [inline]
tlb_flush_mmu mm/mmu_gather.c:249 [inline]
tlb_finish_mmu+0x165/0x8c0 mm/mmu_gather.c:328
exit_mmap+0x2d1/0x530 mm/mmap.c:3185
__mmput+0x122/0x470 kernel/fork.c:1076
mmput+0x53/0x60 kernel/fork.c:1097
exit_mm kernel/exit.c:483 [inline]
do_exit+0xa8b/0x29f0 kernel/exit.c:793
do_group_exit+0x125/0x310 kernel/exit.c:903
get_signal+0x40b/0x1ee0 kernel/signal.c:2743
arch_do_signal+0x82/0x2520 arch/x86/kernel/signal.c:811
exit_to_user_mode_loop kernel/entry/common.c:135 [inline]
exit_to_user_mode_prepare+0x172/0x1d0 kernel/entry/common.c:166
syscall_exit_to_user_mode+0x59/0x2b0 kernel/entry/common.c:241
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45d189
Code: Bad RIP value.
RSP: 002b:00007f9261371c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: 0000000000000018 RBX: 000000000002bf80 RCX: 000000000045d189
RDX: 0000000000000000 RSI: 0000000020005680 RDI: 0000000000000005
RBP: 000000000118d020 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cfec
R13: 00007ffe7d3bf86f R14: 00007f92613729c0 R15: 000000000118cfec

The buggy address belongs to the variable:
no_irq_affinity+0x20/0x40

Memory state around the buggy address:
ffffffff8c96d180: f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9 04 f9 f9 f9
ffffffff8c96d200: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9
>ffffffff8c96d280: f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
^
ffffffff8c96d300: f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9
ffffffff8c96d380: f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Nov 11, 2020, 2:48:12 AM11/11/20
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages