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-7,10.128.0.55' (ECDSA) to the list of known hosts. 2017/09/07 06:23:11 parsed 1 programs 2017/09/07 06:23:11 executed programs: 0 2017/09/07 06:23:16 executed programs: 148 syzkaller login: [ 68.415869] dev_remove_pack: ffff8801c9c828c0 not found [ 68.429332] ================================================================== [ 68.436705] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 68.443437] Read of size 8 at addr ffff8801c9c73128 by task syz-executor0/3697 [ 68.450767] [ 68.452372] CPU: 0 PID: 3697 Comm: syz-executor0 Not tainted 4.13.0+ #71 [ 68.459194] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 68.468563] Call Trace: [ 68.471135] dump_stack+0x194/0x257 [ 68.474756] ? arch_local_irq_restore+0x53/0x53 [ 68.479400] ? show_regs_print_info+0x65/0x65 [ 68.483878] ? __dev_remove_pack+0x305/0x3b0 [ 68.488281] print_address_description+0x73/0x250 [ 68.493100] ? __dev_remove_pack+0x305/0x3b0 [ 68.497491] kasan_report+0x24e/0x340 [ 68.501271] __asan_report_load8_noabort+0x14/0x20 [ 68.506173] __dev_remove_pack+0x305/0x3b0 [ 68.510381] ? dev_get_by_name_rcu+0x270/0x270 [ 68.514947] ? refcount_sub_and_test+0x115/0x1b0 [ 68.519695] __unregister_prot_hook+0x211/0x280 [ 68.524342] packet_release+0x8bb/0xd70 [ 68.528299] ? packet_set_ring+0x1b70/0x1b70 [ 68.532684] ? dentry_free+0xcd/0x130 [ 68.536461] ? rcu_read_lock_sched_held+0x108/0x120 [ 68.541451] ? kmem_cache_free+0x249/0x280 [ 68.545661] ? dentry_free+0xd2/0x130 [ 68.549445] ? locks_remove_file+0x3fa/0x5a0 [ 68.553831] ? fcntl_setlk+0x10d0/0x10d0 [ 68.557869] ? __fsnotify_parent+0xb4/0x3a0 [ 68.562169] ? fsnotify+0x1af0/0x1af0 [ 68.565950] sock_release+0x8d/0x1e0 [ 68.569639] ? sock_release+0x8d/0x1e0 [ 68.573500] ? sock_release+0x1e0/0x1e0 [ 68.577443] sock_close+0x16/0x20 [ 68.580868] __fput+0x333/0x7f0 [ 68.584126] ? fput+0x140/0x140 [ 68.587380] ? check_same_owner+0x320/0x320 [ 68.591675] ? _raw_spin_unlock_irq+0x27/0x70 [ 68.596155] ____fput+0x15/0x20 [ 68.599418] task_work_run+0x199/0x270 [ 68.603292] ? task_work_cancel+0x210/0x210 [ 68.607605] ? _raw_spin_unlock+0x22/0x30 [ 68.611734] ? switch_task_namespaces+0x87/0xc0 [ 68.616386] do_exit+0xa52/0x1b40 [ 68.619811] ? plist_check_list+0xa0/0xa0 [ 68.624038] ? plist_del+0x47b/0x990 [ 68.627730] ? mm_update_next_owner+0x930/0x930 [ 68.632378] ? plist_add+0x760/0x760 [ 68.636083] ? check_same_owner+0x320/0x320 [ 68.640404] ? find_held_lock+0x39/0x1d0 [ 68.644454] ? check_noncircular+0x20/0x20 [ 68.648672] ? lock_downgrade+0x990/0x990 [ 68.652807] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 68.658175] ? find_held_lock+0x39/0x1d0 [ 68.662226] ? lock_downgrade+0x990/0x990 [ 68.666353] ? recalc_sigpending_tsk+0x117/0x150 [ 68.671088] ? recalc_sigpending+0x103/0x160 [ 68.675476] ? recalc_sigpending_tsk+0x150/0x150 [ 68.680205] ? get_signal+0x397/0x17e0 [ 68.684088] do_group_exit+0x149/0x400 [ 68.687953] ? __lock_is_held+0xbc/0x140 [ 68.691990] ? SyS_exit+0x30/0x30 [ 68.695419] ? _raw_spin_unlock_irq+0x27/0x70 [ 68.699910] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 68.704923] get_signal+0x7e8/0x17e0 [ 68.708651] ? ptrace_notify+0x130/0x130 [ 68.712697] ? __fget+0xbb/0x580 [ 68.716042] ? __lockdep_init_map+0xe4/0x650 [ 68.720456] ? lock_release+0xd70/0xd70 [ 68.724512] ? exit_robust_list+0x240/0x240 [ 68.728826] do_signal+0x94/0x1ee0 [ 68.732348] ? iterate_fd+0x3f0/0x3f0 [ 68.736140] ? setup_sigcontext+0x7d0/0x7d0 [ 68.740442] ? __lock_is_held+0xbc/0x140 [ 68.744490] ? __fget_light+0x29d/0x390 [ 68.748444] ? selinux_tun_dev_create+0xc0/0xc0 [ 68.753094] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 68.758782] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 68.764032] ? alloc_file+0x284/0x3a0 [ 68.767808] ? exit_to_usermode_loop+0x98/0x300 [ 68.772476] exit_to_usermode_loop+0x224/0x300 [ 68.777046] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 68.782569] syscall_return_slowpath+0x42f/0x500 [ 68.787303] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 68.792304] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 68.797214] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 68.802209] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 68.806969] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 68.811700] RIP: 0033:0x451e59 [ 68.814862] RSP: 002b:00007f261277acf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 68.822545] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 68.829797] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 68.837048] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 68.844292] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 68.851535] R13: 00007fff5556774f R14: 00007f261277b9c0 R15: 0000000000000000 [ 68.858801] [ 68.860411] Allocated by task 3697: [ 68.864016] save_stack_trace+0x16/0x20 [ 68.867967] save_stack+0x43/0xd0 [ 68.871390] kasan_kmalloc+0xad/0xe0 [ 68.875089] kmem_cache_alloc_trace+0x136/0x750 [ 68.879740] fanout_add+0xa50/0x1190 [ 68.883432] packet_setsockopt+0xfdc/0x1e80 [ 68.887731] SyS_setsockopt+0x189/0x360 [ 68.891679] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 68.896405] [ 68.898011] Freed by task 3697: [ 68.901264] save_stack_trace+0x16/0x20 [ 68.905210] save_stack+0x43/0xd0 [ 68.908635] kasan_slab_free+0x71/0xc0 [ 68.912496] kfree+0xca/0x250 [ 68.915574] packet_release+0xa8f/0xd70 [ 68.919529] sock_release+0x8d/0x1e0 [ 68.923215] sock_close+0x16/0x20 [ 68.926641] __fput+0x333/0x7f0 [ 68.929895] ____fput+0x15/0x20 [ 68.933149] task_work_run+0x199/0x270 [ 68.937012] do_exit+0xa52/0x1b40 [ 68.940438] do_group_exit+0x149/0x400 [ 68.944300] get_signal+0x7e8/0x17e0 [ 68.947998] do_signal+0x94/0x1ee0 [ 68.951513] exit_to_usermode_loop+0x224/0x300 [ 68.956068] syscall_return_slowpath+0x42f/0x500 [ 68.960801] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 68.965525] [ 68.967126] The buggy address belongs to the object at ffff8801c9c72880 [ 68.967126] which belongs to the cache kmalloc-4096 of size 4096 [ 68.979939] The buggy address is located 2216 bytes inside of [ 68.979939] 4096-byte region [ffff8801c9c72880, ffff8801c9c73880) [ 68.991982] The buggy address belongs to the page: [ 68.996889] page:ffffea0007271c80 count:1 mapcount:0 mapping:ffff8801c9c72880 index:0x0 compound_mapcount: 0 [ 69.006839] flags: 0x200000000008100(slab|head) [ 69.011482] raw: 0200000000008100 ffff8801c9c72880 0000000000000000 0000000100000001 [ 69.019337] raw: ffffea0007271c20 ffffea0007271920 ffff8801dac00dc0 0000000000000000 [ 69.027190] page dumped because: kasan: bad access detected [ 69.032878] [ 69.034478] Memory state around the buggy address: [ 69.039380] ffff8801c9c73000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.046712] ffff8801c9c73080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.054045] >ffff8801c9c73100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.061375] ^ [ 69.066020] ffff8801c9c73180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.073359] ffff8801c9c73200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.080691] ================================================================== [ 69.088030] Disabling lock debugging due to kernel taint [ 69.093535] Kernel panic - not syncing: panic_on_warn set ... [ 69.093535] [ 69.100886] CPU: 0 PID: 3697 Comm: syz-executor0 Tainted: G B 4.13.0+ #71 [ 69.108905] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 69.118227] Call Trace: [ 69.120786] dump_stack+0x194/0x257 [ 69.124385] ? arch_local_irq_restore+0x53/0x53 [ 69.129025] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 69.133753] ? __dev_remove_pack+0x240/0x3b0 [ 69.138131] panic+0x1e4/0x417 [ 69.141289] ? __warn+0x1d9/0x1d9 [ 69.144720] ? __dev_remove_pack+0x305/0x3b0 [ 69.149096] kasan_end_report+0x50/0x50 [ 69.153036] kasan_report+0x137/0x340 [ 69.156813] __asan_report_load8_noabort+0x14/0x20 [ 69.161719] __dev_remove_pack+0x305/0x3b0 [ 69.165921] ? dev_get_by_name_rcu+0x270/0x270 [ 69.170471] ? refcount_sub_and_test+0x115/0x1b0 [ 69.175202] __unregister_prot_hook+0x211/0x280 [ 69.179843] packet_release+0x8bb/0xd70 [ 69.183797] ? packet_set_ring+0x1b70/0x1b70 [ 69.188173] ? dentry_free+0xcd/0x130 [ 69.191941] ? rcu_read_lock_sched_held+0x108/0x120 [ 69.196923] ? kmem_cache_free+0x249/0x280 [ 69.201129] ? dentry_free+0xd2/0x130 [ 69.204904] ? locks_remove_file+0x3fa/0x5a0 [ 69.209284] ? fcntl_setlk+0x10d0/0x10d0 [ 69.213325] ? __fsnotify_parent+0xb4/0x3a0 [ 69.217621] ? fsnotify+0x1af0/0x1af0 [ 69.221394] sock_release+0x8d/0x1e0 [ 69.225073] ? sock_release+0x8d/0x1e0 [ 69.228929] ? sock_release+0x1e0/0x1e0 [ 69.232867] sock_close+0x16/0x20 [ 69.236297] __fput+0x333/0x7f0 [ 69.239546] ? fput+0x140/0x140 [ 69.242793] ? check_same_owner+0x320/0x320 [ 69.247092] ? _raw_spin_unlock_irq+0x27/0x70 [ 69.251558] ____fput+0x15/0x20 [ 69.254811] task_work_run+0x199/0x270 [ 69.258676] ? task_work_cancel+0x210/0x210 [ 69.262972] ? _raw_spin_unlock+0x22/0x30 [ 69.267091] ? switch_task_namespaces+0x87/0xc0 [ 69.271737] do_exit+0xa52/0x1b40 [ 69.275160] ? plist_check_list+0xa0/0xa0 [ 69.279282] ? plist_del+0x47b/0x990 [ 69.282965] ? mm_update_next_owner+0x930/0x930 [ 69.287602] ? plist_add+0x760/0x760 [ 69.291292] ? check_same_owner+0x320/0x320 [ 69.295583] ? find_held_lock+0x39/0x1d0 [ 69.299616] ? check_noncircular+0x20/0x20 [ 69.303816] ? lock_downgrade+0x990/0x990 [ 69.307931] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 69.313285] ? find_held_lock+0x39/0x1d0 [ 69.317321] ? lock_downgrade+0x990/0x990 [ 69.321439] ? recalc_sigpending_tsk+0x117/0x150 [ 69.326165] ? recalc_sigpending+0x103/0x160 [ 69.330549] ? recalc_sigpending_tsk+0x150/0x150 [ 69.335276] ? get_signal+0x397/0x17e0 [ 69.339142] do_group_exit+0x149/0x400 [ 69.342998] ? __lock_is_held+0xbc/0x140 [ 69.347035] ? SyS_exit+0x30/0x30 [ 69.350457] ? _raw_spin_unlock_irq+0x27/0x70 [ 69.354920] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 69.359906] get_signal+0x7e8/0x17e0 [ 69.363606] ? ptrace_notify+0x130/0x130 [ 69.367633] ? __fget+0xbb/0x580 [ 69.370968] ? __lockdep_init_map+0xe4/0x650 [ 69.375345] ? lock_release+0xd70/0xd70 [ 69.379302] ? exit_robust_list+0x240/0x240 [ 69.384033] do_signal+0x94/0x1ee0 [ 69.387544] ? iterate_fd+0x3f0/0x3f0 [ 69.391312] ? setup_sigcontext+0x7d0/0x7d0 [ 69.395599] ? __lock_is_held+0xbc/0x140 [ 69.399633] ? __fget_light+0x29d/0x390 [ 69.403576] ? selinux_tun_dev_create+0xc0/0xc0 [ 69.408211] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 69.413890] ? selinux_netlbl_sock_rcv_skb+0x730/0x730