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-7,10.128.0.27' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 43.502792] ================================================================== [ 43.503915] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 43.505094] [ 43.505328] CPU: 0 PID: 2939 Comm: syzkaller746291 Not tainted 4.13.0-rc4-next-20170811 #1 [ 43.506425] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.507663] Call Trace: [ 43.508020] dump_stack+0x194/0x257 [ 43.508512] ? arch_local_irq_restore+0x53/0x53 [ 43.509136] ? show_regs_print_info+0x65/0x65 [ 43.509735] ? mark_held_locks+0xaf/0x100 [ 43.510296] ? selinux_tun_dev_free_security+0x15/0x20 [ 43.511055] print_address_description+0x7f/0x260 [ 43.511698] ? selinux_tun_dev_free_security+0x15/0x20 [ 43.512395] ? selinux_tun_dev_free_security+0x15/0x20 [ 43.513095] kasan_report_double_free+0x55/0x80 [ 43.513737] kasan_slab_free+0xa0/0xc0 [ 43.514259] kfree+0xd3/0x260 [ 43.514683] selinux_tun_dev_free_security+0x15/0x20 [ 43.515375] security_tun_dev_free_security+0x48/0x80 [ 43.516067] __tun_chr_ioctl+0x2cb5/0x3d20 [ 43.516634] ? unwind_get_return_address+0x84/0xa0 [ 43.517298] ? tun_select_queue+0x580/0x580 [ 43.517878] ? putname+0xee/0x130 [ 43.518357] ? save_stack+0xa3/0xd0 [ 43.518857] ? save_stack_trace+0x16/0x20 [ 43.519410] ? save_stack+0x43/0xd0 [ 43.519900] ? kasan_slab_free+0x6e/0xc0 [ 43.520488] ? kmem_cache_free+0x71/0x240 [ 43.521042] ? putname+0xee/0x130 [ 43.521513] ? check_noncircular+0x20/0x20 [ 43.522158] ? __pmd_alloc+0x4f0/0x4f0 [ 43.522691] ? check_same_owner+0x320/0x320 [ 43.525740] ? lock_acquire+0x1d5/0x580 [ 43.529678] ? lock_acquire+0x1d5/0x580 [ 43.533625] ? tun_chr_compat_ioctl+0x30/0x30 [ 43.538088] tun_chr_ioctl+0x2a/0x40 [ 43.541778] ? tun_chr_ioctl+0x2a/0x40 [ 43.545634] do_vfs_ioctl+0x1b1/0x1520 [ 43.549488] ? _cond_resched+0x14/0x30 [ 43.553348] ? ioctl_preallocate+0x2b0/0x2b0 [ 43.557734] ? selinux_capable+0x40/0x40 [ 43.561763] ? __ioremap_caller+0xda/0x750 [ 43.565968] ? downgrade_write+0x150/0x150 [ 43.570188] ? security_file_ioctl+0x7d/0xb0 [ 43.574562] ? security_file_ioctl+0x89/0xb0 [ 43.578953] SyS_ioctl+0x8f/0xc0 [ 43.582294] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.587014] RIP: 0033:0x443ff9 [ 43.590171] RSP: 002b:00007ffc7470cb48 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 43.597846] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443ff9 [ 43.605084] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 [ 43.612322] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 43.619556] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ce0 [ 43.626791] R13: 0000000000401d70 R14: 0000000000000000 R15: 0000000000000000 [ 43.634047] [ 43.635641] Allocated by task 2939: [ 43.639237] save_stack_trace+0x16/0x20 [ 43.643178] save_stack+0x43/0xd0 [ 43.646595] kasan_kmalloc+0xaa/0xd0 [ 43.650272] kmem_cache_alloc_trace+0x108/0x700 [ 43.654911] selinux_tun_dev_alloc_security+0x49/0x170 [ 43.660154] security_tun_dev_alloc_security+0x6d/0xa0 [ 43.665400] __tun_chr_ioctl+0x1730/0x3d20 [ 43.669598] tun_chr_ioctl+0x2a/0x40 [ 43.673276] do_vfs_ioctl+0x1b1/0x1520 [ 43.677127] SyS_ioctl+0x8f/0xc0 [ 43.680458] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.685179] [ 43.686770] Freed by task 2939: [ 43.690030] save_stack_trace+0x16/0x20 [ 43.693967] save_stack+0x43/0xd0 [ 43.697384] kasan_slab_free+0x6e/0xc0 [ 43.701235] kfree+0xd3/0x260 [ 43.704305] selinux_tun_dev_free_security+0x15/0x20 [ 43.709373] security_tun_dev_free_security+0x48/0x80 [ 43.714528] tun_free_netdev+0x13b/0x1b0 [ 43.718553] register_netdevice+0x92b/0xf40 [ 43.722836] __tun_chr_ioctl+0x1caf/0x3d20 [ 43.727035] tun_chr_ioctl+0x2a/0x40 [ 43.730720] do_vfs_ioctl+0x1b1/0x1520 [ 43.734570] SyS_ioctl+0x8f/0xc0 [ 43.737900] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.742619] [ 43.744216] The buggy address belongs to the object at ffff8801d1bb6d00 [ 43.744216] which belongs to the cache kmalloc-32 of size 32 [ 43.756670] The buggy address is located 0 bytes inside of [ 43.756670] 32-byte region [ffff8801d1bb6d00, ffff8801d1bb6d20) [ 43.768250] The buggy address belongs to the page: [ 43.773145] page:ffffea00065e0fd0 count:1 mapcount:0 mapping:ffff8801d1bb6000 index:0xffff8801d1bb6fc1 [ 43.782561] flags: 0x200000000000100(slab) [ 43.786762] raw: 0200000000000100 ffff8801d1bb6000 ffff8801d1bb6fc1 000000010000003f [ 43.794608] raw: ffffea00065ef728 ffffea00065dcbb0 ffff8801dbc00100 [ 43.800974] page dumped because: kasan: bad access detected [ 43.806644] [ 43.808236] Memory state around the buggy address: [ 43.813130] ffff8801d1bb6c00: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc [ 43.820454] ffff8801d1bb6c80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 43.827780] >ffff8801d1bb6d00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 43.835103] ^ [ 43.838435] ffff8801d1bb6d80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 43.845758] ffff8801d1bb6e00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 43.853078] ================================================================== [ 43.860399] Disabling lock debugging due to kernel taint [ 43.865818] Kernel panic - not syncing: panic_on_warn set ... [ 43.865818] [ 43.873144] CPU: 0 PID: 2939 Comm: syzkaller746291 Tainted: G B 4.13.0-rc4-next-20170811 #1 [ 43.882725] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.892044] Call Trace: [ 43.894599] dump_stack+0x194/0x257 [ 43.898191] ? arch_local_irq_restore+0x53/0x53 [ 43.902824] ? kasan_end_report+0x32/0x50 [ 43.906937] ? lock_downgrade+0x990/0x990 [ 43.911055] panic+0x1e4/0x417 [ 43.914225] ? __warn+0x1d9/0x1d9 [ 43.917647] ? selinux_tun_dev_free_security+0x15/0x20 [ 43.922887] ? selinux_tun_dev_free_security+0x15/0x20 [ 43.928126] kasan_end_report+0x50/0x50 [ 43.932063] kasan_report_double_free+0x72/0x80 [ 43.936694] kasan_slab_free+0xa0/0xc0 [ 43.940544] kfree+0xd3/0x260 [ 43.943616] selinux_tun_dev_free_security+0x15/0x20 [ 43.948682] security_tun_dev_free_security+0x48/0x80 [ 43.953837] __tun_chr_ioctl+0x2cb5/0x3d20 [ 43.958037] ? unwind_get_return_address+0x84/0xa0 [ 43.962934] ? tun_select_queue+0x580/0x580 [ 43.967221] ? putname+0xee/0x130 [ 43.970636] ? save_stack+0xa3/0xd0 [ 43.974226] ? save_stack_trace+0x16/0x20 [ 43.978337] ? save_stack+0x43/0xd0 [ 43.981925] ? kasan_slab_free+0x6e/0xc0 [ 43.985949] ? kmem_cache_free+0x71/0x240 [ 43.990061] ? putname+0xee/0x130 [ 43.993481] ? check_noncircular+0x20/0x20 [ 43.997685] ? __pmd_alloc+0x4f0/0x4f0 [ 44.001538] ? check_same_owner+0x320/0x320 [ 44.005819] ? lock_acquire+0x1d5/0x580 [ 44.009756] ? lock_acquire+0x1d5/0x580 [ 44.013695] ? tun_chr_compat_ioctl+0x30/0x30 [ 44.018155] tun_chr_ioctl+0x2a/0x40 [ 44.021831] ? tun_chr_ioctl+0x2a/0x40 [ 44.025682] do_vfs_ioctl+0x1b1/0x1520 [ 44.029532] ? _cond_resched+0x14/0x30 [ 44.033386] ? ioctl_preallocate+0x2b0/0x2b0 [ 44.037758] ? selinux_capable+0x40/0x40 [ 44.041787] ? __ioremap_caller+0xda/0x750 [ 44.045985] ? downgrade_write+0x150/0x150 [ 44.050191] ? security_file_ioctl+0x7d/0xb0 [ 44.054563] ? security_file_ioctl+0x89/0xb0 [ 44.058938] SyS_ioctl+0x8f/0xc0 [ 44.062272] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 44.066993] RIP: 0033:0x443ff9 [ 44.070146] RSP: 002b:00007ffc7470cb48 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 44.077819] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443ff9 [ 44.085057] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 [ 44.092378] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 44.099613] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ce0 [ 44.106845] R13: 0000000000401d70 R14: 0000000000000000 R15: 0000000000000000 [ 44.114522] Dumping ftrace buffer: [ 44.118028] (ftrace buffer empty) [ 44.121702] Kernel Offset: disabled [ 44.125293] Rebooting in 86400 seconds..