INIT: Entering runlevel: 2 [info] Using makefile-style concurrent boot in runlevel 2. [....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added 'ci-upstream-next-kasan-gce-8,10.128.0.40' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 72.111313] ================================================================== [ 72.112464] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 72.113659] [ 72.113928] CPU: 0 PID: 7305 Comm: syzkaller947498 Not tainted 4.13.0-rc5-next-20170817+ #5 [ 72.115065] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 72.116296] Call Trace: [ 72.116685] dump_stack+0x194/0x257 [ 72.117211] ? arch_local_irq_restore+0x53/0x53 [ 72.117915] ? show_regs_print_info+0x65/0x65 [ 72.118529] ? mark_held_locks+0xaf/0x100 [ 72.119109] ? selinux_tun_dev_free_security+0x15/0x20 [ 72.119841] print_address_description+0x73/0x250 [ 72.120517] ? selinux_tun_dev_free_security+0x15/0x20 [ 72.121232] ? selinux_tun_dev_free_security+0x15/0x20 [ 72.121961] kasan_report_double_free+0x55/0x80 [ 72.122604] kasan_slab_free+0xa3/0xc0 [ 72.123143] kfree+0xca/0x250 [ 72.123608] selinux_tun_dev_free_security+0x15/0x20 [ 72.124301] security_tun_dev_free_security+0x48/0x80 [ 72.125010] __tun_chr_ioctl+0x2cb5/0x3d20 [ 72.125605] ? unwind_get_return_address+0x94/0xa0 [ 72.126286] ? tun_chr_read_iter+0x1e0/0x1e0 [ 72.126910] ? check_noncircular+0x20/0x20 [ 72.127491] ? save_stack+0xa3/0xd0 [ 72.128042] ? __handle_mm_fault+0x57f/0x3980 [ 72.128694] ? check_noncircular+0x20/0x20 [ 72.129274] ? __pmd_alloc+0x4e0/0x4e0 [ 72.129840] ? check_same_owner+0x320/0x320 [ 72.130431] ? handle_mm_fault+0x23e/0x940 [ 72.131044] ? tun_chr_compat_ioctl+0x30/0x30 [ 72.132661] tun_chr_ioctl+0x2a/0x40 [ 72.136360] ? tun_chr_ioctl+0x2a/0x40 [ 72.140233] do_vfs_ioctl+0x1b1/0x1520 [ 72.144104] ? _cond_resched+0x14/0x30 [ 72.147988] ? ioctl_preallocate+0x2b0/0x2b0 [ 72.152386] ? selinux_capable+0x40/0x40 [ 72.156442] ? __handle_mm_fault+0x3980/0x3980 [ 72.161030] ? security_file_ioctl+0x7d/0xb0 [ 72.165431] ? security_file_ioctl+0x89/0xb0 [ 72.169835] SyS_ioctl+0x8f/0xc0 [ 72.173194] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 72.177927] RIP: 0033:0x444539 [ 72.181099] RSP: 002b:00007fff541be928 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 72.188789] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444539 [ 72.196041] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000004 [ 72.203295] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 72.210550] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000000000 [ 72.217805] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 72.225091] [ 72.226701] Allocated by task 7305: [ 72.230316] save_stack_trace+0x16/0x20 [ 72.234282] save_stack+0x43/0xd0 [ 72.237719] kasan_kmalloc+0xad/0xe0 [ 72.241420] kmem_cache_alloc_trace+0x136/0x750 [ 72.246074] selinux_tun_dev_alloc_security+0x49/0x170 [ 72.251335] security_tun_dev_alloc_security+0x6d/0xa0 [ 72.256599] __tun_chr_ioctl+0x1730/0x3d20 [ 72.260815] tun_chr_ioctl+0x2a/0x40 [ 72.264518] do_vfs_ioctl+0x1b1/0x1520 [ 72.268391] SyS_ioctl+0x8f/0xc0 [ 72.271743] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 72.276477] [ 72.278091] Freed by task 7305: [ 72.281352] save_stack_trace+0x16/0x20 [ 72.285308] save_stack+0x43/0xd0 [ 72.288746] kasan_slab_free+0x71/0xc0 [ 72.292619] kfree+0xca/0x250 [ 72.295711] selinux_tun_dev_free_security+0x15/0x20 [ 72.300801] security_tun_dev_free_security+0x48/0x80 [ 72.305976] tun_free_netdev+0x13b/0x1b0 [ 72.310025] register_netdevice+0x92b/0xf40 [ 72.314331] __tun_chr_ioctl+0x1caf/0x3d20 [ 72.318553] tun_chr_ioctl+0x2a/0x40 [ 72.322252] do_vfs_ioctl+0x1b1/0x1520 [ 72.326121] SyS_ioctl+0x8f/0xc0 [ 72.329472] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 72.334210] [ 72.335819] The buggy address belongs to the object at ffff8801c248ca40 [ 72.335819] which belongs to the cache kmalloc-32 of size 32 [ 72.348286] The buggy address is located 0 bytes inside of [ 72.348286] 32-byte region [ffff8801c248ca40, ffff8801c248ca60) [ 72.359882] The buggy address belongs to the page: [ 72.364797] page:ffffea0007092300 count:1 mapcount:0 mapping:ffff8801c248c000 index:0xffff8801c248cfc1 [ 72.374226] flags: 0x200000000000100(slab) [ 72.378446] raw: 0200000000000100 ffff8801c248c000 ffff8801c248cfc1 000000010000003f [ 72.386313] raw: ffffea00070b5220 ffffea00070971a0 ffff8801dac001c0 0000000000000000 [ 72.394174] page dumped because: kasan: bad access detected [ 72.400558] [ 72.402167] Memory state around the buggy address: [ 72.407078] ffff8801c248c900: 05 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc [ 72.414418] ffff8801c248c980: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 72.421760] >ffff8801c248ca00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 72.429859] ^ [ 72.435292] ffff8801c248ca80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 72.442633] ffff8801c248cb00: 05 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc [ 72.449974] ================================================================== [ 72.457317] Disabling lock debugging due to kernel taint [ 72.462745] Kernel panic - not syncing: panic_on_warn set ... [ 72.462745] [ 72.470091] CPU: 0 PID: 7305 Comm: syzkaller947498 Tainted: G B 4.13.0-rc5-next-20170817+ #5 [ 72.479773] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 72.489108] Call Trace: [ 72.491680] dump_stack+0x194/0x257 [ 72.495294] ? arch_local_irq_restore+0x53/0x53 [ 72.499944] ? kasan_end_report+0x32/0x50 [ 72.504080] ? lock_downgrade+0x990/0x990 [ 72.508216] panic+0x1e4/0x417 [ 72.511389] ? __warn+0x1d9/0x1d9 [ 72.514834] ? selinux_tun_dev_free_security+0x15/0x20 [ 72.520092] ? selinux_tun_dev_free_security+0x15/0x20 [ 72.525350] kasan_end_report+0x50/0x50 [ 72.529307] kasan_report_double_free+0x72/0x80 [ 72.533962] kasan_slab_free+0xa3/0xc0 [ 72.537836] kfree+0xca/0x250 [ 72.540929] selinux_tun_dev_free_security+0x15/0x20 [ 72.546017] security_tun_dev_free_security+0x48/0x80 [ 72.551194] __tun_chr_ioctl+0x2cb5/0x3d20 [ 72.555412] ? unwind_get_return_address+0x94/0xa0 [ 72.560332] ? tun_chr_read_iter+0x1e0/0x1e0 [ 72.564726] ? check_noncircular+0x20/0x20 [ 72.568943] ? save_stack+0xa3/0xd0 [ 72.572557] ? __handle_mm_fault+0x57f/0x3980 [ 72.577042] ? check_noncircular+0x20/0x20 [ 72.581263] ? __pmd_alloc+0x4e0/0x4e0 [ 72.585154] ? check_same_owner+0x320/0x320 [ 72.589461] ? handle_mm_fault+0x23e/0x940 [ 72.593686] ? tun_chr_compat_ioctl+0x30/0x30 [ 72.598164] tun_chr_ioctl+0x2a/0x40 [ 72.601871] ? tun_chr_ioctl+0x2a/0x40 [ 72.605744] do_vfs_ioctl+0x1b1/0x1520 [ 72.609617] ? _cond_resched+0x14/0x30 [ 72.613500] ? ioctl_preallocate+0x2b0/0x2b0 [ 72.617899] ? selinux_capable+0x40/0x40 [ 72.621949] ? __handle_mm_fault+0x3980/0x3980 [ 72.626523] ? security_file_ioctl+0x7d/0xb0 [ 72.630910] ? security_file_ioctl+0x89/0xb0 [ 72.635307] SyS_ioctl+0x8f/0xc0 [ 72.638661] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 72.643395] RIP: 0033:0x444539 [ 72.646563] RSP: 002b:00007fff541be928 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 72.654250] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444539 [ 72.661507] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000004 [ 72.668760] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 72.676010] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000000000 [ 72.683260] R13: 0000000000401ef0 R14: 0000000000000000 R15: 0000000000000000 [ 72.690928] Dumping ftrace buffer: [ 72.694436] (ftrace buffer empty) [ 72.698111] Kernel Offset: disabled [ 72.701703] Rebooting in 86400 seconds..