serialport: Connected to syzkaller.us-central1-c.ci-upstream-kasan-gce-2 port 1 (session ID: 7d40e01f8b0302d029304e3562056fb7d86b16e73b4b32195364c4702671b85a, active connections: 1). 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-2,10.128.0.57' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 36.875643] ================================================================== [ 36.876812] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 36.877956] [ 36.878207] CPU: 0 PID: 2919 Comm: syzkaller227220 Not tainted 4.13.0-rc4+ #23 [ 36.879185] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 36.880407] Call Trace: [ 36.880770] dump_stack+0x194/0x257 [ 36.881265] ? arch_local_irq_restore+0x53/0x53 [ 36.881903] ? show_regs_print_info+0x65/0x65 [ 36.882506] ? mark_held_locks+0xaf/0x100 [ 36.883071] ? selinux_tun_dev_free_security+0x15/0x20 [ 36.883777] print_address_description+0x7f/0x260 [ 36.884429] ? selinux_tun_dev_free_security+0x15/0x20 [ 36.885171] ? selinux_tun_dev_free_security+0x15/0x20 [ 36.885907] kasan_report_double_free+0x55/0x80 [ 36.886543] kasan_slab_free+0xa0/0xc0 [ 36.887102] kfree+0xd3/0x260 [ 36.887537] selinux_tun_dev_free_security+0x15/0x20 [ 36.888223] security_tun_dev_free_security+0x48/0x80 [ 36.888919] __tun_chr_ioctl+0x2ce6/0x3d50 [ 36.889488] ? unwind_dump+0x4/0x4c0 [ 36.890000] ? tun_select_queue+0x580/0x580 [ 36.890605] ? putname+0xee/0x130 [ 36.891073] ? save_stack+0xa3/0xd0 [ 36.891570] ? save_stack_trace+0x16/0x20 [ 36.892135] ? save_stack+0x43/0xd0 [ 36.892625] ? kasan_slab_free+0x6e/0xc0 [ 36.893169] ? kmem_cache_free+0x71/0x240 [ 36.893724] ? putname+0xee/0x130 [ 36.894200] ? check_noncircular+0x20/0x20 [ 36.894849] ? __pmd_alloc+0x4f0/0x4f0 [ 36.895379] ? check_same_owner+0x320/0x320 [ 36.895972] ? lock_acquire+0x1d5/0x580 [ 36.899915] ? lock_acquire+0x1d5/0x580 [ 36.903865] ? tun_chr_compat_ioctl+0x30/0x30 [ 36.908328] tun_chr_ioctl+0x2a/0x40 [ 36.912012] ? tun_chr_ioctl+0x2a/0x40 [ 36.915872] do_vfs_ioctl+0x1b1/0x1520 [ 36.919737] ? ioctl_preallocate+0x2b0/0x2b0 [ 36.924128] ? selinux_capable+0x40/0x40 [ 36.928165] ? __cpa_process_fault+0x26a/0xf40 [ 36.932722] ? downgrade_write+0x150/0x150 [ 36.936942] ? security_file_ioctl+0x7d/0xb0 [ 36.941327] ? security_file_ioctl+0x89/0xb0 [ 36.945715] SyS_ioctl+0x8f/0xc0 [ 36.949075] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 36.953798] RIP: 0033:0x443ff9 [ 36.956959] RSP: 002b:00007ffc34271f68 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 36.964636] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443ff9 [ 36.971875] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 [ 36.979113] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 36.986364] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ce0 [ 36.993602] R13: 0000000000401d70 R14: 0000000000000000 R15: 0000000000000000 [ 37.000857] [ 37.002460] Allocated by task 2919: [ 37.006061] save_stack_trace+0x16/0x20 [ 37.010004] save_stack+0x43/0xd0 [ 37.013423] kasan_kmalloc+0xaa/0xd0 [ 37.017103] kmem_cache_alloc_trace+0x101/0x6f0 [ 37.021743] selinux_tun_dev_alloc_security+0x49/0x170 [ 37.026992] security_tun_dev_alloc_security+0x6d/0xa0 [ 37.032239] __tun_chr_ioctl+0x1730/0x3d50 [ 37.036444] tun_chr_ioctl+0x2a/0x40 [ 37.040132] do_vfs_ioctl+0x1b1/0x1520 [ 37.043987] SyS_ioctl+0x8f/0xc0 [ 37.047320] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 37.052040] [ 37.053636] Freed by task 2919: [ 37.056884] save_stack_trace+0x16/0x20 [ 37.060827] save_stack+0x43/0xd0 [ 37.064249] kasan_slab_free+0x6e/0xc0 [ 37.068104] kfree+0xd3/0x260 [ 37.071180] selinux_tun_dev_free_security+0x15/0x20 [ 37.076250] security_tun_dev_free_security+0x48/0x80 [ 37.081407] tun_free_netdev+0x13b/0x1b0 [ 37.085443] register_netdevice+0x8d0/0xee0 [ 37.089737] __tun_chr_ioctl+0x1caf/0x3d50 [ 37.093942] tun_chr_ioctl+0x2a/0x40 [ 37.097624] do_vfs_ioctl+0x1b1/0x1520 [ 37.101479] SyS_ioctl+0x8f/0xc0 [ 37.104813] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 37.109535] [ 37.111135] The buggy address belongs to the object at ffff8801d2843b40 [ 37.111135] which belongs to the cache kmalloc-32 of size 32 [ 37.123586] The buggy address is located 0 bytes inside of [ 37.123586] 32-byte region [ffff8801d2843b40, ffff8801d2843b60) [ 37.135175] The buggy address belongs to the page: [ 37.140073] page:ffffea000660cea8 count:1 mapcount:0 mapping:ffff8801d2843000 index:0xffff8801d2843fc1 [ 37.149501] flags: 0x200000000000100(slab) [ 37.153708] raw: 0200000000000100 ffff8801d2843000 ffff8801d2843fc1 000000010000003f [ 37.161559] raw: ffffea0006626a40 ffffea00066141a0 ffff8801dbc00100 [ 37.167933] page dumped because: kasan: bad access detected [ 37.173611] [ 37.175205] Memory state around the buggy address: [ 37.180099] ffff8801d2843a00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 37.187423] ffff8801d2843a80: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc [ 37.194748] >ffff8801d2843b00: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc [ 37.202072] ^ [ 37.207486] ffff8801d2843b80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 37.214813] ffff8801d2843c00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 37.222137] ================================================================== [ 37.229461] Disabling lock debugging due to kernel taint [ 37.234877] Kernel panic - not syncing: panic_on_warn set ... [ 37.234877] [ 37.242207] CPU: 0 PID: 2919 Comm: syzkaller227220 Tainted: G B 4.13.0-rc4+ #23 [ 37.250858] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.260177] Call Trace: [ 37.262739] dump_stack+0x194/0x257 [ 37.266337] ? arch_local_irq_restore+0x53/0x53 [ 37.270974] ? kasan_end_report+0x32/0x50 [ 37.275087] ? lock_downgrade+0x990/0x990 [ 37.279205] panic+0x1e4/0x417 [ 37.282364] ? __warn+0x1d9/0x1d9 [ 37.285791] ? selinux_tun_dev_free_security+0x15/0x20 [ 37.291034] ? selinux_tun_dev_free_security+0x15/0x20 [ 37.296276] kasan_end_report+0x50/0x50 [ 37.300215] kasan_report_double_free+0x72/0x80 [ 37.304849] kasan_slab_free+0xa0/0xc0 [ 37.308705] kfree+0xd3/0x260 [ 37.311777] selinux_tun_dev_free_security+0x15/0x20 [ 37.316846] security_tun_dev_free_security+0x48/0x80 [ 37.322004] __tun_chr_ioctl+0x2ce6/0x3d50 [ 37.326206] ? unwind_dump+0x4/0x4c0 [ 37.329890] ? tun_select_queue+0x580/0x580 [ 37.334178] ? putname+0xee/0x130 [ 37.337600] ? save_stack+0xa3/0xd0 [ 37.341194] ? save_stack_trace+0x16/0x20 [ 37.345924] ? save_stack+0x43/0xd0 [ 37.349524] ? kasan_slab_free+0x6e/0xc0 [ 37.353553] ? kmem_cache_free+0x71/0x240 [ 37.357672] ? putname+0xee/0x130 [ 37.361097] ? check_noncircular+0x20/0x20 [ 37.365302] ? __pmd_alloc+0x4f0/0x4f0 [ 37.369157] ? check_same_owner+0x320/0x320 [ 37.373441] ? lock_acquire+0x1d5/0x580 [ 37.377379] ? lock_acquire+0x1d5/0x580 [ 37.381322] ? tun_chr_compat_ioctl+0x30/0x30 [ 37.385781] tun_chr_ioctl+0x2a/0x40 [ 37.389461] ? tun_chr_ioctl+0x2a/0x40 [ 37.393316] do_vfs_ioctl+0x1b1/0x1520 [ 37.397173] ? ioctl_preallocate+0x2b0/0x2b0 [ 37.401548] ? selinux_capable+0x40/0x40 [ 37.405578] ? __cpa_process_fault+0x26a/0xf40 [ 37.410128] ? downgrade_write+0x150/0x150 [ 37.414335] ? security_file_ioctl+0x7d/0xb0 [ 37.418709] ? security_file_ioctl+0x89/0xb0 [ 37.423084] SyS_ioctl+0x8f/0xc0 [ 37.426418] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 37.431138] RIP: 0033:0x443ff9 [ 37.434294] RSP: 002b:00007ffc34271f68 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 37.441965] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443ff9 [ 37.449202] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000003 [ 37.456438] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 37.463676] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401ce0 [ 37.470913] R13: 0000000000401d70 R14: 0000000000000000 R15: 0000000000000000 [ 37.478230] Dumping ftrace buffer: [ 37.481733] (ftrace buffer empty) [ 37.485410] Kernel Offset: disabled [ 37.489007] Rebooting in 86400 seconds..