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-6,10.128.15.197' (ECDSA) to the list of known hosts. 2017/09/22 04:49:17 parsed 1 programs 2017/09/22 04:49:17 executed programs: 0 syzkaller login: [ 43.606798] dev_remove_pack: ffff8801c969db40 not found [ 43.620346] ================================================================== [ 43.621431] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 43.622323] Read of size 8 at addr ffff8801c969ea68 by task syz-executor0/3285 [ 43.623289] [ 43.623527] CPU: 1 PID: 3285 Comm: syz-executor0 Not tainted 4.13.0-mm1+ #7 [ 43.624464] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.625685] Call Trace: [ 43.626048] dump_stack+0x194/0x257 [ 43.626544] ? arch_local_irq_restore+0x53/0x53 [ 43.628561] ? show_regs_print_info+0x65/0x65 [ 43.633031] ? __dev_remove_pack+0x305/0x3b0 [ 43.637413] print_address_description+0x73/0x250 [ 43.642422] ? __dev_remove_pack+0x305/0x3b0 [ 43.646816] kasan_report+0x24e/0x340 [ 43.650593] __asan_report_load8_noabort+0x14/0x20 [ 43.655493] __dev_remove_pack+0x305/0x3b0 [ 43.659699] ? dev_get_by_name_rcu+0x270/0x270 [ 43.664263] ? refcount_sub_and_test+0x115/0x1b0 [ 43.669003] __unregister_prot_hook+0x211/0x280 [ 43.673651] packet_release+0x8bb/0xd70 [ 43.677604] ? packet_set_ring+0x1b70/0x1b70 [ 43.681988] ? dentry_free+0xcd/0x130 [ 43.685761] ? rcu_read_lock_sched_held+0x108/0x120 [ 43.690750] ? kmem_cache_free+0x249/0x280 [ 43.694957] ? dentry_free+0xd2/0x130 [ 43.698735] ? locks_remove_file+0x3fa/0x5a0 [ 43.703116] ? fcntl_setlk+0x10d0/0x10d0 [ 43.707152] ? __fsnotify_parent+0xb4/0x3a0 [ 43.711448] ? fsnotify+0x1af0/0x1af0 [ 43.715227] sock_release+0x8d/0x1e0 [ 43.718909] ? sock_release+0x8d/0x1e0 [ 43.722768] ? sock_release+0x1e0/0x1e0 [ 43.726711] sock_close+0x16/0x20 [ 43.730135] __fput+0x333/0x7f0 [ 43.733391] ? fput+0x140/0x140 [ 43.736645] ? check_same_owner+0x320/0x320 [ 43.740936] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.745409] ____fput+0x15/0x20 [ 43.748661] task_work_run+0x199/0x270 [ 43.752521] ? task_work_cancel+0x210/0x210 [ 43.756825] ? _raw_spin_unlock+0x22/0x30 [ 43.760948] ? switch_task_namespaces+0x87/0xc0 [ 43.765592] do_exit+0xa52/0x1b40 [ 43.769015] ? plist_check_list+0xa0/0xa0 [ 43.773146] ? plist_del+0x47b/0x990 [ 43.776833] ? mm_update_next_owner+0x930/0x930 [ 43.781480] ? plist_add+0x760/0x760 [ 43.785178] ? check_same_owner+0x320/0x320 [ 43.789479] ? find_held_lock+0x39/0x1d0 [ 43.793520] ? check_noncircular+0x20/0x20 [ 43.797727] ? lock_downgrade+0x990/0x990 [ 43.801850] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 43.807203] ? find_held_lock+0x39/0x1d0 [ 43.811245] ? lock_downgrade+0x990/0x990 [ 43.815369] ? recalc_sigpending_tsk+0x117/0x150 [ 43.820106] ? recalc_sigpending+0x103/0x160 [ 43.824486] ? recalc_sigpending_tsk+0x150/0x150 [ 43.829209] ? get_signal+0x397/0x17e0 [ 43.833078] do_group_exit+0x149/0x400 [ 43.836936] ? __lock_is_held+0xbc/0x140 [ 43.840967] ? SyS_exit+0x30/0x30 [ 43.844393] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.848863] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.853855] get_signal+0x7e8/0x17e0 [ 43.857569] ? ptrace_notify+0x130/0x130 [ 43.861601] ? __fget+0xbb/0x580 [ 43.864939] ? __lockdep_init_map+0xe4/0x650 [ 43.869325] ? lock_release+0xd70/0xd70 [ 43.873280] ? exit_robust_list+0x240/0x240 [ 43.877586] do_signal+0x94/0x1ee0 [ 43.881103] ? iterate_fd+0x3f0/0x3f0 [ 43.884879] ? setup_sigcontext+0x7d0/0x7d0 [ 43.889183] ? __lock_is_held+0xbc/0x140 [ 43.893229] ? __fget_light+0x29d/0x390 [ 43.897179] ? selinux_tun_dev_create+0xc0/0xc0 [ 43.901824] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 43.907506] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 43.912752] ? alloc_file+0x284/0x3a0 [ 43.916525] ? exit_to_usermode_loop+0x98/0x300 [ 43.921171] exit_to_usermode_loop+0x224/0x300 [ 43.925727] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 43.931245] syscall_return_slowpath+0x42f/0x500 [ 43.935976] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 43.940966] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 43.945872] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.950860] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 43.955592] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 43.960319] RIP: 0033:0x4520a9 [ 43.963478] RSP: 002b:00007f4448775cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 43.971161] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 00000000004520a9 [ 43.978401] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 43.985639] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 43.992878] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 44.000119] R13: 00007fff1012979f R14: 00007f44487769c0 R15: 0000000000000002 [ 44.007377] [ 44.008978] Allocated by task 3285: [ 44.012581] save_stack_trace+0x16/0x20 [ 44.016542] save_stack+0x43/0xd0 [ 44.019970] kasan_kmalloc+0xad/0xe0 [ 44.023661] kmem_cache_alloc_trace+0x136/0x750 [ 44.028308] fanout_add+0xa50/0x1190 [ 44.031996] packet_setsockopt+0xfdc/0x1e80 [ 44.036296] SyS_setsockopt+0x189/0x360 [ 44.040245] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 44.044966] [ 44.046567] Freed by task 3285: [ 44.049818] save_stack_trace+0x16/0x20 [ 44.053765] save_stack+0x43/0xd0 [ 44.057186] kasan_slab_free+0x71/0xc0 [ 44.061041] kfree+0xca/0x250 [ 44.064116] packet_release+0xa8f/0xd70 [ 44.068057] sock_release+0x8d/0x1e0 [ 44.071740] sock_close+0x16/0x20 [ 44.075164] __fput+0x333/0x7f0 [ 44.078413] ____fput+0x15/0x20 [ 44.081661] task_work_run+0x199/0x270 [ 44.085518] do_exit+0xa52/0x1b40 [ 44.088940] do_group_exit+0x149/0x400 [ 44.092795] get_signal+0x7e8/0x17e0 [ 44.096477] do_signal+0x94/0x1ee0 [ 44.099989] exit_to_usermode_loop+0x224/0x300 [ 44.104538] syscall_return_slowpath+0x42f/0x500 [ 44.109262] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 44.113994] [ 44.115594] The buggy address belongs to the object at ffff8801c969e1c0 [ 44.115594] which belongs to the cache kmalloc-4096 of size 4096 [ 44.128393] The buggy address is located 2216 bytes inside of [ 44.128393] 4096-byte region [ffff8801c969e1c0, ffff8801c969f1c0) [ 44.140406] The buggy address belongs to the page: [ 44.145306] page:ffffea000725a780 count:1 mapcount:0 mapping:ffff8801c969e1c0 index:0x0 compound_mapcount: 0 [ 44.155248] flags: 0x200000000008100(slab|head) [ 44.159886] raw: 0200000000008100 ffff8801c969e1c0 0000000000000000 0000000100000001 [ 44.167736] raw: ffffea000725e6a0 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 44.175585] page dumped because: kasan: bad access detected [ 44.181265] [ 44.182866] Memory state around the buggy address: [ 44.187765] ffff8801c969e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.195092] ffff8801c969e980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.202418] >ffff8801c969ea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.209746] ^ [ 44.216468] ffff8801c969ea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.223797] ffff8801c969eb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.231122] ================================================================== [ 44.238449] Disabling lock debugging due to kernel taint [ 44.243966] Kernel panic - not syncing: panic_on_warn set ... [ 44.243966] [ 44.251301] CPU: 1 PID: 3285 Comm: syz-executor0 Tainted: G B 4.13.0-mm1+ #7 [ 44.259577] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.268893] Call Trace: [ 44.271451] dump_stack+0x194/0x257 [ 44.275045] ? arch_local_irq_restore+0x53/0x53 [ 44.279682] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 44.284406] ? __dev_remove_pack+0x2f0/0x3b0 [ 44.288780] panic+0x1e4/0x417 [ 44.291937] ? __warn+0x1d9/0x1d9 [ 44.295360] ? __dev_remove_pack+0x305/0x3b0 [ 44.299736] kasan_end_report+0x50/0x50 [ 44.303674] kasan_report+0x137/0x340 [ 44.307439] __asan_report_load8_noabort+0x14/0x20 [ 44.312334] __dev_remove_pack+0x305/0x3b0 [ 44.316535] ? dev_get_by_name_rcu+0x270/0x270 [ 44.321085] ? refcount_sub_and_test+0x115/0x1b0 [ 44.325814] __unregister_prot_hook+0x211/0x280 [ 44.330449] packet_release+0x8bb/0xd70 [ 44.334390] ? packet_set_ring+0x1b70/0x1b70 [ 44.338767] ? dentry_free+0xcd/0x130 [ 44.342533] ? rcu_read_lock_sched_held+0x108/0x120 [ 44.347516] ? kmem_cache_free+0x249/0x280 [ 44.351717] ? dentry_free+0xd2/0x130 [ 44.355484] ? locks_remove_file+0x3fa/0x5a0 [ 44.359857] ? fcntl_setlk+0x10d0/0x10d0 [ 44.363883] ? __fsnotify_parent+0xb4/0x3a0 [ 44.368168] ? fsnotify+0x1af0/0x1af0 [ 44.371940] sock_release+0x8d/0x1e0 [ 44.375619] ? sock_release+0x8d/0x1e0 [ 44.379472] ? sock_release+0x1e0/0x1e0 [ 44.383413] sock_close+0x16/0x20 [ 44.386842] __fput+0x333/0x7f0 [ 44.390090] ? fput+0x140/0x140 [ 44.393339] ? check_same_owner+0x320/0x320 [ 44.397626] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.402088] ____fput+0x15/0x20 [ 44.405336] task_work_run+0x199/0x270 [ 44.409188] ? task_work_cancel+0x210/0x210 [ 44.413474] ? _raw_spin_unlock+0x22/0x30 [ 44.417601] ? switch_task_namespaces+0x87/0xc0 [ 44.422251] do_exit+0xa52/0x1b40 [ 44.425686] ? plist_check_list+0xa0/0xa0 [ 44.429805] ? plist_del+0x47b/0x990 [ 44.433488] ? mm_update_next_owner+0x930/0x930 [ 44.438122] ? plist_add+0x760/0x760 [ 44.441808] ? check_same_owner+0x320/0x320 [ 44.446100] ? find_held_lock+0x39/0x1d0 [ 44.450133] ? check_noncircular+0x20/0x20 [ 44.454334] ? lock_downgrade+0x990/0x990 [ 44.458449] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 44.463785] ? find_held_lock+0x39/0x1d0 [ 44.467816] ? lock_downgrade+0x990/0x990 [ 44.471932] ? recalc_sigpending_tsk+0x117/0x150 [ 44.476655] ? recalc_sigpending+0x103/0x160 [ 44.481029] ? recalc_sigpending_tsk+0x150/0x150 [ 44.485748] ? get_signal+0x397/0x17e0 [ 44.489606] do_group_exit+0x149/0x400 [ 44.493458] ? __lock_is_held+0xbc/0x140 [ 44.497484] ? SyS_exit+0x30/0x30 [ 44.500905] ? _raw_spin_unlock_irq+0x27/0x70 [ 44.505367] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 44.510352] get_signal+0x7e8/0x17e0 [ 44.514046] ? ptrace_notify+0x130/0x130 [ 44.518076] ? __fget+0xbb/0x580 [ 44.521410] ? __lockdep_init_map+0xe4/0x650 [ 44.525791] ? lock_release+0xd70/0xd70 [ 44.529735] ? exit_robust_list+0x240/0x240 [ 44.534029] do_signal+0x94/0x1ee0 [ 44.537538] ? iterate_fd+0x3f0/0x3f0 [ 44.541305] ? setup_sigcontext+0x7d0/0x7d0 [ 44.545594] ? __lock_is_held+0xbc/0x140 [ 44.549627] ? __fget_light+0x29d/0x390 [ 44.553570] ? selinux_tun_dev_create+0xc0/0xc0 [ 44.558209] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 44.563884] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 44.569124] ? alloc_file+0x284/0x3a0 [ 44.572891] ? exit_to_usermode_loop+0x98/0x300 [ 44.577527] exit_to_usermode_loop+0x224/0x300 [ 44.582084] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 44.587591] syscall_return_slowpath+0x42f/0x500 [ 44.592313] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 44.597298] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 44.602196] ? trace_hardirqs_on_caller+0x421/0x5c0