[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAeHK+yqC-S=fQozuBF4xu+d+e=ikwc_ipn-xUGnmfnWsjUtoA@mail.gmail.com>
Date: Tue, 20 Dec 2016 15:43:27 +0100
From: Andrey Konovalov <andreyknvl@...gle.com>
To: Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
kasan-dev <kasan-dev@...glegroups.com>, linux-mm@...ck.org,
LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Kostya Serebryany <kcc@...gle.com>,
syzkaller <syzkaller@...glegroups.com>
Subject: x86: warning in unwind_get_return_address
Hi,
I've got the following warning while running the syzkaller fuzzer:
WARNING: unrecognized kernel stack return address ffffffffa0000001 at
ffff88006377fa18 in a.out:4467
By adding a BUG() to unwind_get_return_address() I was able to capture
the stack trace (see below). Looks like unwind_get_return_address()
gets called when KASAN tries to unwind the stack to save the stack
trace.
A reproducer is attached. CONFIG_KASAN=y is most likely needed for it to work.
On commit e93b1cc8a8965da137ffea0b88e5f62fa1d2a9e6 (Dec 19).
------------[ cut here ]------------
kernel BUG at arch/x86/kernel/unwind_frame.c:27!
invalid opcode: 0000 [#1] SMP KASAN
Modules linked in:
CPU: 1 PID: 4467 Comm: a.out Not tainted 4.9.0+ #53
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
task: ffff8800665b9600 task.stack: ffff880063778000
RIP: 0010:unwind_get_return_address+0xcc/0x1b0 arch/x86/kernel/unwind_frame.c:24
RSP: 0018:ffff88006cb06fa0 EFLAGS: 00010286
RAX: 0000000000000064 RBX: ffff8800665b9600 RCX: 0000000000000000
RDX: 0000000000000100 RSI: ffff88006cb15f08 RDI: ffffed000d960de6
RBP: ffff88006cb06fb8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000009 R11: 0000000000000000 R12: ffffffffa0000001
R13: ffff88006377fa18 R14: ffff8800665b9600 R15: 0000000000000246
FS: 00007f7c347947c0(0000) GS:ffff88006cb00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020004fc8 CR3: 0000000062668000 CR4: 00000000000006e0
Call Trace:
<IRQ>
__save_stack_trace+0x7e/0xd0 arch/x86/kernel/stacktrace.c:43
save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57
save_stack+0x43/0xd0 mm/kasan/kasan.c:502
set_track mm/kasan/kasan.c:514
kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:578
slab_free_hook mm/slub.c:1352
slab_free_freelist_hook mm/slub.c:1374
slab_free mm/slub.c:2951
kmem_cache_free+0xb2/0x2c0 mm/slub.c:2973
file_free_rcu+0x6d/0xa0 fs/file_table.c:49
__rcu_reclaim kernel/rcu/rcu.h:118
rcu_do_batch.isra.67+0x900/0xc50 kernel/rcu/tree.c:2777
invoke_rcu_callbacks kernel/rcu/tree.c:3040
__rcu_process_callbacks kernel/rcu/tree.c:3007
rcu_process_callbacks+0x2b7/0xba0 kernel/rcu/tree.c:3024
__do_softirq+0x2fb/0xb7d kernel/softirq.c:284
invoke_softirq kernel/softirq.c:364
irq_exit+0x19e/0x1d0 kernel/softirq.c:405
exiting_irq ./arch/x86/include/asm/apic.h:658
smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:961
apic_timer_interrupt+0x93/0xa0
RIP: 0010:0xffffffffa0000001
RSP: 0018:ffff88006377fa48 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10
RAX: ffff8800665b9600 RBX: ffff880066471400 RCX: 1ffffffff0bc9005
RDX: 0000000000000000 RSI: ffff88006377fe78 RDI: ffff880066471400
RBP: ffff88006377fb00 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff1000c6eff4f
R13: ffffffff85e47fc0 R14: 0000000000000000 R15: ffff880066471428
</IRQ>
Code: 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 eb 00 00 00 4d 8b 65
00 4c 89 e7 e8 21 75 0c 00 85 c0 75 0e 80 3d 44 fc c9 04 00 74 4f <0f>
0b 45 31 e4 5b 4c 89 e0 41 5c 41 5d 5d c3 48 8d 7b 38 48 b8
RIP: unwind_get_return_address+0xcc/0x1b0 RSP: ffff88006cb06fa0
---[ end trace a4f6a441af47c2dc ]---
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: disabled
---[ end Kernel panic - not syncing: Fatal exception in interrupt
View attachment "stack-unwind-warn-poc.c" of type "text/x-csrc" (7934 bytes)
Powered by blists - more mailing lists