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-6,10.128.0.18' (ECDSA) to the list of known hosts. 2017/09/08 01:35:45 parsed 1 programs 2017/09/08 01:35:45 executed programs: 0 syzkaller login: [ 42.932497] dev_remove_pack: ffff8801cdd43a80 not found [ 42.947368] ================================================================== [ 42.954776] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 42.961505] Read of size 8 at addr ffff8801ce2a4c28 by task syz-executor0/3053 [ 42.968848] [ 42.970462] CPU: 1 PID: 3053 Comm: syz-executor0 Not tainted 4.13.0+ #73 [ 42.977271] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.986596] Call Trace: [ 42.989157] dump_stack+0x194/0x257 [ 42.992759] ? arch_local_irq_restore+0x53/0x53 [ 42.997403] ? show_regs_print_info+0x65/0x65 [ 43.001877] ? __dev_remove_pack+0x305/0x3b0 [ 43.006260] print_address_description+0x73/0x250 [ 43.011076] ? __dev_remove_pack+0x305/0x3b0 [ 43.015466] kasan_report+0x24e/0x340 [ 43.019243] __asan_report_load8_noabort+0x14/0x20 [ 43.024150] __dev_remove_pack+0x305/0x3b0 [ 43.028359] ? dev_get_by_name_rcu+0x270/0x270 [ 43.032919] ? refcount_sub_and_test+0x115/0x1b0 [ 43.037654] __unregister_prot_hook+0x211/0x280 [ 43.042311] packet_release+0x8bb/0xd70 [ 43.046264] ? packet_set_ring+0x1b70/0x1b70 [ 43.050656] ? dentry_free+0xcd/0x130 [ 43.054428] ? rcu_read_lock_sched_held+0x108/0x120 [ 43.059415] ? kmem_cache_free+0x249/0x280 [ 43.063623] ? dentry_free+0xd2/0x130 [ 43.067407] ? locks_remove_file+0x3fa/0x5a0 [ 43.071788] ? fcntl_setlk+0x10d0/0x10d0 [ 43.075825] ? __fsnotify_parent+0xb4/0x3a0 [ 43.080126] ? fsnotify+0x1af0/0x1af0 [ 43.083905] sock_release+0x8d/0x1e0 [ 43.087589] ? sock_release+0x8d/0x1e0 [ 43.091448] ? sock_release+0x1e0/0x1e0 [ 43.095391] sock_close+0x16/0x20 [ 43.098815] __fput+0x333/0x7f0 [ 43.102071] ? fput+0x140/0x140 [ 43.105323] ? check_same_owner+0x320/0x320 [ 43.109614] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.114086] ____fput+0x15/0x20 [ 43.117338] task_work_run+0x199/0x270 [ 43.121199] ? task_work_cancel+0x210/0x210 [ 43.125493] ? _raw_spin_unlock+0x22/0x30 [ 43.129614] ? switch_task_namespaces+0x87/0xc0 [ 43.134259] do_exit+0xa52/0x1b40 [ 43.137694] ? plist_check_list+0xa0/0xa0 [ 43.141830] ? plist_del+0x47b/0x990 [ 43.145516] ? mm_update_next_owner+0x930/0x930 [ 43.150157] ? plist_add+0x760/0x760 [ 43.153856] ? check_same_owner+0x320/0x320 [ 43.158158] ? find_held_lock+0x39/0x1d0 [ 43.162202] ? check_noncircular+0x20/0x20 [ 43.166417] ? lock_downgrade+0x990/0x990 [ 43.170539] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 43.175893] ? find_held_lock+0x39/0x1d0 [ 43.179938] ? lock_downgrade+0x990/0x990 [ 43.184058] ? recalc_sigpending_tsk+0x117/0x150 [ 43.188794] ? recalc_sigpending+0x103/0x160 [ 43.193174] ? recalc_sigpending_tsk+0x150/0x150 [ 43.197901] ? get_signal+0x397/0x17e0 [ 43.201774] do_group_exit+0x149/0x400 [ 43.205644] ? __lock_is_held+0xbc/0x140 [ 43.209677] ? SyS_exit+0x30/0x30 [ 43.213100] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.217580] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.222579] get_signal+0x7e8/0x17e0 [ 43.226312] ? ptrace_notify+0x130/0x130 [ 43.230349] ? __fget+0xbb/0x580 [ 43.233690] ? lock_downgrade+0x990/0x990 [ 43.237814] ? lock_release+0xd70/0xd70 [ 43.241768] ? exit_robust_list+0x240/0x240 [ 43.246073] do_signal+0x94/0x1ee0 [ 43.249594] ? iterate_fd+0x3f0/0x3f0 [ 43.253369] ? setup_sigcontext+0x7d0/0x7d0 [ 43.257672] ? do_page_fault+0xee/0x720 [ 43.261619] ? __do_page_fault+0xb60/0xb60 [ 43.265831] ? __fget_light+0x29d/0x390 [ 43.269781] ? selinux_tun_dev_create+0xc0/0xc0 [ 43.274421] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 43.280104] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 43.285353] ? exit_to_usermode_loop+0x98/0x300 [ 43.290008] exit_to_usermode_loop+0x224/0x300 [ 43.294565] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 43.300088] syscall_return_slowpath+0x42f/0x500 [ 43.304816] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 43.309804] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 43.314709] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.319714] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 43.324455] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 43.329180] RIP: 0033:0x451e59 [ 43.332341] RSP: 002b:00007ff6254e6cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 43.340029] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 43.347287] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 43.354536] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 43.361779] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 43.369020] R13: 00007ffdd07a326f R14: 00007ff6254e79c0 R15: 0000000000000000 [ 43.376280] [ 43.377877] Allocated by task 3053: [ 43.381475] save_stack_trace+0x16/0x20 [ 43.385421] save_stack+0x43/0xd0 [ 43.388845] kasan_kmalloc+0xad/0xe0 [ 43.392528] kmem_cache_alloc_trace+0x136/0x750 [ 43.397168] fanout_add+0xa50/0x1190 [ 43.400850] packet_setsockopt+0xfdc/0x1e80 [ 43.405139] SyS_setsockopt+0x189/0x360 [ 43.409090] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.413813] [ 43.415411] Freed by task 3053: [ 43.418659] save_stack_trace+0x16/0x20 [ 43.422602] save_stack+0x43/0xd0 [ 43.426023] kasan_slab_free+0x71/0xc0 [ 43.429879] kfree+0xca/0x250 [ 43.432960] packet_release+0xa8f/0xd70 [ 43.436903] sock_release+0x8d/0x1e0 [ 43.440584] sock_close+0x16/0x20 [ 43.444007] __fput+0x333/0x7f0 [ 43.447255] ____fput+0x15/0x20 [ 43.450503] task_work_run+0x199/0x270 [ 43.454359] do_exit+0xa52/0x1b40 [ 43.457787] do_group_exit+0x149/0x400 [ 43.461646] get_signal+0x7e8/0x17e0 [ 43.465329] do_signal+0x94/0x1ee0 [ 43.468842] exit_to_usermode_loop+0x224/0x300 [ 43.473393] syscall_return_slowpath+0x42f/0x500 [ 43.478119] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 43.482840] [ 43.484440] The buggy address belongs to the object at ffff8801ce2a4380 [ 43.484440] which belongs to the cache kmalloc-4096 of size 4096 [ 43.497252] The buggy address is located 2216 bytes inside of [ 43.497252] 4096-byte region [ffff8801ce2a4380, ffff8801ce2a5380) [ 43.509267] The buggy address belongs to the page: [ 43.514167] page:ffffea000738a900 count:1 mapcount:0 mapping:ffff8801ce2a4380 index:0x0 compound_mapcount: 0 [ 43.524111] flags: 0x200000000008100(slab|head) [ 43.528751] raw: 0200000000008100 ffff8801ce2a4380 0000000000000000 0000000100000001 [ 43.536602] raw: ffffea000738a8a0 ffffea000738bfa0 ffff8801dac00dc0 0000000000000000 [ 43.544450] page dumped because: kasan: bad access detected [ 43.550126] [ 43.551721] Memory state around the buggy address: [ 43.556619] ffff8801ce2a4b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.563949] ffff8801ce2a4b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.571275] >ffff8801ce2a4c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.578688] ^ [ 43.583323] ffff8801ce2a4c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.590652] ffff8801ce2a4d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.597985] ================================================================== [ 43.605317] Disabling lock debugging due to kernel taint [ 43.610798] Kernel panic - not syncing: panic_on_warn set ... [ 43.610798] [ 43.618130] CPU: 1 PID: 3053 Comm: syz-executor0 Tainted: G B 4.13.0+ #73 [ 43.626149] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.635468] Call Trace: [ 43.638024] dump_stack+0x194/0x257 [ 43.641619] ? arch_local_irq_restore+0x53/0x53 [ 43.646252] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 43.650975] ? __dev_remove_pack+0x230/0x3b0 [ 43.655349] panic+0x1e4/0x417 [ 43.658507] ? __warn+0x1d9/0x1d9 [ 43.661931] ? __dev_remove_pack+0x305/0x3b0 [ 43.666304] kasan_end_report+0x50/0x50 [ 43.670242] kasan_report+0x137/0x340 [ 43.674010] __asan_report_load8_noabort+0x14/0x20 [ 43.678904] __dev_remove_pack+0x305/0x3b0 [ 43.683111] ? dev_get_by_name_rcu+0x270/0x270 [ 43.687662] ? refcount_sub_and_test+0x115/0x1b0 [ 43.692392] __unregister_prot_hook+0x211/0x280 [ 43.697027] packet_release+0x8bb/0xd70 [ 43.700970] ? packet_set_ring+0x1b70/0x1b70 [ 43.705343] ? dentry_free+0xcd/0x130 [ 43.709108] ? rcu_read_lock_sched_held+0x108/0x120 [ 43.714092] ? kmem_cache_free+0x249/0x280 [ 43.718298] ? dentry_free+0xd2/0x130 [ 43.722067] ? locks_remove_file+0x3fa/0x5a0 [ 43.726440] ? fcntl_setlk+0x10d0/0x10d0 [ 43.730467] ? __fsnotify_parent+0xb4/0x3a0 [ 43.734753] ? fsnotify+0x1af0/0x1af0 [ 43.738520] sock_release+0x8d/0x1e0 [ 43.742197] ? sock_release+0x8d/0x1e0 [ 43.746050] ? sock_release+0x1e0/0x1e0 [ 43.749990] sock_close+0x16/0x20 [ 43.753408] __fput+0x333/0x7f0 [ 43.756654] ? fput+0x140/0x140 [ 43.759914] ? check_same_owner+0x320/0x320 [ 43.764201] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.768663] ____fput+0x15/0x20 [ 43.771910] task_work_run+0x199/0x270 [ 43.775762] ? task_work_cancel+0x210/0x210 [ 43.780049] ? _raw_spin_unlock+0x22/0x30 [ 43.784163] ? switch_task_namespaces+0x87/0xc0 [ 43.788799] do_exit+0xa52/0x1b40 [ 43.792215] ? plist_check_list+0xa0/0xa0 [ 43.796332] ? plist_del+0x47b/0x990 [ 43.800011] ? mm_update_next_owner+0x930/0x930 [ 43.804645] ? plist_add+0x760/0x760 [ 43.808327] ? check_same_owner+0x320/0x320 [ 43.812806] ? find_held_lock+0x39/0x1d0 [ 43.816836] ? check_noncircular+0x20/0x20 [ 43.821038] ? lock_downgrade+0x990/0x990 [ 43.825149] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 43.830486] ? find_held_lock+0x39/0x1d0 [ 43.834525] ? lock_downgrade+0x990/0x990 [ 43.838639] ? recalc_sigpending_tsk+0x117/0x150 [ 43.843358] ? recalc_sigpending+0x103/0x160 [ 43.847737] ? recalc_sigpending_tsk+0x150/0x150 [ 43.852455] ? get_signal+0x397/0x17e0 [ 43.856312] do_group_exit+0x149/0x400 [ 43.860163] ? __lock_is_held+0xbc/0x140 [ 43.864187] ? SyS_exit+0x30/0x30 [ 43.867615] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.872075] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.877062] get_signal+0x7e8/0x17e0 [ 43.880753] ? ptrace_notify+0x130/0x130 [ 43.884776] ? __fget+0xbb/0x580 [ 43.888107] ? lock_downgrade+0x990/0x990 [ 43.892222] ? lock_release+0xd70/0xd70 [ 43.896172] ? exit_robust_list+0x240/0x240 [ 43.900464] do_signal+0x94/0x1ee0 [ 43.903971] ? iterate_fd+0x3f0/0x3f0 [ 43.907736] ? setup_sigcontext+0x7d0/0x7d0 [ 43.912026] ? do_page_fault+0xee/0x720 [ 43.915966] ? __do_page_fault+0xb60/0xb60 [ 43.920172] ? __fget_light+0x29d/0x390 [ 43.924114] ? selinux_tun_dev_create+0xc0/0xc0 [ 43.928748] ? selinux_netlbl_socket_setsockopt+0x10c/0x460