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-1,10.128.0.21' (ECDSA) to the list of known hosts. 2017/09/07 18:05:47 parsed 1 programs 2017/09/07 18:05:47 executed programs: 0 syzkaller login: [ 32.247423] dev_remove_pack: ffff8801ce7ecb80 not found [ 32.262452] ================================================================== [ 32.269877] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 32.276611] Read of size 8 at addr ffff8801ce2756a8 by task syz-executor0/3040 [ 32.283944] [ 32.285553] CPU: 0 PID: 3040 Comm: syz-executor0 Not tainted 4.13.0-next-20170907+ #17 [ 32.293580] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.302909] Call Trace: [ 32.305486] dump_stack+0x194/0x257 [ 32.309095] ? arch_local_irq_restore+0x53/0x53 [ 32.313739] ? show_regs_print_info+0x65/0x65 [ 32.318216] ? __dev_remove_pack+0x305/0x3b0 [ 32.322600] print_address_description+0x73/0x250 [ 32.327419] ? __dev_remove_pack+0x305/0x3b0 [ 32.331801] kasan_report+0x24e/0x340 [ 32.335595] __asan_report_load8_noabort+0x14/0x20 [ 32.340506] __dev_remove_pack+0x305/0x3b0 [ 32.344715] ? dev_get_by_name_rcu+0x270/0x270 [ 32.349277] ? refcount_sub_and_test+0x115/0x1b0 [ 32.354023] __unregister_prot_hook+0x211/0x280 [ 32.358776] packet_release+0x8bb/0xd70 [ 32.362737] ? packet_set_ring+0x1b70/0x1b70 [ 32.367124] ? lock_downgrade+0x990/0x990 [ 32.371266] ? lockref_put_or_lock+0x19/0x80 [ 32.375662] ? do_raw_spin_trylock+0x190/0x190 [ 32.380235] ? locks_remove_file+0x3fa/0x5a0 [ 32.384621] ? fcntl_setlk+0x10d0/0x10d0 [ 32.388662] ? __fsnotify_parent+0xb4/0x3a0 [ 32.392958] ? fsnotify+0x1af0/0x1af0 [ 32.396734] ? _raw_spin_unlock+0x22/0x30 [ 32.400863] sock_release+0x8d/0x1e0 [ 32.404551] ? sock_release+0x8d/0x1e0 [ 32.408417] ? sock_release+0x1e0/0x1e0 [ 32.412367] sock_close+0x16/0x20 [ 32.415802] __fput+0x333/0x7f0 [ 32.419064] ? fput+0x140/0x140 [ 32.422323] ? check_same_owner+0x320/0x320 [ 32.426625] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.431115] ____fput+0x15/0x20 [ 32.434374] task_work_run+0x199/0x270 [ 32.438239] ? task_work_cancel+0x210/0x210 [ 32.442541] ? _raw_spin_unlock+0x22/0x30 [ 32.446664] ? switch_task_namespaces+0x87/0xc0 [ 32.451317] do_exit+0xa52/0x1b40 [ 32.454748] ? plist_check_list+0xa0/0xa0 [ 32.458895] ? plist_del+0x47b/0x990 [ 32.462585] ? mm_update_next_owner+0x930/0x930 [ 32.467228] ? plist_add+0x760/0x760 [ 32.470928] ? check_same_owner+0x320/0x320 [ 32.475228] ? find_held_lock+0x39/0x1d0 [ 32.479273] ? check_noncircular+0x20/0x20 [ 32.483486] ? lock_downgrade+0x990/0x990 [ 32.487612] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 32.492980] ? find_held_lock+0x39/0x1d0 [ 32.497028] ? lock_downgrade+0x990/0x990 [ 32.501156] ? recalc_sigpending_tsk+0x117/0x150 [ 32.505888] ? recalc_sigpending+0x103/0x160 [ 32.510276] ? recalc_sigpending_tsk+0x150/0x150 [ 32.515002] ? get_signal+0x397/0x17e0 [ 32.518877] do_group_exit+0x149/0x400 [ 32.522748] ? __lock_is_held+0xbc/0x140 [ 32.526820] ? SyS_exit+0x30/0x30 [ 32.530250] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.534723] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.540058] get_signal+0x7e8/0x17e0 [ 32.543776] ? ptrace_notify+0x130/0x130 [ 32.547813] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.552805] ? __lockdep_init_map+0xe4/0x650 [ 32.557201] ? lockdep_init_map+0x3d/0x70 [ 32.561344] ? exit_robust_list+0x240/0x240 [ 32.565653] do_signal+0x94/0x1ee0 [ 32.569177] ? get_unused_fd_flags+0x190/0x190 [ 32.573746] ? setup_sigcontext+0x7d0/0x7d0 [ 32.578050] ? __lock_is_held+0xbc/0x140 [ 32.582103] ? __fd_install+0x2f7/0x6a0 [ 32.586060] ? get_unused_fd_flags+0x190/0x190 [ 32.590620] ? alloc_file+0x284/0x3a0 [ 32.594399] ? exit_to_usermode_loop+0x98/0x300 [ 32.599052] exit_to_usermode_loop+0x224/0x300 [ 32.603606] ? sock_poll+0x320/0x320 [ 32.607294] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 32.612808] ? __alloc_fd+0x750/0x750 [ 32.616591] syscall_return_slowpath+0x42f/0x500 [ 32.621322] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 32.626317] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 32.631223] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.636214] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.640949] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 32.645676] RIP: 0033:0x451e59 [ 32.648839] RSP: 002b:00007fc9d9d60cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 32.656525] RAX: fffffffffffffe00 RBX: 0000000000718188 RCX: 0000000000451e59 [ 32.663768] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718188 [ 32.671013] RBP: 0000000000718160 R08: 0000000000000000 R09: 0000000000000000 [ 32.678258] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 32.685509] R13: 00007ffca55c056f R14: 00007fc9d9d619c0 R15: 0000000000000016 [ 32.692782] [ 32.694386] Allocated by task 3038: [ 32.698001] save_stack_trace+0x16/0x20 [ 32.701949] save_stack+0x43/0xd0 [ 32.705374] kasan_kmalloc+0xad/0xe0 [ 32.709059] kmem_cache_alloc_trace+0x136/0x750 [ 32.713699] fanout_add+0xa50/0x1190 [ 32.717384] packet_setsockopt+0xfdc/0x1e80 [ 32.721678] SyS_setsockopt+0x189/0x360 [ 32.725623] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.730344] [ 32.731946] Freed by task 3040: [ 32.735196] save_stack_trace+0x16/0x20 [ 32.739155] save_stack+0x43/0xd0 [ 32.742588] kasan_slab_free+0x71/0xc0 [ 32.746449] kfree+0xca/0x250 [ 32.749530] packet_release+0xa8f/0xd70 [ 32.753488] sock_release+0x8d/0x1e0 [ 32.757185] sock_close+0x16/0x20 [ 32.760616] __fput+0x333/0x7f0 [ 32.763871] ____fput+0x15/0x20 [ 32.767132] task_work_run+0x199/0x270 [ 32.770999] do_exit+0xa52/0x1b40 [ 32.774426] do_group_exit+0x149/0x400 [ 32.778288] get_signal+0x7e8/0x17e0 [ 32.781980] do_signal+0x94/0x1ee0 [ 32.785499] exit_to_usermode_loop+0x224/0x300 [ 32.790060] syscall_return_slowpath+0x42f/0x500 [ 32.794808] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 32.799537] [ 32.801140] The buggy address belongs to the object at ffff8801ce274e00 [ 32.801140] which belongs to the cache kmalloc-4096 of size 4096 [ 32.813950] The buggy address is located 2216 bytes inside of [ 32.813950] 4096-byte region [ffff8801ce274e00, ffff8801ce275e00) [ 32.825986] The buggy address belongs to the page: [ 32.830895] page:ffffea0007389d00 count:1 mapcount:0 mapping:ffff8801ce274e00 index:0x0 compound_mapcount: 0 [ 32.840844] flags: 0x200000000008100(slab|head) [ 32.845490] raw: 0200000000008100 ffff8801ce274e00 0000000000000000 0000000100000001 [ 32.853348] raw: ffffea0007389ca0 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 32.861200] page dumped because: kasan: bad access detected [ 32.866883] [ 32.868483] Memory state around the buggy address: [ 32.873386] ffff8801ce275580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.880722] ffff8801ce275600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.888228] >ffff8801ce275680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.895563] ^ [ 32.900213] ffff8801ce275700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.907544] ffff8801ce275780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.914879] ================================================================== [ 32.922214] Disabling lock debugging due to kernel taint [ 32.927755] Kernel panic - not syncing: panic_on_warn set ... [ 32.927755] [ 32.935112] CPU: 0 PID: 3040 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170907+ #17 [ 32.944352] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.953678] Call Trace: [ 32.956242] dump_stack+0x194/0x257 [ 32.959851] ? arch_local_irq_restore+0x53/0x53 [ 32.964499] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.969230] ? __dev_remove_pack+0x2f0/0x3b0 [ 32.973610] panic+0x1e4/0x417 [ 32.976772] ? __warn+0x1d9/0x1d9 [ 32.980201] ? __dev_remove_pack+0x305/0x3b0 [ 32.984583] kasan_end_report+0x50/0x50 [ 32.988541] kasan_report+0x137/0x340 [ 32.992313] __asan_report_load8_noabort+0x14/0x20 [ 32.997214] __dev_remove_pack+0x305/0x3b0 [ 33.001424] ? dev_get_by_name_rcu+0x270/0x270 [ 33.005980] ? refcount_sub_and_test+0x115/0x1b0 [ 33.010710] __unregister_prot_hook+0x211/0x280 [ 33.015353] packet_release+0x8bb/0xd70 [ 33.019299] ? packet_set_ring+0x1b70/0x1b70 [ 33.023676] ? lock_downgrade+0x990/0x990 [ 33.027796] ? lockref_put_or_lock+0x19/0x80 [ 33.032173] ? do_raw_spin_trylock+0x190/0x190 [ 33.036727] ? locks_remove_file+0x3fa/0x5a0 [ 33.041102] ? fcntl_setlk+0x10d0/0x10d0 [ 33.045135] ? __fsnotify_parent+0xb4/0x3a0 [ 33.049427] ? fsnotify+0x1af0/0x1af0 [ 33.053192] ? _raw_spin_unlock+0x22/0x30 [ 33.057311] sock_release+0x8d/0x1e0 [ 33.060990] ? sock_release+0x8d/0x1e0 [ 33.064842] ? sock_release+0x1e0/0x1e0 [ 33.068781] sock_close+0x16/0x20 [ 33.072200] __fput+0x333/0x7f0 [ 33.075454] ? fput+0x140/0x140 [ 33.078707] ? check_same_owner+0x320/0x320 [ 33.082992] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.087456] ____fput+0x15/0x20 [ 33.090703] task_work_run+0x199/0x270 [ 33.094559] ? task_work_cancel+0x210/0x210 [ 33.098848] ? _raw_spin_unlock+0x22/0x30 [ 33.102964] ? switch_task_namespaces+0x87/0xc0 [ 33.107602] do_exit+0xa52/0x1b40 [ 33.111024] ? plist_check_list+0xa0/0xa0 [ 33.115146] ? plist_del+0x47b/0x990 [ 33.118847] ? mm_update_next_owner+0x930/0x930 [ 33.123487] ? plist_add+0x760/0x760 [ 33.127170] ? check_same_owner+0x320/0x320 [ 33.131462] ? find_held_lock+0x39/0x1d0 [ 33.135499] ? check_noncircular+0x20/0x20 [ 33.139697] ? lock_downgrade+0x990/0x990 [ 33.143812] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 33.149150] ? find_held_lock+0x39/0x1d0 [ 33.153182] ? lock_downgrade+0x990/0x990 [ 33.157297] ? recalc_sigpending_tsk+0x117/0x150 [ 33.162021] ? recalc_sigpending+0x103/0x160 [ 33.166396] ? recalc_sigpending_tsk+0x150/0x150 [ 33.171122] ? get_signal+0x397/0x17e0 [ 33.174980] do_group_exit+0x149/0x400 [ 33.178834] ? __lock_is_held+0xbc/0x140 [ 33.182861] ? SyS_exit+0x30/0x30 [ 33.186285] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.190748] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.195733] get_signal+0x7e8/0x17e0 [ 33.199427] ? ptrace_notify+0x130/0x130 [ 33.203454] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.208439] ? __lockdep_init_map+0xe4/0x650 [ 33.212818] ? lockdep_init_map+0x3d/0x70 [ 33.216943] ? exit_robust_list+0x240/0x240 [ 33.221241] do_signal+0x94/0x1ee0 [ 33.224750] ? get_unused_fd_flags+0x190/0x190 [ 33.229299] ? setup_sigcontext+0x7d0/0x7d0 [ 33.233589] ? __lock_is_held+0xbc/0x140 [ 33.237623] ? __fd_install+0x2f7/0x6a0 [ 33.241567] ? get_unused_fd_flags+0x190/0x190 [ 33.246115] ? alloc_file+0x284/0x3a0