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-4,10.128.15.215' (ECDSA) to the list of known hosts. 2017/09/08 01:51:42 parsed 1 programs 2017/09/08 01:51:42 executed programs: 0 syzkaller login: [ 35.200528] dev_remove_pack: ffff8801d35cbe40 not found [ 35.211242] ================================================================== [ 35.212568] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 35.213589] Read of size 8 at addr ffff8801ce4a7428 by task syz-executor0/2993 [ 35.214640] [ 35.214888] CPU: 1 PID: 2993 Comm: syz-executor0 Not tainted 4.13.0-next-20170907+ #17 [ 35.216090] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.217451] Call Trace: [ 35.217844] dump_stack+0x194/0x257 [ 35.218364] ? arch_local_irq_restore+0x53/0x53 [ 35.219155] ? show_regs_print_info+0x65/0x65 [ 35.219854] ? __dev_remove_pack+0x305/0x3b0 [ 35.220532] print_address_description+0x73/0x250 [ 35.224578] ? __dev_remove_pack+0x305/0x3b0 [ 35.228959] kasan_report+0x24e/0x340 [ 35.232732] __asan_report_load8_noabort+0x14/0x20 [ 35.237631] __dev_remove_pack+0x305/0x3b0 [ 35.241843] ? dev_get_by_name_rcu+0x270/0x270 [ 35.246405] ? refcount_sub_and_test+0x115/0x1b0 [ 35.251155] __unregister_prot_hook+0x211/0x280 [ 35.255804] packet_release+0x8bb/0xd70 [ 35.259767] ? packet_set_ring+0x1b70/0x1b70 [ 35.264162] ? dentry_free+0xcd/0x130 [ 35.267949] ? rcu_read_lock_sched_held+0x108/0x120 [ 35.272956] ? kmem_cache_free+0x249/0x280 [ 35.277175] ? dentry_free+0xd2/0x130 [ 35.280958] ? locks_remove_file+0x3fa/0x5a0 [ 35.285343] ? fcntl_setlk+0x10d0/0x10d0 [ 35.289380] ? __fsnotify_parent+0xb4/0x3a0 [ 35.293676] ? fsnotify+0x1af0/0x1af0 [ 35.297467] sock_release+0x8d/0x1e0 [ 35.301149] ? sock_release+0x8d/0x1e0 [ 35.305016] ? sock_release+0x1e0/0x1e0 [ 35.308961] sock_close+0x16/0x20 [ 35.312393] __fput+0x333/0x7f0 [ 35.315661] ? fput+0x140/0x140 [ 35.318922] ? check_same_owner+0x320/0x320 [ 35.323217] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.327696] ____fput+0x15/0x20 [ 35.330950] task_work_run+0x199/0x270 [ 35.334813] ? task_work_cancel+0x210/0x210 [ 35.339120] ? switch_task_namespaces+0x87/0xc0 [ 35.343769] do_exit+0xa52/0x1b40 [ 35.347196] ? plist_check_list+0xa0/0xa0 [ 35.351327] ? plist_del+0x47b/0x990 [ 35.355012] ? mm_update_next_owner+0x930/0x930 [ 35.359655] ? plist_add+0x760/0x760 [ 35.363354] ? check_same_owner+0x320/0x320 [ 35.367656] ? find_held_lock+0x39/0x1d0 [ 35.371708] ? check_noncircular+0x20/0x20 [ 35.375926] ? lock_downgrade+0x990/0x990 [ 35.380046] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 35.385413] ? find_held_lock+0x39/0x1d0 [ 35.389457] ? lock_downgrade+0x990/0x990 [ 35.393580] ? recalc_sigpending_tsk+0x117/0x150 [ 35.398311] ? recalc_sigpending+0x103/0x160 [ 35.402695] ? recalc_sigpending_tsk+0x150/0x150 [ 35.407419] ? get_signal+0x397/0x17e0 [ 35.411289] do_group_exit+0x149/0x400 [ 35.415146] ? __lock_is_held+0xbc/0x140 [ 35.419182] ? SyS_exit+0x30/0x30 [ 35.422609] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.427082] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.432072] get_signal+0x7e8/0x17e0 [ 35.435784] ? ptrace_notify+0x130/0x130 [ 35.439819] ? __fget+0xbb/0x580 [ 35.443180] ? lock_release+0xd70/0xd70 [ 35.447144] ? exit_robust_list+0x240/0x240 [ 35.451450] do_signal+0x94/0x1ee0 [ 35.454968] ? iterate_fd+0x3f0/0x3f0 [ 35.458752] ? setup_sigcontext+0x7d0/0x7d0 [ 35.463059] ? mntput_no_expire+0x15e/0xa90 [ 35.467353] ? check_same_owner+0x320/0x320 [ 35.471766] ? __fget_light+0x29d/0x390 [ 35.475718] ? selinux_tun_dev_create+0xc0/0xc0 [ 35.480358] ? putname+0xee/0x130 [ 35.483782] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 35.489477] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 35.494737] ? exit_to_usermode_loop+0x98/0x300 [ 35.499394] exit_to_usermode_loop+0x224/0x300 [ 35.503972] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 35.509494] syscall_return_slowpath+0x42f/0x500 [ 35.514223] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 35.519227] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 35.524132] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.529130] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.533890] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 35.538616] RIP: 0033:0x451e59 [ 35.541777] RSP: 002b:00007f2e1b425cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 35.549476] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 0000000000451e59 [ 35.556719] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 35.563978] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 35.571242] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 35.578486] R13: 00007ffc5c47c52f R14: 00007f2e1b4269c0 R15: 0000000000000002 [ 35.585745] [ 35.587343] Allocated by task 2992: [ 35.590943] save_stack_trace+0x16/0x20 [ 35.594892] save_stack+0x43/0xd0 [ 35.598321] kasan_kmalloc+0xad/0xe0 [ 35.602010] kmem_cache_alloc_trace+0x136/0x750 [ 35.606650] fanout_add+0xa50/0x1190 [ 35.610334] packet_setsockopt+0xfdc/0x1e80 [ 35.614631] SyS_setsockopt+0x189/0x360 [ 35.618577] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 35.623313] [ 35.624910] Freed by task 2993: [ 35.628159] save_stack_trace+0x16/0x20 [ 35.632104] save_stack+0x43/0xd0 [ 35.635526] kasan_slab_free+0x71/0xc0 [ 35.639382] kfree+0xca/0x250 [ 35.642458] packet_release+0xa8f/0xd70 [ 35.646403] sock_release+0x8d/0x1e0 [ 35.650087] sock_close+0x16/0x20 [ 35.653512] __fput+0x333/0x7f0 [ 35.656766] ____fput+0x15/0x20 [ 35.660022] task_work_run+0x199/0x270 [ 35.663879] do_exit+0xa52/0x1b40 [ 35.667302] do_group_exit+0x149/0x400 [ 35.671161] get_signal+0x7e8/0x17e0 [ 35.674848] do_signal+0x94/0x1ee0 [ 35.678370] exit_to_usermode_loop+0x224/0x300 [ 35.682924] syscall_return_slowpath+0x42f/0x500 [ 35.687653] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 35.692375] [ 35.693979] The buggy address belongs to the object at ffff8801ce4a6b80 [ 35.693979] which belongs to the cache kmalloc-4096 of size 4096 [ 35.706783] The buggy address is located 2216 bytes inside of [ 35.706783] 4096-byte region [ffff8801ce4a6b80, ffff8801ce4a7b80) [ 35.718812] The buggy address belongs to the page: [ 35.723718] page:ffffea0007392980 count:1 mapcount:0 mapping:ffff8801ce4a6b80 index:0x0 compound_mapcount: 0 [ 35.733663] flags: 0x200000000008100(slab|head) [ 35.738321] raw: 0200000000008100 ffff8801ce4a6b80 0000000000000000 0000000100000001 [ 35.746174] raw: ffffea0007391da0 ffffea0007392aa0 ffff8801dac00dc0 0000000000000000 [ 35.754023] page dumped because: kasan: bad access detected [ 35.759704] [ 35.761349] Memory state around the buggy address: [ 35.766250] ffff8801ce4a7300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.773580] ffff8801ce4a7380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.780965] >ffff8801ce4a7400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.788299] ^ [ 35.792940] ffff8801ce4a7480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.800269] ffff8801ce4a7500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.807595] ================================================================== [ 35.814932] Disabling lock debugging due to kernel taint [ 35.820430] Kernel panic - not syncing: panic_on_warn set ... [ 35.820430] [ 35.827766] CPU: 1 PID: 2993 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170907+ #17 [ 35.837005] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.846324] Call Trace: [ 35.848881] dump_stack+0x194/0x257 [ 35.852484] ? arch_local_irq_restore+0x53/0x53 [ 35.857122] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.861847] ? __dev_remove_pack+0x2f0/0x3b0 [ 35.866222] panic+0x1e4/0x417 [ 35.869379] ? __warn+0x1d9/0x1d9 [ 35.872805] ? __dev_remove_pack+0x305/0x3b0 [ 35.877183] kasan_end_report+0x50/0x50 [ 35.881155] kasan_report+0x137/0x340 [ 35.884938] __asan_report_load8_noabort+0x14/0x20 [ 35.889847] __dev_remove_pack+0x305/0x3b0 [ 35.894045] ? dev_get_by_name_rcu+0x270/0x270 [ 35.898596] ? refcount_sub_and_test+0x115/0x1b0 [ 35.903332] __unregister_prot_hook+0x211/0x280 [ 35.907992] packet_release+0x8bb/0xd70 [ 35.911935] ? packet_set_ring+0x1b70/0x1b70 [ 35.916311] ? dentry_free+0xcd/0x130 [ 35.920079] ? rcu_read_lock_sched_held+0x108/0x120 [ 35.925062] ? kmem_cache_free+0x249/0x280 [ 35.929265] ? dentry_free+0xd2/0x130 [ 35.933034] ? locks_remove_file+0x3fa/0x5a0 [ 35.937409] ? fcntl_setlk+0x10d0/0x10d0 [ 35.941438] ? __fsnotify_parent+0xb4/0x3a0 [ 35.945724] ? fsnotify+0x1af0/0x1af0 [ 35.949493] sock_release+0x8d/0x1e0 [ 35.953171] ? sock_release+0x8d/0x1e0 [ 35.957022] ? sock_release+0x1e0/0x1e0 [ 35.960960] sock_close+0x16/0x20 [ 35.964388] __fput+0x333/0x7f0 [ 35.967650] ? fput+0x140/0x140 [ 35.970908] ? check_same_owner+0x320/0x320 [ 35.975199] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.979663] ____fput+0x15/0x20 [ 35.982910] task_work_run+0x199/0x270 [ 35.986763] ? task_work_cancel+0x210/0x210 [ 35.991057] ? switch_task_namespaces+0x87/0xc0 [ 35.995718] do_exit+0xa52/0x1b40 [ 35.999134] ? plist_check_list+0xa0/0xa0 [ 36.003252] ? plist_del+0x47b/0x990 [ 36.006930] ? mm_update_next_owner+0x930/0x930 [ 36.011588] ? plist_add+0x760/0x760 [ 36.015275] ? check_same_owner+0x320/0x320 [ 36.019566] ? find_held_lock+0x39/0x1d0 [ 36.023596] ? check_noncircular+0x20/0x20 [ 36.027801] ? lock_downgrade+0x990/0x990 [ 36.031921] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 36.037262] ? find_held_lock+0x39/0x1d0 [ 36.041305] ? lock_downgrade+0x990/0x990 [ 36.045416] ? recalc_sigpending_tsk+0x117/0x150 [ 36.050138] ? recalc_sigpending+0x103/0x160 [ 36.054512] ? recalc_sigpending_tsk+0x150/0x150 [ 36.059233] ? get_signal+0x397/0x17e0 [ 36.063090] do_group_exit+0x149/0x400 [ 36.066946] ? __lock_is_held+0xbc/0x140 [ 36.070983] ? SyS_exit+0x30/0x30 [ 36.074407] ? _raw_spin_unlock_irq+0x27/0x70 [ 36.078878] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 36.083862] get_signal+0x7e8/0x17e0 [ 36.087554] ? ptrace_notify+0x130/0x130 [ 36.091582] ? __fget+0xbb/0x580 [ 36.094933] ? lock_release+0xd70/0xd70 [ 36.098879] ? exit_robust_list+0x240/0x240 [ 36.103174] do_signal+0x94/0x1ee0 [ 36.106714] ? iterate_fd+0x3f0/0x3f0 [ 36.110506] ? setup_sigcontext+0x7d0/0x7d0 [ 36.114847] ? mntput_no_expire+0x15e/0xa90 [ 36.119148] ? check_same_owner+0x320/0x320 [ 36.123435] ? __fget_light+0x29d/0x390 [ 36.127379] ? selinux_tun_dev_create+0xc0/0xc0 [ 36.132016] ? putname+0xee/0x130 [ 36.135438] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 36.141116] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 36.146369] ? exit_to_usermode_loop+0x98/0x300 [ 36.151022] exit_to_usermode_loop+0x224/0x300 [ 36.155573] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 36.161084] syscall_return_slowpath+0x42f/0x500 [ 36.165810] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 36.170799] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 36.175712] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 36.180698] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 36.185434] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 36.190154] RIP: 0033:0x451e59 [ 36.193322] RSP: 002b:00007f2e1b425cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca