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-0,10.128.0.37' (ECDSA) to the list of known hosts. 2017/09/07 09:15:44 parsed 1 programs 2017/09/07 09:15:44 executed programs: 0 syzkaller login: [ 42.291909] dev_remove_pack: ffff8801ce12f9c0 not found [ 42.313368] ================================================================== [ 42.320786] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 42.327518] Read of size 8 at addr ffff8801ce2392a8 by task syz-executor0/3029 [ 42.334851] [ 42.336453] CPU: 1 PID: 3029 Comm: syz-executor0 Not tainted 4.13.0-next-20170907+ #17 [ 42.344472] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.353796] Call Trace: [ 42.356358] dump_stack+0x194/0x257 [ 42.359958] ? arch_local_irq_restore+0x53/0x53 [ 42.364599] ? show_regs_print_info+0x65/0x65 [ 42.369076] ? __dev_remove_pack+0x305/0x3b0 [ 42.373459] print_address_description+0x73/0x250 [ 42.378278] ? __dev_remove_pack+0x305/0x3b0 [ 42.382662] kasan_report+0x24e/0x340 [ 42.386439] __asan_report_load8_noabort+0x14/0x20 [ 42.391353] __dev_remove_pack+0x305/0x3b0 [ 42.395562] ? dev_get_by_name_rcu+0x270/0x270 [ 42.400117] ? refcount_sub_and_test+0x115/0x1b0 [ 42.404852] __unregister_prot_hook+0x211/0x280 [ 42.409497] packet_release+0x8bb/0xd70 [ 42.413451] ? packet_set_ring+0x1b70/0x1b70 [ 42.417851] ? dentry_free+0xcd/0x130 [ 42.421626] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.426625] ? kmem_cache_free+0x249/0x280 [ 42.430834] ? dentry_free+0xd2/0x130 [ 42.434610] ? locks_remove_file+0x3fa/0x5a0 [ 42.439006] ? fcntl_setlk+0x10d0/0x10d0 [ 42.443040] ? __fsnotify_parent+0xb4/0x3a0 [ 42.447335] ? fsnotify+0x1af0/0x1af0 [ 42.451122] sock_release+0x8d/0x1e0 [ 42.454818] ? sock_release+0x8d/0x1e0 [ 42.458678] ? sock_release+0x1e0/0x1e0 [ 42.462623] sock_close+0x16/0x20 [ 42.466046] __fput+0x333/0x7f0 [ 42.469306] ? fput+0x140/0x140 [ 42.472557] ? check_same_owner+0x320/0x320 [ 42.476861] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.481343] ____fput+0x15/0x20 [ 42.484597] task_work_run+0x199/0x270 [ 42.488458] ? task_work_cancel+0x210/0x210 [ 42.492759] ? _raw_spin_unlock+0x22/0x30 [ 42.496895] ? switch_task_namespaces+0x87/0xc0 [ 42.501539] do_exit+0xa52/0x1b40 [ 42.504964] ? plist_check_list+0xa0/0xa0 [ 42.509097] ? plist_del+0x47b/0x990 [ 42.512783] ? mm_update_next_owner+0x930/0x930 [ 42.517425] ? plist_add+0x760/0x760 [ 42.521126] ? check_same_owner+0x320/0x320 [ 42.525424] ? find_held_lock+0x39/0x1d0 [ 42.529465] ? check_noncircular+0x20/0x20 [ 42.533673] ? lock_downgrade+0x990/0x990 [ 42.537794] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 42.543153] ? find_held_lock+0x39/0x1d0 [ 42.547200] ? lock_downgrade+0x990/0x990 [ 42.551324] ? recalc_sigpending_tsk+0x117/0x150 [ 42.556051] ? recalc_sigpending+0x103/0x160 [ 42.560432] ? recalc_sigpending_tsk+0x150/0x150 [ 42.565159] ? get_signal+0x397/0x17e0 [ 42.569040] do_group_exit+0x149/0x400 [ 42.572902] ? __lock_is_held+0xbc/0x140 [ 42.576932] ? SyS_exit+0x30/0x30 [ 42.580358] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.584833] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.589828] get_signal+0x7e8/0x17e0 [ 42.593557] ? ptrace_notify+0x130/0x130 [ 42.597587] ? __fget+0xbb/0x580 [ 42.600925] ? lock_downgrade+0x990/0x990 [ 42.605048] ? lock_release+0xd70/0xd70 [ 42.609002] ? exit_robust_list+0x240/0x240 [ 42.613307] do_signal+0x94/0x1ee0 [ 42.616825] ? iterate_fd+0x3f0/0x3f0 [ 42.620601] ? setup_sigcontext+0x7d0/0x7d0 [ 42.624902] ? do_page_fault+0xee/0x720 [ 42.628851] ? __do_page_fault+0xb60/0xb60 [ 42.633058] ? __fget_light+0x29d/0x390 [ 42.637005] ? selinux_tun_dev_create+0xc0/0xc0 [ 42.641646] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 42.647327] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 42.652584] ? exit_to_usermode_loop+0x98/0x300 [ 42.657262] exit_to_usermode_loop+0x224/0x300 [ 42.661816] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 42.667347] syscall_return_slowpath+0x42f/0x500 [ 42.672077] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 42.677069] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 42.681971] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.686963] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.691697] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 42.696422] RIP: 0033:0x451e59 [ 42.699584] RSP: 002b:00007fbaf2a9ecf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 42.707264] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 42.714506] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 42.721760] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 42.728998] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 42.736239] R13: 00007ffed3928c8f R14: 00007fbaf2a9f9c0 R15: 0000000000000000 [ 42.743506] [ 42.745105] Allocated by task 3029: [ 42.748705] save_stack_trace+0x16/0x20 [ 42.752651] save_stack+0x43/0xd0 [ 42.756073] kasan_kmalloc+0xad/0xe0 [ 42.759768] kmem_cache_alloc_trace+0x136/0x750 [ 42.764410] fanout_add+0xa50/0x1190 [ 42.768108] packet_setsockopt+0xfdc/0x1e80 [ 42.772403] SyS_setsockopt+0x189/0x360 [ 42.776350] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.781071] [ 42.782669] Freed by task 3029: [ 42.785918] save_stack_trace+0x16/0x20 [ 42.789863] save_stack+0x43/0xd0 [ 42.793285] kasan_slab_free+0x71/0xc0 [ 42.797139] kfree+0xca/0x250 [ 42.800214] packet_release+0xa8f/0xd70 [ 42.804159] sock_release+0x8d/0x1e0 [ 42.807843] sock_close+0x16/0x20 [ 42.811267] __fput+0x333/0x7f0 [ 42.814515] ____fput+0x15/0x20 [ 42.817777] task_work_run+0x199/0x270 [ 42.821631] do_exit+0xa52/0x1b40 [ 42.825051] do_group_exit+0x149/0x400 [ 42.828908] get_signal+0x7e8/0x17e0 [ 42.832591] do_signal+0x94/0x1ee0 [ 42.836100] exit_to_usermode_loop+0x224/0x300 [ 42.840647] syscall_return_slowpath+0x42f/0x500 [ 42.845374] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 42.850102] [ 42.851709] The buggy address belongs to the object at ffff8801ce238a00 [ 42.851709] which belongs to the cache kmalloc-4096 of size 4096 [ 42.864515] The buggy address is located 2216 bytes inside of [ 42.864515] 4096-byte region [ffff8801ce238a00, ffff8801ce239a00) [ 42.876532] The buggy address belongs to the page: [ 42.881432] page:ffffea0007388e00 count:1 mapcount:0 mapping:ffff8801ce238a00 index:0x0 compound_mapcount: 0 [ 42.891379] flags: 0x200000000008100(slab|head) [ 42.896019] raw: 0200000000008100 ffff8801ce238a00 0000000000000000 0000000100000001 [ 42.903868] raw: ffffea000738d9a0 ffffea0007388ea0 ffff8801dac00dc0 0000000000000000 [ 42.911717] page dumped because: kasan: bad access detected [ 42.917423] [ 42.919020] Memory state around the buggy address: [ 42.923915] ffff8801ce239180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.931256] ffff8801ce239200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.938584] >ffff8801ce239280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.945908] ^ [ 42.950544] ffff8801ce239300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.957876] ffff8801ce239380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.965207] ================================================================== [ 42.972536] Disabling lock debugging due to kernel taint [ 42.978036] Kernel panic - not syncing: panic_on_warn set ... [ 42.978036] [ 42.985388] CPU: 1 PID: 3029 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170907+ #17 [ 42.994625] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.003948] Call Trace: [ 43.006507] dump_stack+0x194/0x257 [ 43.010102] ? arch_local_irq_restore+0x53/0x53 [ 43.014752] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 43.019487] ? __dev_remove_pack+0x2f0/0x3b0 [ 43.023860] panic+0x1e4/0x417 [ 43.027019] ? __warn+0x1d9/0x1d9 [ 43.030447] ? __dev_remove_pack+0x305/0x3b0 [ 43.034818] kasan_end_report+0x50/0x50 [ 43.038757] kasan_report+0x137/0x340 [ 43.042535] __asan_report_load8_noabort+0x14/0x20 [ 43.047429] __dev_remove_pack+0x305/0x3b0 [ 43.051632] ? dev_get_by_name_rcu+0x270/0x270 [ 43.056179] ? refcount_sub_and_test+0x115/0x1b0 [ 43.060904] __unregister_prot_hook+0x211/0x280 [ 43.065540] packet_release+0x8bb/0xd70 [ 43.069491] ? packet_set_ring+0x1b70/0x1b70 [ 43.073868] ? dentry_free+0xcd/0x130 [ 43.077633] ? rcu_read_lock_sched_held+0x108/0x120 [ 43.082613] ? kmem_cache_free+0x249/0x280 [ 43.086815] ? dentry_free+0xd2/0x130 [ 43.090587] ? locks_remove_file+0x3fa/0x5a0 [ 43.094959] ? fcntl_setlk+0x10d0/0x10d0 [ 43.098987] ? __fsnotify_parent+0xb4/0x3a0 [ 43.103276] ? fsnotify+0x1af0/0x1af0 [ 43.107044] sock_release+0x8d/0x1e0 [ 43.110722] ? sock_release+0x8d/0x1e0 [ 43.114575] ? sock_release+0x1e0/0x1e0 [ 43.118513] sock_close+0x16/0x20 [ 43.121931] __fput+0x333/0x7f0 [ 43.125183] ? fput+0x140/0x140 [ 43.128429] ? check_same_owner+0x320/0x320 [ 43.132714] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.137179] ____fput+0x15/0x20 [ 43.140424] task_work_run+0x199/0x270 [ 43.144276] ? task_work_cancel+0x210/0x210 [ 43.148564] ? _raw_spin_unlock+0x22/0x30 [ 43.152676] ? switch_task_namespaces+0x87/0xc0 [ 43.157312] do_exit+0xa52/0x1b40 [ 43.160732] ? plist_check_list+0xa0/0xa0 [ 43.164853] ? plist_del+0x47b/0x990 [ 43.168529] ? mm_update_next_owner+0x930/0x930 [ 43.173161] ? plist_add+0x760/0x760 [ 43.176844] ? check_same_owner+0x320/0x320 [ 43.181131] ? find_held_lock+0x39/0x1d0 [ 43.185162] ? check_noncircular+0x20/0x20 [ 43.189360] ? lock_downgrade+0x990/0x990 [ 43.193474] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 43.198808] ? find_held_lock+0x39/0x1d0 [ 43.202837] ? lock_downgrade+0x990/0x990 [ 43.206949] ? recalc_sigpending_tsk+0x117/0x150 [ 43.211673] ? recalc_sigpending+0x103/0x160 [ 43.216046] ? recalc_sigpending_tsk+0x150/0x150 [ 43.220761] ? get_signal+0x397/0x17e0 [ 43.224618] do_group_exit+0x149/0x400 [ 43.228471] ? __lock_is_held+0xbc/0x140 [ 43.232497] ? SyS_exit+0x30/0x30 [ 43.235916] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.240383] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.245365] get_signal+0x7e8/0x17e0 [ 43.249057] ? ptrace_notify+0x130/0x130 [ 43.253087] ? __fget+0xbb/0x580 [ 43.256416] ? lock_downgrade+0x990/0x990 [ 43.260538] ? lock_release+0xd70/0xd70 [ 43.264478] ? exit_robust_list+0x240/0x240 [ 43.268775] do_signal+0x94/0x1ee0 [ 43.272284] ? iterate_fd+0x3f0/0x3f0 [ 43.276049] ? setup_sigcontext+0x7d0/0x7d0 [ 43.280348] ? do_page_fault+0xee/0x720 [ 43.284290] ? __do_page_fault+0xb60/0xb60 [ 43.288491] ? __fget_light+0x29d/0x390