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-7,10.128.0.59' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 41.918018] ================================================================== [ 41.919131] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 41.920275] [ 41.920508] CPU: 0 PID: 3011 Comm: syzkaller067220 Not tainted 4.13.0-rc5+ #39 [ 41.921473] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.922727] Call Trace: [ 41.923089] dump_stack+0x194/0x257 [ 41.923581] ? arch_local_irq_restore+0x53/0x53 [ 41.924210] ? show_regs_print_info+0x65/0x65 [ 41.924810] ? mark_held_locks+0xaf/0x100 [ 41.925372] ? selinux_tun_dev_free_security+0x15/0x20 [ 41.926082] print_address_description+0x73/0x250 [ 41.926727] ? selinux_tun_dev_free_security+0x15/0x20 [ 41.927582] ? selinux_tun_dev_free_security+0x15/0x20 [ 41.928305] kasan_report_double_free+0x55/0x80 [ 41.928930] kasan_slab_free+0xa3/0xc0 [ 41.929492] kfree+0xca/0x250 [ 41.929955] selinux_tun_dev_free_security+0x15/0x20 [ 41.930670] security_tun_dev_free_security+0x48/0x80 [ 41.931363] __tun_chr_ioctl+0x2ce6/0x3d50 [ 41.931940] ? tun_select_queue+0x580/0x580 [ 41.932521] ? check_noncircular+0x20/0x20 [ 41.933105] ? __handle_mm_fault+0x57f/0x3810 [ 41.933729] ? check_noncircular+0x20/0x20 [ 41.934295] ? __pmd_alloc+0x4e0/0x4e0 [ 41.934834] ? check_same_owner+0x320/0x320 [ 41.935482] ? handle_mm_fault+0x23e/0x940 [ 41.936109] ? tun_chr_compat_ioctl+0x30/0x30 [ 41.936762] tun_chr_ioctl+0x2a/0x40 [ 41.937297] ? tun_chr_ioctl+0x2a/0x40 [ 41.937822] do_vfs_ioctl+0x1b1/0x1520 [ 41.939598] ? ioctl_preallocate+0x2b0/0x2b0 [ 41.943978] ? selinux_capable+0x40/0x40 [ 41.948014] ? __handle_mm_fault+0x3810/0x3810 [ 41.952585] ? security_file_ioctl+0x7d/0xb0 [ 41.956970] ? security_file_ioctl+0x89/0xb0 [ 41.961350] SyS_ioctl+0x8f/0xc0 [ 41.964693] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.969418] RIP: 0033:0x443dd9 [ 41.972575] RSP: 002b:00007ffd8b9ba018 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 41.980251] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443dd9 [ 41.987500] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 [ 41.994741] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 42.001982] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ac0 [ 42.009224] R13: 0000000000401b50 R14: 0000000000000000 R15: 0000000000000000 [ 42.016484] [ 42.018082] Allocated by task 3011: [ 42.021686] save_stack_trace+0x16/0x20 [ 42.025639] save_stack+0x43/0xd0 [ 42.029082] kasan_kmalloc+0xad/0xe0 [ 42.032772] kmem_cache_alloc_trace+0x12f/0x740 [ 42.037425] selinux_tun_dev_alloc_security+0x49/0x170 [ 42.042685] security_tun_dev_alloc_security+0x6d/0xa0 [ 42.047954] __tun_chr_ioctl+0x1730/0x3d50 [ 42.052177] tun_chr_ioctl+0x2a/0x40 [ 42.055866] do_vfs_ioctl+0x1b1/0x1520 [ 42.059725] SyS_ioctl+0x8f/0xc0 [ 42.063074] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.067796] [ 42.069393] Freed by task 3011: [ 42.072671] save_stack_trace+0x16/0x20 [ 42.076634] save_stack+0x43/0xd0 [ 42.080058] kasan_slab_free+0x71/0xc0 [ 42.083924] kfree+0xca/0x250 [ 42.087003] selinux_tun_dev_free_security+0x15/0x20 [ 42.092080] security_tun_dev_free_security+0x48/0x80 [ 42.097241] tun_free_netdev+0x13b/0x1b0 [ 42.101276] register_netdevice+0x8d0/0xee0 [ 42.105570] __tun_chr_ioctl+0x1caf/0x3d50 [ 42.109773] tun_chr_ioctl+0x2a/0x40 [ 42.113455] do_vfs_ioctl+0x1b1/0x1520 [ 42.117311] SyS_ioctl+0x8f/0xc0 [ 42.120647] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.125367] [ 42.126971] The buggy address belongs to the object at ffff8801d0f6c600 [ 42.126971] which belongs to the cache kmalloc-32 of size 32 [ 42.139437] The buggy address is located 0 bytes inside of [ 42.139437] 32-byte region [ffff8801d0f6c600, ffff8801d0f6c620) [ 42.151030] The buggy address belongs to the page: [ 42.155934] page:ffffea000743db00 count:1 mapcount:0 mapping:ffff8801d0f6c000 index:0xffff8801d0f6cfc1 [ 42.165356] flags: 0x200000000000100(slab) [ 42.169562] raw: 0200000000000100 ffff8801d0f6c000 ffff8801d0f6cfc1 000000010000003f [ 42.177418] raw: ffffea0007451060 ffffea000743e9a0 ffff8801dac001c0 0000000000000000 [ 42.185272] page dumped because: kasan: bad access detected [ 42.190965] [ 42.192563] Memory state around the buggy address: [ 42.197471] ffff8801d0f6c500: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 42.204822] ffff8801d0f6c580: 00 00 00 fc fc fc fc fc 00 00 00 00 fc fc fc fc [ 42.212182] >ffff8801d0f6c600: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 42.219519] ^ [ 42.222872] ffff8801d0f6c680: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 42.230209] ffff8801d0f6c700: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 42.237551] ================================================================== [ 42.244898] Disabling lock debugging due to kernel taint [ 42.250318] Kernel panic - not syncing: panic_on_warn set ... [ 42.250318] [ 42.257662] CPU: 0 PID: 3011 Comm: syzkaller067220 Tainted: G B 4.13.0-rc5+ #39 [ 42.266211] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.275547] Call Trace: [ 42.278112] dump_stack+0x194/0x257 [ 42.281716] ? arch_local_irq_restore+0x53/0x53 [ 42.286370] ? kasan_end_report+0x32/0x50 [ 42.290493] ? lock_downgrade+0x990/0x990 [ 42.294615] panic+0x1e4/0x417 [ 42.297781] ? __warn+0x1d9/0x1d9 [ 42.301212] ? selinux_tun_dev_free_security+0x15/0x20 [ 42.306471] ? selinux_tun_dev_free_security+0x15/0x20 [ 42.311723] kasan_end_report+0x50/0x50 [ 42.315678] kasan_report_double_free+0x72/0x80 [ 42.320325] kasan_slab_free+0xa3/0xc0 [ 42.324186] kfree+0xca/0x250 [ 42.327265] selinux_tun_dev_free_security+0x15/0x20 [ 42.332349] security_tun_dev_free_security+0x48/0x80 [ 42.337514] __tun_chr_ioctl+0x2ce6/0x3d50 [ 42.341722] ? tun_select_queue+0x580/0x580 [ 42.346017] ? check_noncircular+0x20/0x20 [ 42.350227] ? __handle_mm_fault+0x57f/0x3810 [ 42.354694] ? check_noncircular+0x20/0x20 [ 42.358898] ? __pmd_alloc+0x4e0/0x4e0 [ 42.362763] ? check_same_owner+0x320/0x320 [ 42.367054] ? handle_mm_fault+0x23e/0x940 [ 42.371269] ? tun_chr_compat_ioctl+0x30/0x30 [ 42.375735] tun_chr_ioctl+0x2a/0x40 [ 42.379416] ? tun_chr_ioctl+0x2a/0x40 [ 42.383276] do_vfs_ioctl+0x1b1/0x1520 [ 42.387137] ? ioctl_preallocate+0x2b0/0x2b0 [ 42.391518] ? selinux_capable+0x40/0x40 [ 42.395550] ? __handle_mm_fault+0x3810/0x3810 [ 42.400110] ? security_file_ioctl+0x7d/0xb0 [ 42.404487] ? security_file_ioctl+0x89/0xb0 [ 42.408878] SyS_ioctl+0x8f/0xc0 [ 42.412223] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.416947] RIP: 0033:0x443dd9 [ 42.420106] RSP: 002b:00007ffd8b9ba018 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 42.427783] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443dd9 [ 42.435023] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 [ 42.442271] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 42.449516] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ac0 [ 42.456758] R13: 0000000000401b50 R14: 0000000000000000 R15: 0000000000000000 [ 42.464055] Dumping ftrace buffer: [ 42.467572] (ftrace buffer empty) [ 42.471253] Kernel Offset: disabled [ 42.474849] Rebooting in 86400 seconds..