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-4,10.128.0.46' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 22.271850] ================================================================== [ 22.272993] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 22.274134] [ 22.274370] CPU: 1 PID: 3001 Comm: syzkaller171169 Not tainted 4.13.0-rc5+ #39 [ 22.275399] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.276668] Call Trace: [ 22.277025] dump_stack+0x194/0x257 [ 22.277533] ? arch_local_irq_restore+0x53/0x53 [ 22.278153] ? show_regs_print_info+0x65/0x65 [ 22.278749] ? mark_held_locks+0xaf/0x100 [ 22.279372] ? selinux_tun_dev_free_security+0x15/0x20 [ 22.280082] print_address_description+0x73/0x250 [ 22.280726] ? selinux_tun_dev_free_security+0x15/0x20 [ 22.281481] ? selinux_tun_dev_free_security+0x15/0x20 [ 22.282211] kasan_report_double_free+0x55/0x80 [ 22.282849] kasan_slab_free+0xa3/0xc0 [ 22.283372] kfree+0xca/0x250 [ 22.283821] selinux_tun_dev_free_security+0x15/0x20 [ 22.284608] security_tun_dev_free_security+0x48/0x80 [ 22.285360] __tun_chr_ioctl+0x2ce6/0x3d50 [ 22.285926] ? unwind_dump+0x4/0x4c0 [ 22.286446] ? tun_select_queue+0x580/0x580 [ 22.287052] ? putname+0xee/0x130 [ 22.287532] ? save_stack+0xa3/0xd0 [ 22.288022] ? save_stack_trace+0x16/0x20 [ 22.288573] ? save_stack+0x43/0xd0 [ 22.289070] ? kasan_slab_free+0x71/0xc0 [ 22.289620] ? kmem_cache_free+0x77/0x280 [ 22.290227] ? putname+0xee/0x130 [ 22.290703] ? __lock_is_held+0xb6/0x140 [ 22.291348] ? check_same_owner+0x320/0x320 [ 22.291933] ? tun_chr_compat_ioctl+0x30/0x30 [ 22.292530] tun_chr_ioctl+0x2a/0x40 [ 22.296213] ? tun_chr_ioctl+0x2a/0x40 [ 22.300077] do_vfs_ioctl+0x1b1/0x1520 [ 22.303939] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.308322] ? selinux_capable+0x40/0x40 [ 22.312363] ? putname+0xf3/0x130 [ 22.315786] ? do_sys_open+0x320/0x6d0 [ 22.319647] ? security_file_ioctl+0x7d/0xb0 [ 22.324026] ? security_file_ioctl+0x89/0xb0 [ 22.328405] SyS_ioctl+0x8f/0xc0 [ 22.331743] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.336460] RIP: 0033:0x443da9 [ 22.339614] RSP: 002b:00007ffde1a54b28 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 22.347309] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443da9 [ 22.354545] RDX: 0000000020511fd8 RSI: 00000000400454ca RDI: 0000000000000003 [ 22.361783] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 22.369028] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000000003 [ 22.376266] R13: 0000000000401b20 R14: 0000000000000000 R15: 0000000000000000 [ 22.383526] [ 22.385120] Allocated by task 3001: [ 22.388714] save_stack_trace+0x16/0x20 [ 22.392651] save_stack+0x43/0xd0 [ 22.396075] kasan_kmalloc+0xad/0xe0 [ 22.399757] kmem_cache_alloc_trace+0x12f/0x740 [ 22.404390] selinux_tun_dev_alloc_security+0x49/0x170 [ 22.409633] security_tun_dev_alloc_security+0x6d/0xa0 [ 22.414879] __tun_chr_ioctl+0x1730/0x3d50 [ 22.419084] tun_chr_ioctl+0x2a/0x40 [ 22.422766] do_vfs_ioctl+0x1b1/0x1520 [ 22.426629] SyS_ioctl+0x8f/0xc0 [ 22.429963] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.434690] [ 22.436287] Freed by task 3001: [ 22.439536] save_stack_trace+0x16/0x20 [ 22.443480] save_stack+0x43/0xd0 [ 22.446898] kasan_slab_free+0x71/0xc0 [ 22.450749] kfree+0xca/0x250 [ 22.453823] selinux_tun_dev_free_security+0x15/0x20 [ 22.458897] security_tun_dev_free_security+0x48/0x80 [ 22.464056] tun_free_netdev+0x13b/0x1b0 [ 22.468088] register_netdevice+0x8d0/0xee0 [ 22.472380] __tun_chr_ioctl+0x1caf/0x3d50 [ 22.476581] tun_chr_ioctl+0x2a/0x40 [ 22.480264] do_vfs_ioctl+0x1b1/0x1520 [ 22.484126] SyS_ioctl+0x8f/0xc0 [ 22.487466] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.492185] [ 22.493780] The buggy address belongs to the object at ffff8801d043cd80 [ 22.493780] which belongs to the cache kmalloc-32 of size 32 [ 22.506230] The buggy address is located 0 bytes inside of [ 22.506230] 32-byte region [ffff8801d043cd80, ffff8801d043cda0) [ 22.517817] The buggy address belongs to the page: [ 22.522721] page:ffffea0007410f00 count:1 mapcount:0 mapping:ffff8801d043c000 index:0xffff8801d043cfc1 [ 22.532138] flags: 0x200000000000100(slab) [ 22.536439] raw: 0200000000000100 ffff8801d043c000 ffff8801d043cfc1 000000010000003f [ 22.544299] raw: ffffea0007452d60 ffffea000741a0e0 ffff8801dac001c0 0000000000000000 [ 22.552152] page dumped because: kasan: bad access detected [ 22.557828] [ 22.559420] Memory state around the buggy address: [ 22.564315] ffff8801d043cc80: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc [ 22.571645] ffff8801d043cd00: 00 00 00 fc fc fc fc fc 00 00 00 00 fc fc fc fc [ 22.578974] >ffff8801d043cd80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 22.586314] ^ [ 22.589649] ffff8801d043ce00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 22.596983] ffff8801d043ce80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 22.604306] ================================================================== [ 22.611629] Disabling lock debugging due to kernel taint [ 22.617042] Kernel panic - not syncing: panic_on_warn set ... [ 22.617042] [ 22.624372] CPU: 1 PID: 3001 Comm: syzkaller171169 Tainted: G B 4.13.0-rc5+ #39 [ 22.632919] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.642255] Call Trace: [ 22.644815] dump_stack+0x194/0x257 [ 22.648417] ? arch_local_irq_restore+0x53/0x53 [ 22.653054] ? kasan_end_report+0x32/0x50 [ 22.657198] ? lock_downgrade+0x990/0x990 [ 22.661448] panic+0x1e4/0x417 [ 22.664619] ? __warn+0x1d9/0x1d9 [ 22.668068] ? selinux_tun_dev_free_security+0x15/0x20 [ 22.673317] ? selinux_tun_dev_free_security+0x15/0x20 [ 22.678562] kasan_end_report+0x50/0x50 [ 22.682508] kasan_report_double_free+0x72/0x80 [ 22.687146] kasan_slab_free+0xa3/0xc0 [ 22.691002] kfree+0xca/0x250 [ 22.694083] selinux_tun_dev_free_security+0x15/0x20 [ 22.699162] security_tun_dev_free_security+0x48/0x80 [ 22.704322] __tun_chr_ioctl+0x2ce6/0x3d50 [ 22.708530] ? unwind_dump+0x4/0x4c0 [ 22.712216] ? tun_select_queue+0x580/0x580 [ 22.716509] ? putname+0xee/0x130 [ 22.719941] ? save_stack+0xa3/0xd0 [ 22.723534] ? save_stack_trace+0x16/0x20 [ 22.727647] ? save_stack+0x43/0xd0 [ 22.731235] ? kasan_slab_free+0x71/0xc0 [ 22.735268] ? kmem_cache_free+0x77/0x280 [ 22.739393] ? putname+0xee/0x130 [ 22.742823] ? __lock_is_held+0xb6/0x140 [ 22.746862] ? check_same_owner+0x320/0x320 [ 22.751153] ? tun_chr_compat_ioctl+0x30/0x30 [ 22.755612] tun_chr_ioctl+0x2a/0x40 [ 22.759295] ? tun_chr_ioctl+0x2a/0x40 [ 22.763154] do_vfs_ioctl+0x1b1/0x1520 [ 22.767021] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.771398] ? selinux_capable+0x40/0x40 [ 22.775426] ? putname+0xf3/0x130 [ 22.778844] ? do_sys_open+0x320/0x6d0 [ 22.782704] ? security_file_ioctl+0x7d/0xb0 [ 22.787081] ? security_file_ioctl+0x89/0xb0 [ 22.791460] SyS_ioctl+0x8f/0xc0 [ 22.794804] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.799530] RIP: 0033:0x443da9 [ 22.802686] RSP: 002b:00007ffde1a54b28 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 22.810367] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443da9 [ 22.817612] RDX: 0000000020511fd8 RSI: 00000000400454ca RDI: 0000000000000003 [ 22.824850] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 22.832094] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000000003 [ 22.839333] R13: 0000000000401b20 R14: 0000000000000000 R15: 0000000000000000 [ 22.846824] Dumping ftrace buffer: [ 22.850334] (ftrace buffer empty) [ 22.854014] Kernel Offset: disabled [ 22.857616] Rebooting in 86400 seconds..