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-9,10.128.15.199' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.685041] ================================================================== [ 32.686357] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 32.687884] [ 32.688155] CPU: 1 PID: 3004 Comm: syzkaller779649 Not tainted 4.13.0-rc5+ #39 [ 32.689154] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.690388] Call Trace: [ 32.690859] dump_stack+0x194/0x257 [ 32.691370] ? arch_local_irq_restore+0x53/0x53 [ 32.692030] ? show_regs_print_info+0x65/0x65 [ 32.692698] ? mark_held_locks+0xaf/0x100 [ 32.693418] ? selinux_tun_dev_free_security+0x15/0x20 [ 32.694204] print_address_description+0x73/0x250 [ 32.694886] ? selinux_tun_dev_free_security+0x15/0x20 [ 32.695646] ? selinux_tun_dev_free_security+0x15/0x20 [ 32.696477] kasan_report_double_free+0x55/0x80 [ 32.697178] kasan_slab_free+0xa3/0xc0 [ 32.697787] kfree+0xca/0x250 [ 32.698230] selinux_tun_dev_free_security+0x15/0x20 [ 32.699073] security_tun_dev_free_security+0x48/0x80 [ 32.699887] __tun_chr_ioctl+0x2ce6/0x3d50 [ 32.700519] ? unwind_dump+0x4/0x4c0 [ 32.701038] ? tun_select_queue+0x580/0x580 [ 32.701746] ? check_noncircular+0x20/0x20 [ 32.702373] ? save_stack+0xa3/0xd0 [ 32.702893] ? __handle_mm_fault+0x57f/0x3810 [ 32.703549] ? check_noncircular+0x20/0x20 [ 32.704256] ? __pmd_alloc+0x4e0/0x4e0 [ 32.704847] ? check_same_owner+0x320/0x320 [ 32.707050] ? handle_mm_fault+0x23e/0x940 [ 32.711254] ? tun_chr_compat_ioctl+0x30/0x30 [ 32.715715] tun_chr_ioctl+0x2a/0x40 [ 32.719409] ? tun_chr_ioctl+0x2a/0x40 [ 32.723268] do_vfs_ioctl+0x1b1/0x1520 [ 32.727137] ? ioctl_preallocate+0x2b0/0x2b0 [ 32.731516] ? selinux_capable+0x40/0x40 [ 32.735555] ? __handle_mm_fault+0x3810/0x3810 [ 32.740134] ? security_file_ioctl+0x7d/0xb0 [ 32.744503] ? security_file_ioctl+0x89/0xb0 [ 32.748878] SyS_ioctl+0x8f/0xc0 [ 32.752218] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.756936] RIP: 0033:0x443da9 [ 32.760087] RSP: 002b:00007ffd271b3f38 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 32.767755] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443da9 [ 32.774988] RDX: 0000000020511fd8 RSI: 00000000400454ca RDI: 0000000000000003 [ 32.782221] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 32.789453] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401a90 [ 32.796696] R13: 0000000000401b20 R14: 0000000000000000 R15: 0000000000000000 [ 32.803948] [ 32.805538] Allocated by task 3004: [ 32.809138] save_stack_trace+0x16/0x20 [ 32.813075] save_stack+0x43/0xd0 [ 32.816492] kasan_kmalloc+0xad/0xe0 [ 32.820181] kmem_cache_alloc_trace+0x12f/0x740 [ 32.824821] selinux_tun_dev_alloc_security+0x49/0x170 [ 32.830062] security_tun_dev_alloc_security+0x6d/0xa0 [ 32.835312] __tun_chr_ioctl+0x1730/0x3d50 [ 32.839517] tun_chr_ioctl+0x2a/0x40 [ 32.843192] do_vfs_ioctl+0x1b1/0x1520 [ 32.847038] SyS_ioctl+0x8f/0xc0 [ 32.850365] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.855078] [ 32.856667] Freed by task 3004: [ 32.859906] save_stack_trace+0x16/0x20 [ 32.863840] save_stack+0x43/0xd0 [ 32.867256] kasan_slab_free+0x71/0xc0 [ 32.871105] kfree+0xca/0x250 [ 32.874171] selinux_tun_dev_free_security+0x15/0x20 [ 32.879235] security_tun_dev_free_security+0x48/0x80 [ 32.884387] tun_free_netdev+0x13b/0x1b0 [ 32.888414] register_netdevice+0x8d0/0xee0 [ 32.892695] __tun_chr_ioctl+0x1caf/0x3d50 [ 32.896892] tun_chr_ioctl+0x2a/0x40 [ 32.900571] do_vfs_ioctl+0x1b1/0x1520 [ 32.904421] SyS_ioctl+0x8f/0xc0 [ 32.907748] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.912460] [ 32.914059] The buggy address belongs to the object at ffff8801d966af40 [ 32.914059] which belongs to the cache kmalloc-32 of size 32 [ 32.926516] The buggy address is located 0 bytes inside of [ 32.926516] 32-byte region [ffff8801d966af40, ffff8801d966af60) [ 32.938090] The buggy address belongs to the page: [ 32.942988] page:ffffea0007659a80 count:1 mapcount:0 mapping:ffff8801d966a000 index:0xffff8801d966afc1 [ 32.952395] flags: 0x200000000000100(slab) [ 32.956592] raw: 0200000000000100 ffff8801d966a000 ffff8801d966afc1 000000010000003f [ 32.964443] raw: ffffea000765a6a0 ffff8801dac01248 ffff8801dac001c0 0000000000000000 [ 32.972372] page dumped because: kasan: bad access detected [ 32.978042] [ 32.979653] Memory state around the buggy address: [ 32.984557] ffff8801d966ae00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 32.991877] ffff8801d966ae80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 32.999199] >ffff8801d966af00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 33.006530] ^ [ 33.011939] ffff8801d966af80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 33.019260] ffff8801d966b000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.026590] ================================================================== [ 33.033923] Disabling lock debugging due to kernel taint [ 33.039332] Kernel panic - not syncing: panic_on_warn set ... [ 33.039332] [ 33.046656] CPU: 1 PID: 3004 Comm: syzkaller779649 Tainted: G B 4.13.0-rc5+ #39 [ 33.055198] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.064516] Call Trace: [ 33.067086] dump_stack+0x194/0x257 [ 33.070680] ? arch_local_irq_restore+0x53/0x53 [ 33.075315] ? kasan_end_report+0x32/0x50 [ 33.079426] ? lock_downgrade+0x990/0x990 [ 33.083540] panic+0x1e4/0x417 [ 33.086698] ? __warn+0x1d9/0x1d9 [ 33.090118] ? selinux_tun_dev_free_security+0x15/0x20 [ 33.095357] ? selinux_tun_dev_free_security+0x15/0x20 [ 33.100595] kasan_end_report+0x50/0x50 [ 33.104545] kasan_report_double_free+0x72/0x80 [ 33.109175] kasan_slab_free+0xa3/0xc0 [ 33.113025] kfree+0xca/0x250 [ 33.116092] selinux_tun_dev_free_security+0x15/0x20 [ 33.121168] security_tun_dev_free_security+0x48/0x80 [ 33.126322] __tun_chr_ioctl+0x2ce6/0x3d50 [ 33.130533] ? unwind_dump+0x4/0x4c0 [ 33.134216] ? tun_select_queue+0x580/0x580 [ 33.138501] ? check_noncircular+0x20/0x20 [ 33.142701] ? save_stack+0xa3/0xd0 [ 33.146294] ? __handle_mm_fault+0x57f/0x3810 [ 33.150754] ? check_noncircular+0x20/0x20 [ 33.154959] ? __pmd_alloc+0x4e0/0x4e0 [ 33.158818] ? check_same_owner+0x320/0x320 [ 33.163101] ? handle_mm_fault+0x23e/0x940 [ 33.167306] ? tun_chr_compat_ioctl+0x30/0x30 [ 33.171763] tun_chr_ioctl+0x2a/0x40 [ 33.175439] ? tun_chr_ioctl+0x2a/0x40 [ 33.179303] do_vfs_ioctl+0x1b1/0x1520 [ 33.183167] ? ioctl_preallocate+0x2b0/0x2b0 [ 33.187549] ? selinux_capable+0x40/0x40 [ 33.191573] ? __handle_mm_fault+0x3810/0x3810 [ 33.196121] ? security_file_ioctl+0x7d/0xb0 [ 33.200488] ? security_file_ioctl+0x89/0xb0 [ 33.204869] SyS_ioctl+0x8f/0xc0 [ 33.208201] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 33.212916] RIP: 0033:0x443da9 [ 33.216072] RSP: 002b:00007ffd271b3f38 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 33.223743] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443da9 [ 33.230974] RDX: 0000000020511fd8 RSI: 00000000400454ca RDI: 0000000000000003 [ 33.238203] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 33.245432] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401a90 [ 33.252670] R13: 0000000000401b20 R14: 0000000000000000 R15: 0000000000000000 [ 33.260184] Dumping ftrace buffer: [ 33.263695] (ftrace buffer empty) [ 33.267369] Kernel Offset: disabled [ 33.270959] Rebooting in 86400 seconds..