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-1,10.128.0.38' (ECDSA) to the list of known hosts. 2017/09/08 09:41:15 parsed 1 programs 2017/09/08 09:41:15 executed programs: 0 syzkaller login: [ 42.316854] dev_remove_pack: ffff8801ce1c5940 not found [ 42.334381] ================================================================== [ 42.341815] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 42.348551] Read of size 8 at addr ffff8801ce1c7268 by task syz-executor0/3072 [ 42.355889] [ 42.357490] CPU: 0 PID: 3072 Comm: syz-executor0 Not tainted 4.13.0-next-20170908+ #18 [ 42.365512] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.374836] Call Trace: [ 42.377412] dump_stack+0x194/0x257 [ 42.381104] ? arch_local_irq_restore+0x53/0x53 [ 42.385747] ? show_regs_print_info+0x65/0x65 [ 42.390236] ? __dev_remove_pack+0x305/0x3b0 [ 42.394618] print_address_description+0x73/0x250 [ 42.399436] ? __dev_remove_pack+0x305/0x3b0 [ 42.403817] kasan_report+0x24e/0x340 [ 42.407593] __asan_report_load8_noabort+0x14/0x20 [ 42.412510] __dev_remove_pack+0x305/0x3b0 [ 42.416718] ? dev_get_by_name_rcu+0x270/0x270 [ 42.421277] ? refcount_sub_and_test+0x115/0x1b0 [ 42.426041] __unregister_prot_hook+0x211/0x280 [ 42.430692] packet_release+0x8bb/0xd70 [ 42.434646] ? packet_set_ring+0x1b70/0x1b70 [ 42.439028] ? dentry_free+0xcd/0x130 [ 42.442809] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.447818] ? kmem_cache_free+0x249/0x280 [ 42.452044] ? dentry_free+0xd2/0x130 [ 42.455827] ? locks_remove_file+0x3fa/0x5a0 [ 42.460228] ? fcntl_setlk+0x10d0/0x10d0 [ 42.464266] ? __fsnotify_parent+0xb4/0x3a0 [ 42.468559] ? fsnotify+0x1af0/0x1af0 [ 42.472339] sock_release+0x8d/0x1e0 [ 42.476049] ? sock_release+0x8d/0x1e0 [ 42.479908] ? sock_release+0x1e0/0x1e0 [ 42.483851] sock_close+0x16/0x20 [ 42.487278] __fput+0x333/0x7f0 [ 42.490537] ? fput+0x140/0x140 [ 42.493794] ? check_same_owner+0x320/0x320 [ 42.498092] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.502579] ____fput+0x15/0x20 [ 42.505828] task_work_run+0x199/0x270 [ 42.509690] ? task_work_cancel+0x210/0x210 [ 42.513986] ? _raw_spin_unlock+0x22/0x30 [ 42.518121] ? switch_task_namespaces+0x87/0xc0 [ 42.522765] do_exit+0xa52/0x1b40 [ 42.526191] ? plist_check_list+0xa0/0xa0 [ 42.530326] ? plist_del+0x47b/0x990 [ 42.534017] ? mm_update_next_owner+0x930/0x930 [ 42.538676] ? plist_add+0x760/0x760 [ 42.542390] ? check_same_owner+0x320/0x320 [ 42.546693] ? find_held_lock+0x39/0x1d0 [ 42.550740] ? check_noncircular+0x20/0x20 [ 42.554951] ? lock_downgrade+0x990/0x990 [ 42.559083] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 42.564444] ? find_held_lock+0x39/0x1d0 [ 42.568492] ? lock_downgrade+0x990/0x990 [ 42.572618] ? recalc_sigpending_tsk+0x117/0x150 [ 42.577364] ? recalc_sigpending+0x103/0x160 [ 42.581750] ? recalc_sigpending_tsk+0x150/0x150 [ 42.586482] ? get_signal+0x397/0x17e0 [ 42.590366] do_group_exit+0x149/0x400 [ 42.594228] ? __lock_is_held+0xbc/0x140 [ 42.598259] ? SyS_exit+0x30/0x30 [ 42.601685] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.606158] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.611156] get_signal+0x7e8/0x17e0 [ 42.614872] ? ptrace_notify+0x130/0x130 [ 42.618904] ? __fget+0xbb/0x580 [ 42.622243] ? __lockdep_init_map+0xe4/0x650 [ 42.626630] ? lock_release+0xd70/0xd70 [ 42.630604] ? exit_robust_list+0x240/0x240 [ 42.634930] do_signal+0x94/0x1ee0 [ 42.638453] ? iterate_fd+0x3f0/0x3f0 [ 42.642230] ? setup_sigcontext+0x7d0/0x7d0 [ 42.646532] ? __lock_is_held+0xbc/0x140 [ 42.650580] ? __fget_light+0x29d/0x390 [ 42.654542] ? selinux_tun_dev_create+0xc0/0xc0 [ 42.659185] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 42.664870] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 42.670120] ? alloc_file+0x284/0x3a0 [ 42.673895] ? exit_to_usermode_loop+0x98/0x300 [ 42.678545] exit_to_usermode_loop+0x224/0x300 [ 42.683109] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 42.688640] syscall_return_slowpath+0x42f/0x500 [ 42.693375] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 42.698366] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 42.703272] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.708264] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.713028] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 42.717771] RIP: 0033:0x451e59 [ 42.720931] RSP: 002b:00007fbbabc48cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 42.728620] RAX: fffffffffffffe00 RBX: 00000000007180d8 RCX: 0000000000451e59 [ 42.735874] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007180d8 [ 42.743121] RBP: 00000000007180b0 R08: 0000000000000000 R09: 0000000000000000 [ 42.750361] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 42.757606] R13: 00007fffafca975f R14: 00007fbbabc499c0 R15: 0000000000000004 [ 42.764872] [ 42.766473] Allocated by task 3071: [ 42.770075] save_stack_trace+0x16/0x20 [ 42.774025] save_stack+0x43/0xd0 [ 42.777485] kasan_kmalloc+0xad/0xe0 [ 42.781181] kmem_cache_alloc_trace+0x136/0x750 [ 42.785824] fanout_add+0xa50/0x1190 [ 42.789508] packet_setsockopt+0xfdc/0x1e80 [ 42.793800] SyS_setsockopt+0x189/0x360 [ 42.797749] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.802472] [ 42.804080] Freed by task 3072: [ 42.807376] save_stack_trace+0x16/0x20 [ 42.811321] save_stack+0x43/0xd0 [ 42.814744] kasan_slab_free+0x71/0xc0 [ 42.818603] kfree+0xca/0x250 [ 42.821682] packet_release+0xa8f/0xd70 [ 42.825630] sock_release+0x8d/0x1e0 [ 42.829321] sock_close+0x16/0x20 [ 42.832757] __fput+0x333/0x7f0 [ 42.836010] ____fput+0x15/0x20 [ 42.839260] task_work_run+0x199/0x270 [ 42.843131] do_exit+0xa52/0x1b40 [ 42.846555] do_group_exit+0x149/0x400 [ 42.850412] get_signal+0x7e8/0x17e0 [ 42.854094] do_signal+0x94/0x1ee0 [ 42.857619] exit_to_usermode_loop+0x224/0x300 [ 42.862181] syscall_return_slowpath+0x42f/0x500 [ 42.866912] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 42.871671] [ 42.873272] The buggy address belongs to the object at ffff8801ce1c69c0 [ 42.873272] which belongs to the cache kmalloc-4096 of size 4096 [ 42.886082] The buggy address is located 2216 bytes inside of [ 42.886082] 4096-byte region [ffff8801ce1c69c0, ffff8801ce1c79c0) [ 42.898105] The buggy address belongs to the page: [ 42.903010] page:ffffea0007387180 count:1 mapcount:0 mapping:ffff8801ce1c69c0 index:0x0 compound_mapcount: 0 [ 42.912978] flags: 0x200000000008100(slab|head) [ 42.917624] raw: 0200000000008100 ffff8801ce1c69c0 0000000000000000 0000000100000001 [ 42.925772] raw: ffffea000739e8a0 ffff8801dac01a50 ffff8801dac00dc0 0000000000000000 [ 42.933630] page dumped because: kasan: bad access detected [ 42.939318] [ 42.940927] Memory state around the buggy address: [ 42.945827] ffff8801ce1c7100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.953169] ffff8801ce1c7180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.960504] >ffff8801ce1c7200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.967848] ^ [ 42.974803] ffff8801ce1c7280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.982136] ffff8801ce1c7300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.989464] ================================================================== [ 42.996791] Disabling lock debugging due to kernel taint [ 43.002450] Kernel panic - not syncing: panic_on_warn set ... [ 43.002450] [ 43.009790] CPU: 0 PID: 3072 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170908+ #18 [ 43.019032] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.028352] Call Trace: [ 43.030912] dump_stack+0x194/0x257 [ 43.034518] ? arch_local_irq_restore+0x53/0x53 [ 43.039160] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 43.043885] ? __dev_remove_pack+0x2f0/0x3b0 [ 43.048261] panic+0x1e4/0x417 [ 43.051420] ? __warn+0x1d9/0x1d9 [ 43.054846] ? __dev_remove_pack+0x305/0x3b0 [ 43.059222] kasan_end_report+0x50/0x50 [ 43.063162] kasan_report+0x137/0x340 [ 43.066929] __asan_report_load8_noabort+0x14/0x20 [ 43.071824] __dev_remove_pack+0x305/0x3b0 [ 43.076025] ? dev_get_by_name_rcu+0x270/0x270 [ 43.080585] ? refcount_sub_and_test+0x115/0x1b0 [ 43.085313] __unregister_prot_hook+0x211/0x280 [ 43.089951] packet_release+0x8bb/0xd70 [ 43.093891] ? packet_set_ring+0x1b70/0x1b70 [ 43.098269] ? dentry_free+0xcd/0x130 [ 43.102058] ? rcu_read_lock_sched_held+0x108/0x120 [ 43.107040] ? kmem_cache_free+0x249/0x280 [ 43.111244] ? dentry_free+0xd2/0x130 [ 43.115011] ? locks_remove_file+0x3fa/0x5a0 [ 43.119383] ? fcntl_setlk+0x10d0/0x10d0 [ 43.123410] ? __fsnotify_parent+0xb4/0x3a0 [ 43.127697] ? fsnotify+0x1af0/0x1af0 [ 43.131468] sock_release+0x8d/0x1e0 [ 43.135147] ? sock_release+0x8d/0x1e0 [ 43.139016] ? sock_release+0x1e0/0x1e0 [ 43.142955] sock_close+0x16/0x20 [ 43.146373] __fput+0x333/0x7f0 [ 43.149622] ? fput+0x140/0x140 [ 43.152867] ? check_same_owner+0x320/0x320 [ 43.157154] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.161628] ____fput+0x15/0x20 [ 43.164886] task_work_run+0x199/0x270 [ 43.168753] ? task_work_cancel+0x210/0x210 [ 43.173056] ? _raw_spin_unlock+0x22/0x30 [ 43.177176] ? switch_task_namespaces+0x87/0xc0 [ 43.181813] do_exit+0xa52/0x1b40 [ 43.185229] ? plist_check_list+0xa0/0xa0 [ 43.189350] ? plist_del+0x47b/0x990 [ 43.193030] ? mm_update_next_owner+0x930/0x930 [ 43.197665] ? plist_add+0x760/0x760 [ 43.201351] ? check_same_owner+0x320/0x320 [ 43.205643] ? find_held_lock+0x39/0x1d0 [ 43.209674] ? check_noncircular+0x20/0x20 [ 43.213874] ? lock_downgrade+0x990/0x990 [ 43.218040] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 43.223378] ? find_held_lock+0x39/0x1d0 [ 43.227407] ? lock_downgrade+0x990/0x990 [ 43.231520] ? recalc_sigpending_tsk+0x117/0x150 [ 43.236240] ? recalc_sigpending+0x103/0x160 [ 43.240622] ? recalc_sigpending_tsk+0x150/0x150 [ 43.245352] ? get_signal+0x397/0x17e0 [ 43.249210] do_group_exit+0x149/0x400 [ 43.253064] ? __lock_is_held+0xbc/0x140 [ 43.257093] ? SyS_exit+0x30/0x30 [ 43.260523] ? _raw_spin_unlock_irq+0x27/0x70 [ 43.264986] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 43.269971] get_signal+0x7e8/0x17e0 [ 43.273667] ? ptrace_notify+0x130/0x130 [ 43.277707] ? __fget+0xbb/0x580 [ 43.281041] ? __lockdep_init_map+0xe4/0x650 [ 43.285421] ? lock_release+0xd70/0xd70 [ 43.289366] ? exit_robust_list+0x240/0x240 [ 43.293688] do_signal+0x94/0x1ee0 [ 43.297209] ? iterate_fd+0x3f0/0x3f0 [ 43.300976] ? setup_sigcontext+0x7d0/0x7d0 [ 43.305264] ? __lock_is_held+0xbc/0x140 [ 43.309299] ? __fget_light+0x29d/0x390 [ 43.313244] ? selinux_tun_dev_create+0xc0/0xc0