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.225' (ECDSA) to the list of known hosts. 2017/09/20 04:16:20 parsed 1 programs 2017/09/20 04:16:20 executed programs: 0 syzkaller login: [ 34.421135] dev_remove_pack: ffff8801ce3f8800 not found [ 34.439247] ================================================================== [ 34.446669] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 34.453391] Read of size 8 at addr ffff8801cdd052a8 by task syz-executor0/3041 [ 34.460731] [ 34.462336] CPU: 1 PID: 3041 Comm: syz-executor0 Not tainted 4.13.0-mm1+ #7 [ 34.469404] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.478729] Call Trace: [ 34.481292] dump_stack+0x194/0x257 [ 34.484894] ? arch_local_irq_restore+0x53/0x53 [ 34.489534] ? show_regs_print_info+0x65/0x65 [ 34.494007] ? __dev_remove_pack+0x305/0x3b0 [ 34.498389] print_address_description+0x73/0x250 [ 34.503204] ? __dev_remove_pack+0x305/0x3b0 [ 34.507586] kasan_report+0x24e/0x340 [ 34.511361] __asan_report_load8_noabort+0x14/0x20 [ 34.516263] __dev_remove_pack+0x305/0x3b0 [ 34.520474] ? dev_get_by_name_rcu+0x270/0x270 [ 34.525030] ? refcount_sub_and_test+0x115/0x1b0 [ 34.529768] __unregister_prot_hook+0x211/0x280 [ 34.534418] packet_release+0x8bb/0xd70 [ 34.538372] ? packet_set_ring+0x1b70/0x1b70 [ 34.542754] ? dentry_free+0xcd/0x130 [ 34.546526] ? rcu_read_lock_sched_held+0x108/0x120 [ 34.551515] ? kmem_cache_free+0x249/0x280 [ 34.555723] ? dentry_free+0xd2/0x130 [ 34.559501] ? locks_remove_file+0x3fa/0x5a0 [ 34.563885] ? fcntl_setlk+0x10d0/0x10d0 [ 34.567923] ? __fsnotify_parent+0xb4/0x3a0 [ 34.572216] ? fsnotify+0x1af0/0x1af0 [ 34.576023] sock_release+0x8d/0x1e0 [ 34.579709] ? sock_release+0x8d/0x1e0 [ 34.583570] ? sock_release+0x1e0/0x1e0 [ 34.587515] sock_close+0x16/0x20 [ 34.590940] __fput+0x333/0x7f0 [ 34.594197] ? fput+0x140/0x140 [ 34.597451] ? check_same_owner+0x320/0x320 [ 34.602438] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.606910] ____fput+0x15/0x20 [ 34.610164] task_work_run+0x199/0x270 [ 34.614027] ? task_work_cancel+0x210/0x210 [ 34.618320] ? _raw_spin_unlock+0x22/0x30 [ 34.622438] ? switch_task_namespaces+0x87/0xc0 [ 34.627084] do_exit+0xa52/0x1b40 [ 34.630515] ? plist_check_list+0xa0/0xa0 [ 34.634647] ? plist_del+0x47b/0x990 [ 34.638335] ? mm_update_next_owner+0x930/0x930 [ 34.642978] ? plist_add+0x760/0x760 [ 34.646675] ? check_same_owner+0x320/0x320 [ 34.650974] ? find_held_lock+0x39/0x1d0 [ 34.655014] ? check_noncircular+0x20/0x20 [ 34.659220] ? lock_downgrade+0x990/0x990 [ 34.663340] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 34.668695] ? find_held_lock+0x39/0x1d0 [ 34.672738] ? lock_downgrade+0x990/0x990 [ 34.676858] ? recalc_sigpending_tsk+0x117/0x150 [ 34.681586] ? recalc_sigpending+0x103/0x160 [ 34.685978] ? recalc_sigpending_tsk+0x150/0x150 [ 34.690703] ? get_signal+0x397/0x17e0 [ 34.694575] do_group_exit+0x149/0x400 [ 34.698435] ? __lock_is_held+0xbc/0x140 [ 34.702466] ? SyS_exit+0x30/0x30 [ 34.705889] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.710358] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 34.715350] get_signal+0x7e8/0x17e0 [ 34.719063] ? ptrace_notify+0x130/0x130 [ 34.723092] ? __fget+0xbb/0x580 [ 34.726430] ? __lockdep_init_map+0xe4/0x650 [ 34.730815] ? lock_release+0xd70/0xd70 [ 34.734770] ? exit_robust_list+0x240/0x240 [ 34.739078] do_signal+0x94/0x1ee0 [ 34.742596] ? iterate_fd+0x3f0/0x3f0 [ 34.746371] ? setup_sigcontext+0x7d0/0x7d0 [ 34.750666] ? __lock_is_held+0xbc/0x140 [ 34.754711] ? __fget_light+0x29d/0x390 [ 34.758659] ? selinux_tun_dev_create+0xc0/0xc0 [ 34.763302] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 34.768984] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 34.774232] ? alloc_file+0x284/0x3a0 [ 34.778004] ? exit_to_usermode_loop+0x98/0x300 [ 34.782652] exit_to_usermode_loop+0x224/0x300 [ 34.787211] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 34.792731] syscall_return_slowpath+0x42f/0x500 [ 34.797461] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 34.802451] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 34.807352] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 34.812341] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 34.817074] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 34.821799] RIP: 0033:0x4520a9 [ 34.824962] RSP: 002b:00007f30ac789cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 34.832643] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 00000000004520a9 [ 34.839893] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 34.847135] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 34.854377] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 34.861619] R13: 00007ffeca2e264f R14: 00007f30ac78a9c0 R15: 0000000000000000 [ 34.868876] [ 34.870481] Allocated by task 3041: [ 34.874088] save_stack_trace+0x16/0x20 [ 34.878037] save_stack+0x43/0xd0 [ 34.881459] kasan_kmalloc+0xad/0xe0 [ 34.885141] kmem_cache_alloc_trace+0x136/0x750 [ 34.889784] fanout_add+0xa50/0x1190 [ 34.893468] packet_setsockopt+0xfdc/0x1e80 [ 34.897763] SyS_setsockopt+0x189/0x360 [ 34.901710] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 34.906441] [ 34.908040] Freed by task 3041: [ 34.911289] save_stack_trace+0x16/0x20 [ 34.915233] save_stack+0x43/0xd0 [ 34.918657] kasan_slab_free+0x71/0xc0 [ 34.922525] kfree+0xca/0x250 [ 34.925608] packet_release+0xa8f/0xd70 [ 34.929554] sock_release+0x8d/0x1e0 [ 34.933235] sock_close+0x16/0x20 [ 34.936657] __fput+0x333/0x7f0 [ 34.939905] ____fput+0x15/0x20 [ 34.943153] task_work_run+0x199/0x270 [ 34.947009] do_exit+0xa52/0x1b40 [ 34.950434] do_group_exit+0x149/0x400 [ 34.954306] get_signal+0x7e8/0x17e0 [ 34.957991] do_signal+0x94/0x1ee0 [ 34.961502] exit_to_usermode_loop+0x224/0x300 [ 34.966058] syscall_return_slowpath+0x42f/0x500 [ 34.970792] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 34.975514] [ 34.977115] The buggy address belongs to the object at ffff8801cdd04a00 [ 34.977115] which belongs to the cache kmalloc-4096 of size 4096 [ 34.989915] The buggy address is located 2216 bytes inside of [ 34.989915] 4096-byte region [ffff8801cdd04a00, ffff8801cdd05a00) [ 35.001932] The buggy address belongs to the page: [ 35.006830] page:ffffea0007374100 count:1 mapcount:0 mapping:ffff8801cdd04a00 index:0x0 compound_mapcount: 0 [ 35.016774] flags: 0x200000000008100(slab|head) [ 35.021413] raw: 0200000000008100 ffff8801cdd04a00 0000000000000000 0000000100000001 [ 35.029263] raw: ffffea000739eb20 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 35.037112] page dumped because: kasan: bad access detected [ 35.042791] [ 35.044390] Memory state around the buggy address: [ 35.049287] ffff8801cdd05180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.056615] ffff8801cdd05200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.063944] >ffff8801cdd05280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.071269] ^ [ 35.075905] ffff8801cdd05300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.083233] ffff8801cdd05380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.090559] ================================================================== [ 35.097885] Disabling lock debugging due to kernel taint [ 35.103369] Kernel panic - not syncing: panic_on_warn set ... [ 35.103369] [ 35.110702] CPU: 1 PID: 3041 Comm: syz-executor0 Tainted: G B 4.13.0-mm1+ #7 [ 35.118988] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.128307] Call Trace: [ 35.130867] dump_stack+0x194/0x257 [ 35.134461] ? arch_local_irq_restore+0x53/0x53 [ 35.139105] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.143831] ? __dev_remove_pack+0x2f0/0x3b0 [ 35.148204] panic+0x1e4/0x417 [ 35.151360] ? __warn+0x1d9/0x1d9 [ 35.154786] ? __dev_remove_pack+0x305/0x3b0 [ 35.159158] kasan_end_report+0x50/0x50 [ 35.163095] kasan_report+0x137/0x340 [ 35.166862] __asan_report_load8_noabort+0x14/0x20 [ 35.171757] __dev_remove_pack+0x305/0x3b0 [ 35.175960] ? dev_get_by_name_rcu+0x270/0x270 [ 35.180508] ? refcount_sub_and_test+0x115/0x1b0 [ 35.185233] __unregister_prot_hook+0x211/0x280 [ 35.189871] packet_release+0x8bb/0xd70 [ 35.193816] ? packet_set_ring+0x1b70/0x1b70 [ 35.198190] ? dentry_free+0xcd/0x130 [ 35.201956] ? rcu_read_lock_sched_held+0x108/0x120 [ 35.206941] ? kmem_cache_free+0x249/0x280 [ 35.211142] ? dentry_free+0xd2/0x130 [ 35.214910] ? locks_remove_file+0x3fa/0x5a0 [ 35.219285] ? fcntl_setlk+0x10d0/0x10d0 [ 35.223313] ? __fsnotify_parent+0xb4/0x3a0 [ 35.227598] ? fsnotify+0x1af0/0x1af0 [ 35.231366] sock_release+0x8d/0x1e0 [ 35.235043] ? sock_release+0x8d/0x1e0 [ 35.238897] ? sock_release+0x1e0/0x1e0 [ 35.242837] sock_close+0x16/0x20 [ 35.246256] __fput+0x333/0x7f0 [ 35.249502] ? fput+0x140/0x140 [ 35.252749] ? check_same_owner+0x320/0x320 [ 35.257040] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.261504] ____fput+0x15/0x20 [ 35.264752] task_work_run+0x199/0x270 [ 35.268611] ? task_work_cancel+0x210/0x210 [ 35.272906] ? _raw_spin_unlock+0x22/0x30 [ 35.277022] ? switch_task_namespaces+0x87/0xc0 [ 35.281659] do_exit+0xa52/0x1b40 [ 35.285079] ? plist_check_list+0xa0/0xa0 [ 35.289198] ? plist_del+0x47b/0x990 [ 35.292879] ? mm_update_next_owner+0x930/0x930 [ 35.297513] ? plist_add+0x760/0x760 [ 35.301198] ? check_same_owner+0x320/0x320 [ 35.305488] ? find_held_lock+0x39/0x1d0 [ 35.309517] ? check_noncircular+0x20/0x20 [ 35.313719] ? lock_downgrade+0x990/0x990 [ 35.317832] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 35.323169] ? find_held_lock+0x39/0x1d0 [ 35.327200] ? lock_downgrade+0x990/0x990 [ 35.331313] ? recalc_sigpending_tsk+0x117/0x150 [ 35.336035] ? recalc_sigpending+0x103/0x160 [ 35.340418] ? recalc_sigpending_tsk+0x150/0x150 [ 35.345135] ? get_signal+0x397/0x17e0 [ 35.348991] do_group_exit+0x149/0x400 [ 35.352842] ? __lock_is_held+0xbc/0x140 [ 35.356866] ? SyS_exit+0x30/0x30 [ 35.360283] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.364742] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.369724] get_signal+0x7e8/0x17e0 [ 35.373419] ? ptrace_notify+0x130/0x130 [ 35.377444] ? __fget+0xbb/0x580 [ 35.380777] ? __lockdep_init_map+0xe4/0x650 [ 35.385151] ? lock_release+0xd70/0xd70 [ 35.389095] ? exit_robust_list+0x240/0x240 [ 35.393389] do_signal+0x94/0x1ee0 [ 35.396897] ? iterate_fd+0x3f0/0x3f0 [ 35.400664] ? setup_sigcontext+0x7d0/0x7d0 [ 35.404953] ? __lock_is_held+0xbc/0x140 [ 35.408985] ? __fget_light+0x29d/0x390 [ 35.412936] ? selinux_tun_dev_create+0xc0/0xc0 [ 35.417573] ? selinux_netlbl_socket_setsockopt+0x10c/0x460