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-4,10.128.0.56' (ECDSA) to the list of known hosts. 2017/09/08 22:25:02 parsed 1 programs 2017/09/08 22:25:02 executed programs: 0 syzkaller login: [ 43.318445] dev_remove_pack: ffff8801cd47b280 not found [ 43.333371] ================================================================== [ 43.340766] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 43.347508] Read of size 8 at addr ffff8801cd5389a8 by task syz-executor0/3074 [ 43.354839] [ 43.356443] CPU: 1 PID: 3074 Comm: syz-executor0 Not tainted 4.13.0+ #74 [ 43.363252] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.372582] Call Trace: [ 43.375280] dump_stack+0x194/0x257 [ 43.378890] ? arch_local_irq_restore+0x53/0x53 [ 43.383538] ? show_regs_print_info+0x65/0x65 [ 43.388021] ? __dev_remove_pack+0x305/0x3b0 [ 43.392408] print_address_description+0x73/0x250 [ 43.397224] ? __dev_remove_pack+0x305/0x3b0 [ 43.401605] kasan_report+0x24e/0x340 [ 43.405382] __asan_report_load8_noabort+0x14/0x20 [ 43.410283] __dev_remove_pack+0x305/0x3b0 [ 43.414522] ? dev_get_by_name_rcu+0x270/0x270 [ 43.419083] ? refcount_sub_and_test+0x115/0x1b0 [ 43.423827] __unregister_prot_hook+0x211/0x280 [ 43.428474] packet_release+0x8bb/0xd70 [ 43.432432] ? packet_set_ring+0x1b70/0x1b70 [ 43.436818] ? dentry_free+0xcd/0x130 [ 43.440596] ? rcu_read_lock_sched_held+0x108/0x120 [ 43.445589] ? kmem_cache_free+0x249/0x280 [ 43.449801] ? dentry_free+0xd2/0x130 [ 43.453580] ? locks_remove_file+0x3fa/0x5a0 [ 43.457963] ? fcntl_setlk+0x10d0/0x10d0 [ 43.461999] ? __fsnotify_parent+0xb4/0x3a0 [ 43.466298] ? fsnotify+0x1af0/0x1af0 [ 43.470083] sock_release+0x8d/0x1e0 [ 43.473771] ? sock_release+0x8d/0x1e0 [ 43.477634] ? sock_release+0x1e0/0x1e0 [ 43.481582] sock_close+0x16/0x20 [ 43.485013] __fput+0x333/0x7f0 [ 43.488271] ? fput+0x140/0x140 [ 43.491529] ? check_same_owner+0x320/0x320 [ 43.495828] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.500317] ____fput+0x15/0x20 [ 43.503585] task_work_run+0x199/0x270 [ 43.507451] ? task_work_cancel+0x210/0x210 [ 43.511750] ? _raw_spin_unlock+0x22/0x30 [ 43.515875] ? switch_task_namespaces+0x87/0xc0 [ 43.520523] do_exit+0xa52/0x1b40 [ 43.523951] ? plist_check_list+0xa0/0xa0 [ 43.528093] ? plist_del+0x47b/0x990 [ 43.531785] ? mm_update_next_owner+0x930/0x930 [ 43.536431] ? plist_add+0x760/0x760 [ 43.540129] ? check_same_owner+0x320/0x320 [ 43.544431] ? find_held_lock+0x39/0x1d0 [ 43.548473] ? check_noncircular+0x20/0x20 [ 43.552684] ? lock_downgrade+0x990/0x990 [ 43.556815] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 43.562172] ? find_held_lock+0x39/0x1d0 [ 43.566227] ? lock_downgrade+0x990/0x990 [ 43.570360] ? recalc_sigpending_tsk+0x117/0x150 [ 43.575093] ? recalc_sigpending+0x103/0x160 [ 43.579480] ? recalc_sigpending_tsk+0x150/0x150 [ 43.584209] ? get_signal+0x397/0x17e0 [ 43.588081] do_group_exit+0x149/0x400 [ 43.591944] ? __lock_is_held+0xbc/0x140 [ 43.595978] ? SyS_exit+0x30/0x30 [ 43.599405] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.603874] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.608867] get_signal+0x7e8/0x17e0 [ 43.612584] ? ptrace_notify+0x130/0x130 [ 43.616629] ? __schedule+0x8f0/0x2070 [ 43.620492] ? lock_release+0xd70/0xd70 [ 43.624450] ? exit_robust_list+0x240/0x240 [ 43.628763] do_signal+0x94/0x1ee0 [ 43.632285] ? iterate_fd+0x3f0/0x3f0 [ 43.636062] ? setup_sigcontext+0x7d0/0x7d0 [ 43.640368] ? schedule+0x108/0x440 [ 43.643971] ? __schedule+0x2070/0x2070 [ 43.647921] ? __fget_light+0x29d/0x390 [ 43.651872] ? selinux_tun_dev_create+0xc0/0xc0 [ 43.656518] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 43.662201] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 43.667452] ? exit_to_usermode_loop+0x98/0x300 [ 43.672101] exit_to_usermode_loop+0x224/0x300 [ 43.676659] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 43.682180] syscall_return_slowpath+0x42f/0x500 [ 43.686910] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 43.691904] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 43.696818] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.701808] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 43.706546] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 43.711275] RIP: 0033:0x451e59 [ 43.714438] RSP: 002b:00007ff64bbe6cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 43.722121] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 43.729365] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 43.736610] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 43.743851] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 43.751092] R13: 00007fff8c78b8ff R14: 00007ff64bbe79c0 R15: 0000000000000000 [ 43.758353] [ 43.759954] Allocated by task 3074: [ 43.763566] save_stack_trace+0x16/0x20 [ 43.767516] save_stack+0x43/0xd0 [ 43.770944] kasan_kmalloc+0xad/0xe0 [ 43.774633] kmem_cache_alloc_trace+0x136/0x750 [ 43.779278] fanout_add+0xa50/0x1190 [ 43.782964] packet_setsockopt+0xfdc/0x1e80 [ 43.787263] SyS_setsockopt+0x189/0x360 [ 43.791211] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.795935] [ 43.797535] Freed by task 3074: [ 43.800795] save_stack_trace+0x16/0x20 [ 43.804742] save_stack+0x43/0xd0 [ 43.808166] kasan_slab_free+0x71/0xc0 [ 43.812033] kfree+0xca/0x250 [ 43.815110] packet_release+0xa8f/0xd70 [ 43.819057] sock_release+0x8d/0x1e0 [ 43.822742] sock_close+0x16/0x20 [ 43.826175] __fput+0x333/0x7f0 [ 43.829424] ____fput+0x15/0x20 [ 43.832695] task_work_run+0x199/0x270 [ 43.836557] do_exit+0xa52/0x1b40 [ 43.839983] do_group_exit+0x149/0x400 [ 43.843843] get_signal+0x7e8/0x17e0 [ 43.847535] do_signal+0x94/0x1ee0 [ 43.851053] exit_to_usermode_loop+0x224/0x300 [ 43.855607] syscall_return_slowpath+0x42f/0x500 [ 43.860353] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 43.865078] [ 43.866678] The buggy address belongs to the object at ffff8801cd538100 [ 43.866678] which belongs to the cache kmalloc-4096 of size 4096 [ 43.879481] The buggy address is located 2216 bytes inside of [ 43.879481] 4096-byte region [ffff8801cd538100, ffff8801cd539100) [ 43.891502] The buggy address belongs to the page: [ 43.896404] page:ffffea0007354e00 count:1 mapcount:0 mapping:ffff8801cd538100 index:0x0 compound_mapcount: 0 [ 43.906352] flags: 0x200000000008100(slab|head) [ 43.910993] raw: 0200000000008100 ffff8801cd538100 0000000000000000 0000000100000001 [ 43.918846] raw: ffffea0007356b20 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 43.926694] page dumped because: kasan: bad access detected [ 43.932373] [ 43.933969] Memory state around the buggy address: [ 43.938869] ffff8801cd538880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.946201] ffff8801cd538900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.953533] >ffff8801cd538980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.960860] ^ [ 43.965510] ffff8801cd538a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.972840] ffff8801cd538a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.980168] ================================================================== [ 43.987500] Disabling lock debugging due to kernel taint [ 43.993018] Kernel panic - not syncing: panic_on_warn set ... [ 43.993018] [ 44.000352] CPU: 1 PID: 3074 Comm: syz-executor0 Tainted: G B 4.13.0+ #74 [ 44.008368] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.017688] Call Trace: [ 44.020258] dump_stack+0x194/0x257 [ 44.023855] ? arch_local_irq_restore+0x53/0x53 [ 44.028500] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 44.033238] ? __dev_remove_pack+0x230/0x3b0 [ 44.037622] panic+0x1e4/0x417 [ 44.040782] ? __warn+0x1d9/0x1d9 [ 44.044225] ? __dev_remove_pack+0x305/0x3b0 [ 44.048600] kasan_end_report+0x50/0x50 [ 44.052540] kasan_report+0x137/0x340 [ 44.056309] __asan_report_load8_noabort+0x14/0x20 [ 44.061205] __dev_remove_pack+0x305/0x3b0 [ 44.065407] ? dev_get_by_name_rcu+0x270/0x270 [ 44.069958] ? refcount_sub_and_test+0x115/0x1b0 [ 44.074696] __unregister_prot_hook+0x211/0x280 [ 44.079334] packet_release+0x8bb/0xd70 [ 44.083278] ? packet_set_ring+0x1b70/0x1b70 [ 44.087651] ? dentry_free+0xcd/0x130 [ 44.091421] ? rcu_read_lock_sched_held+0x108/0x120 [ 44.096407] ? kmem_cache_free+0x249/0x280 [ 44.100612] ? dentry_free+0xd2/0x130 [ 44.104382] ? locks_remove_file+0x3fa/0x5a0 [ 44.108757] ? fcntl_setlk+0x10d0/0x10d0 [ 44.112787] ? __fsnotify_parent+0xb4/0x3a0 [ 44.117075] ? fsnotify+0x1af0/0x1af0 [ 44.120847] sock_release+0x8d/0x1e0 [ 44.124535] ? sock_release+0x8d/0x1e0 [ 44.128387] ? sock_release+0x1e0/0x1e0 [ 44.132325] sock_close+0x16/0x20 [ 44.135743] __fput+0x333/0x7f0 [ 44.138991] ? fput+0x140/0x140 [ 44.142238] ? check_same_owner+0x320/0x320 [ 44.146527] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.150992] ____fput+0x15/0x20 [ 44.154240] task_work_run+0x199/0x270 [ 44.158094] ? task_work_cancel+0x210/0x210 [ 44.162382] ? _raw_spin_unlock+0x22/0x30 [ 44.166497] ? switch_task_namespaces+0x87/0xc0 [ 44.171142] do_exit+0xa52/0x1b40 [ 44.174566] ? plist_check_list+0xa0/0xa0 [ 44.178684] ? plist_del+0x47b/0x990 [ 44.182363] ? mm_update_next_owner+0x930/0x930 [ 44.186999] ? plist_add+0x760/0x760 [ 44.190686] ? check_same_owner+0x320/0x320 [ 44.194981] ? find_held_lock+0x39/0x1d0 [ 44.199013] ? check_noncircular+0x20/0x20 [ 44.203215] ? lock_downgrade+0x990/0x990 [ 44.207333] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 44.212672] ? find_held_lock+0x39/0x1d0 [ 44.216705] ? lock_downgrade+0x990/0x990 [ 44.220822] ? recalc_sigpending_tsk+0x117/0x150 [ 44.225545] ? recalc_sigpending+0x103/0x160 [ 44.229925] ? recalc_sigpending_tsk+0x150/0x150 [ 44.234643] ? get_signal+0x397/0x17e0 [ 44.238504] do_group_exit+0x149/0x400 [ 44.242360] ? __lock_is_held+0xbc/0x140 [ 44.246388] ? SyS_exit+0x30/0x30 [ 44.249809] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.254271] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 44.259298] get_signal+0x7e8/0x17e0 [ 44.262995] ? ptrace_notify+0x130/0x130 [ 44.267028] ? __schedule+0x8f0/0x2070 [ 44.270887] ? lock_release+0xd70/0xd70 [ 44.274919] ? exit_robust_list+0x240/0x240 [ 44.279217] do_signal+0x94/0x1ee0 [ 44.282727] ? iterate_fd+0x3f0/0x3f0 [ 44.286500] ? setup_sigcontext+0x7d0/0x7d0 [ 44.290797] ? schedule+0x108/0x440 [ 44.294391] ? __schedule+0x2070/0x2070 [ 44.298342] ? __fget_light+0x29d/0x390 [ 44.302285] ? selinux_tun_dev_create+0xc0/0xc0 [ 44.306923] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 44.312619] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 44.317874] ? exit_to_usermode_loop+0x98/0x300