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-6,10.128.15.206' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 47.953940] ================================================================== [ 47.955121] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 47.956281] [ 47.956514] CPU: 1 PID: 3003 Comm: syzkaller269109 Not tainted 4.13.0-rc5+ #42 [ 47.957528] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.958803] Call Trace: [ 47.959192] dump_stack+0x194/0x257 [ 47.959722] ? arch_local_irq_restore+0x53/0x53 [ 47.960365] ? show_regs_print_info+0x65/0x65 [ 47.960975] ? mark_held_locks+0xaf/0x100 [ 47.961608] ? selinux_tun_dev_free_security+0x15/0x20 [ 47.962309] print_address_description+0x73/0x250 [ 47.963040] ? selinux_tun_dev_free_security+0x15/0x20 [ 47.963772] ? selinux_tun_dev_free_security+0x15/0x20 [ 47.964482] kasan_report_double_free+0x55/0x80 [ 47.965106] kasan_slab_free+0xa3/0xc0 [ 47.965630] kfree+0xca/0x250 [ 47.966053] selinux_tun_dev_free_security+0x15/0x20 [ 47.966730] security_tun_dev_free_security+0x48/0x80 [ 47.967423] __tun_chr_ioctl+0x2ce6/0x3d50 [ 47.967989] ? unwind_dump+0x4/0x4c0 [ 47.968497] ? tun_select_queue+0x580/0x580 [ 47.969079] ? check_noncircular+0x20/0x20 [ 47.969671] ? save_stack+0xa3/0xd0 [ 47.970167] ? __handle_mm_fault+0x577/0x3860 [ 47.970765] ? check_noncircular+0x20/0x20 [ 47.971335] ? check_noncircular+0x20/0x20 [ 47.971934] ? __pmd_alloc+0x4e0/0x4e0 [ 47.972473] ? check_same_owner+0x320/0x320 [ 47.973050] ? handle_mm_fault+0x23e/0x860 [ 47.973621] ? tun_chr_compat_ioctl+0x30/0x30 [ 47.974232] tun_chr_ioctl+0x2a/0x40 [ 47.977912] ? tun_chr_ioctl+0x2a/0x40 [ 47.981769] do_vfs_ioctl+0x1b1/0x1520 [ 47.985637] ? ioctl_preallocate+0x2b0/0x2b0 [ 47.990014] ? selinux_capable+0x40/0x40 [ 47.994134] ? __handle_mm_fault+0x3860/0x3860 [ 47.998691] ? security_file_ioctl+0x7d/0xb0 [ 48.003066] ? security_file_ioctl+0x89/0xb0 [ 48.007450] SyS_ioctl+0x8f/0xc0 [ 48.011287] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 48.016012] RIP: 0033:0x443dd9 [ 48.019170] RSP: 002b:00007fff1776a6b8 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 48.026849] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443dd9 [ 48.034087] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 [ 48.041327] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 48.048567] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ac0 [ 48.055800] R13: 0000000000401b50 R14: 0000000000000000 R15: 0000000000000000 [ 48.063053] [ 48.064646] Allocated by task 3003: [ 48.068243] save_stack_trace+0x16/0x20 [ 48.072198] save_stack+0x43/0xd0 [ 48.075615] kasan_kmalloc+0xad/0xe0 [ 48.079294] kmem_cache_alloc_trace+0x12f/0x740 [ 48.083929] selinux_tun_dev_alloc_security+0x49/0x170 [ 48.089170] security_tun_dev_alloc_security+0x6d/0xa0 [ 48.094415] __tun_chr_ioctl+0x1730/0x3d50 [ 48.098616] tun_chr_ioctl+0x2a/0x40 [ 48.102294] do_vfs_ioctl+0x1b1/0x1520 [ 48.106147] SyS_ioctl+0x8f/0xc0 [ 48.109479] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 48.114195] [ 48.115786] Freed by task 3003: [ 48.119030] save_stack_trace+0x16/0x20 [ 48.122966] save_stack+0x43/0xd0 [ 48.126381] kasan_slab_free+0x71/0xc0 [ 48.130243] kfree+0xca/0x250 [ 48.133312] selinux_tun_dev_free_security+0x15/0x20 [ 48.138380] security_tun_dev_free_security+0x48/0x80 [ 48.143535] tun_free_netdev+0x13b/0x1b0 [ 48.147561] register_netdevice+0x8d0/0xee0 [ 48.151846] __tun_chr_ioctl+0x1caf/0x3d50 [ 48.156044] tun_chr_ioctl+0x2a/0x40 [ 48.159720] do_vfs_ioctl+0x1b1/0x1520 [ 48.163572] SyS_ioctl+0x8f/0xc0 [ 48.166901] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 48.171620] [ 48.173215] The buggy address belongs to the object at ffff8801d0ff60c0 [ 48.173215] which belongs to the cache kmalloc-32 of size 32 [ 48.185662] The buggy address is located 0 bytes inside of [ 48.185662] 32-byte region [ffff8801d0ff60c0, ffff8801d0ff60e0) [ 48.197239] The buggy address belongs to the page: [ 48.202132] page:ffffea000743fd80 count:1 mapcount:0 mapping:ffff8801d0ff6000 index:0xffff8801d0ff6fc1 [ 48.211541] flags: 0x200000000000100(slab) [ 48.215747] raw: 0200000000000100 ffff8801d0ff6000 ffff8801d0ff6fc1 000000010000003f [ 48.223590] raw: ffffea000741f9e0 ffffea0007404320 ffff8801dac001c0 0000000000000000 [ 48.231432] page dumped because: kasan: bad access detected [ 48.237103] [ 48.238710] Memory state around the buggy address: [ 48.243602] ffff8801d0ff5f80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 48.250927] ffff8801d0ff6000: 00 00 00 00 fc fc fc fc 00 00 00 fc fc fc fc fc [ 48.258249] >ffff8801d0ff6080: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 48.265570] ^ [ 48.270985] ffff8801d0ff6100: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 48.278306] ffff8801d0ff6180: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 48.285632] ================================================================== [ 48.292951] Disabling lock debugging due to kernel taint [ 48.298367] Kernel panic - not syncing: panic_on_warn set ... [ 48.298367] [ 48.305691] CPU: 1 PID: 3003 Comm: syzkaller269109 Tainted: G B 4.13.0-rc5+ #42 [ 48.314225] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.323540] Call Trace: [ 48.326101] dump_stack+0x194/0x257 [ 48.329696] ? arch_local_irq_restore+0x53/0x53 [ 48.334339] ? kasan_end_report+0x32/0x50 [ 48.338450] ? lock_downgrade+0x990/0x990 [ 48.342567] panic+0x1e4/0x417 [ 48.345723] ? __warn+0x1d9/0x1d9 [ 48.349148] ? selinux_tun_dev_free_security+0x15/0x20 [ 48.354387] ? selinux_tun_dev_free_security+0x15/0x20 [ 48.359627] kasan_end_report+0x50/0x50 [ 48.363563] kasan_report_double_free+0x72/0x80 [ 48.368197] kasan_slab_free+0xa3/0xc0 [ 48.372047] kfree+0xca/0x250 [ 48.375118] selinux_tun_dev_free_security+0x15/0x20 [ 48.380186] security_tun_dev_free_security+0x48/0x80 [ 48.385340] __tun_chr_ioctl+0x2ce6/0x3d50 [ 48.389540] ? unwind_dump+0x4/0x4c0 [ 48.393221] ? tun_select_queue+0x580/0x580 [ 48.397509] ? check_noncircular+0x20/0x20 [ 48.401708] ? save_stack+0xa3/0xd0 [ 48.405303] ? __handle_mm_fault+0x577/0x3860 [ 48.409759] ? check_noncircular+0x20/0x20 [ 48.413957] ? check_noncircular+0x20/0x20 [ 48.418157] ? __pmd_alloc+0x4e0/0x4e0 [ 48.422022] ? check_same_owner+0x320/0x320 [ 48.426304] ? handle_mm_fault+0x23e/0x860 [ 48.430503] ? tun_chr_compat_ioctl+0x30/0x30 [ 48.434968] tun_chr_ioctl+0x2a/0x40 [ 48.438651] ? tun_chr_ioctl+0x2a/0x40 [ 48.442502] do_vfs_ioctl+0x1b1/0x1520 [ 48.446353] ? ioctl_preallocate+0x2b0/0x2b0 [ 48.450728] ? selinux_capable+0x40/0x40 [ 48.454754] ? __handle_mm_fault+0x3860/0x3860 [ 48.459307] ? security_file_ioctl+0x7d/0xb0 [ 48.463675] ? security_file_ioctl+0x89/0xb0 [ 48.468048] SyS_ioctl+0x8f/0xc0 [ 48.471381] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 48.476098] RIP: 0033:0x443dd9 [ 48.479251] RSP: 002b:00007fff1776a6b8 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 48.486921] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443dd9 [ 48.494154] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 [ 48.501387] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 48.508619] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ac0 [ 48.515854] R13: 0000000000401b50 R14: 0000000000000000 R15: 0000000000000000 [ 48.523133] Dumping ftrace buffer: [ 48.526639] (ftrace buffer empty) [ 48.530314] Kernel Offset: disabled [ 48.533906] Rebooting in 86400 seconds..