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-next-kasan-gce-3,10.128.0.32' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 50.641581] ================================================================== [ 50.642654] BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x15/0x20 [ 50.643808] [ 50.644038] CPU: 0 PID: 2945 Comm: syzkaller885821 Not tainted 4.13.0-rc4-next-20170811 #1 [ 50.645132] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 50.646374] Call Trace: [ 50.646763] dump_stack+0x194/0x257 [ 50.647251] ? arch_local_irq_restore+0x53/0x53 [ 50.647886] ? show_regs_print_info+0x65/0x65 [ 50.648486] ? mark_held_locks+0xaf/0x100 [ 50.649044] ? selinux_tun_dev_free_security+0x15/0x20 [ 50.649744] print_address_description+0x7f/0x260 [ 50.650386] ? selinux_tun_dev_free_security+0x15/0x20 [ 50.651081] ? selinux_tun_dev_free_security+0x15/0x20 [ 50.651779] kasan_report_double_free+0x55/0x80 [ 50.652402] kasan_slab_free+0xa0/0xc0 [ 50.652956] kfree+0xd3/0x260 [ 50.653379] selinux_tun_dev_free_security+0x15/0x20 [ 50.654054] security_tun_dev_free_security+0x48/0x80 [ 50.654786] __tun_chr_ioctl+0x2cb5/0x3d20 [ 50.655361] ? tun_select_queue+0x580/0x580 [ 50.656098] ? do_raw_spin_trylock+0x190/0x190 [ 50.656740] ? lockdep_init_map+0x9/0x10 [ 50.657352] ? check_noncircular+0x20/0x20 [ 50.657947] ? __pmd_alloc+0x4f0/0x4f0 [ 50.658476] ? check_same_owner+0x320/0x320 [ 50.659079] ? lock_acquire+0x1d5/0x580 [ 50.659608] ? lock_acquire+0x1d5/0x580 [ 50.660145] ? tun_chr_compat_ioctl+0x30/0x30 [ 50.660758] tun_chr_ioctl+0x2a/0x40 [ 50.661267] ? tun_chr_ioctl+0x2a/0x40 [ 50.662687] do_vfs_ioctl+0x1b1/0x1520 [ 50.666546] ? _cond_resched+0x14/0x30 [ 50.670404] ? ioctl_preallocate+0x2b0/0x2b0 [ 50.674785] ? selinux_capable+0x40/0x40 [ 50.678815] ? __ioremap_caller+0xda/0x750 [ 50.683019] ? downgrade_write+0x150/0x150 [ 50.687232] ? security_file_ioctl+0x7d/0xb0 [ 50.691612] ? security_file_ioctl+0x89/0xb0 [ 50.696000] SyS_ioctl+0x8f/0xc0 [ 50.699338] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 50.704057] RIP: 0033:0x443e69 [ 50.707209] RSP: 002b:00007ffe4fc5a108 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 50.714883] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443e69 [ 50.722130] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000004 [ 50.729366] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 50.736603] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401b50 [ 50.743838] R13: 0000000000401be0 R14: 0000000000000000 R15: 0000000000000000 [ 50.751091] [ 50.752687] Allocated by task 2945: [ 50.756281] save_stack_trace+0x16/0x20 [ 50.760218] save_stack+0x43/0xd0 [ 50.763633] kasan_kmalloc+0xaa/0xd0 [ 50.767307] kmem_cache_alloc_trace+0x108/0x700 [ 50.771943] selinux_tun_dev_alloc_security+0x49/0x170 [ 50.777185] security_tun_dev_alloc_security+0x6d/0xa0 [ 50.782428] __tun_chr_ioctl+0x1730/0x3d20 [ 50.786627] tun_chr_ioctl+0x2a/0x40 [ 50.790311] do_vfs_ioctl+0x1b1/0x1520 [ 50.794161] SyS_ioctl+0x8f/0xc0 [ 50.797496] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 50.802217] [ 50.803807] Freed by task 2945: [ 50.807051] save_stack_trace+0x16/0x20 [ 50.810991] save_stack+0x43/0xd0 [ 50.814414] kasan_slab_free+0x6e/0xc0 [ 50.818263] kfree+0xd3/0x260 [ 50.821336] selinux_tun_dev_free_security+0x15/0x20 [ 50.826404] security_tun_dev_free_security+0x48/0x80 [ 50.831560] tun_free_netdev+0x13b/0x1b0 [ 50.835591] register_netdevice+0x92b/0xf40 [ 50.839877] __tun_chr_ioctl+0x1caf/0x3d20 [ 50.844075] tun_chr_ioctl+0x2a/0x40 [ 50.847754] do_vfs_ioctl+0x1b1/0x1520 [ 50.851610] SyS_ioctl+0x8f/0xc0 [ 50.854947] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 50.859663] [ 50.861255] The buggy address belongs to the object at ffff8801da00c4c0 [ 50.861255] which belongs to the cache kmalloc-32 of size 32 [ 50.873706] The buggy address is located 0 bytes inside of [ 50.873706] 32-byte region [ffff8801da00c4c0, ffff8801da00c4e0) [ 50.885282] The buggy address belongs to the page: [ 50.890175] page:ffffea00067b02a0 count:1 mapcount:0 mapping:ffff8801da00c000 index:0xffff8801da00cfc1 [ 50.899584] flags: 0x200000000000100(slab) [ 50.903789] raw: 0200000000000100 ffff8801da00c000 ffff8801da00cfc1 000000010000003c [ 50.911633] raw: ffffea00067b48f8 ffff8801dbc01238 ffff8801dbc00100 [ 50.918003] page dumped because: kasan: bad access detected [ 50.923674] [ 50.925307] Memory state around the buggy address: [ 50.930198] ffff8801da00c380: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 50.937520] ffff8801da00c400: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 50.944842] >ffff8801da00c480: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc [ 50.952169] ^ [ 50.957581] ffff8801da00c500: fb fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc [ 50.964903] ffff8801da00c580: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc [ 50.972226] ================================================================== [ 50.979546] Disabling lock debugging due to kernel taint [ 50.984957] Kernel panic - not syncing: panic_on_warn set ... [ 50.984957] [ 50.992282] CPU: 0 PID: 2945 Comm: syzkaller885821 Tainted: G B 4.13.0-rc4-next-20170811 #1 [ 51.001881] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.011198] Call Trace: [ 51.013751] dump_stack+0x194/0x257 [ 51.017340] ? arch_local_irq_restore+0x53/0x53 [ 51.021977] ? kasan_end_report+0x32/0x50 [ 51.026090] ? lock_downgrade+0x990/0x990 [ 51.030219] panic+0x1e4/0x417 [ 51.033390] ? __warn+0x1d9/0x1d9 [ 51.036817] ? selinux_tun_dev_free_security+0x15/0x20 [ 51.042056] ? selinux_tun_dev_free_security+0x15/0x20 [ 51.047297] kasan_end_report+0x50/0x50 [ 51.051233] kasan_report_double_free+0x72/0x80 [ 51.055862] kasan_slab_free+0xa0/0xc0 [ 51.059710] kfree+0xd3/0x260 [ 51.062779] selinux_tun_dev_free_security+0x15/0x20 [ 51.067847] security_tun_dev_free_security+0x48/0x80 [ 51.073002] __tun_chr_ioctl+0x2cb5/0x3d20 [ 51.077205] ? tun_select_queue+0x580/0x580 [ 51.081497] ? do_raw_spin_trylock+0x190/0x190 [ 51.086045] ? lockdep_init_map+0x9/0x10 [ 51.090079] ? check_noncircular+0x20/0x20 [ 51.094282] ? __pmd_alloc+0x4f0/0x4f0 [ 51.098133] ? check_same_owner+0x320/0x320 [ 51.102416] ? lock_acquire+0x1d5/0x580 [ 51.106353] ? lock_acquire+0x1d5/0x580 [ 51.110294] ? tun_chr_compat_ioctl+0x30/0x30 [ 51.114750] tun_chr_ioctl+0x2a/0x40 [ 51.118426] ? tun_chr_ioctl+0x2a/0x40 [ 51.122277] do_vfs_ioctl+0x1b1/0x1520 [ 51.126130] ? _cond_resched+0x14/0x30 [ 51.129982] ? ioctl_preallocate+0x2b0/0x2b0 [ 51.134353] ? selinux_capable+0x40/0x40 [ 51.138378] ? __ioremap_caller+0xda/0x750 [ 51.142913] ? downgrade_write+0x150/0x150 [ 51.147115] ? security_file_ioctl+0x7d/0xb0 [ 51.151485] ? security_file_ioctl+0x89/0xb0 [ 51.155856] SyS_ioctl+0x8f/0xc0 [ 51.159189] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.163908] RIP: 0033:0x443e69 [ 51.167058] RSP: 002b:00007ffe4fc5a108 EFLAGS: 00000217 ORIG_RAX: 0000000000000010 [ 51.174728] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443e69 [ 51.181961] RDX: 0000000020533000 RSI: 00000000400454ca RDI: 0000000000000004 [ 51.189202] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 51.196437] R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401b50 [ 51.203673] R13: 0000000000401be0 R14: 0000000000000000 R15: 0000000000000000 [ 51.211215] Dumping ftrace buffer: [ 51.214721] (ftrace buffer empty) [ 51.218405] Kernel Offset: disabled [ 51.221996] Rebooting in 86400 seconds..