================================================================== BUG: KASAN: use-after-free in hlist_move_list include/linux/list.h:729 [inline] BUG: KASAN: use-after-free in __collect_expired_timers kernel/time/timer.c:1339 [inline] BUG: KASAN: use-after-free in collect_expired_timers kernel/time/timer.c:1569 [inline] BUG: KASAN: use-after-free in __run_timers+0xa2e/0xb90 kernel/time/timer.c:1616 Write of size 8 at addr ffff8801cb133a88 by task syz-executor5/8431 CPU: 1 PID: 8431 Comm: syz-executor5 Not tainted 4.14.0-rc3-mm1+ #13 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 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+0x25b/0x340 mm/kasan/report.c:409 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report.c:435 hlist_move_list include/linux/list.h:729 [inline] __collect_expired_timers kernel/time/timer.c:1339 [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+0x29d/0xbb2 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:540 [inline] smp_apic_timer_interrupt+0x16b/0x700 arch/x86/kernel/apic/apic.c:1041 apic_timer_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:770 RIP: 0010:__sock_create+0x30d/0x850 net/socket.c:1256 RSP: 0018:ffff8801c53c7d98 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff11 RAX: dffffc0000000000 RBX: 1ffff10038a78fba RCX: ffffc900041a0000 RDX: 1ffffffff0a7f35e RSI: ffffffff83e22148 RDI: 0000000000000286 RBP: ffff8801c53c7e98 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: ffffffff87069c60 R12: 0000000000000002 R13: 0000000000000006 R14: ffffffff853f9ae0 R15: ffffffff853f9af0 sock_create net/socket.c:1302 [inline] SYSC_socket net/socket.c:1332 [inline] SyS_socket+0xeb/0x200 net/socket.c:1312 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4520a9 RSP: 002b:00007ff7f6abcc08 EFLAGS: 00000216 ORIG_RAX: 0000000000000029 RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 00000000004520a9 RDX: 0000004000000400 RSI: 0000000000000006 RDI: 0000000000000002 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 R13: 0000000000a6f7ef R14: 00007ff7f6abd9c0 R15: 0000000000000000 Allocated by task 7737: 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_node mm/slab.c:3690 [inline] __kmalloc_node+0x47/0x70 mm/slab.c:3697 kmalloc_node include/linux/slab.h:550 [inline] kvmalloc_node+0x64/0xd0 mm/util.c:397 kvmalloc include/linux/mm.h:529 [inline] kvzalloc include/linux/mm.h:537 [inline] alloc_netdev_mqs+0x16d/0xed0 net/core/dev.c:8044 tun_set_iff drivers/net/tun.c:2245 [inline] __tun_chr_ioctl+0x1386/0x3e40 drivers/net/tun.c:2499 tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:2744 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 7737: 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:3504 [inline] kfree+0xca/0x250 mm/slab.c:3821 kvfree+0x36/0x60 mm/util.c:416 netdev_freemem net/core/dev.c:7996 [inline] free_netdev+0x2cf/0x360 net/core/dev.c:8158 tun_set_iff drivers/net/tun.c:2328 [inline] __tun_chr_ioctl+0x2df6/0x3e40 drivers/net/tun.c:2499 tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:2744 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 entry_SYSCALL_64_fastpath+0x1f/0xbe The buggy address belongs to the object at ffff8801cb130680 which belongs to the cache kmalloc-16384 of size 16384 The buggy address is located 13320 bytes inside of 16384-byte region [ffff8801cb130680, ffff8801cb134680) The buggy address belongs to the page: page:ffffea00072c4c00 count:1 mapcount:0 mapping:ffff8801cb130680 index:0x0 compound_mapcount: 0 flags: 0x200000000008100(slab|head) raw: 0200000000008100 ffff8801cb130680 0000000000000000 0000000100000001 raw: ffffea00072b7620 ffffea00072b7220 ffff8801dac02200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cb133980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cb133a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801cb133a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801cb133b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cb133b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================