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-1,10.128.0.34' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.530171] ================================================================== [ 32.531263] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 32.532407] [ 32.532643] CPU: 0 PID: 3004 Comm: syzkaller211546 Not tainted 4.13.0-rc5+ #39 [ 32.533674] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.534991] Call Trace: [ 32.535350] dump_stack+0x194/0x257 [ 32.535842] ? arch_local_irq_restore+0x53/0x53 [ 32.536526] ? show_regs_print_info+0x65/0x65 [ 32.537136] ? mark_held_locks+0xaf/0x100 [ 32.537697] ? selinux_tun_dev_free_security+0x15/0x20 [ 32.538411] print_address_description+0x73/0x250 [ 32.539056] ? selinux_tun_dev_free_security+0x15/0x20 [ 32.539759] ? selinux_tun_dev_free_security+0x15/0x20 [ 32.540462] kasan_report_double_free+0x55/0x80 [ 32.541089] kasan_slab_free+0xa3/0xc0 [ 32.541624] kfree+0xca/0x250 [ 32.542050] selinux_tun_dev_free_security+0x15/0x20 [ 32.542740] security_tun_dev_free_security+0x48/0x80 [ 32.543466] __tun_chr_ioctl+0x2ce6/0x3d50 [ 32.544036] ? unwind_dump+0x4/0x4c0 [ 32.544545] ? tun_select_queue+0x580/0x580 [ 32.545127] ? check_noncircular+0x20/0x20 [ 32.545727] ? save_stack+0xa3/0xd0 [ 32.546282] ? __handle_mm_fault+0x57f/0x3810 [ 32.546903] ? check_noncircular+0x20/0x20 [ 32.547479] ? __pmd_alloc+0x4e0/0x4e0 [ 32.548032] ? check_same_owner+0x320/0x320 [ 32.548658] ? handle_mm_fault+0x23e/0x940 [ 32.549245] ? tun_chr_compat_ioctl+0x30/0x30 [ 32.549859] tun_chr_ioctl+0x2a/0x40 [ 32.550870] ? tun_chr_ioctl+0x2a/0x40 [ 32.554726] do_vfs_ioctl+0x1b1/0x1520 [ 32.558590] ? ioctl_preallocate+0x2b0/0x2b0 [ 32.562970] ? selinux_capable+0x40/0x40 [ 32.567004] ? __handle_mm_fault+0x3810/0x3810 [ 32.571564] ? security_file_ioctl+0x7d/0xb0 [ 32.575939] ? security_file_ioctl+0x89/0xb0 [ 32.580321] SyS_ioctl+0x8f/0xc0 [ 32.583658] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.588379] RIP: 0033:0x443dd9 [ 32.591535] RSP: 002b:00007fff82a4ab08 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 32.599210] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443dd9 [ 32.606454] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 [ 32.613690] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 32.620933] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ac0 [ 32.628170] R13: 0000000000401b50 R14: 0000000000000000 R15: 0000000000000000 [ 32.635424] [ 32.637020] Allocated by task 3004: [ 32.640614] save_stack_trace+0x16/0x20 [ 32.644555] save_stack+0x43/0xd0 [ 32.647971] kasan_kmalloc+0xad/0xe0 [ 32.651650] kmem_cache_alloc_trace+0x12f/0x740 [ 32.656283] selinux_tun_dev_alloc_security+0x49/0x170 [ 32.661528] security_tun_dev_alloc_security+0x6d/0xa0 [ 32.666770] __tun_chr_ioctl+0x1730/0x3d50 [ 32.670969] tun_chr_ioctl+0x2a/0x40 [ 32.674654] do_vfs_ioctl+0x1b1/0x1520 [ 32.678507] SyS_ioctl+0x8f/0xc0 [ 32.681839] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.686557] [ 32.688150] Freed by task 3004: [ 32.691396] save_stack_trace+0x16/0x20 [ 32.695516] save_stack+0x43/0xd0 [ 32.698936] kasan_slab_free+0x71/0xc0 [ 32.702802] kfree+0xca/0x250 [ 32.705877] selinux_tun_dev_free_security+0x15/0x20 [ 32.710957] security_tun_dev_free_security+0x48/0x80 [ 32.716118] tun_free_netdev+0x13b/0x1b0 [ 32.720147] register_netdevice+0x8d0/0xee0 [ 32.724435] __tun_chr_ioctl+0x1caf/0x3d50 [ 32.728643] tun_chr_ioctl+0x2a/0x40 [ 32.732327] do_vfs_ioctl+0x1b1/0x1520 [ 32.736182] SyS_ioctl+0x8f/0xc0 [ 32.739514] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.744233] [ 32.745832] The buggy address belongs to the object at ffff8801d16b4640 [ 32.745832] which belongs to the cache kmalloc-32 of size 32 [ 32.758376] The buggy address is located 0 bytes inside of [ 32.758376] 32-byte region [ffff8801d16b4640, ffff8801d16b4660) [ 32.769965] The buggy address belongs to the page: [ 32.774862] page:ffffea000745ad00 count:1 mapcount:0 mapping:ffff8801d16b4000 index:0xffff8801d16b4fc1 [ 32.784270] flags: 0x200000000000100(slab) [ 32.788472] raw: 0200000000000100 ffff8801d16b4000 ffff8801d16b4fc1 000000010000003f [ 32.796319] raw: ffffea000746fb60 ffffea000743cce0 ffff8801dac001c0 0000000000000000 [ 32.804170] page dumped because: kasan: bad access detected [ 32.809851] [ 32.811442] Memory state around the buggy address: [ 32.816338] ffff8801d16b4500: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.823664] ffff8801d16b4580: fb fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 32.830990] >ffff8801d16b4600: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc [ 32.838314] ^ [ 32.843738] ffff8801d16b4680: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 32.851068] ffff8801d16b4700: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 32.858394] ================================================================== [ 32.865717] Disabling lock debugging due to kernel taint [ 32.871130] Kernel panic - not syncing: panic_on_warn set ... [ 32.871130] [ 32.878455] CPU: 0 PID: 3004 Comm: syzkaller211546 Tainted: G B 4.13.0-rc5+ #39 [ 32.886994] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.896323] Call Trace: [ 32.898879] dump_stack+0x194/0x257 [ 32.902476] ? arch_local_irq_restore+0x53/0x53 [ 32.907111] ? kasan_end_report+0x32/0x50 [ 32.911224] ? lock_downgrade+0x990/0x990 [ 32.915340] panic+0x1e4/0x417 [ 32.918585] ? __warn+0x1d9/0x1d9 [ 32.922009] ? selinux_tun_dev_free_security+0x15/0x20 [ 32.927251] ? selinux_tun_dev_free_security+0x15/0x20 [ 32.932494] kasan_end_report+0x50/0x50 [ 32.936434] kasan_report_double_free+0x72/0x80 [ 32.941070] kasan_slab_free+0xa3/0xc0 [ 32.944923] kfree+0xca/0x250 [ 32.948011] selinux_tun_dev_free_security+0x15/0x20 [ 32.953080] security_tun_dev_free_security+0x48/0x80 [ 32.958236] __tun_chr_ioctl+0x2ce6/0x3d50 [ 32.962436] ? unwind_dump+0x4/0x4c0 [ 32.966119] ? tun_select_queue+0x580/0x580 [ 32.970408] ? check_noncircular+0x20/0x20 [ 32.974607] ? save_stack+0xa3/0xd0 [ 32.978201] ? __handle_mm_fault+0x57f/0x3810 [ 32.982662] ? check_noncircular+0x20/0x20 [ 32.986860] ? __pmd_alloc+0x4e0/0x4e0 [ 32.990721] ? check_same_owner+0x320/0x320 [ 32.995617] ? handle_mm_fault+0x23e/0x940 [ 32.999833] ? tun_chr_compat_ioctl+0x30/0x30 [ 33.004292] tun_chr_ioctl+0x2a/0x40 [ 33.007973] ? tun_chr_ioctl+0x2a/0x40 [ 33.011835] do_vfs_ioctl+0x1b1/0x1520 [ 33.015688] ? ioctl_preallocate+0x2b0/0x2b0 [ 33.020065] ? selinux_capable+0x40/0x40 [ 33.024097] ? __handle_mm_fault+0x3810/0x3810 [ 33.028649] ? security_file_ioctl+0x7d/0xb0 [ 33.033024] ? security_file_ioctl+0x89/0xb0 [ 33.037397] SyS_ioctl+0x8f/0xc0 [ 33.040730] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 33.045449] RIP: 0033:0x443dd9 [ 33.048603] RSP: 002b:00007fff82a4ab08 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 33.056274] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443dd9 [ 33.063509] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 [ 33.070745] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 33.077982] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ac0 [ 33.085217] R13: 0000000000401b50 R14: 0000000000000000 R15: 0000000000000000 [ 33.092491] Dumping ftrace buffer: [ 33.095997] (ftrace buffer empty) [ 33.099674] Kernel Offset: disabled [ 33.103268] Rebooting in 86400 seconds..