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.54' (ECDSA) to the list of known hosts. 2017/09/06 16:38:57 parsed 1 programs 2017/09/06 16:38:57 executed programs: 0 syzkaller login: [ 33.030138] dev_remove_pack: ffff8801cbc8edc0 not found [ 33.052231] ================================================================== [ 33.059646] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 33.066373] Read of size 8 at addr ffff8801cbefaf28 by task syz-executor0/3201 [ 33.073733] [ 33.075336] CPU: 0 PID: 3201 Comm: syz-executor0 Not tainted 4.13.0+ #70 [ 33.082151] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.091489] Call Trace: [ 33.094060] dump_stack+0x194/0x257 [ 33.097671] ? arch_local_irq_restore+0x53/0x53 [ 33.102331] ? show_regs_print_info+0x65/0x65 [ 33.106817] ? __dev_remove_pack+0x305/0x3b0 [ 33.111210] print_address_description+0x73/0x250 [ 33.116034] ? __dev_remove_pack+0x305/0x3b0 [ 33.120426] kasan_report+0x24e/0x340 [ 33.124208] __asan_report_load8_noabort+0x14/0x20 [ 33.129135] __dev_remove_pack+0x305/0x3b0 [ 33.133352] ? dev_get_by_name_rcu+0x270/0x270 [ 33.137929] ? refcount_sub_and_test+0x115/0x1b0 [ 33.142674] __unregister_prot_hook+0x211/0x280 [ 33.147348] packet_release+0x8bb/0xd70 [ 33.151327] ? packet_set_ring+0x1b70/0x1b70 [ 33.155718] ? dentry_free+0xcd/0x130 [ 33.159502] ? rcu_read_lock_sched_held+0x108/0x120 [ 33.164509] ? kmem_cache_free+0x249/0x280 [ 33.168877] ? dentry_free+0xd2/0x130 [ 33.172671] ? locks_remove_file+0x414/0x560 [ 33.177071] ? fcntl_setlk+0x10d0/0x10d0 [ 33.181119] ? __fsnotify_parent+0xb4/0x3a0 [ 33.185428] ? fsnotify+0x1af0/0x1af0 [ 33.189220] sock_release+0x8d/0x1e0 [ 33.192917] ? sock_release+0x8d/0x1e0 [ 33.196790] ? sock_release+0x1e0/0x1e0 [ 33.200748] sock_close+0x16/0x20 [ 33.204186] __fput+0x333/0x7f0 [ 33.207462] ? fput+0x140/0x140 [ 33.210724] ? check_same_owner+0x320/0x320 [ 33.215043] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.219537] ____fput+0x15/0x20 [ 33.222799] task_work_run+0x199/0x270 [ 33.226675] ? task_work_cancel+0x210/0x210 [ 33.230989] ? _raw_spin_unlock+0x22/0x30 [ 33.235126] ? switch_task_namespaces+0x87/0xc0 [ 33.239786] do_exit+0xa52/0x1b40 [ 33.243233] ? plist_check_list+0xa0/0xa0 [ 33.247380] ? plist_del+0x47b/0x990 [ 33.251085] ? mm_update_next_owner+0x930/0x930 [ 33.255747] ? plist_add+0x760/0x760 [ 33.259457] ? check_same_owner+0x320/0x320 [ 33.263767] ? find_held_lock+0x39/0x1d0 [ 33.267815] ? check_noncircular+0x20/0x20 [ 33.272043] ? lock_downgrade+0x990/0x990 [ 33.276174] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 33.281546] ? find_held_lock+0x39/0x1d0 [ 33.285598] ? lock_downgrade+0x990/0x990 [ 33.289724] ? recalc_sigpending_tsk+0x117/0x150 [ 33.294457] ? recalc_sigpending+0x103/0x160 [ 33.298843] ? recalc_sigpending_tsk+0x150/0x150 [ 33.303574] ? get_signal+0x397/0x17e0 [ 33.307453] do_group_exit+0x149/0x400 [ 33.311317] ? __lock_is_held+0xbc/0x140 [ 33.315352] ? SyS_exit+0x30/0x30 [ 33.318782] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.323255] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.328249] get_signal+0x7e8/0x17e0 [ 33.331966] ? ptrace_notify+0x130/0x130 [ 33.336001] ? __fget+0xbb/0x580 [ 33.339343] ? __lockdep_init_map+0xe4/0x650 [ 33.343730] ? lock_release+0xd70/0xd70 [ 33.347688] ? exit_robust_list+0x240/0x240 [ 33.352018] do_signal+0x94/0x1ee0 [ 33.355540] ? iterate_fd+0x3f0/0x3f0 [ 33.359324] ? setup_sigcontext+0x7d0/0x7d0 [ 33.363624] ? __lock_is_held+0xbc/0x140 [ 33.367677] ? __fget_light+0x29d/0x390 [ 33.371631] ? selinux_tun_dev_create+0xc0/0xc0 [ 33.376288] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 33.381983] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 33.387240] ? alloc_file+0x284/0x3a0 [ 33.391021] ? exit_to_usermode_loop+0x98/0x300 [ 33.395674] exit_to_usermode_loop+0x224/0x300 [ 33.400239] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 33.405768] syscall_return_slowpath+0x42f/0x500 [ 33.410499] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 33.415497] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 33.420413] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.425414] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.430163] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 33.434889] RIP: 0033:0x451e59 [ 33.438056] RSP: 002b:00007f1152effcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 33.445742] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 33.452989] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 33.460243] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 33.467488] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 33.474735] R13: 00007ffc05f5171f R14: 00007f1152f009c0 R15: 0000000000000000 [ 33.481999] [ 33.483601] Allocated by task 3201: [ 33.487206] save_stack_trace+0x16/0x20 [ 33.491154] save_stack+0x43/0xd0 [ 33.494587] kasan_kmalloc+0xad/0xe0 [ 33.498283] kmem_cache_alloc_trace+0x136/0x750 [ 33.502943] fanout_add+0xa50/0x1190 [ 33.506631] packet_setsockopt+0xfdc/0x1e80 [ 33.510926] SyS_setsockopt+0x189/0x360 [ 33.514874] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 33.519599] [ 33.521199] Freed by task 3201: [ 33.524458] save_stack_trace+0x16/0x20 [ 33.528404] save_stack+0x43/0xd0 [ 33.531833] kasan_slab_free+0x71/0xc0 [ 33.535692] kfree+0xca/0x250 [ 33.538777] packet_release+0xa8f/0xd70 [ 33.542731] sock_release+0x8d/0x1e0 [ 33.546417] sock_close+0x16/0x20 [ 33.549843] __fput+0x333/0x7f0 [ 33.553095] ____fput+0x15/0x20 [ 33.556352] task_work_run+0x199/0x270 [ 33.560215] do_exit+0xa52/0x1b40 [ 33.563642] do_group_exit+0x149/0x400 [ 33.567502] get_signal+0x7e8/0x17e0 [ 33.571192] do_signal+0x94/0x1ee0 [ 33.574716] exit_to_usermode_loop+0x224/0x300 [ 33.579272] syscall_return_slowpath+0x42f/0x500 [ 33.584005] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 33.588728] [ 33.590329] The buggy address belongs to the object at ffff8801cbefa680 [ 33.590329] which belongs to the cache kmalloc-4096 of size 4096 [ 33.603135] The buggy address is located 2216 bytes inside of [ 33.603135] 4096-byte region [ffff8801cbefa680, ffff8801cbefb680) [ 33.615157] The buggy address belongs to the page: [ 33.620062] page:ffffea00072fbe80 count:1 mapcount:0 mapping:ffff8801cbefa680 index:0x0 compound_mapcount: 0 [ 33.630010] flags: 0x200000000008100(slab|head) [ 33.634651] raw: 0200000000008100 ffff8801cbefa680 0000000000000000 0000000100000001 [ 33.642501] raw: ffffea00072e28a0 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 33.650353] page dumped because: kasan: bad access detected [ 33.656034] [ 33.657634] Memory state around the buggy address: [ 33.662534] ffff8801cbefae00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.669864] ffff8801cbefae80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.677203] >ffff8801cbefaf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.684532] ^ [ 33.689170] ffff8801cbefaf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.696498] ffff8801cbefb000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.703825] ================================================================== [ 33.711152] Disabling lock debugging due to kernel taint [ 33.716663] Kernel panic - not syncing: panic_on_warn set ... [ 33.716663] [ 33.724000] CPU: 0 PID: 3201 Comm: syz-executor0 Tainted: G B 4.13.0+ #70 [ 33.732021] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.741343] Call Trace: [ 33.743906] dump_stack+0x194/0x257 [ 33.747503] ? arch_local_irq_restore+0x53/0x53 [ 33.752141] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.756870] ? __dev_remove_pack+0x240/0x3b0 [ 33.761248] panic+0x1e4/0x417 [ 33.764408] ? __warn+0x1d9/0x1d9 [ 33.767846] ? __dev_remove_pack+0x305/0x3b0 [ 33.772227] kasan_end_report+0x50/0x50 [ 33.776166] kasan_report+0x137/0x340 [ 33.779937] __asan_report_load8_noabort+0x14/0x20 [ 33.784835] __dev_remove_pack+0x305/0x3b0 [ 33.789038] ? dev_get_by_name_rcu+0x270/0x270 [ 33.793591] ? refcount_sub_and_test+0x115/0x1b0 [ 33.798321] __unregister_prot_hook+0x211/0x280 [ 33.802971] packet_release+0x8bb/0xd70 [ 33.806921] ? packet_set_ring+0x1b70/0x1b70 [ 33.811297] ? dentry_free+0xcd/0x130 [ 33.815068] ? rcu_read_lock_sched_held+0x108/0x120 [ 33.820053] ? kmem_cache_free+0x249/0x280 [ 33.824255] ? dentry_free+0xd2/0x130 [ 33.828026] ? locks_remove_file+0x414/0x560 [ 33.832404] ? fcntl_setlk+0x10d0/0x10d0 [ 33.836438] ? __fsnotify_parent+0xb4/0x3a0 [ 33.840728] ? fsnotify+0x1af0/0x1af0 [ 33.844498] sock_release+0x8d/0x1e0 [ 33.848177] ? sock_release+0x8d/0x1e0 [ 33.852031] ? sock_release+0x1e0/0x1e0 [ 33.855969] sock_close+0x16/0x20 [ 33.859391] __fput+0x333/0x7f0 [ 33.862638] ? fput+0x140/0x140 [ 33.865890] ? check_same_owner+0x320/0x320 [ 33.870176] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.874646] ____fput+0x15/0x20 [ 33.877893] task_work_run+0x199/0x270 [ 33.881752] ? task_work_cancel+0x210/0x210 [ 33.886045] ? _raw_spin_unlock+0x22/0x30 [ 33.890165] ? switch_task_namespaces+0x87/0xc0 [ 33.894809] do_exit+0xa52/0x1b40 [ 33.898236] ? plist_check_list+0xa0/0xa0 [ 33.902365] ? plist_del+0x47b/0x990 [ 33.906052] ? mm_update_next_owner+0x930/0x930 [ 33.910695] ? plist_add+0x760/0x760 [ 33.914389] ? check_same_owner+0x320/0x320 [ 33.918680] ? find_held_lock+0x39/0x1d0 [ 33.922714] ? check_noncircular+0x20/0x20 [ 33.926918] ? lock_downgrade+0x990/0x990 [ 33.931033] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 33.936374] ? find_held_lock+0x39/0x1d0 [ 33.940407] ? lock_downgrade+0x990/0x990 [ 33.944522] ? recalc_sigpending_tsk+0x117/0x150 [ 33.949256] ? recalc_sigpending+0x103/0x160 [ 33.953634] ? recalc_sigpending_tsk+0x150/0x150 [ 33.958357] ? get_signal+0x397/0x17e0 [ 33.962230] do_group_exit+0x149/0x400 [ 33.966087] ? __lock_is_held+0xbc/0x140 [ 33.970113] ? SyS_exit+0x30/0x30 [ 33.973538] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.978004] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.982993] get_signal+0x7e8/0x17e0 [ 33.986687] ? ptrace_notify+0x130/0x130 [ 33.990710] ? __fget+0xbb/0x580 [ 33.994043] ? __lockdep_init_map+0xe4/0x650 [ 33.998424] ? lock_release+0xd70/0xd70 [ 34.002373] ? exit_robust_list+0x240/0x240 [ 34.006670] do_signal+0x94/0x1ee0 [ 34.010181] ? iterate_fd+0x3f0/0x3f0 [ 34.013952] ? setup_sigcontext+0x7d0/0x7d0 [ 34.018244] ? __lock_is_held+0xbc/0x140 [ 34.022278] ? __fget_light+0x29d/0x390 [ 34.026233] ? selinux_tun_dev_create+0xc0/0xc0