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-0,10.128.0.25' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 20.271197] ================================================================== [ 20.272424] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 20.273603] [ 20.273837] CPU: 0 PID: 3000 Comm: syzkaller887527 Not tainted 4.13.0-rc5+ #43 [ 20.274883] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.276180] Call Trace: [ 20.276575] dump_stack+0x194/0x257 [ 20.277070] ? arch_local_irq_restore+0x53/0x53 [ 20.277713] ? show_regs_print_info+0x65/0x65 [ 20.278311] ? mark_held_locks+0xaf/0x100 [ 20.278872] ? selinux_tun_dev_free_security+0x15/0x20 [ 20.279576] print_address_description+0x73/0x250 [ 20.280235] ? selinux_tun_dev_free_security+0x15/0x20 [ 20.280934] ? selinux_tun_dev_free_security+0x15/0x20 [ 20.281637] kasan_report_double_free+0x55/0x80 [ 20.282290] kasan_slab_free+0xa3/0xc0 [ 20.282953] kfree+0xca/0x250 [ 20.283411] selinux_tun_dev_free_security+0x15/0x20 [ 20.284111] security_tun_dev_free_security+0x48/0x80 [ 20.284806] __tun_chr_ioctl+0x2ce6/0x3d50 [ 20.285372] ? unwind_dump+0x4/0x4c0 [ 20.285883] ? tun_select_queue+0x580/0x580 [ 20.286466] ? check_noncircular+0x20/0x20 [ 20.287317] ? save_stack+0xa3/0xd0 [ 20.287830] ? __handle_mm_fault+0x577/0x3860 [ 20.288440] ? check_noncircular+0x20/0x20 [ 20.289027] ? check_noncircular+0x20/0x20 [ 20.289632] ? __pmd_alloc+0x4e0/0x4e0 [ 20.290179] ? check_same_owner+0x320/0x320 [ 20.290831] ? handle_mm_fault+0x23e/0x860 [ 20.291405] ? tun_chr_compat_ioctl+0x30/0x30 [ 20.295867] tun_chr_ioctl+0x2a/0x40 [ 20.299549] ? tun_chr_ioctl+0x2a/0x40 [ 20.303406] do_vfs_ioctl+0x1b1/0x1520 [ 20.307266] ? ioctl_preallocate+0x2b0/0x2b0 [ 20.311647] ? selinux_capable+0x40/0x40 [ 20.315681] ? __handle_mm_fault+0x3860/0x3860 [ 20.320243] ? security_file_ioctl+0x7d/0xb0 [ 20.324626] ? security_file_ioctl+0x89/0xb0 [ 20.329017] SyS_ioctl+0x8f/0xc0 [ 20.332360] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 20.337082] RIP: 0033:0x443eb9 [ 20.340240] RSP: 002b:00007ffc37b9f4f8 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 20.347918] RAX: ffffffffffffffda RBX: 3ce0bf1bfd9aecc7 RCX: 0000000000443eb9 [ 20.355162] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000018 [ 20.362401] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 20.369638] R10: 0000000000000000 R11: 0000000000000217 R12: 0000001000003a8d [ 20.376881] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 20.384136] [ 20.385730] Allocated by task 3000: [ 20.389332] save_stack_trace+0x16/0x20 [ 20.393276] save_stack+0x43/0xd0 [ 20.396697] kasan_kmalloc+0xad/0xe0 [ 20.400383] kmem_cache_alloc_trace+0x12f/0x740 [ 20.405032] selinux_tun_dev_alloc_security+0x49/0x170 [ 20.410276] security_tun_dev_alloc_security+0x6d/0xa0 [ 20.415522] __tun_chr_ioctl+0x1730/0x3d50 [ 20.419722] tun_chr_ioctl+0x2a/0x40 [ 20.423402] do_vfs_ioctl+0x1b1/0x1520 [ 20.427255] SyS_ioctl+0x8f/0xc0 [ 20.430599] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 20.435319] [ 20.436912] Freed by task 3000: [ 20.440171] save_stack_trace+0x16/0x20 [ 20.444115] save_stack+0x43/0xd0 [ 20.447536] kasan_slab_free+0x71/0xc0 [ 20.451390] kfree+0xca/0x250 [ 20.454464] selinux_tun_dev_free_security+0x15/0x20 [ 20.459536] security_tun_dev_free_security+0x48/0x80 [ 20.464696] tun_free_netdev+0x13b/0x1b0 [ 20.468725] register_netdevice+0x8d0/0xee0 [ 20.473014] __tun_chr_ioctl+0x1caf/0x3d50 [ 20.477213] tun_chr_ioctl+0x2a/0x40 [ 20.480896] do_vfs_ioctl+0x1b1/0x1520 [ 20.484750] SyS_ioctl+0x8f/0xc0 [ 20.488083] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 20.492801] [ 20.494396] The buggy address belongs to the object at ffff8801dada7dc0 [ 20.494396] which belongs to the cache kmalloc-32 of size 32 [ 20.506852] The buggy address is located 0 bytes inside of [ 20.506852] 32-byte region [ffff8801dada7dc0, ffff8801dada7de0) [ 20.518438] The buggy address belongs to the page: [ 20.523345] page:ffffea00076b69c0 count:1 mapcount:0 mapping:ffff8801dada7000 index:0xffff8801dada7fc1 [ 20.532761] flags: 0x200000000000100(slab) [ 20.536965] raw: 0200000000000100 ffff8801dada7000 ffff8801dada7fc1 000000010000003f [ 20.544814] raw: ffffea00076b73a0 ffffea0007613fe0 ffff8801dac001c0 0000000000000000 [ 20.552662] page dumped because: kasan: bad access detected [ 20.558339] [ 20.559934] Memory state around the buggy address: [ 20.564846] ffff8801dada7c80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 20.572178] ffff8801dada7d00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 20.579511] >ffff8801dada7d80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 20.586845] ^ [ 20.592262] ffff8801dada7e00: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc [ 20.599587] ffff8801dada7e80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 20.606916] ================================================================== [ 20.614241] Disabling lock debugging due to kernel taint [ 20.619654] Kernel panic - not syncing: panic_on_warn set ... [ 20.619654] [ 20.626984] CPU: 0 PID: 3000 Comm: syzkaller887527 Tainted: G B 4.13.0-rc5+ #43 [ 20.635522] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 20.644844] Call Trace: [ 20.647400] dump_stack+0x194/0x257 [ 20.651002] ? arch_local_irq_restore+0x53/0x53 [ 20.655637] ? kasan_end_report+0x32/0x50 [ 20.659753] ? lock_downgrade+0x990/0x990 [ 20.663876] panic+0x1e4/0x417 [ 20.667040] ? __warn+0x1d9/0x1d9 [ 20.670468] ? selinux_tun_dev_free_security+0x15/0x20 [ 20.675723] ? selinux_tun_dev_free_security+0x15/0x20 [ 20.681144] kasan_end_report+0x50/0x50 [ 20.685090] kasan_report_double_free+0x72/0x80 [ 20.689727] kasan_slab_free+0xa3/0xc0 [ 20.693583] kfree+0xca/0x250 [ 20.696657] selinux_tun_dev_free_security+0x15/0x20 [ 20.701901] security_tun_dev_free_security+0x48/0x80 [ 20.707059] __tun_chr_ioctl+0x2ce6/0x3d50 [ 20.711259] ? unwind_dump+0x4/0x4c0 [ 20.714946] ? tun_select_queue+0x580/0x580 [ 20.719233] ? check_noncircular+0x20/0x20 [ 20.723432] ? save_stack+0xa3/0xd0 [ 20.727303] ? __handle_mm_fault+0x577/0x3860 [ 20.731762] ? check_noncircular+0x20/0x20 [ 20.735962] ? check_noncircular+0x20/0x20 [ 20.740190] ? __pmd_alloc+0x4e0/0x4e0 [ 20.744055] ? check_same_owner+0x320/0x320 [ 20.748343] ? handle_mm_fault+0x23e/0x860 [ 20.752553] ? tun_chr_compat_ioctl+0x30/0x30 [ 20.757015] tun_chr_ioctl+0x2a/0x40 [ 20.760697] ? tun_chr_ioctl+0x2a/0x40 [ 20.764552] do_vfs_ioctl+0x1b1/0x1520 [ 20.768407] ? ioctl_preallocate+0x2b0/0x2b0 [ 20.772784] ? selinux_capable+0x40/0x40 [ 20.776812] ? __handle_mm_fault+0x3860/0x3860 [ 20.781365] ? security_file_ioctl+0x7d/0xb0 [ 20.785737] ? security_file_ioctl+0x89/0xb0 [ 20.790111] SyS_ioctl+0x8f/0xc0 [ 20.793452] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 20.798175] RIP: 0033:0x443eb9 [ 20.801330] RSP: 002b:00007ffc37b9f4f8 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 20.809002] RAX: ffffffffffffffda RBX: 3ce0bf1bfd9aecc7 RCX: 0000000000443eb9 [ 20.816240] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000018 [ 20.823475] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 20.830716] R10: 0000000000000000 R11: 0000000000000217 R12: 0000001000003a8d [ 20.837952] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 20.845552] Dumping ftrace buffer: [ 20.849059] (ftrace buffer empty) [ 20.852738] Kernel Offset: disabled [ 20.856335] Rebooting in 86400 seconds..