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-mmots-kasan-gce-0,10.128.0.25' (ECDSA) to the list of known hosts. 2017/09/21 18:42:12 parsed 1 programs 2017/09/21 18:42:12 executed programs: 0 syzkaller login: [ 34.759698] dev_remove_pack: ffff8801ce739a80 not found [ 34.775432] ================================================================== [ 34.782857] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 34.789583] Read of size 8 at addr ffff8801ce73aba8 by task syz-executor0/3030 [ 34.796911] [ 34.798515] CPU: 1 PID: 3030 Comm: syz-executor0 Not tainted 4.13.0-mm1+ #7 [ 34.805583] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.814905] Call Trace: [ 34.817474] dump_stack+0x194/0x257 [ 34.821077] ? arch_local_irq_restore+0x53/0x53 [ 34.825720] ? show_regs_print_info+0x65/0x65 [ 34.830195] ? __dev_remove_pack+0x305/0x3b0 [ 34.834575] print_address_description+0x73/0x250 [ 34.839388] ? __dev_remove_pack+0x305/0x3b0 [ 34.843766] kasan_report+0x24e/0x340 [ 34.847540] __asan_report_load8_noabort+0x14/0x20 [ 34.852438] __dev_remove_pack+0x305/0x3b0 [ 34.856654] ? dev_get_by_name_rcu+0x270/0x270 [ 34.861207] ? refcount_sub_and_test+0x115/0x1b0 [ 34.865942] __unregister_prot_hook+0x211/0x280 [ 34.870590] packet_release+0x8bb/0xd70 [ 34.874541] ? packet_set_ring+0x1b70/0x1b70 [ 34.878920] ? lock_downgrade+0x990/0x990 [ 34.883058] ? locks_remove_file+0x3fa/0x5a0 [ 34.887440] ? fcntl_setlk+0x10d0/0x10d0 [ 34.891474] ? __fsnotify_parent+0xb4/0x3a0 [ 34.895773] ? fsnotify+0x1af0/0x1af0 [ 34.899554] sock_release+0x8d/0x1e0 [ 34.903239] ? sock_release+0x8d/0x1e0 [ 34.907111] ? sock_release+0x1e0/0x1e0 [ 34.911060] sock_close+0x16/0x20 [ 34.914487] __fput+0x333/0x7f0 [ 34.917745] ? fput+0x140/0x140 [ 34.921000] ? check_same_owner+0x320/0x320 [ 34.925295] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.929775] ____fput+0x15/0x20 [ 34.933030] task_work_run+0x199/0x270 [ 34.936895] ? task_work_cancel+0x210/0x210 [ 34.941192] ? _raw_spin_unlock+0x22/0x30 [ 34.945314] ? switch_task_namespaces+0x87/0xc0 [ 34.949969] do_exit+0xa52/0x1b40 [ 34.953399] ? plist_check_list+0xa0/0xa0 [ 34.957533] ? plist_del+0x47b/0x990 [ 34.961223] ? mm_update_next_owner+0x930/0x930 [ 34.965866] ? plist_add+0x760/0x760 [ 34.969563] ? check_same_owner+0x320/0x320 [ 34.973864] ? find_held_lock+0x39/0x1d0 [ 34.977907] ? check_noncircular+0x20/0x20 [ 34.982114] ? lock_downgrade+0x990/0x990 [ 34.986236] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 34.991588] ? find_held_lock+0x39/0x1d0 [ 34.995633] ? lock_downgrade+0x990/0x990 [ 34.999752] ? recalc_sigpending_tsk+0x117/0x150 [ 35.004481] ? recalc_sigpending+0x103/0x160 [ 35.008861] ? recalc_sigpending_tsk+0x150/0x150 [ 35.013587] ? get_signal+0x397/0x17e0 [ 35.017460] do_group_exit+0x149/0x400 [ 35.021320] ? __lock_is_held+0xbc/0x140 [ 35.025350] ? SyS_exit+0x30/0x30 [ 35.028776] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.033245] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.038240] get_signal+0x7e8/0x17e0 [ 35.041975] ? ptrace_notify+0x130/0x130 [ 35.046009] ? __fget+0xbb/0x580 [ 35.049348] ? lock_downgrade+0x990/0x990 [ 35.053471] ? lock_release+0xd70/0xd70 [ 35.057428] ? exit_robust_list+0x240/0x240 [ 35.061738] do_signal+0x94/0x1ee0 [ 35.065257] ? iterate_fd+0x3f0/0x3f0 [ 35.069034] ? setup_sigcontext+0x7d0/0x7d0 [ 35.073339] ? do_page_fault+0xee/0x720 [ 35.077291] ? __do_page_fault+0xb60/0xb60 [ 35.081502] ? __fget_light+0x29d/0x390 [ 35.085450] ? selinux_tun_dev_create+0xc0/0xc0 [ 35.090093] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 35.095776] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 35.101028] ? exit_to_usermode_loop+0x98/0x300 [ 35.105678] exit_to_usermode_loop+0x224/0x300 [ 35.110235] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 35.115754] syscall_return_slowpath+0x42f/0x500 [ 35.120491] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 35.125484] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 35.130387] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.135376] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.140287] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 35.145017] RIP: 0033:0x4520a9 [ 35.148268] RSP: 002b:00007f8d54719cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 35.155949] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 00000000004520a9 [ 35.163189] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 35.170433] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 35.177673] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 35.185089] R13: 00007ffeac6a0abf R14: 00007f8d5471a9c0 R15: 0000000000000000 [ 35.192697] [ 35.194299] Allocated by task 3030: [ 35.197912] save_stack_trace+0x16/0x20 [ 35.201856] save_stack+0x43/0xd0 [ 35.205279] kasan_kmalloc+0xad/0xe0 [ 35.208962] kmem_cache_alloc_trace+0x136/0x750 [ 35.213602] fanout_add+0xa50/0x1190 [ 35.217286] packet_setsockopt+0xfdc/0x1e80 [ 35.221578] SyS_setsockopt+0x189/0x360 [ 35.225522] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 35.230245] [ 35.231845] Freed by task 3030: [ 35.235125] save_stack_trace+0x16/0x20 [ 35.239073] save_stack+0x43/0xd0 [ 35.242497] kasan_slab_free+0x71/0xc0 [ 35.246354] kfree+0xca/0x250 [ 35.249431] packet_release+0xa8f/0xd70 [ 35.253376] sock_release+0x8d/0x1e0 [ 35.257071] sock_close+0x16/0x20 [ 35.260495] __fput+0x333/0x7f0 [ 35.263745] ____fput+0x15/0x20 [ 35.266999] task_work_run+0x199/0x270 [ 35.270861] do_exit+0xa52/0x1b40 [ 35.274285] do_group_exit+0x149/0x400 [ 35.278141] get_signal+0x7e8/0x17e0 [ 35.281825] do_signal+0x94/0x1ee0 [ 35.285357] exit_to_usermode_loop+0x224/0x300 [ 35.289911] syscall_return_slowpath+0x42f/0x500 [ 35.294646] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 35.299369] [ 35.300970] The buggy address belongs to the object at ffff8801ce73a300 [ 35.300970] which belongs to the cache kmalloc-4096 of size 4096 [ 35.313774] The buggy address is located 2216 bytes inside of [ 35.313774] 4096-byte region [ffff8801ce73a300, ffff8801ce73b300) [ 35.325801] The buggy address belongs to the page: [ 35.330703] page:ffffea000739ce80 count:1 mapcount:0 mapping:ffff8801ce73a300 index:0x0 compound_mapcount: 0 [ 35.340653] flags: 0x200000000008100(slab|head) [ 35.345296] raw: 0200000000008100 ffff8801ce73a300 0000000000000000 0000000100000001 [ 35.353158] raw: ffffea000739fc20 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 35.361006] page dumped because: kasan: bad access detected [ 35.366685] [ 35.368283] Memory state around the buggy address: [ 35.373191] ffff8801ce73aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.380531] ffff8801ce73ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.387865] >ffff8801ce73ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.395196] ^ [ 35.399835] ffff8801ce73ac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.407165] ffff8801ce73ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.414493] ================================================================== [ 35.421822] Disabling lock debugging due to kernel taint [ 35.427315] Kernel panic - not syncing: panic_on_warn set ... [ 35.427315] [ 35.434650] CPU: 1 PID: 3030 Comm: syz-executor0 Tainted: G B 4.13.0-mm1+ #7 [ 35.442932] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.452252] Call Trace: [ 35.454808] dump_stack+0x194/0x257 [ 35.458501] ? arch_local_irq_restore+0x53/0x53 [ 35.463137] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.467861] ? __dev_remove_pack+0x2f0/0x3b0 [ 35.472237] panic+0x1e4/0x417 [ 35.475394] ? __warn+0x1d9/0x1d9 [ 35.478952] ? __dev_remove_pack+0x305/0x3b0 [ 35.483330] kasan_end_report+0x50/0x50 [ 35.487272] kasan_report+0x137/0x340 [ 35.491041] __asan_report_load8_noabort+0x14/0x20 [ 35.495938] __dev_remove_pack+0x305/0x3b0 [ 35.500141] ? dev_get_by_name_rcu+0x270/0x270 [ 35.504690] ? refcount_sub_and_test+0x115/0x1b0 [ 35.509419] __unregister_prot_hook+0x211/0x280 [ 35.514066] packet_release+0x8bb/0xd70 [ 35.518009] ? packet_set_ring+0x1b70/0x1b70 [ 35.522385] ? lock_downgrade+0x990/0x990 [ 35.526507] ? locks_remove_file+0x3fa/0x5a0 [ 35.530882] ? fcntl_setlk+0x10d0/0x10d0 [ 35.534912] ? __fsnotify_parent+0xb4/0x3a0 [ 35.539203] ? fsnotify+0x1af0/0x1af0 [ 35.542983] sock_release+0x8d/0x1e0 [ 35.546663] ? sock_release+0x8d/0x1e0 [ 35.550515] ? sock_release+0x1e0/0x1e0 [ 35.554453] sock_close+0x16/0x20 [ 35.557872] __fput+0x333/0x7f0 [ 35.561122] ? fput+0x140/0x140 [ 35.564379] ? check_same_owner+0x320/0x320 [ 35.568664] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.573126] ____fput+0x15/0x20 [ 35.576371] task_work_run+0x199/0x270 [ 35.580223] ? task_work_cancel+0x210/0x210 [ 35.584512] ? _raw_spin_unlock+0x22/0x30 [ 35.588625] ? switch_task_namespaces+0x87/0xc0 [ 35.593261] do_exit+0xa52/0x1b40 [ 35.596680] ? plist_check_list+0xa0/0xa0 [ 35.600799] ? plist_del+0x47b/0x990 [ 35.604479] ? mm_update_next_owner+0x930/0x930 [ 35.609115] ? plist_add+0x760/0x760 [ 35.612801] ? check_same_owner+0x320/0x320 [ 35.617091] ? find_held_lock+0x39/0x1d0 [ 35.621121] ? check_noncircular+0x20/0x20 [ 35.625328] ? lock_downgrade+0x990/0x990 [ 35.629443] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 35.634781] ? find_held_lock+0x39/0x1d0 [ 35.638813] ? lock_downgrade+0x990/0x990 [ 35.642948] ? recalc_sigpending_tsk+0x117/0x150 [ 35.647669] ? recalc_sigpending+0x103/0x160 [ 35.652045] ? recalc_sigpending_tsk+0x150/0x150 [ 35.656774] ? get_signal+0x397/0x17e0 [ 35.660631] do_group_exit+0x149/0x400 [ 35.664483] ? __lock_is_held+0xbc/0x140 [ 35.668519] ? SyS_exit+0x30/0x30 [ 35.671938] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.676400] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.681382] get_signal+0x7e8/0x17e0 [ 35.685075] ? ptrace_notify+0x130/0x130 [ 35.689100] ? __fget+0xbb/0x580 [ 35.692431] ? lock_downgrade+0x990/0x990 [ 35.696547] ? lock_release+0xd70/0xd70 [ 35.700491] ? exit_robust_list+0x240/0x240 [ 35.704785] do_signal+0x94/0x1ee0 [ 35.708306] ? iterate_fd+0x3f0/0x3f0 [ 35.712082] ? setup_sigcontext+0x7d0/0x7d0 [ 35.716459] ? do_page_fault+0xee/0x720 [ 35.720400] ? __do_page_fault+0xb60/0xb60 [ 35.724603] ? __fget_light+0x29d/0x390 [ 35.728547] ? selinux_tun_dev_create+0xc0/0xc0 [ 35.733185] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 35.738862] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 35.744123] ? exit_to_usermode_loop+0x98/0x300 [ 35.748760] exit_to_usermode_loop+0x224/0x300 [ 35.753312] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 35.758820] syscall_return_slowpath+0x42f/0x500