linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sound: use-after-free in snd_timer_interrupt
@ 2016-01-13 15:00 Dmitry Vyukov
  2016-01-13 16:53 ` Takashi Iwai
  0 siblings, 1 reply; 37+ messages in thread
From: Dmitry Vyukov @ 2016-01-13 15:00 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Mark Brown, Jie Yang, alsa-devel, LKML
  Cc: syzkaller, Kostya Serebryany, Alexander Potapenko, Sasha Levin,
	Eric Dumazet

Hello,

The following program triggers use-after-free in snd_timer_interrupt:

// autogenerated by syzkaller (http://github.com/google/syzkaller)
#include <unistd.h>
#include <sys/syscall.h>
#include <string.h>
#include <stdint.h>
#include <pthread.h>

long r[84];

void *thr(void *arg)
{
        switch ((long)arg) {
        case 0:
                r[0] = syscall(SYS_mmap, 0x20000000ul, 0xe000ul,
0x3ul, 0x32ul, 0xfffffffffffffffful, 0x0ul);
                break;
        case 1:
                memcpy((void*)0x20000990,
"\x2f\x64\x65\x76\x2f\x73\x6e\x64\x2f\x74\x69\x6d\x65\x72", 14);
                r[2] = syscall(SYS_open, 0x20000990ul, 0x1ul, 0x0ul, 0, 0, 0);
                break;
        case 2:
                *(uint32_t*)0x20000000 = (uint32_t)0x1;
                *(uint32_t*)0x20000004 = (uint32_t)0x7;
                *(uint32_t*)0x20000008 = (uint32_t)0x3;
                *(uint32_t*)0x2000000c = (uint32_t)0x0;
                *(uint32_t*)0x20000010 = (uint32_t)0x0;
                *(uint8_t*)0x20000014 = (uint8_t)0x0;
                *(uint8_t*)0x20000015 = (uint8_t)0x0;
                *(uint8_t*)0x20000016 = (uint8_t)0x0;
                *(uint8_t*)0x20000017 = (uint8_t)0x0;
                *(uint8_t*)0x20000018 = (uint8_t)0x0;
                *(uint8_t*)0x20000019 = (uint8_t)0x0;
                *(uint8_t*)0x2000001a = (uint8_t)0x0;
                *(uint8_t*)0x2000001b = (uint8_t)0x0;
                *(uint8_t*)0x2000001c = (uint8_t)0x0;
                *(uint8_t*)0x2000001d = (uint8_t)0x0;
                *(uint8_t*)0x2000001e = (uint8_t)0x0;
                *(uint8_t*)0x2000001f = (uint8_t)0x0;
                *(uint8_t*)0x20000020 = (uint8_t)0x0;
                *(uint8_t*)0x20000021 = (uint8_t)0x0;
                *(uint8_t*)0x20000022 = (uint8_t)0x0;
                *(uint8_t*)0x20000023 = (uint8_t)0x0;
                *(uint8_t*)0x20000024 = (uint8_t)0x0;
                *(uint8_t*)0x20000025 = (uint8_t)0x0;
                *(uint8_t*)0x20000026 = (uint8_t)0x0;
                *(uint8_t*)0x20000027 = (uint8_t)0x0;
                *(uint8_t*)0x20000028 = (uint8_t)0x0;
                *(uint8_t*)0x20000029 = (uint8_t)0x0;
                *(uint8_t*)0x2000002a = (uint8_t)0x0;
                *(uint8_t*)0x2000002b = (uint8_t)0x0;
                *(uint8_t*)0x2000002c = (uint8_t)0x0;
                *(uint8_t*)0x2000002d = (uint8_t)0x0;
                *(uint8_t*)0x2000002e = (uint8_t)0x0;
                *(uint8_t*)0x2000002f = (uint8_t)0x0;
                *(uint8_t*)0x20000030 = (uint8_t)0x0;
                *(uint8_t*)0x20000031 = (uint8_t)0x0;
                *(uint8_t*)0x20000032 = (uint8_t)0x0;
                *(uint8_t*)0x20000033 = (uint8_t)0x0;
                r[40] = syscall(SYS_ioctl, r[2], 0x40345410ul,
0x20000000ul, 0, 0, 0);
                break;
        case 3:
                r[41] = syscall(SYS_ioctl, r[2], 0x54a2ul, 0, 0, 0, 0);
                break;
        case 4:
                r[42] = syscall(SYS_mmap, 0x2000e000ul, 0x1000ul,
0x3ul, 0x32ul, 0xfffffffffffffffful, 0x0ul);
                break;
        case 5:
                *(uint32_t*)0x2000efcc = (uint32_t)0x7;
                *(uint32_t*)0x2000efd0 = (uint32_t)0x9;
                *(uint32_t*)0x2000efd4 = (uint32_t)0x4513;
                *(uint32_t*)0x2000efd8 = (uint32_t)0x9;
                *(uint32_t*)0x2000efdc = (uint32_t)0x5;
                *(uint8_t*)0x2000efe0 = (uint8_t)0x0;
                *(uint8_t*)0x2000efe1 = (uint8_t)0x0;
                *(uint8_t*)0x2000efe2 = (uint8_t)0x0;
                *(uint8_t*)0x2000efe3 = (uint8_t)0x0;
                *(uint8_t*)0x2000efe4 = (uint8_t)0x0;
                *(uint8_t*)0x2000efe5 = (uint8_t)0x0;
                *(uint8_t*)0x2000efe6 = (uint8_t)0x0;
                *(uint8_t*)0x2000efe7 = (uint8_t)0x0;
                *(uint8_t*)0x2000efe8 = (uint8_t)0x0;
                *(uint8_t*)0x2000efe9 = (uint8_t)0x0;
                *(uint8_t*)0x2000efea = (uint8_t)0x0;
                *(uint8_t*)0x2000efeb = (uint8_t)0x0;
                *(uint8_t*)0x2000efec = (uint8_t)0x0;
                *(uint8_t*)0x2000efed = (uint8_t)0x0;
                *(uint8_t*)0x2000efee = (uint8_t)0x0;
                *(uint8_t*)0x2000efef = (uint8_t)0x0;
                *(uint8_t*)0x2000eff0 = (uint8_t)0x0;
                *(uint8_t*)0x2000eff1 = (uint8_t)0x0;
                *(uint8_t*)0x2000eff2 = (uint8_t)0x0;
                *(uint8_t*)0x2000eff3 = (uint8_t)0x0;
                *(uint8_t*)0x2000eff4 = (uint8_t)0x0;
                *(uint8_t*)0x2000eff5 = (uint8_t)0x0;
                *(uint8_t*)0x2000eff6 = (uint8_t)0x0;
                *(uint8_t*)0x2000eff7 = (uint8_t)0x0;
                *(uint8_t*)0x2000eff8 = (uint8_t)0x0;
                *(uint8_t*)0x2000eff9 = (uint8_t)0x0;
                *(uint8_t*)0x2000effa = (uint8_t)0x0;
                *(uint8_t*)0x2000effb = (uint8_t)0x0;
                *(uint8_t*)0x2000effc = (uint8_t)0x0;
                *(uint8_t*)0x2000effd = (uint8_t)0x0;
                *(uint8_t*)0x2000effe = (uint8_t)0x0;
                *(uint8_t*)0x2000efff = (uint8_t)0x0;
                r[80] = syscall(SYS_ioctl, r[2], 0x40345410ul,
0x2000efccul, 0, 0, 0);
                break;
        case 6:
                r[81] = syscall(SYS_ioctl, r[2], 0x54a0ul, 0, 0, 0, 0);
                break;
        case 7:
                r[82] = syscall(SYS_mmap, 0x2000f000ul, 0x1000ul,
0x3ul, 0x32ul, 0xfffffffffffffffful, 0x0ul);
                break;
        case 8:
                r[83] = syscall(SYS_ioctl, r[2], 0x80e85411ul,
0x2000ffd4ul, 0, 0, 0);
                break;
        }
        return 0;
}

int main()
{
        long i;
        pthread_t th[9];

        memset(r, -1, sizeof(r));
        for (i = 0; i < 9; i++) {
                pthread_create(&th[i], 0, thr, (void*)i);
                usleep(10000);
        }
        for (i = 0; i < 9; i++) {
                pthread_create(&th[i], 0, thr, (void*)i);
                if (i%2==0)
                        usleep(10000);
        }
        usleep(100000);
        return 0;
}


==================================================================
BUG: KASAN: use-after-free in snd_timer_interrupt+0xb11/0xbf0 at addr
ffff88002fd230d8
Read of size 8 by task syz-executor/8301
=============================================================================
BUG kmalloc-256 (Not tainted): kasan: bad access detected
-----------------------------------------------------------------------------

INFO: Allocated in snd_timer_instance_new+0x52/0x3a0 age=2 cpu=1 pid=8283
[<      none      >] ___slab_alloc+0x486/0x4e0 mm/slub.c:2468
[<      none      >] __slab_alloc+0x66/0xc0 mm/slub.c:2497
[<     inline     >] slab_alloc_node mm/slub.c:2560
[<     inline     >] slab_alloc mm/slub.c:2602
[<      none      >] kmem_cache_alloc_trace+0x284/0x310 mm/slub.c:2619
[<     inline     >] kmalloc include/linux/slab.h:458
[<     inline     >] kzalloc include/linux/slab.h:602
[<      none      >] snd_timer_instance_new+0x52/0x3a0 sound/core/timer.c:105
[<      none      >] snd_timer_open+0x522/0xc90 sound/core/timer.c:286
[<     inline     >] snd_timer_user_tselect sound/core/timer.c:1527
[<      none      >] snd_timer_user_ioctl+0x89f/0x2540 sound/core/timer.c:1809
[<     inline     >] vfs_ioctl fs/ioctl.c:43
[<      none      >] do_vfs_ioctl+0x18c/0xfa0 fs/ioctl.c:674
[<     inline     >] SYSC_ioctl fs/ioctl.c:689
[<      none      >] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:680
[<      none      >] entry_SYSCALL_64_fastpath+0x16/0x7a
arch/x86/entry/entry_64.S:185

INFO: Freed in snd_timer_close+0x354/0x5f0 age=1 cpu=1 pid=8283
[<      none      >] __slab_free+0x1fc/0x320 mm/slub.c:2678
[<     inline     >] slab_free mm/slub.c:2833
[<      none      >] kfree+0x2a8/0x2d0 mm/slub.c:3662
[<      none      >] snd_timer_close+0x354/0x5f0 sound/core/timer.c:364
[<     inline     >] snd_timer_user_tselect sound/core/timer.c:1517
[<      none      >] snd_timer_user_ioctl+0x784/0x2540 sound/core/timer.c:1809
[<     inline     >] vfs_ioctl fs/ioctl.c:43
[<      none      >] do_vfs_ioctl+0x18c/0xfa0 fs/ioctl.c:674
[<     inline     >] SYSC_ioctl fs/ioctl.c:689
[<      none      >] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:680
[<      none      >] entry_SYSCALL_64_fastpath+0x16/0x7a
arch/x86/entry/entry_64.S:185

INFO: Slab 0xffffea0000bf4800 objects=22 used=2 fp=0xffff88002fd23058
flags=0x1fffc0000004080
INFO: Object 0xffff88002fd23058 @offset=12376 fp=0xffff88002fd227d0
CPU: 2 PID: 8301 Comm: syz-executor Tainted: G    B           4.4.0+ #240
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
 00000000ffffffff ffff88006d607b08 ffffffff82926eed ffff88003e807000
 ffff88002fd23058 ffff88002fd20000 ffff88006d607b38 ffffffff81740ca4
 ffff88003e807000 ffffea0000bf4800 ffff88002fd23058 ffff88002fd230d8

Call Trace:
 [<ffffffff8174a1fe>] __asan_report_load8_noabort+0x3e/0x40
mm/kasan/report.c:295
 [<ffffffff84ebe841>] snd_timer_interrupt+0xb11/0xbf0 sound/core/timer.c:680
 [<ffffffff84ebe9dd>] snd_timer_s_function+0xbd/0x130 sound/core/timer.c:963
 [<ffffffff814b8c56>] call_timer_fn+0x176/0x550 kernel/time/timer.c:1178
 [<     inline     >] __run_timers kernel/time/timer.c:1254
 [<ffffffff814ba175>] run_timer_softirq+0x5c5/0x9f0 kernel/time/timer.c:1437
 [<ffffffff813606a8>] __do_softirq+0x268/0x920 kernel/softirq.c:273
 [<     inline     >] invoke_softirq kernel/softirq.c:350
 [<ffffffff813610ef>] irq_exit+0x18f/0x1d0 kernel/softirq.c:391
 [<     inline     >] exiting_irq ./arch/x86/include/asm/apic.h:659
 [<ffffffff8125157b>] smp_apic_timer_interrupt+0x7b/0xa0
arch/x86/kernel/apic/apic.c:932
 [<ffffffff86273dec>] apic_timer_interrupt+0x8c/0xa0
arch/x86/entry/entry_64.S:520
 <EOI>  [<ffffffff813ac59d>] ? alloc_pid+0x5d/0xc90 kernel/pid.c:306
 [<     inline     >] slab_alloc_node mm/slub.c:2560
 [<     inline     >] slab_alloc mm/slub.c:2602
 [<ffffffff817446e1>] kmem_cache_alloc+0x261/0x2e0 mm/slub.c:2607
 [<ffffffff813ac59d>] alloc_pid+0x5d/0xc90 kernel/pid.c:306
 [<ffffffff8134ca2e>] copy_process.part.35+0x374e/0x5770 kernel/fork.c:1463
 [<     inline     >] copy_process kernel/fork.c:1275
 [<ffffffff8134ed7c>] _do_fork+0x1bc/0xcb0 kernel/fork.c:1724
 [<     inline     >] SYSC_clone kernel/fork.c:1833
 [<ffffffff8134f947>] SyS_clone+0x37/0x50 kernel/fork.c:1827
 [<ffffffff86272ff6>] entry_SYSCALL_64_fastpath+0x16/0x7a
arch/x86/entry/entry_64.S:185
==================================================================

On commit 67990608c8b95d2b8ccc29932376ae73d5818727 (Jan 12).

^ permalink raw reply	[flat|nested] 37+ messages in thread
* sound: use-after-free in snd_timer_interrupt
@ 2016-04-02  9:08 Dmitry Vyukov
  2016-04-02 16:30 ` Takashi Iwai
  0 siblings, 1 reply; 37+ messages in thread
From: Dmitry Vyukov @ 2016-04-02  9:08 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Thomas Gleixner, Peter Zijlstra,
	alsa-devel, LKML
  Cc: syzkaller, Kostya Serebryany, Alexander Potapenko, Sasha Levin

Hello,

I am hitting the following use-after-free while running syzkaller
fuzzer on commit 8e0f93cda48ed054e1216bab5c60017e1a5fc1e8

==================================================================
BUG: KASAN: use-after-free in __list_del_entry+0x1d3/0x1e0 at addr
ffff88002ebf6e20
Read of size 8 by task syz-executor/7684
=============================================================================
BUG kmalloc-256 (Not tainted): kasan: bad access detected
-----------------------------------------------------------------------------

INFO: Allocated in snd_timer_instance_new+0x52/0x3a0 age=5 cpu=0 pid=7693
[<      none      >] ___slab_alloc+0x578/0x5d0 mm/slub.c:2464
[<      none      >] __slab_alloc+0x66/0xc0 mm/slub.c:2493
[<     inline     >] slab_alloc_node mm/slub.c:2556
[<     inline     >] slab_alloc mm/slub.c:2598
[<      none      >] kmem_cache_alloc_trace+0x242/0x3b0 mm/slub.c:2615
[<     inline     >] kmalloc include/linux/slab.h:463
[<     inline     >] kzalloc include/linux/slab.h:607
[<      none      >] snd_timer_instance_new+0x52/0x3a0 sound/core/timer.c:106
[<      none      >] snd_timer_open+0x522/0xd20 sound/core/timer.c:289
[<     inline     >] snd_timer_user_tselect sound/core/timer.c:1612
[<     inline     >] __snd_timer_user_ioctl sound/core/timer.c:1888
[<      none      >] snd_timer_user_ioctl+0x8f4/0x2490 sound/core/timer.c:1918
[<     inline     >] vfs_ioctl fs/ioctl.c:43
[<      none      >] do_vfs_ioctl+0x18c/0xfb0 fs/ioctl.c:674
[<     inline     >] SYSC_ioctl fs/ioctl.c:689
[<      none      >] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:680
[<      none      >] entry_SYSCALL_64_fastpath+0x16/0x7a
arch/x86/entry/entry_64.S:185

INFO: Freed in snd_timer_close+0x3ee/0x750 age=9 cpu=0 pid=7693
[<      none      >] __slab_free+0x1fc/0x320 mm/slub.c:2674
[<     inline     >] slab_free mm/slub.c:2829
[<      none      >] kfree+0x2f5/0x370 mm/slub.c:3660
[<      none      >] snd_timer_close+0x3ee/0x750 sound/core/timer.c:375
[<     inline     >] snd_timer_user_tselect sound/core/timer.c:1602
[<     inline     >] __snd_timer_user_ioctl sound/core/timer.c:1888
[<      none      >] snd_timer_user_ioctl+0x7cd/0x2490 sound/core/timer.c:1918
[<     inline     >] vfs_ioctl fs/ioctl.c:43
[<      none      >] do_vfs_ioctl+0x18c/0xfb0 fs/ioctl.c:674
[<     inline     >] SYSC_ioctl fs/ioctl.c:689
[<      none      >] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:680
[<      none      >] entry_SYSCALL_64_fastpath+0x16/0x7a
arch/x86/entry/entry_64.S:185

INFO: Slab 0xffffea0000bafd00 objects=22 used=11 fp=0xffff88002ebf6d80
flags=0x1fffc0000004080
INFO: Object 0xffff88002ebf6d80 @offset=11648 fp=0xffff88002ebf5110
CPU: 3 PID: 7684 Comm: syz-executor Tainted: G    B           4.5.0-rc7+ #337
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
 ffffffff87b7d480 ffff88006d707bb0 ffffffff82c2125f ffffffff00bafd00
 fffffbfff0f6fa90 ffff88003e807000 ffff88002ebf6d80 ffff88002ebf4000
 ffffea0000bafd00 ffff88002ebf6e18 ffff88006d707be0 ffffffff8176dcc4

Call Trace:
 [<ffffffff81777e4e>] __asan_report_load8_noabort+0x3e/0x40
mm/kasan/report.c:295
 [<ffffffff82c88f63>] __list_del_entry+0x1d3/0x1e0 lib/list_debug.c:48
 [<     inline     >] list_del_init include/linux/list.h:145
 [<ffffffff852942f9>] snd_timer_interrupt+0x5b9/0xc80 sound/core/timer.c:791
 [<ffffffff8529acc9>] snd_hrtimer_callback+0x169/0x230 sound/core/hrtimer.c:54
 [<     inline     >] __run_hrtimer kernel/time/hrtimer.c:1248
 [<ffffffff814c3911>] __hrtimer_run_queues+0x331/0xe90
kernel/time/hrtimer.c:1312
 [<ffffffff814c62e2>] hrtimer_interrupt+0x182/0x430 kernel/time/hrtimer.c:1346
 [<ffffffff81255ec2>] local_apic_timer_interrupt+0x72/0xe0
arch/x86/kernel/apic/apic.c:907
 [<ffffffff812593e9>] smp_apic_timer_interrupt+0x79/0xa0
arch/x86/kernel/apic/apic.c:931
 [<ffffffff866d256c>] apic_timer_interrupt+0x8c/0xa0
arch/x86/entry/entry_64.S:520
 [<     inline     >] spin_unlock_irqrestore include/linux/spinlock.h:362
 [<ffffffff8177369e>] __slab_free+0x1ae/0x320 mm/slub.c:2681
 [<     inline     >] slab_free mm/slub.c:2829
 [<ffffffff81773ed8>] kmem_cache_free+0x318/0x440 mm/slub.c:2838
 [<ffffffff81704cb8>] ptlock_free+0x38/0x50 mm/memory.c:3912
 [<     inline     >] pgtable_pmd_page_dtor include/linux/mm.h:1702
 [<ffffffff812951ca>] ___pmd_free_tlb+0xaa/0x110 arch/x86/mm/pgtable.c:74
 [<     inline     >] __pmd_free_tlb ./arch/x86/include/asm/pgalloc.h:106
 [<     inline     >] free_pmd_range mm/memory.c:432
 [<     inline     >] free_pud_range mm/memory.c:450
 [<ffffffff816f4dc3>] free_pgd_range+0x973/0xbe0 mm/memory.c:526
 [<ffffffff816f52f5>] free_pgtables+0x2c5/0x3b0 mm/memory.c:558
 [<ffffffff817137c3>] exit_mmap+0x233/0x410 mm/mmap.c:2868
 [<ffffffff813543f5>] mmput+0x95/0x230 kernel/fork.c:706
 [<     inline     >] exit_mm kernel/exit.c:436
 [<ffffffff81366eb2>] do_exit+0x7b2/0x2d00 kernel/exit.c:735
 [<ffffffff81369578>] do_group_exit+0x108/0x330 kernel/exit.c:878
 [<ffffffff8138cf14>] get_signal+0x634/0x15e0 kernel/signal.c:2307
 [<ffffffff811a7db3>] do_signal+0x83/0x1c90 arch/x86/kernel/signal.c:712
 [<ffffffff81006685>] exit_to_usermode_loop+0x1a5/0x210
arch/x86/entry/common.c:247
 [<     inline     >] prepare_exit_to_usermode arch/x86/entry/common.c:282
 [<ffffffff8100866a>] syscall_return_slowpath+0x2ba/0x340
arch/x86/entry/common.c:344
 [<ffffffff866d18e2>] int_ret_from_sys_call+0x25/0x9f
arch/x86/entry/entry_64.S:281

==================================================================
kasan: GPF could be caused by NULL-ptr deref or user memory
accessgeneral protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN
Modules linked in:
CPU: 3 PID: 7684 Comm: syz-executor Tainted: G    B           4.5.0-rc7+ #337
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
task: ffff880061062f80 ti: ffff88005ee10000 task.ti: ffff88005ee10000
RIP: 0010:[<ffffffff82c88e16>]  [<ffffffff82c88e16>] __list_del_entry+0x86/0x1e0
RSP: 0018:ffff88006d707cd0  EFLAGS: 00010046
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffff88002ebf6e18
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffff88006d707cf0 R08: ffffffff89cbcf00 R09: 0000000000000000
R10: ffffed000dae0f8c R11: 0000000000000000 R12: ffff88005ee0d120
R13: ffff8800670a2298 R14: ffff88005ee0d110 R15: ffff88002ebf6e18
FS:  0000000000000000(0000) GS:ffff88006d700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00000000006e0000 CR3: 0000000007ae9000 CR4: 00000000000006e0
Stack:
 ffff88006d707cf0 ffff88002ebf6e18 dffffc0000000000 ffff88005ee0d120
 ffff88006d707db0 ffffffff852942f9 ffff8800670a2368 0000000000000082
 dffffc0000000000 ffff8800670a234c ffffffff87b7d480 ffffed000ce1446d
Call Trace:
 <IRQ>
 [<     inline     >] list_del_init include/linux/list.h:145
 [<ffffffff852942f9>] snd_timer_interrupt+0x5b9/0xc80 sound/core/timer.c:791
 [<ffffffff8529acc9>] snd_hrtimer_callback+0x169/0x230 sound/core/hrtimer.c:54
 [<     inline     >] __run_hrtimer kernel/time/hrtimer.c:1248
 [<ffffffff814c3911>] __hrtimer_run_queues+0x331/0xe90
kernel/time/hrtimer.c:1312
 [<ffffffff814c62e2>] hrtimer_interrupt+0x182/0x430 kernel/time/hrtimer.c:1346
 [<ffffffff81255ec2>] local_apic_timer_interrupt+0x72/0xe0
arch/x86/kernel/apic/apic.c:907
 [<ffffffff812593e9>] smp_apic_timer_interrupt+0x79/0xa0
arch/x86/kernel/apic/apic.c:931
 [<ffffffff866d256c>] apic_timer_interrupt+0x8c/0xa0
arch/x86/entry/entry_64.S:520
 <EOI>
 [<     inline     >] spin_unlock_irqrestore include/linux/spinlock.h:362
 [<ffffffff8177369e>] __slab_free+0x1ae/0x320 mm/slub.c:2681
 [<     inline     >] slab_free mm/slub.c:2829
 [<ffffffff81773ed8>] kmem_cache_free+0x318/0x440 mm/slub.c:2838
 [<ffffffff81704cb8>] ptlock_free+0x38/0x50 mm/memory.c:3912
 [<     inline     >] pgtable_pmd_page_dtor include/linux/mm.h:1702
 [<ffffffff812951ca>] ___pmd_free_tlb+0xaa/0x110 arch/x86/mm/pgtable.c:74
 [<     inline     >] __pmd_free_tlb ./arch/x86/include/asm/pgalloc.h:106
 [<     inline     >] free_pmd_range mm/memory.c:432
 [<     inline     >] free_pud_range mm/memory.c:450
 [<ffffffff816f4dc3>] free_pgd_range+0x973/0xbe0 mm/memory.c:526
 [<ffffffff816f52f5>] free_pgtables+0x2c5/0x3b0 mm/memory.c:558
 [<ffffffff817137c3>] exit_mmap+0x233/0x410 mm/mmap.c:2868
 [<ffffffff813543f5>] mmput+0x95/0x230 kernel/fork.c:706
 [<     inline     >] exit_mm kernel/exit.c:436
 [<ffffffff81366eb2>] do_exit+0x7b2/0x2d00 kernel/exit.c:735
 [<ffffffff81369578>] do_group_exit+0x108/0x330 kernel/exit.c:878
 [<ffffffff8138cf14>] get_signal+0x634/0x15e0 kernel/signal.c:2307
 [<ffffffff811a7db3>] do_signal+0x83/0x1c90 arch/x86/kernel/signal.c:712
 [<ffffffff81006685>] exit_to_usermode_loop+0x1a5/0x210
arch/x86/entry/common.c:247
 [<     inline     >] prepare_exit_to_usermode arch/x86/entry/common.c:282
 [<ffffffff8100866a>] syscall_return_slowpath+0x2ba/0x340
arch/x86/entry/common.c:344
 [<ffffffff866d18e2>] int_ret_from_sys_call+0x25/0x9f
arch/x86/entry/entry_64.S:281
Code: c0 0f 84 91 00 00 00 48 b8 00 02 00 00 00 00 ad de 48 39 c3 0f
84 9f 00 00 00 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80>
3c 02 00 0f 85 f6 00 00 00 4c 8b 23 4c 39 e1 0f 85 95 00 00
RIP  [<ffffffff82c88e16>] __list_del_entry+0x86/0x1e0 lib/list_debug.c:57
 RSP <ffff88006d707cd0>
---[ end trace fd16e1eaa1720656 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Shutting down cpus with NMI
Kernel Offset: disabled
---[ end Kernel panic - not syncing: Fatal exception in interrupt


It is not easily reproducible. I've hit several times while running
fuzzer for a week. Here is one of the logs for the record:
https://gist.githubusercontent.com/dvyukov/c84798ee55721563ecb537c4d51dc9f5/raw/f00b865a85877656f13b41917f7321730f140d35/gistfile1.txt

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2016-04-21  8:31 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-13 15:00 sound: use-after-free in snd_timer_interrupt Dmitry Vyukov
2016-01-13 16:53 ` Takashi Iwai
2016-01-13 18:34   ` Dmitry Vyukov
2016-01-13 19:05     ` Takashi Iwai
2016-01-13 19:30       ` Dmitry Vyukov
2016-01-13 19:41         ` Dmitry Vyukov
2016-01-13 20:30           ` Takashi Iwai
2016-01-13 20:48             ` Dmitry Vyukov
2016-01-13 20:54               ` Takashi Iwai
2016-01-14 16:09                 ` Takashi Iwai
2016-01-15  8:06                   ` Dmitry Vyukov
2016-01-15 11:00                     ` Takashi Iwai
2016-01-15 11:03                       ` Dmitry Vyukov
2016-01-15 13:51                         ` Takashi Iwai
2016-01-15 14:38                           ` Dmitry Vyukov
2016-01-15 15:21                             ` Takashi Iwai
2016-01-15 15:28                               ` Dmitry Vyukov
2016-01-15 15:39                                 ` Takashi Iwai
2016-01-15 19:13                             ` Dmitry Vyukov
2016-01-15 19:18                               ` Takashi Iwai
2016-01-15 19:47                                 ` Dmitry Vyukov
2016-01-15 21:22                                   ` Takashi Iwai
2016-01-15 21:44                                     ` Takashi Iwai
2016-01-18 10:53                                       ` Dmitry Vyukov
2016-01-18 13:06                                         ` Takashi Iwai
2016-01-18 13:30                                           ` Dmitry Vyukov
2016-01-18 13:36                                             ` Takashi Iwai
2016-01-13 20:45         ` Takashi Iwai
2016-04-02  9:08 Dmitry Vyukov
2016-04-02 16:30 ` Takashi Iwai
2016-04-03  6:06   ` Dmitry Vyukov
2016-04-03  6:33     ` Takashi Iwai
2016-04-20  7:56       ` Dmitry Vyukov
2016-04-20  8:08         ` Takashi Iwai
2016-04-20 10:31           ` Takashi Iwai
2016-04-21  8:14             ` Dmitry Vyukov
2016-04-21  8:31               ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).