================================================================== BUG: KASAN: slab-out-of-bounds in __collect_expired_timers include/linux/list.h:729 [inline] BUG: KASAN: slab-out-of-bounds in collect_expired_timers kernel/time/timer.c:1569 [inline] BUG: KASAN: slab-out-of-bounds in __run_timers+0xa2e/0xb90 kernel/time/timer.c:1616 Write of size 8 at addr ffff880067f0bb48 by task swapper/2/0 CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.13.0-rc7-next-20170901+ #13 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x24e/0x340 mm/kasan/report.c:409 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report.c:435 __collect_expired_timers include/linux/list.h:729 [inline] collect_expired_timers kernel/time/timer.c:1569 [inline] __run_timers+0xa2e/0xb90 kernel/time/timer.c:1616 run_timer_softirq+0x4c/0xb0 kernel/time/timer.c:1646 __do_softirq+0x2bb/0xbd0 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x1d3/0x210 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x177/0x710 arch/x86/kernel/apic/apic.c:1048 apic_timer_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:577 RIP: 0010:native_safe_halt+0x6/0x10 arch/x86/include/asm/irqflags.h:53 RSP: 0018:ffff88006dacfdb0 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10 RAX: dffffc0000000000 RBX: 1ffff1000db59fb9 RCX: 0000000000000000 RDX: 1ffffffff0b59308 RSI: 0000000000000001 RDI: ffffffff85ac9840 RBP: ffff88006dacfdb0 R08: ffffffff8161c679 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff85ac9830 R13: ffff88006dacfe68 R14: 0000000000000000 R15: ffff88006dac6040 arch_safe_halt arch/x86/include/asm/paravirt.h:98 [inline] default_idle+0xbf/0x460 arch/x86/kernel/process.c:341 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:332 default_idle_call+0x36/0x90 kernel/sched/idle.c:98 cpuidle_idle_call kernel/sched/idle.c:156 [inline] do_idle+0x256/0x3b0 kernel/sched/idle.c:246 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:351 start_secondary+0x277/0x310 arch/x86/kernel/smpboot.c:275 secondary_startup_64+0xa5/0xa5 arch/x86/kernel/head_64.S:235 Allocated by task 8030: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x162/0x760 mm/slab.c:3734 kmalloc include/linux/slab.h:498 [inline] bio_alloc_bioset+0x404/0x750 block/bio.c:450 bio_kmalloc include/linux/bio.h:422 [inline] bio_copy_user_iov+0x40e/0xe70 block/bio.c:1246 __blk_rq_map_user_iov block/blk-map.c:59 [inline] blk_rq_map_user_iov+0x28c/0x7f0 block/blk-map.c:137 blk_rq_map_user+0x111/0x180 block/blk-map.c:167 sg_start_req drivers/scsi/sg.c:1786 [inline] sg_common_write.isra.17+0x1352/0x1cb0 drivers/scsi/sg.c:777 sg_write+0x7a6/0xca0 drivers/scsi/sg.c:677 __vfs_write+0xef/0x970 fs/read_write.c:468 vfs_write+0x18f/0x510 fs/read_write.c:518 SYSC_write fs/read_write.c:565 [inline] SyS_write+0xef/0x220 fs/read_write.c:557 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 7588: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3503 [inline] kfree+0xca/0x250 mm/slab.c:3820 kvfree+0x36/0x60 mm/util.c:416 netdev_freemem+0x4c/0x60 net/core/dev.c:7962 netdev_release+0x76/0x90 net/core/net-sysfs.c:1492 device_release+0x7c/0x200 drivers/base/core.c:814 kobject_cleanup lib/kobject.c:648 [inline] kobject_release lib/kobject.c:677 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put+0x14c/0x240 lib/kobject.c:694 netdev_run_todo+0x914/0xca0 net/core/dev.c:7867 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:106 tun_detach drivers/net/tun.c:588 [inline] tun_chr_close+0x49/0x60 drivers/net/tun.c:2595 __fput+0x333/0x7f0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:246 task_work_run+0x199/0x270 kernel/task_work.c:112 exit_task_work include/linux/task_work.h:21 [inline] do_exit+0xa52/0x1b40 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 get_signal+0x7e8/0x17e0 kernel/signal.c:2334 do_signal+0x94/0x1ee0 arch/x86/kernel/signal.c:808 exit_to_usermode_loop+0x224/0x300 arch/x86/entry/common.c:158 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath+0x42f/0x500 arch/x86/entry/common.c:266 entry_SYSCALL_64_fastpath+0xbc/0xbe The buggy address belongs to the object at ffff880067f08740 which belongs to the cache kmalloc-16384 of size 16384 The buggy address is located 13320 bytes inside of 16384-byte region [ffff880067f08740, ffff880067f0c740) The buggy address belongs to the page: page:ffffea00019fc200 count:1 mapcount:0 mapping:ffff880067f08740 index:0x0 compound_mapcount: 0 flags: 0x500000000008100(slab|head) raw: 0500000000008100 ffff880067f08740 0000000000000000 0000000100000001 raw: ffffea0001666420 ffffea0001a69220 ffff88003e802200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff880067f0ba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff880067f0ba80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff880067f0bb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff880067f0bb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff880067f0bc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================