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-kasan-gce-2,10.128.0.38' (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 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: [ 44.684139] ================================================================== [ 44.685263] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 44.686449] [ 44.686696] CPU: 1 PID: 5465 Comm: syzkaller505545 Not tainted 4.13.0-rc5+ #41 [ 44.687674] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.688941] Call Trace: [ 44.689327] dump_stack+0x194/0x257 [ 44.689836] ? arch_local_irq_restore+0x53/0x53 [ 44.690477] ? show_regs_print_info+0x65/0x65 [ 44.691090] ? mark_held_locks+0xaf/0x100 [ 44.691672] ? selinux_tun_dev_free_security+0x15/0x20 [ 44.692428] print_address_description+0x73/0x250 [ 44.693088] ? selinux_tun_dev_free_security+0x15/0x20 [ 44.693801] ? selinux_tun_dev_free_security+0x15/0x20 [ 44.694529] kasan_report_double_free+0x55/0x80 [ 44.695170] kasan_slab_free+0xa3/0xc0 [ 44.695785] kfree+0xca/0x250 [ 44.696230] selinux_tun_dev_free_security+0x15/0x20 [ 44.696954] security_tun_dev_free_security+0x48/0x80 [ 44.697661] __tun_chr_ioctl+0x2ce6/0x3d50 [ 44.698259] ? tun_select_queue+0x580/0x580 [ 44.698865] ? lock_downgrade+0x990/0x990 [ 44.699439] ? lock_release+0xa40/0xa40 [ 44.700008] ? __lock_is_held+0xb6/0x140 [ 44.700606] ? check_same_owner+0x320/0x320 [ 44.701220] ? handle_mm_fault+0x23e/0x940 [ 44.701828] ? tun_chr_compat_ioctl+0x30/0x30 [ 44.702442] tun_chr_ioctl+0x2a/0x40 [ 44.702992] ? tun_chr_ioctl+0x2a/0x40 [ 44.703569] do_vfs_ioctl+0x1b1/0x1520 [ 44.707276] ? ioctl_preallocate+0x2b0/0x2b0 [ 44.711682] ? selinux_capable+0x40/0x40 [ 44.715740] ? __handle_mm_fault+0x3810/0x3810 [ 44.720305] ? vmacache_find+0x61/0x270 [ 44.724292] ? security_file_ioctl+0x7d/0xb0 [ 44.728680] ? security_file_ioctl+0x89/0xb0 [ 44.733078] SyS_ioctl+0x8f/0xc0 [ 44.736437] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 44.741180] RIP: 0033:0x4499f9 [ 44.744351] RSP: 002b:00007f88d5b71dc8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 44.752041] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004499f9 [ 44.759292] RDX: 0000000020521fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 44.766543] RBP: 0000000000000086 R08: 00007f88d5b72700 R09: 00007f88d5b72700 [ 44.773795] R10: 00007f88d5b72700 R11: 0000000000000202 R12: 0000000000000000 [ 44.781046] R13: 00007ffd1eb16c7f R14: 00007f88d5b729c0 R15: 0000000000000000 [ 44.788328] [ 44.789935] Allocated by task 5465: [ 44.793548] save_stack_trace+0x16/0x20 [ 44.797506] save_stack+0x43/0xd0 [ 44.800944] kasan_kmalloc+0xad/0xe0 [ 44.804638] kmem_cache_alloc_trace+0x12f/0x740 [ 44.809292] selinux_tun_dev_alloc_security+0x49/0x170 [ 44.814549] security_tun_dev_alloc_security+0x6d/0xa0 [ 44.819807] __tun_chr_ioctl+0x1730/0x3d50 [ 44.824023] tun_chr_ioctl+0x2a/0x40 [ 44.827724] do_vfs_ioctl+0x1b1/0x1520 [ 44.831593] SyS_ioctl+0x8f/0xc0 [ 44.834940] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 44.839674] [ 44.841280] Freed by task 5465: [ 44.844542] save_stack_trace+0x16/0x20 [ 44.848500] save_stack+0x43/0xd0 [ 44.851935] kasan_slab_free+0x71/0xc0 [ 44.855803] kfree+0xca/0x250 [ 44.858891] selinux_tun_dev_free_security+0x15/0x20 [ 44.863974] security_tun_dev_free_security+0x48/0x80 [ 44.869146] tun_free_netdev+0x13b/0x1b0 [ 44.873190] register_netdevice+0x8d0/0xee0 [ 44.877494] __tun_chr_ioctl+0x1caf/0x3d50 [ 44.881707] tun_chr_ioctl+0x2a/0x40 [ 44.885402] do_vfs_ioctl+0x1b1/0x1520 [ 44.889272] SyS_ioctl+0x8f/0xc0 [ 44.892629] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 44.897362] [ 44.898975] The buggy address belongs to the object at ffff8801dadc2b00 [ 44.898975] which belongs to the cache kmalloc-32 of size 32 [ 44.911438] The buggy address is located 0 bytes inside of [ 44.911438] 32-byte region [ffff8801dadc2b00, ffff8801dadc2b20) [ 44.923031] The buggy address belongs to the page: [ 44.927940] page:ffffea00076b7080 count:1 mapcount:0 mapping:ffff8801dadc2000 index:0xffff8801dadc2fc1 [ 44.937368] flags: 0x200000000000100(slab) [ 44.941587] raw: 0200000000000100 ffff8801dadc2000 ffff8801dadc2fc1 000000010000003f [ 44.949450] raw: ffffea00076b7520 ffffea00076b70e0 ffff8801dac001c0 0000000000000000 [ 44.957306] page dumped because: kasan: bad access detected [ 44.962990] [ 44.964598] Memory state around the buggy address: [ 44.969505] ffff8801dadc2a00: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc [ 44.976846] ffff8801dadc2a80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 44.984185] >ffff8801dadc2b00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 44.991524] ^ [ 44.994868] ffff8801dadc2b80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 45.002208] ffff8801dadc2c00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 45.009546] ================================================================== [ 45.016884] Disabling lock debugging due to kernel taint [ 45.022310] Kernel panic - not syncing: panic_on_warn set ... [ 45.022310] [ 45.029650] CPU: 1 PID: 5465 Comm: syzkaller505545 Tainted: G B 4.13.0-rc5+ #41 [ 45.038198] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 45.047530] Call Trace: [ 45.050100] dump_stack+0x194/0x257 [ 45.053719] ? arch_local_irq_restore+0x53/0x53 [ 45.058367] ? kasan_end_report+0x32/0x50 [ 45.062484] ? lock_downgrade+0x990/0x990 [ 45.066600] panic+0x1e4/0x417 [ 45.069758] ? __warn+0x1d9/0x1d9 [ 45.073181] ? selinux_tun_dev_free_security+0x15/0x20 [ 45.078421] ? selinux_tun_dev_free_security+0x15/0x20 [ 45.083664] kasan_end_report+0x50/0x50 [ 45.087603] kasan_report_double_free+0x72/0x80 [ 45.092242] kasan_slab_free+0xa3/0xc0 [ 45.096096] kfree+0xca/0x250 [ 45.099168] selinux_tun_dev_free_security+0x15/0x20 [ 45.104242] security_tun_dev_free_security+0x48/0x80 [ 45.109401] __tun_chr_ioctl+0x2ce6/0x3d50 [ 45.113606] ? tun_select_queue+0x580/0x580 [ 45.117891] ? lock_downgrade+0x990/0x990 [ 45.122007] ? lock_release+0xa40/0xa40 [ 45.125952] ? __lock_is_held+0xb6/0x140 [ 45.129991] ? check_same_owner+0x320/0x320 [ 45.134285] ? handle_mm_fault+0x23e/0x940 [ 45.138493] ? tun_chr_compat_ioctl+0x30/0x30 [ 45.142954] tun_chr_ioctl+0x2a/0x40 [ 45.146634] ? tun_chr_ioctl+0x2a/0x40 [ 45.150486] do_vfs_ioctl+0x1b1/0x1520 [ 45.154341] ? ioctl_preallocate+0x2b0/0x2b0 [ 45.158719] ? selinux_capable+0x40/0x40 [ 45.162748] ? __handle_mm_fault+0x3810/0x3810 [ 45.167293] ? vmacache_find+0x61/0x270 [ 45.171237] ? security_file_ioctl+0x7d/0xb0 [ 45.175608] ? security_file_ioctl+0x89/0xb0 [ 45.179985] SyS_ioctl+0x8f/0xc0 [ 45.183317] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 45.188036] RIP: 0033:0x4499f9 [ 45.191190] RSP: 002b:00007f88d5b71dc8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 45.198862] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004499f9 [ 45.206096] RDX: 0000000020521fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 45.213330] RBP: 0000000000000086 R08: 00007f88d5b72700 R09: 00007f88d5b72700 [ 45.220563] R10: 00007f88d5b72700 R11: 0000000000000202 R12: 0000000000000000 [ 45.227801] R13: 00007ffd1eb16c7f R14: 00007f88d5b729c0 R15: 0000000000000000 [ 45.235511] Dumping ftrace buffer: [ 45.239025] (ftrace buffer empty) [ 45.242702] Kernel Offset: disabled [ 45.246311] Rebooting in 86400 seconds..