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.56' (ECDSA) to the list of known hosts. 2017/09/19 08:25:11 parsed 1 programs 2017/09/19 08:25:11 executed programs: 0 syzkaller login: [ 40.522248] dev_remove_pack: ffff8801d3501280 not found [ 40.534261] ================================================================== [ 40.535422] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 40.536370] Read of size 8 at addr ffff8801ce028b28 by task syz-executor0/3001 [ 40.537354] [ 40.537590] CPU: 1 PID: 3001 Comm: syz-executor0 Not tainted 4.13.0-mm1+ #7 [ 40.538526] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 40.539761] Call Trace: [ 40.540123] dump_stack+0x194/0x257 [ 40.540620] ? arch_local_irq_restore+0x53/0x53 [ 40.541247] ? show_regs_print_info+0x65/0x65 [ 40.541872] ? __dev_remove_pack+0x305/0x3b0 [ 40.542676] print_address_description+0x73/0x250 [ 40.547493] ? __dev_remove_pack+0x305/0x3b0 [ 40.551966] kasan_report+0x24e/0x340 [ 40.555748] __asan_report_load8_noabort+0x14/0x20 [ 40.560653] __dev_remove_pack+0x305/0x3b0 [ 40.564865] ? dev_get_by_name_rcu+0x270/0x270 [ 40.569424] ? refcount_sub_and_test+0x115/0x1b0 [ 40.574166] __unregister_prot_hook+0x211/0x280 [ 40.578826] packet_release+0x8bb/0xd70 [ 40.582778] ? packet_set_ring+0x1b70/0x1b70 [ 40.587160] ? dentry_free+0xcd/0x130 [ 40.590934] ? rcu_read_lock_sched_held+0x108/0x120 [ 40.595926] ? kmem_cache_free+0x249/0x280 [ 40.600137] ? dentry_free+0xd2/0x130 [ 40.603921] ? locks_remove_file+0x3fa/0x5a0 [ 40.608307] ? fcntl_setlk+0x10d0/0x10d0 [ 40.612350] ? __fsnotify_parent+0xb4/0x3a0 [ 40.616649] ? fsnotify+0x1af0/0x1af0 [ 40.620432] sock_release+0x8d/0x1e0 [ 40.624117] ? sock_release+0x8d/0x1e0 [ 40.627978] ? sock_release+0x1e0/0x1e0 [ 40.631924] sock_close+0x16/0x20 [ 40.635351] __fput+0x333/0x7f0 [ 40.638609] ? fput+0x140/0x140 [ 40.641864] ? check_same_owner+0x320/0x320 [ 40.646159] ? _raw_spin_unlock_irq+0x27/0x70 [ 40.650634] ____fput+0x15/0x20 [ 40.653888] task_work_run+0x199/0x270 [ 40.657754] ? task_work_cancel+0x210/0x210 [ 40.662049] ? _raw_spin_unlock+0x22/0x30 [ 40.666174] ? switch_task_namespaces+0x87/0xc0 [ 40.670820] do_exit+0xa52/0x1b40 [ 40.674245] ? plist_check_list+0xa0/0xa0 [ 40.678374] ? plist_del+0x47b/0x990 [ 40.682062] ? mm_update_next_owner+0x930/0x930 [ 40.686710] ? plist_add+0x760/0x760 [ 40.690409] ? check_same_owner+0x320/0x320 [ 40.694708] ? osq_unlock+0x350/0x350 [ 40.698495] ? find_held_lock+0x39/0x1d0 [ 40.702542] ? check_noncircular+0x20/0x20 [ 40.706753] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 40.712110] ? find_held_lock+0x39/0x1d0 [ 40.716155] ? lock_downgrade+0x990/0x990 [ 40.720276] ? recalc_sigpending_tsk+0x117/0x150 [ 40.725006] ? recalc_sigpending+0x103/0x160 [ 40.729388] ? recalc_sigpending_tsk+0x150/0x150 [ 40.735156] ? get_signal+0x397/0x17e0 [ 40.739027] do_group_exit+0x149/0x400 [ 40.742904] ? __lock_is_held+0xbc/0x140 [ 40.746949] ? SyS_exit+0x30/0x30 [ 40.750376] ? _raw_spin_unlock_irq+0x27/0x70 [ 40.754845] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 40.759836] get_signal+0x7e8/0x17e0 [ 40.763555] ? ptrace_notify+0x130/0x130 [ 40.767589] ? __fget+0xbb/0x580 [ 40.770936] ? lock_release+0xd70/0xd70 [ 40.774890] ? exit_robust_list+0x240/0x240 [ 40.779196] do_signal+0x94/0x1ee0 [ 40.782713] ? iterate_fd+0x3f0/0x3f0 [ 40.786499] ? setup_sigcontext+0x7d0/0x7d0 [ 40.790798] ? find_held_lock+0x39/0x1d0 [ 40.794841] ? __fget_light+0x29d/0x390 [ 40.798791] ? selinux_tun_dev_create+0xc0/0xc0 [ 40.803435] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 40.809118] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 40.814371] ? exit_to_usermode_loop+0x98/0x300 [ 40.819017] exit_to_usermode_loop+0x224/0x300 [ 40.823576] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 40.829094] syscall_return_slowpath+0x42f/0x500 [ 40.833822] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 40.838811] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 40.843713] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 40.848706] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 40.853526] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 40.858252] RIP: 0033:0x451e59 [ 40.861415] RSP: 002b:00007f9084810cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 40.869096] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 0000000000451e59 [ 40.876338] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 40.883588] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 40.890830] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 40.898071] R13: 00007ffe9a3c325f R14: 00007f90848119c0 R15: 0000000000000004 [ 40.905337] [ 40.906934] Allocated by task 3000: [ 40.910533] save_stack_trace+0x16/0x20 [ 40.914483] save_stack+0x43/0xd0 [ 40.917904] kasan_kmalloc+0xad/0xe0 [ 40.921587] kmem_cache_alloc_trace+0x136/0x750 [ 40.926225] fanout_add+0xa50/0x1190 [ 40.929907] packet_setsockopt+0xfdc/0x1e80 [ 40.934199] SyS_setsockopt+0x189/0x360 [ 40.938141] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 40.942866] [ 40.944463] Freed by task 3001: [ 40.947712] save_stack_trace+0x16/0x20 [ 40.951654] save_stack+0x43/0xd0 [ 40.955077] kasan_slab_free+0x71/0xc0 [ 40.958932] kfree+0xca/0x250 [ 40.962006] packet_release+0xa8f/0xd70 [ 40.965951] sock_release+0x8d/0x1e0 [ 40.969632] sock_close+0x16/0x20 [ 40.973054] __fput+0x333/0x7f0 [ 40.976303] ____fput+0x15/0x20 [ 40.979553] task_work_run+0x199/0x270 [ 40.983411] do_exit+0xa52/0x1b40 [ 40.986832] do_group_exit+0x149/0x400 [ 40.990688] get_signal+0x7e8/0x17e0 [ 40.994370] do_signal+0x94/0x1ee0 [ 40.997880] exit_to_usermode_loop+0x224/0x300 [ 41.002434] syscall_return_slowpath+0x42f/0x500 [ 41.007162] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 41.011885] [ 41.013485] The buggy address belongs to the object at ffff8801ce028280 [ 41.013485] which belongs to the cache kmalloc-4096 of size 4096 [ 41.026284] The buggy address is located 2216 bytes inside of [ 41.026284] 4096-byte region [ffff8801ce028280, ffff8801ce029280) [ 41.038302] The buggy address belongs to the page: [ 41.043204] page:ffffea0007380a00 count:1 mapcount:0 mapping:ffff8801ce028280 index:0x0 compound_mapcount: 0 [ 41.053150] flags: 0x200000000008100(slab|head) [ 41.057789] raw: 0200000000008100 ffff8801ce028280 0000000000000000 0000000100000001 [ 41.065652] raw: ffffea0007380920 ffffea0007380ca0 ffff8801dac00dc0 0000000000000000 [ 41.073502] page dumped because: kasan: bad access detected [ 41.079180] [ 41.080778] Memory state around the buggy address: [ 41.085677] ffff8801ce028a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.093006] ffff8801ce028a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.100336] >ffff8801ce028b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.107666] ^ [ 41.112306] ffff8801ce028b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.119636] ffff8801ce028c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.126963] ================================================================== [ 41.134291] Disabling lock debugging due to kernel taint [ 41.139790] Kernel panic - not syncing: panic_on_warn set ... [ 41.139790] [ 41.147121] CPU: 1 PID: 3001 Comm: syz-executor0 Tainted: G B 4.13.0-mm1+ #7 [ 41.155400] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.164730] Call Trace: [ 41.167306] dump_stack+0x194/0x257 [ 41.170905] ? arch_local_irq_restore+0x53/0x53 [ 41.175543] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.180269] ? __dev_remove_pack+0x2f0/0x3b0 [ 41.184644] panic+0x1e4/0x417 [ 41.187802] ? __warn+0x1d9/0x1d9 [ 41.191227] ? __dev_remove_pack+0x305/0x3b0 [ 41.195602] kasan_end_report+0x50/0x50 [ 41.199540] kasan_report+0x137/0x340 [ 41.203308] __asan_report_load8_noabort+0x14/0x20 [ 41.208208] __dev_remove_pack+0x305/0x3b0 [ 41.212411] ? dev_get_by_name_rcu+0x270/0x270 [ 41.216960] ? refcount_sub_and_test+0x115/0x1b0 [ 41.221689] __unregister_prot_hook+0x211/0x280 [ 41.226334] packet_release+0x8bb/0xd70 [ 41.230277] ? packet_set_ring+0x1b70/0x1b70 [ 41.234654] ? dentry_free+0xcd/0x130 [ 41.238424] ? rcu_read_lock_sched_held+0x108/0x120 [ 41.243410] ? kmem_cache_free+0x249/0x280 [ 41.247611] ? dentry_free+0xd2/0x130 [ 41.251384] ? locks_remove_file+0x3fa/0x5a0 [ 41.255760] ? fcntl_setlk+0x10d0/0x10d0 [ 41.259788] ? __fsnotify_parent+0xb4/0x3a0 [ 41.264073] ? fsnotify+0x1af0/0x1af0 [ 41.267840] sock_release+0x8d/0x1e0 [ 41.271520] ? sock_release+0x8d/0x1e0 [ 41.275374] ? sock_release+0x1e0/0x1e0 [ 41.279314] sock_close+0x16/0x20 [ 41.282742] __fput+0x333/0x7f0 [ 41.285990] ? fput+0x140/0x140 [ 41.289237] ? check_same_owner+0x320/0x320 [ 41.293522] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.297982] ____fput+0x15/0x20 [ 41.301227] task_work_run+0x199/0x270 [ 41.305080] ? task_work_cancel+0x210/0x210 [ 41.309365] ? _raw_spin_unlock+0x22/0x30 [ 41.313479] ? switch_task_namespaces+0x87/0xc0 [ 41.318114] do_exit+0xa52/0x1b40 [ 41.321531] ? plist_check_list+0xa0/0xa0 [ 41.325648] ? plist_del+0x47b/0x990 [ 41.329327] ? mm_update_next_owner+0x930/0x930 [ 41.333959] ? plist_add+0x760/0x760 [ 41.337642] ? check_same_owner+0x320/0x320 [ 41.341931] ? osq_unlock+0x350/0x350 [ 41.345696] ? find_held_lock+0x39/0x1d0 [ 41.349727] ? check_noncircular+0x20/0x20 [ 41.353928] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 41.359265] ? find_held_lock+0x39/0x1d0 [ 41.363296] ? lock_downgrade+0x990/0x990 [ 41.367414] ? recalc_sigpending_tsk+0x117/0x150 [ 41.372135] ? recalc_sigpending+0x103/0x160 [ 41.376508] ? recalc_sigpending_tsk+0x150/0x150 [ 41.381226] ? get_signal+0x397/0x17e0 [ 41.385084] do_group_exit+0x149/0x400 [ 41.388935] ? __lock_is_held+0xbc/0x140 [ 41.392958] ? SyS_exit+0x30/0x30 [ 41.396377] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.400837] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.405818] get_signal+0x7e8/0x17e0 [ 41.409509] ? ptrace_notify+0x130/0x130 [ 41.413534] ? __fget+0xbb/0x580 [ 41.416869] ? lock_release+0xd70/0xd70 [ 41.420812] ? exit_robust_list+0x240/0x240 [ 41.425106] do_signal+0x94/0x1ee0 [ 41.428612] ? iterate_fd+0x3f0/0x3f0 [ 41.432381] ? setup_sigcontext+0x7d0/0x7d0 [ 41.436670] ? find_held_lock+0x39/0x1d0 [ 41.440700] ? __fget_light+0x29d/0x390 [ 41.444644] ? selinux_tun_dev_create+0xc0/0xc0 [ 41.449280] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 41.454967] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 41.460209] ? exit_to_usermode_loop+0x98/0x300 [ 41.464845] exit_to_usermode_loop+0x224/0x300 [ 41.469394] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 41.474899] syscall_return_slowpath+0x42f/0x500 [ 41.479707] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 41.484687] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 41.489584] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.494564] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.499296] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 41.504036] RIP: 0033:0x451e59 [ 41.507191] RSP: 002b:00007f9084810cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 41.515318] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 0000000000451e59